Hi, for secrets, i've got the last question "08" working with --from-literal way . . .

Raja K:
Hi, for secrets, i’ve got the last question “08” working with --from-literal way of creating the secret.
But when i tried to create using a Secret yaml with base64 encoded, the webapp always fail to connect to mysql. It introduces a space at the end to the decoded password. Am i missing something?
Here’s the data part of the secrets.yaml

  DB_Host: c3FsMDEK
  DB_Password: cGFzc3dvcmQxMjMK
  DB_User: cm9vdAo=

Here’s the screenshot comparison of --from-literal vs file (you can notice a blank space at the end of each prop).

Hello, @Raja K
Please use -n flag,

echo -n "root" | base64

Raja K:
Nice catch @Tej_Singh_Rana by default echo adds a new line and -n would prevent that. Let me try this. Thanks.