diff --git a/influxdb/influxdb-deployment.yml b/influxdb/influxdb-deployment.yml new file mode 100644 index 0000000..da3c449 --- /dev/null +++ b/influxdb/influxdb-deployment.yml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: influx + labels: + app: influxdb + name: influxdb +spec: + replicas: 1 + selector: + matchLabels: + app: influxdb + template: + metadata: + labels: + app: influxdb + spec: + containers: + - name: influxdb + image: docker.io/influxdb:2.3.0 + volumeMounts: + - mountPath: /var/lib/influxdb2 + name: var-lib-influxdb + ports: + - containerPort: 8086 + volumes: + - name: var-lib-influxdb + persistentVolumeClaim: + claimName: influxdb-pvc + diff --git a/influxdb/influxdb-ingress.yml b/influxdb/influxdb-ingress.yml new file mode 100644 index 0000000..03ccbe3 --- /dev/null +++ b/influxdb/influxdb-ingress.yml @@ -0,0 +1,24 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: influxdb-ingress + annotations: + kubernetes.io/ingress.class: nginx + cert-manager.io/cluster-issuer: letsencrypt-production + namespace: influx +spec: + rules: + - host: influx.cyclops-labs.io + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: influxdb + port: + number: 80 + tls: + - hosts: + - influx.cyclops-labs.io + secretName: influx-tls diff --git a/influxdb/influxdb-pvc.yml b/influxdb/influxdb-pvc.yml new file mode 100644 index 0000000..840e8a0 --- /dev/null +++ b/influxdb/influxdb-pvc.yml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + namespace: influx + labels: + app: influxdb + name: influxdb-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/influxdb/influxdb-service.yml b/influxdb/influxdb-service.yml new file mode 100644 index 0000000..ebf1486 --- /dev/null +++ b/influxdb/influxdb-service.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: influxdb + name: influxdb + namespace: influx +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 8086 + selector: + app: influxdb +