Skip to content

Instantly share code, notes, and snippets.

@GauntletWizard
Last active November 4, 2019 22:17
Show Gist options
  • Select an option

  • Save GauntletWizard/5c10002e3c2ba60d2943b4b13783f39e to your computer and use it in GitHub Desktop.

Select an option

Save GauntletWizard/5c10002e3c2ba60d2943b4b13783f39e to your computer and use it in GitHub Desktop.
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