配置传入ConfigMap
使用命令创建
kubectl create configmap myconfigmap --from-literal=foo=bar --from-literal=one=two# 先通过key=value的方式创建环境变量的文件 cat << EOF > env.txt > config1=xxx > config2=yyy > EOF # 使用k8s命令创建 kubectl create configmap myconfigmap --from-env-file=env.txtkubectl create configmap myconfigmap --from-file=config-file.confkubectl create configmap myconfigmap --from-file=customkey=config-file.conf
使用配置文件创建
Last updated