k8s通过yaml 文件创建保密字典
cat k8s-test-secret.yamlapiVersion: v1kind: Secretmetadata: name: k8s-test-secret namespace: k8s-testtype: OpaquestringData: redis_host: "127.0.0.1" redis_password: "123456" redis_port...
·
cat k8s-test-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: k8s-test-secret
namespace: k8s-test
type: Opaque
stringData:
redis_host: "127.0.0.1"
redis_password: "123456"
redis_port: "6579"
部署
kubectl apply -f k8s-test-secret.yaml
更多推荐
已为社区贡献5条内容
所有评论(0)