apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  labels:
    app: my-nginx
    tier: frontend
spec:
  replicas: 2
  selector: # Pod template label(s)
    matchLabels:
      tier: frontend
  template: # template used to create the Pods
    metadata:
      labels:
        tier: frontend
    spec:
      containers:
        - name: my-nginx
          image: nginx:alpine
