Last active
April 12, 2021 05:12
-
-
Save cahyowhy/e4cfe3810b41597b8140eb2d5bfcbe69 to your computer and use it in GitHub Desktop.
hello-deployment-vol.yaml
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: hello | |
labels: | |
app: hello | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: hello | |
template: # pod template follows | |
metadata: | |
labels: | |
app: hello | |
spec: | |
containers: | |
- name: hello | |
image: cahyowhy/junk:1.0 | |
envFrom: | |
- configMapRef: | |
name: hello-config | |
- secretRef: | |
name: hello-secret | |
volumeMounts: | |
- name: data-vol | |
mountPath: /testdata # mounted inside pod/container | |
volumes: | |
- name: data-vol | |
hostPath: | |
path: /d/script/go-simple-docker-kube-hello-deployment-vol/testdata # actual path on this machine [host path] [in production we would use awsElasticBlockStore or gcePersistendDisk] | |
terminationGracePeriodSeconds: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment