apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubernetes-test-ha-application-with-mysql-deployment
  labels:
    app: kubernetes-test-ha-application-with-mysql
spec:
  replicas: 3
  selector:
    matchLabels:
      app: kubernetes-test-ha-application-with-mysql
  template:
    metadata:
      labels:
        app: kubernetes-test-ha-application-with-mysql
    spec:
      containers:
        - name: kubernetes-test-ha-application-with-mysql
          image: packtworkshops/the-kubernetes-workshop:demo-app-with-mysql
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
          env:
            - name: CONN_STRING
              valueFrom:
                secretKeyRef:
                  key: CONN_STRING
                  name: mysql-secret-config
