#apiVersion: apps/v1beta1
#kind: Deployment
#metadata:
#  name: nginx
#  labels:
#    app: symfony
#spec:
#  replicas: 1
#  strategy:
#    type: Recreate
#  template:
#    metadata:
#      labels:
#        app: symfony
#        tier: backend
#    spec:
#      restartPolicy: Always
#      containers:
#      - name: nginx
#        image: nginx
#        ports:
#        - containerPort: 80

apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
spec:
  volumes:
    - name: www-storage
      persistentVolumeClaim:
       claimName: www-claim
  containers:
    - name: www-container
      image: nginx
      ports:
        - containerPort: 80
          name: "http-server"
      volumeMounts:
      - mountPath: "/usr/share/nginx/html"
        name: www-storage

apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
  labels:
    app: nginx
spec:
  volumes:
    - name: www-storage
      persistentVolumeClaim:
       claimName: www-claim
  containers:
    - name: www-container
      image: nginx
      ports:
        - containerPort: 80
          name: "http-server"
      volumeMounts:
      - mountPath: "/usr/share/nginx/html"
        name: www-storage

---

apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  type: NodePort
  selector:
    app: nginx
  ports:
    - port: 80

Set nodePort as service type
Set nodePort as service type
