-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathk8s-deployment.yml
49 lines (49 loc) · 1007 Bytes
/
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
49
apiVersion: v1
kind: Service
metadata:
name: cloud-native-go
labels:
app: cloud-native-go
spec:
# use NodePort here to be able to access the port on each node
type: NodePort
ports:
- port: 8080
selector:
app: cloud-native-go
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: cloud-native-go
spec:
replicas: 1
minReadySeconds: 30
template:
metadata:
labels:
app: cloud-native-go
spec:
containers:
- name: cloud-native-go
image: "cloud-native-go:1.0.2"
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 30
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: 8080
timeoutSeconds: 5