Skip to content

Instantly share code, notes, and snippets.

@lemonlatte
Created November 2, 2017 04:43
Show Gist options
  • Save lemonlatte/4dfa94734e9f2adda774946df6759615 to your computer and use it in GitHub Desktop.
Save lemonlatte/4dfa94734e9f2adda774946df6759615 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
data:
example.conf: |
{
"host": "localhost"
}
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: example
labels:
app: example
spec:
strategy:
type: Recreate
template:
metadata:
labels:
app: example
spec:
containers:
- name: example
image: ubuntu
resources:
requests:
cpu: 500m
memory: 512m
volumeMounts:
- name: config-volume
mountPath: /.config/
volumes:
- name: config-volume
configMap:
name: example-config
items:
- key: example.conf
path: example.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment