Looking for answer

Create a second pod name pod-secrets-via-env, using the redis image, which exports password as TOPSECRET? is there a way to export password via secrets?

Hello, siva.s.kumar
You can do with env field. [Pod.spec.containers.env]

1 Like

Thanks player001! that helps!

Is it right answer?

apiVersion: v1
kind: Pod
metadata:
name: pod-secrets-via-env
spec:
containers:

  • name: redis
    image: redis
    env:
    • name: password
      value: CONFIDENTIAL

Hi @ashok.aix432,
No, he wanted to take values from the secret in the above case.
Please have a look at this example.

Regards,