0%

kubectl-command

创建secret

echo -n "password"|base64
# cGFzc3dvcmQ=
echo "cGFzc3dvcmQ=" | base64 --decode
# password

secret.yaml

apiVersion: v1
kind: Secret
metadata:
name: my-secret
type: Opaque
data:
password: cGFzc3dvcmQ== # password

kubectl apply -f secret.yaml 创建

kubectl get secret my-secret -o yaml 查看

欢迎关注我的其它发布渠道