Skip to content

Instantly share code, notes, and snippets.

@tom-code
Last active January 18, 2019 16:33
Show Gist options
  • Select an option

  • Save tom-code/a5640dc3ba20ef957767e1595f4e309a to your computer and use it in GitHub Desktop.

Select an option

Save tom-code/a5640dc3ba20ef957767e1595f4e309a to your computer and use it in GitHub Desktop.
kubernetes configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: config1
labels:
app: vla
data:
config1.json: ' {
"aaa": "ccc"
}'
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: baf
spec:
selector:
matchLabels:
app: baf
replicas: 1
template:
metadata:
labels:
app: baf
spec:
containers:
- name: baf
imagePullPolicy: Never
image: ubu
ports:
- containerPort: 80
stdin: true
tty: true
volumeMounts:
- name: config1
mountPath: /etc/config1
volumes:
- name: config1
configMap:
name: config1
cat /etc/config1/config1.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment