forked from junhp1234/dps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yaml
43 lines (43 loc) · 853 Bytes
/
deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-web-app
spec:
replicas: 1
selector:
matchLabels:
app: k8s-web-app
template:
metadata:
labels:
app: k8s-web-app
spec:
containers:
- name: web-app
image: junhp1234/dps:0.2
ports:
- containerPort: 5000
env:
- name: KUBECONFIG
value: "/root/.kube/config"
volumeMounts:
- name: kubeconfig
mountPath: "/root/.kube"
readOnly: true
volumes:
- name: kubeconfig
secret:
secretName: kubeconfig-secret
---
apiVersion: v1
kind: Service
metadata:
name: k8s-web-app-service
spec:
type: NodePort
ports:
- port: 5000
targetPort: 5000
nodePort: 30000
selector:
app: k8s-web-app