Fix password example for kubectl create secret (#14142)
Add extra '\' to properly escape '\' for --from-literal example.
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
b17d809a4c
commit
367afa62a4
@@ -78,7 +78,7 @@ secret "db-user-pass" created
|
|||||||
{{< note >}}
|
{{< note >}}
|
||||||
Special characters such as `$`, `\*`, and `!` require escaping.
|
Special characters such as `$`, `\*`, and `!` require escaping.
|
||||||
If the password you are using has special characters, you need to escape them using the `\\` character. For example, if your actual password is `S!B\*d$zDsb`, you should execute the command this way:
|
If the password you are using has special characters, you need to escape them using the `\\` character. For example, if your actual password is `S!B\*d$zDsb`, you should execute the command this way:
|
||||||
kubectl create secret generic dev-db-secret --from-literal=username=devuser --from-literal=password=S\\!B\\\*d\\$zDsb
|
kubectl create secret generic dev-db-secret --from-literal=username=devuser --from-literal=password=S\\!B\\\\*d\\$zDsb
|
||||||
You do not need to escape special characters in passwords from files (`--from-file`).
|
You do not need to escape special characters in passwords from files (`--from-file`).
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user