apiVersion: v1
kind: Pod
metadata:
  name: web
  labels:
    app: web
spec:
  containers:
    - name: otus-nginx
      image: vitrez/otus-nginx:latest
      imagePullPolicy: Always
      volumeMounts:
        - name: web-volume
          mountPath: /app
  initContainers:
    - name: init
      image: busybox:latest
      command: ['sh', '-c', 'wget -O- https://tinyurl.com/otus-k8s-intro | sh']
      volumeMounts:
        - name: web-volume
          mountPath: /app
  restartPolicy: Always
  hostNetwork: true
  dnsPolicy: ClusterFirstWithHostNet
  volumes:
    - name: web-volume
      emptyDir: {}
