apiVersion: v1
kind: Pod
metadata:
  name: web
  labels:
    app: web
spec:
  containers:
  - name: web
    image: demshin/nginx
    volumeMounts:
      - mountPath: /app
        name: app
    # readinessProbe:
    #   httpGet:
    #     port: 80
    #     path: /index.html
    livenessProbe:
            tcpSocket:
              port: 8000
  initContainers:
    - name: init-app
      image: busybox:1.32.0
      command: ['sh', '-c', 'wget -O- https://tinyurl.com/otus-k8s-intro | sh']
      volumeMounts:
        - mountPath: /app
          name: app
  volumes:
    - name: app
      emptyDir: {}
