Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active August 5, 2019 17:02
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 abhirockzz/9e6a65545e033b64b2b2367bea6bed6f to your computer and use it in GitHub Desktop.
Save abhirockzz/9e6a65545e033b64b2b2367bea6bed6f to your computer and use it in GitHub Desktop.
simple config map with pod using the its data
apiVersion: v1
kind: ConfigMap
metadata:
name: simpleconfig
data:
foo: bar
hello: world
---
apiVersion: v1
kind: Pod
metadata:
name: pod2
spec:
containers:
- name: nginx
image: nginx
env:
- name: FOO_ENV_VAR
valueFrom:
configMapKeyRef:
name: simpleconfig
key: foo
- name: HELLO_ENV_VAR
valueFrom:
configMapKeyRef:
name: simpleconfig
key: hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment