Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created December 2, 2022 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/39e303282ff800e79db4258d4615c6e6 to your computer and use it in GitHub Desktop.
Save anjanashankar9/39e303282ff800e79db4258d4615c6e6 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: configmap-example-pod
spec:
containers:
- name: example-container
image: alpine
command: ["sleep", "3600"]
env:
# Define the environment variable
- name: LICENSE # Environment Variable name, can be different from configmap key
valueFrom:
configMapKeyRef:
name: example-config # The ConfigMap this value comes from.
key: license # The key to fetch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment