-
Notifications
You must be signed in to change notification settings - Fork 37
/
02-deployment.yaml
101 lines (100 loc) · 2.99 KB
/
02-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
apiVersion: apps/v1
kind: Deployment
metadata:
name: influxdb
namespace: monitoring
labels:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb
template:
metadata:
labels:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb
spec:
serviceAccountName: influxdb
containers:
- name: influxdb2
image: "influxdb:latest"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8086
env:
# Automated setup will not run if an existing boltdb file is found at the configured path.
- name: DOCKER_INFLUXDB_INIT_MODE
value: setup
# The username to set for the system's initial super-user (Required).
- name: DOCKER_INFLUXDB_INIT_USERNAME
value: admin
# The password to set for the system's inital super-user (Required).
- name: DOCKER_INFLUXDB_INIT_PASSWORD
value: password
# The name to set for the system's initial organization (Required).
- name: DOCKER_INFLUXDB_INIT_ORG
value: aks-cluster
# The name to set for the system's initial bucket (Required).
- name: DOCKER_INFLUXDB_INIT_BUCKET
value: metrics
# The duration the system's initial bucket should retain data.
- name: DOCKER_INFLUXDB_INIT_RETENTION
value: 1d
# The authentication token to associate with the system's initial super-user.
- name: DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
value: pre-shared-local-token
# Path to the BoltDB database.
- name: INFLUXD_BOLT_PATH
value: /var/lib/influxdb2/influxd.bolt
# Path to persistent storage engine files.
- name: INFLUXD_ENGINE_PATH
value: /var/lib/influxdb2
volumeMounts:
- name: data
mountPath: /var/lib/influxdb2
volumes:
- name: data
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: influxdb
namespace: monitoring
labels:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb
spec:
selector:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb
type: ClusterIP
ports:
- port: 8086
targetPort: 8086
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: influxdb
namespace: monitoring
labels:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb
spec:
ingressClassName: webapprouting.kubernetes.azure.com
rules:
- host: influx.ingress.host
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: influxdb
port:
number: 8086