2019-12-17 20:24:08 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: influxdb
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: influxdb
|
|
|
|
name: influxdb
|
|
|
|
namespace: influxdb
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: influxdb
|
|
|
|
serviceName: influxdb
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: influxdb
|
|
|
|
spec:
|
|
|
|
containers:
|
2021-04-30 20:17:27 +00:00
|
|
|
- image: influxdb:2.0.6
|
2019-12-17 20:24:08 +00:00
|
|
|
name: influxdb
|
|
|
|
ports:
|
2020-09-04 18:26:51 +00:00
|
|
|
- containerPort: 8086
|
2019-12-17 20:24:08 +00:00
|
|
|
name: influxdb
|
|
|
|
volumeMounts:
|
2021-04-30 20:17:27 +00:00
|
|
|
- mountPath: /var/lib/influxdb2
|
2019-12-17 20:24:08 +00:00
|
|
|
name: data
|
|
|
|
volumeClaimTemplates:
|
|
|
|
- metadata:
|
|
|
|
name: data
|
|
|
|
namespace: influxdb
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 10G
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: influxdb
|
|
|
|
namespace: influxdb
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- name: influxdb
|
2020-09-04 18:26:51 +00:00
|
|
|
port: 8086
|
|
|
|
targetPort: 8086
|
2019-12-17 20:24:08 +00:00
|
|
|
selector:
|
|
|
|
app: influxdb
|
|
|
|
type: ClusterIP
|