Skip to content

Instantly share code, notes, and snippets.

@watiko
Created June 11, 2018 16:02
Show Gist options
  • Save watiko/50eaf893418ca4b9f4129f387fbbe641 to your computer and use it in GitHub Desktop.
Save watiko/50eaf893418ca4b9f4129f387fbbe641 to your computer and use it in GitHub Desktop.
Kubernetes envFrom with env
apiVersion: v1
kind: ConfigMap
metadata:
name: myconf
data:
TEST_KEY: my-value
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mydep
spec:
replicas: 1
template:
spec:
containers:
- name: myapp
image: alpine
command:
- sleep
- '10000'
envFrom:
- configMapRef:
name: myconf
env:
- name: GEN_TEST_KEY
value: 'PREFIX_$(TEST_KEY)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment