【发布时间】:2021-10-27 18:53:51
【问题描述】:
我正在尝试使用Bitnami Redis HELM Chart 在 Kubernetes 环境中安装 Redis。我想使用定义的密码而不是随机生成的密码。但是当我想使用 redis-cli 连接到 redis 主服务器或副本时,我在下面遇到错误。
I have no name!@redis-client:/$ redis-cli -h redis-master -a $REDIS_PASSWORD
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
Warning: AUTH failed
我创建了一个这样的 Kubernetes 机密。
---
apiVersion: v1
kind: Secret
metadata:
name: redis-secret
namespace: redis
type: Opaque
data:
redis-password: YWRtaW4xMjM0Cg==
在 values.yaml 文件中,我更新了如下所示的身份验证规范。
auth:
enabled: true
sentinel: false
existingSecret: "redis-secret"
existingSecretPasswordKey: "redis-password"
usePasswordFiles: false
如果我没有定义existingSecret 字段并使用随机生成的密码,那么我可以毫无问题地连接。在Warning: AUTH failed 错误之后,我也尝试了AUTH admin1234,但它也不起作用。
【问题讨论】:
标签: kubernetes redis kubernetes-helm bitnami