1.创建两个环境变量
[root@node-1 configmap]# cat env.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: env-config
data:
http_port: '18080'
ssh_port: '1022'
[root@node-1 configmap]#
[root@node-1 configmap]# kubectl create -f env.yaml
configmap/env-config created
[root@node-1 configmap]# kubectl describe configmaps env-config
Name: env-config
Namespace: default
Labels: