apiVersion: apps/v1
kind: Deployment
metadata:
  name: iot-kafka-consumer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: iot-kafka-consumer
  template:
    metadata:
      labels:
        app: iot-kafka-consumer
        tier: backend
        group: java
    spec:
      containers:        
      - name: iot-kafka-consumer
        image: registry.gitlab.com/mc-b/iot-kafka/iot-kafka-consumer
        imagePullPolicy: IfNotPresent        
        # Volumes im Container
        volumeMounts:
        - mountPath: "/data"
          subPath: mlg
          name: "mlg-data"
      # Volumes in Host
      volumes:
      - name: "mlg-data"
        persistentVolumeClaim:
         claimName: data-claim