Last active
November 4, 2019 22:17
-
-
Save GauntletWizard/5c10002e3c2ba60d2943b4b13783f39e to your computer and use it in GitHub Desktop.
This file contains hidden or 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: init-demo | |
| spec: | |
| template: | |
| spec: | |
| hostNetwork: true | |
| containers: | |
| - name: nginx | |
| image: nginx | |
| ports: | |
| - containerPort: 80 | |
| volumeMounts: | |
| - name: workdir | |
| mountPath: /usr/share/nginx/html | |
| # These containers are run during pod initialization | |
| initContainers: | |
| - name: install | |
| image: busybox | |
| command: | |
| - wget | |
| - "-O" | |
| - "/work-dir/index.html" | |
| - http://kubernetes.io | |
| volumeMounts: | |
| - name: workdir | |
| mountPath: "/work-dir" | |
| dnsPolicy: Default | |
| volumes: | |
| - name: workdir | |
| emptyDir: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment