-
Notifications
You must be signed in to change notification settings - Fork 4
/
k8s-server.yaml
80 lines (78 loc) · 1.57 KB
/
k8s-server.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
kind: Service
apiVersion: v1
metadata:
name: rg-server
labels:
app: rg-server
spec:
type: ClusterIP
selector:
app: rg-server
ports:
- name: grpc
port: 80
targetPort: grpc
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: rg-server
labels:
app: rg-server
spec:
replicas: 3
selector:
matchLabels:
app: rg-server
template:
metadata:
labels:
app: rg-server
annotations:
linkerd.io/inject: enabled
spec:
containers:
- name: rg-server
image: gcr.io/runconduit/routeguide
imagePullPolicy: Always
envFrom:
- configMapRef:
name: rg-server-config
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
command:
- /bin/bash
- "-c"
- |
/rg-server -port=${SERVER_PORT}
ports:
- name: grpc
containerPort: 80
readinessProbe:
initialDelaySeconds: 5
exec:
command:
- /bin/bash
- "-c"
- |
/grpc_health_probe -addr=${POD_NAME}:${SERVER_PORT} -service=routeguide.RouteGuide
livenessProbe:
initialDelaySeconds: 10
exec:
command:
- /bin/bash
- "-c"
- |
/grpc_health_probe -addr=${POD_NAME}:${SERVER_PORT} -service=routeguide.RouteGuide
---
kind: ConfigMap
apiVersion: v1
metadata:
name: rg-server-config
labels:
app: rg-server
data:
SERVER_PORT: "80"