forked from easzlab/kubeasz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hellogo.yaml
49 lines (48 loc) · 1002 Bytes
/
hellogo.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
49
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hellogo-deploy
spec:
replicas: 3
minReadySeconds: 5 # Wait 5 seconds after each new pod comes up before marked as "ready"
strategy:
type: RollingUpdate # describe how we do rolling updates
rollingUpdate:
maxUnavailable: 1 # When updating take one pod down at a time
maxSurge: 1
selector:
matchLabels:
name: hellogo-app
template:
metadata:
labels:
name: hellogo-app
spec:
containers:
- name: hellogo
image: hellogo:v1.0
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "64Mi"
cpu: "100m"
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: hellogo-svc
spec:
type: NodePort
ports:
- name: http
port: 80
targetPort: 3000
nodePort: 30000
selector:
name: hellogo-app