apiVersion: apps/v1
kind: Deployment
metadata:
  name: app
  labels:
    tier: web
    name: nginx-app
spec:
  template:
    metadata:
      name: pod-nginx
      labels:
        name: nginx
        tier: web
    spec:
      containers:
        - name: nginximage
          image: nginx
  replicas: 3
  selector:
    matchLabels:
      name: nginx
      tier: web
---
apiVersion: v1
kind: Service
metadata:
  name: app
  labels:
    name: nginx-app
spec:
  type: NodePort
  ports:
    - port: 80
      targetPort: 80
      nodePort: 30010
  selector:
    name: nginx
    tier: web
