Skip to content

Commit

Permalink
Simplify the update REC credential step
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitlynmichael committed Feb 7, 2025
1 parent 56778da commit 850677e
Showing 1 changed file with 7 additions and 32 deletions.
39 changes: 7 additions & 32 deletions content/operate/kubernetes/security/manage-rec-credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,12 @@ curl -k --request POST \

3. From outside the pod, update the REC credential secret.

3a. Save the existing username to a text file.

```sh
echo -n "<current_username>" > username
```

3b. Save the new password to a text file.

```sh
echo -n "<new_password>" > password
```

3c. Update the REC credential secret.

```sh
kubectl create secret generic <cluster_secret_name> \
--from-file=./username \
--from-file=./password --dry-run \
--save-config \
--dry-run=client \
--from-literal=username=<username> \
--from-literal=password=<password> \
-o yaml | \
kubectl apply -f
```
Expand Down Expand Up @@ -119,27 +107,14 @@ curl -k --request DELETE \

4. Update the REC credential secret:

4a. Save the new username to a text file.

```sh
echo -n "<new_username>" > username
```

4b. Save the new password to a text file.

```sh
echo -n "<new_password>" > password
```

4c. Update the REC credential secret.

```sh
kubectl create secret generic <cluster_secret_name> \
--save-config \
--dry-run=client \
--from-file=./username --from-file=./password \
--from-literal=username=<username> \
--from-literal=password=<password> \
-o yaml | \
kubectl apply -f
kubectl apply -f
```

5. Wait five minutes for all the components to read the new password from the updated secret. If you proceed to the next step too soon, the account could get locked.
Expand Down

0 comments on commit 850677e

Please sign in to comment.