-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathk8s.deploy.yaml
47 lines (46 loc) · 986 Bytes
/
k8s.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
44
45
46
47
apiVersion: v1
kind: Namespace
metadata:
name: kubernetes-devonbike-webapi
---
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-devonbike-webapi
name: kubernetes-devonbike-webapi
namespace: kubernetes-devonbike-webapi
spec:
ports:
- port: 8500
targetPort: 8000
selector:
k8s-app: kubernetes-devonbike-webapi
---
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
k8s-app: kubernetes-devonbike-webapi
name: kubernetes-devonbike-webapi
namespace: kubernetes-devonbike-webapi
spec:
replicas: 2
strategy:
type: Recreate
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: kubernetes-devonbike-webapi
template:
metadata:
labels:
k8s-app: kubernetes-devonbike-webapi
spec:
containers:
- name: kubernetes-devonbike-webapi
image: webapi:latest
imagePullPolicy: Never
ports:
- containerPort: 8500
protocol: TCP