apiVersion: v1
kind: Pod
metadata:
  labels:
    app: http-app
  name: web
spec:
  volumes:
  - name: app
    emptyDir: {}
  containers:
  - image: vsb2007/http-app
    readinessProbe: # Добавим проверку готовности
      httpGet: # веб-сервера отдавать
        path: /index.html # контент
        port: 80
    livenessProbe:
      tcpSocket: { port: 8000 }
    name: web
    volumeMounts:
    - name: app
      mountPath: /app
  initContainers:
  - image: busybox:1.31.0
    name: init-index
    command: ['sh', '-c', 'wget -O- https://raw.githubusercontent.com/express42/otus-platform-snippets/master/Module-02/Introduction-to-Kubernetes/wget.sh | sh']
    volumeMounts:
    - name: app
      mountPath: /app
