Skip to content

CKAD-exercises | configuration | Secrets | env vs envFrom #380

@eddiedlopez

Description

@eddiedlopez

Create a Secret named 'ext-service-secret' in the namespace 'secret-ops'. Then, provide the key-value pair API_KEY=LmLHbYhsgWZwNifiqaRorH8T as literal.

Consuming the Secret. Create a Pod named 'consumer' with the image 'nginx' in the namespace 'secret-ops' and consume the Secret as an environment variable. Then, open an interactive shell to the Pod, and print all environment variables.

There's no need to use env -> name -> valueFrom -> secretKeyRef name/key to rename the key API_KEY.

envFrom -> secretRef -> name will suffice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions