Last active
February 8, 2023 22:58
-
-
Save mbigras/18c4000ac2ad1c730dc551931bb88b29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: myconfig | |
data: | |
HELLO: world | |
SPAM: eggs | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: mypod | |
spec: | |
restartPolicy: Never | |
containers: | |
- name: mycontainer | |
image: registry.k8s.io/busybox | |
command: | |
- /bin/echo | |
- Hello world! | |
- Env var HELLO is "$HELLO"—surprise!. # Incorrect shell form. | |
- Env var SPAM is "$(SPAM)"—expected. # Correct $(VAR_NAME) Kubernetes substitution syntax—see https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#use-configmap-defined-environment-variables-in-pod-commands. | |
envFrom: | |
- configMapRef: | |
name: myconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment