apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: chp09-set936
  name: kubia
spec:
  selector:
    matchLabels:
      app: kubia # match spec.template.metadata.labels.app
  replicas: 3
  minReadySeconds: 10 # life of new successful pod before it's considered available
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0 # make deployment replace pods one by one
    type: RollingUpdate
  template:
    metadata:
      name: kubia
      labels:
        app: kubia # match spec.selector.matchLabels.app
        app.kubernetes.io/version: "3.0"
    spec:
      containers:
      - image: georgebaptista/kubia:v3 # bad container
        name: nodejs
        readinessProbe:
          periodSeconds: 1 # readiness probe executed every second
          httpGet: # readiness probe test
            path: /
            port: 8080
