-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.yaml
48 lines (48 loc) · 932 Bytes
/
database.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
apiVersion: v1
kind: Service
metadata:
name: database
labels:
app: kubernetes-tp
spec:
ports:
- port: 3306
selector:
app: kubernetes-tp
partie: database
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: database
labels:
app: kubernetes-tp
spec:
template:
spec:
containers:
- image: mariadb:latest
name: database
ports:
- containerPort: 3306
env:
- name: MARIADB_ROOT_PASSWORD
value: "1234"
- name: MARIADB_USER
value: "apitext"
- name: MARIADB_PASSWORD
value: "1234"
- name: MARIADB_DATABASE
value: apitext
metadata:
labels:
app: kubernetes-tp
partie: database
selector:
matchLabels:
app: kubernetes-tp
partie: database
strategy:
type: Recreate
replicas: 1