-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathk8s-deployment.yml
48 lines (48 loc) · 1.08 KB
/
k8s-deployment.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
apiVersion: app/v1beta1
kind: Deployment
metadata:
name: golang-microdervice
labels:
app: golang-microdervice
spec:
replicas: 2
revisionHistoryLimit: 10
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 2
template:
metadata:
labels:
app: golang-microdervice
tier: service
spec:
containers:
- name: golang-microdervice
image: "gaurawesome/golang-microservice:1.0.0-alpine"
resources:
requests:
memory: "64Mi"
cpu: "125m"
limits:
memory: "128Mi"
cpu: "250m"
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 5
env:
- name: PORT
value: "8080"