---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: influxdb
  labels:
    app: influxdb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: influxdb
  template:
    metadata:
      labels:
        app: influxdb
    spec:
      containers:
        - name: influxdb
          image: influxdb:1.8.9
          env:
            - name: INFLUXDB_ADMIN_USER
              value: influxdb
            - name: INFLUXDB_ADMIN_PASSWORD
              value: influxdb
          ports:
            - name: influxdb
              containerPort: 8086
              protocol: TCP
          volumeMounts:
            - name: influxdb
              mountPath: /var/lib/influxdb
      volumes:
        - name: influxdb
          persistentVolumeClaim:
            claimName: influxdb
