-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
48 lines (48 loc) · 885 Bytes
/
deployment.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
apiVersion: v1
kind: Service
metadata:
name: go-api
spec:
type: LoadBalancer
selector:
app: go-api
ports:
- port: 80
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: go-api
spec:
selector:
matchLabels:
app: go-api
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: go-api
spec:
containers:
- name: go-api
image: shankube/go-api:v0.0.1
ports:
- containerPort: 8080
resources:
requests:
cpu: 25m
memory: 64Mi
limits:
cpu: 410m
memory: 512Mi
securityContext:
runAsNonRoot: true
runAsUser: 10001
readOnlyRootFilesystem: true
---