From c3783c3b6a676ab4e7a78a30525f9c6f1e470f21 Mon Sep 17 00:00:00 2001 From: Shanica Date: Tue, 12 Jun 2018 02:58:27 +0300 Subject: [PATCH] Add a note regarding escaping characters (#8844) * Add a note regarding escaping characters Updated docs with a note regarding escaping characters, it's important because it won't work well otherwise. * Update secret.md * No escape required for --from-file Feedback from @mengqiy --- content/en/docs/concepts/configuration/secret.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/en/docs/concepts/configuration/secret.md b/content/en/docs/concepts/configuration/secret.md index 8177fce0c8..336e3f3340 100644 --- a/content/en/docs/concepts/configuration/secret.md +++ b/content/en/docs/concepts/configuration/secret.md @@ -532,6 +532,14 @@ secret "prod-db-secret" created $ kubectl create secret generic test-db-secret --from-literal=username=testuser --from-literal=password=iluvtests secret "test-db-secret" created ``` +{{< note >}} +**Note:** 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: + + 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`). +{{< /note >}} Now make the pods: