apiVersion: v1
kind: Pod
metadata:
  name: sharing-data
  labels:
    app: sharing-data
spec:
  containers:
    - name: nginx1
      image: nginx:mainline
      imagePullPolicy: IfNotPresent
      ports:
        - containerPort: 80
      volumeMounts:
        - mountPath: /usr/share/nginx/html/index.html
          subPath: index.html
          name: index-html-nginx
          readOnly: true
    - name: nginx2
      image: bitnami/nginx
      imagePullPolicy: IfNotPresent
      ports:
        - containerPort: 8080
      volumeMounts:
        - mountPath: /app/index.html
          subPath: index.html
          name: index-html-nginx
          readOnly: true
  volumes:
    - name: index-html-nginx
      hostPath:
        path: /data/nginx/html
        type: DirectoryOrCreate
  restartPolicy: Always
