-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyapp-deployment.yml
More file actions
61 lines (61 loc) · 1.41 KB
/
Copy pathmyapp-deployment.yml
File metadata and controls
61 lines (61 loc) · 1.41 KB
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
apiVersion: v1
kind: Service
metadata:
name: myapp
labels:
app: myapp
spec:
ports:
- port: 80
selector:
app: myapp
tier: frontend
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
labels:
app: myapp
spec:
selector:
matchLabels:
app: myapp
tier: frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: myapp
tier: frontend
spec:
initContainers:
- name: init-mysql
image: busybox:1.28
command: ['sh', '-c', "until nslookup mysql.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"]
containers:
- image: engrmnasirilyas716/jedwasmserver:latest
name: myapp
env:
# - name: myapp_DB_HOST
# value: myapp-mysql
- name: DATABASE_HOST
value: mysql
- name: DATABASE_PORT
value: "3306"
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-pass
key: password
# - name: DATABASE_PASSWORD
# value: "your_database_password"
- name: DATABASE_USER
value: root
- name: DATABASE_NAME
value: imap
ports:
- containerPort: 80
name: myapp