---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: randomizer
  labels:
    app: flask
spec:
  selector:
    matchLabels:
      app: flask
  replicas: 3
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: flask
    spec:
      containers:
      - name: randomizer
        image: randomizer
        imagePullPolicy: Never
        env:
        - name: MYSQL_DB_HOST
          value: mysql
        ports:
        - containerPort: 8000
          name: flask-container
---
apiVersion: v1
kind: Service
metadata:
  name: randomizer
  labels:
    app: flask
spec:
  ports:
  - port: 8000
    protocol: TCP
    name: flask
  selector:
    app: flask
  type: LoadBalancer
...

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: randomizer
  labels:
    app: flask
spec:
  selector:
    matchLabels:
      app: flask
  replicas: 3
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: flask
    spec:
      containers:
      - name: randomizer
        image: randomizer
        imagePullPolicy: Never
        env:
        - name: MYSQL_DB_HOST
          value: mysql
        ports:
        - containerPort: 8000
          name: flask-container
---
apiVersion: v1
kind: Service
metadata:
  name: randomizer
  labels:
    app: flask
spec:
  ports:
  - port: 8000
    protocol: TCP
    name: flask
  selector:
    app: flask
  type: LoadBalancer
...

Fix the RollingUpdate Aspect of K8s Deployment
Fix the RollingUpdate Aspect of K8s Deployment

Update the app-deployment.yml file to reflect that the Deployment should
use the RollingUpdate method of updating the application to ensure
zero-downtime updates.
