apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.8
        ports:
        - containerPort: 80
        volumeMounts:
        - mountPath: "/usr/share/nginx/html"
          name: nginx-vol
      volumes:
      - name: nginx-vol
        emptyDir: {}
        # hostPath: 
        #   path: " /var/data"

# kubectl create -f nginx_deployment.yaml
# kubectl get pods -l app=nginx
# kubectl replace -f nginx_deployment.yaml
# kubectl apply -f nginx_deployment.yaml
# kubectl delete -f nginx-deployment.yaml

# kubectl get pods
# kubectl exec -it nginx-deployment-5c678cfb6d-lg9lw bash