parent
5e3a617419
commit
3527f95fbc
@ -0,0 +1,109 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: flask-consul
|
||||
namespace: consulmanager
|
||||
labels:
|
||||
service: flask-consul
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
service: flask-consul
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
service: flask-consul
|
||||
spec:
|
||||
containers:
|
||||
- name: flask-consul
|
||||
image: 'swr.cn-south-1.myhuaweicloud.com/starsl.cn/flask-consul:latest'
|
||||
ports:
|
||||
- name: http-2026
|
||||
containerPort: 2026
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: admin_passwd
|
||||
value: Admin@123
|
||||
- name: consul_token
|
||||
value: 27f38cb5-76b1-11dd-ba75-85d6aae1647e
|
||||
- name: consul_url
|
||||
value: 'http://192.168.31.150:8500/v1'
|
||||
- name: log_level
|
||||
value: INFO
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
imagePullPolicy: Always
|
||||
restartPolicy: Always
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: flask-consul
|
||||
namespace: consulmanager
|
||||
labels:
|
||||
app: flask-consul
|
||||
spec:
|
||||
ports:
|
||||
- name: http-2060
|
||||
protocol: TCP
|
||||
port: 2026
|
||||
targetPort: 2026
|
||||
selector:
|
||||
service: flask-consul
|
||||
type: ClusterIP
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: nginx-consul
|
||||
namespace: consulmanager
|
||||
labels:
|
||||
service: nginx-consul
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
service: nginx-consul
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
service: nginx-consul
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx-consul
|
||||
image: 'swr.cn-south-1.myhuaweicloud.com/starsl.cn/nginx-consul:latest'
|
||||
ports:
|
||||
- name: http-1026
|
||||
containerPort: 1026
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
resources:
|
||||
limits:
|
||||
cpu: '1'
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: '1'
|
||||
memory: 1Gi
|
||||
imagePullPolicy: Always
|
||||
restartPolicy: Always
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: nginx-consul
|
||||
namespace: consulmanager
|
||||
labels:
|
||||
service: nginx-consul
|
||||
spec:
|
||||
ports:
|
||||
- name: nginx-consul
|
||||
protocol: TCP
|
||||
port: 1026
|
||||
targetPort: 1026
|
||||
nodePort: 31800
|
||||
selector:
|
||||
service: nginx-consul
|
||||
type: NodePort
|
Loading…
Reference in new issue