Kubernetes(K8S) 配置管理 Secret 介绍

Secret
作用:加密数据(base64)存在 etcd 里面,让 Pod 容器以挂载 Volume 方式进行访问
场景:凭证

[root@k8smaster ~]# echo -n 'admin' | base64
# 创建 secret
[root@k8smaster ~]# kubectl create -f secret.yaml
# 查看 secret
[root@k8smaster ~]# kubectl get secret.yaml

image
image
image

以 Volume 形式挂载 Pod 容器中

image
image

posted @ 2022-12-01 12:02  VipSoft  阅读(160)  评论(0)    收藏  举报