Search code examples
kuberneteskubernetes-secrets

Why does the output of the secret from the kubernetes job not show the actual value?


Can anyone tell me why the out put of this job come out as not text?

Job.yaml

the output is �ǫ when its supposed to be user

the secret looks like this: Secret.yaml


Solution

  • Because the secret value was not base64 encoded during creation. Use stringData for un-encoded value:

    ...
    stringData:
      username: user
      password: password