|NO.Z.00263|——————————|CloudNative|——|KuberNetes&中间件容器化及helm.V10|——|中间件.v10|redis.v5.0.4|redis自定义账号密码|

一、redis集群自定义账号密码
### --- 自定义账号密码

[root@k8s-master01 redis-cluster-operator]# more deploy/example/custom-password.yaml 
apiVersion: v1
kind: Secret
metadata:
  annotations:
    # if your operator run as cluster-scoped, add this annotations
    redis.kun/scope: cluster-scoped
  name: mysecret
type: Opaque
data:
  password: MWYyZDFlMmU2N2Rm
### --- 查看账号密码;账号面是经过base64加密的,更改的时候也需要通过base64加密

[root@k8s-master01 redis-cluster-operator]# echo "MWYyZDFlMmU2N2Rm" | base64
TVdZeVpERmxNbVUyTjJSbQo=
### --- 更改密码为password,先通过base64加密

[root@k8s-master01 redis-cluster-operator]# echo "password" | base64
cGFzc3dvcmQK
### --- 然后更改custom-password.yaml 中的参数

[root@k8s-master01 redis-cluster-operator]# more deploy/example/custom-password.yaml 
    # if your operator run as cluster-scoped, add this annotations
    redis.kun/scope: cluster-scoped
  name: mysecret
type: Opaque
data:
  password: cGFzc3dvcmQK        // 更改密码参数即可

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on 2022-03-31 13:28  yanqi_vip  阅读(49)  评论(0)    收藏  举报

导航