# Now let's create a deployment in that namespace that contains 2 versions of the same app...
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: frontend
  name: frontend-deployment
spec:
  replicas: 4
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1 # Maximum number of pods we allow above the number of replicas (i.e. 5)
      maxUnavailable: 1  # Minimum number of pods that has to be available
  selector:
    matchLabels:
      app: frontend-deployment
  template:
    metadata:
      labels:
        app: frontend-deployment # the label for the pods and the deployments
        env: prod
    spec:
      containers:
      - name: sample
        image: tpayne666/samples:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 8080 # the application listens to this port