configmap/secret
1164 ワード
configmap
kubectl create configmap test-configmap --namespace="sock-shop" --from-literal=DBCONN="tcp(10.246.112.3:3306)/socksdb" --from-literal=DBUSER="catalogue_user" --from-literal=DBPASSWD="default_password"
kubectl get configmap test-configmap -o yaml

complete-demo.yamlファイル

test-configmapファイルyamlフォーマット
secret

test-secret.yamlファイル
echo -n 'catalogue_user' | base64
echo -n 'default_password' | base64
echo -n 'tcp(10.246.112.3:3306)/socksdb' | base64
kubectl apply -f test-secret.yaml

test-secretファイルyamlフォーマット

complete-demo.yamlファイル
Reference
この問題について(configmap/secret), 我々は、より多くの情報をここで見つけました https://velog.io/@sykim/configmapsecretテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol