-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes.yml
58 lines (57 loc) · 1.25 KB
/
kubernetes.yml
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
#change the image tag before you deploy, if using minikube, please use any tag other than "latest"
apiVersion: apps/v1
kind: Deployment
metadata:
name: petstore-deployment
labels:
app: petstore
environment: dev
spec:
replicas: 1
selector:
matchLabels:
app: petstore
template:
metadata:
labels:
app: petstore
spec:
containers:
- name: petstore
image: networknt/com.networknt.petstore-3.1.0:3.1.0
ports:
- containerPort: 9443
resources:
requests:
memory: "64Mi"
#0.25 cpu
cpu: "250m"
limits:
#0.5 cpu
memory: "128Mi"
cpu: "500m"
#cannot use httpcheck due to the server can be https
readinessProbe:
tcpSocket:
port: 9443
initialDelaySeconds: 3
periodSeconds: 3
livenessProbe:
tcpSocket:
port: 9443
initialDelaySeconds: 5
periodSeconds: 20
---
apiVersion: v1
kind: Service
metadata:
name: petstore-service
labels:
app: petstore
spec:
selector:
app: petstore
type: NodePort
ports:
- protocol: TCP
port: 9443