|
@ -1,23 +1,23 @@ |
|
|
apiVersion: apps/v1 #指定API版本标签 |
|
|
apiVersion: apps/v1 #指定API版本标签 |
|
|
kind: Deployment #定义资源的类型/角色,deployment为控制器,service,endpoints |
|
|
kind: Deployment #定义资源的类型/角色,deployment为控制器,service,endpoints |
|
|
metadata: #定义资源的元数据信息 |
|
|
metadata: #定义资源的元数据信息 |
|
|
name: goupload-deployment #定义资源的名称,在同一个namespace空间中必须是唯一的 |
|
|
name: goinout-deployment #定义资源的名称,在同一个namespace空间中必须是唯一的 |
|
|
namespace: lk #默认default |
|
|
namespace: lk #默认default |
|
|
labels: #定义资源标签 |
|
|
labels: #定义资源标签 |
|
|
app: yaml-goupload-d |
|
|
app: yaml-goinout-d |
|
|
spec: |
|
|
spec: |
|
|
replicas: 1 #定义副本数量 |
|
|
replicas: 1 #定义副本数量 |
|
|
selector: #定义选择器 |
|
|
selector: #定义选择器 |
|
|
matchLabels: #匹配上边的标签 |
|
|
matchLabels: #匹配上边的标签 |
|
|
app: yaml-goupload-d #名称 |
|
|
app: yaml-goinout-d #名称 |
|
|
template: #定义模板 |
|
|
template: #定义模板 |
|
|
metadata: |
|
|
metadata: |
|
|
labels: |
|
|
labels: |
|
|
app: yaml-goupload-d |
|
|
app: yaml-goinout-d |
|
|
spec: |
|
|
spec: |
|
|
containers: |
|
|
containers: |
|
|
- name: yaml-goupload #容器名,与标签名要相同 |
|
|
- name: yaml-goinout #容器名,与标签名要相同 |
|
|
image: registry.ngaiot.com/local/git-goupload-image:12 |
|
|
image: registry.ngaiot.com/local/in-out-image:24 |
|
|
imagePullPolicy: IfNotPresent |
|
|
imagePullPolicy: IfNotPresent |
|
|
volumeMounts: |
|
|
volumeMounts: |
|
|
- name: config |
|
|
- name: config |
|
@ -26,14 +26,14 @@ spec: |
|
|
volumes: # volumes和container处于同一层级,别搞错了 |
|
|
volumes: # volumes和container处于同一层级,别搞错了 |
|
|
- name: config |
|
|
- name: config |
|
|
configMap: |
|
|
configMap: |
|
|
name: config-goupload |
|
|
name: config-goinout |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
--- |
|
|
apiVersion: v1 |
|
|
apiVersion: v1 |
|
|
kind: ConfigMap |
|
|
kind: ConfigMap |
|
|
metadata: |
|
|
metadata: |
|
|
name: config-goupload |
|
|
name: config-goinout |
|
|
namespace: lk |
|
|
namespace: lk |
|
|
data: #监测因素 统计字段表 |
|
|
data: #监测因素 统计字段表 |
|
|
config.json: | |
|
|
config.json: | |