-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8-deploy.yaml
62 lines (62 loc) · 1.57 KB
/
k8-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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
name: service-user
labels:
app: service-user
spec:
replicas: 1
selector:
matchLabels:
app: service-user
template:
metadata:
labels:
app: service-user
spec:
containers:
- name: service-user
image: registry-intl.ap-southeast-5.aliyuncs.com:IMAGE_TAG # replace it with your exactly <image_name:tags>
ports:
- containerPort: 8083
protocol: TCP
imagePullPolicy: Always
resources:
requests:
cpu: "256m"
memory: "512Mi"
livenessProbe:
httpGet:
path: /user/health-check
port: 8083
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /user/health-check
port: 8083
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/alicloud-loadbalancer-force-override-listeners: "true"
service.beta.kubernetes.io/alicloud-loadbalancer-id: lb-d9jrnqscujyy67gm5w6a9
name: service-user
spec:
allocateLoadBalancerNodePorts: true
externalTrafficPolicy: Local
internalTrafficPolicy: Cluster
ports:
- name: service-user
port: 8083
protocol: TCP
targetPort: 8083
selector:
app: service-user
sessionAffinity: None
type: LoadBalancer