Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8s: Simplify the update REC credential step #1147

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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