Skip to content

Commit 011050a

Browse files
committed
Add instructions for retrieving Redis password based on OS in Redis Streams setup
Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com>
1 parent 5ec35c3 commit 011050a

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

daprdocs/content/en/reference/components-reference/supported-pubsub/setup-redis-pubsub.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ You can use [Helm](https://helm.sh/) to quickly create a Redis instance in our K
101101
- name: redisHost
102102
value: redis-master:6379
103103
```
104+
105+
4. Next, we'll get our Redis password, which is slightly different depending on the OS we're using:
106+
- **Windows**: Run `kubectl get secret --namespace default redis -o jsonpath="{.data.redis-password}" > encoded.b64`, which will create a file with your encoded password. Next, run `certutil -decode encoded.b64 password.txt`, which will put your redis password in a text file called `password.txt`. Copy the password and delete the two files.
107+
108+
- **Linux/MacOS**: Run `kubectl get secret --namespace default redis -o jsonpath="{.data.redis-password}" | base64 --decode` and copy the outputted password.
109+
110+
Add this password as the `redisPassword` value in your redis.yaml file. For example:
111+
112+
```yaml
113+
- name: redisPassword
114+
value: "lhDOkwTlp0"
115+
```
116+
104117
## Redis Sentinel configuration
105118

106119
When using Redis Sentinel for high availability, set `redisType` to `"node"`, enable failover mode with `failover: "true"`, and provide the sentinel master name. Multiple sentinel addresses can be specified as a comma-separated list in the `redisHost` field for redundancy.
@@ -124,17 +137,6 @@ When using Redis Sentinel for high availability, set `redisType` to `"node"`, en
124137
value: "mymaster"
125138
```
126139

127-
4. Next, we'll get our Redis password, which is slightly different depending on the OS we're using:
128-
- **Windows**: Run `kubectl get secret --namespace default redis -o jsonpath="{.data.redis-password}" > encoded.b64`, which will create a file with your encoded password. Next, run `certutil -decode encoded.b64 password.txt`, which will put your redis password in a text file called `password.txt`. Copy the password and delete the two files.
129-
130-
- **Linux/MacOS**: Run `kubectl get secret --namespace default redis -o jsonpath="{.data.redis-password}" | base64 --decode` and copy the outputted password.
131-
132-
Add this password as the `redisPassword` value in your redis.yaml file. For example:
133-
134-
```yaml
135-
- name: redisPassword
136-
value: "lhDOkwTlp0"
137-
```
138140
{{% /tab %}}
139141

140142
{{% tab "AWS" %}}

0 commit comments

Comments
 (0)