apiVersion: apps/v1
# k8s config file type
kind: Deployment
metadata:
  # deployment name
  name: nginx-deployment
  # service selector matches with depl. label
  labels:
    app: nginx
spec:
  replicas: 2
  selector: 
    # depl. selector label matches with template/pod label 
    matchLabels:
      app: nginx
  # blue print of the Pod
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.16
        # it matches with Service targetPort
        ports:
        - containerPort: 8080