apiVersion: apps/v1 kind: Deployment metadata: name: mosquitto spec: progressDeadlineSeconds: 600 replicas: 1 selector: matchLabels: app.kubernetes.io/instance: mosquitto app.kubernetes.io/name: mosquitto strategy: type: Recreate template: metadata: labels: app.kubernetes.io/instance: mosquitto app.kubernetes.io/name: mosquitto spec: containers: - image: eclipse-mosquitto:2.0.22-openssl imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 periodSeconds: 10 successThreshold: 1 tcpSocket: port: 8883 timeoutSeconds: 1 name: mosquitto ports: - containerPort: 1883 name: mqtt protocol: TCP - containerPort: 8883 name: mqtt2 protocol: TCP readinessProbe: failureThreshold: 3 periodSeconds: 10 successThreshold: 1 tcpSocket: port: 8883 timeoutSeconds: 1 resources: {} startupProbe: failureThreshold: 30 periodSeconds: 5 successThreshold: 1 tcpSocket: port: 8883 timeoutSeconds: 1 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /mosquitto/config/mosquitto.conf name: mosquitto-config subPath: mosquitto.conf - mountPath: /mosquitto/certs name: shared-certs dnsPolicy: ClusterFirst restartPolicy: Always terminationGracePeriodSeconds: 30 volumes: - configMap: name: mosquitto-config name: mosquitto-config - name: shared-certs persistentVolumeClaim: claimName: shared-certs-pvc