apiVersion: apps/v1
kind: Deployment
metadata:
  name: influxdb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: influxdb
  template:
    metadata:
      labels:
        app: influxdb
    spec:
      containers:
      - image: influxdb:latest
        imagePullPolicy: Always
        name: influx-db
        ports:
        - containerPort: 8083
        - containerPort: 8086
        - containerPort: 8089
          protocol: UDP
        - containerPort: 2003
        volumeMounts:
          - name: influxdb-conf
            mountPath: /etc/influxdb
      volumes:
        - name: influxdb-conf
          configMap:
            name: influxdb-conf
            items:
              - key: influxdb.conf
                path: influxdb.conf