forked from GoogleCloudPlatform/gke-networking-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrpc-hc-no-proxy.yaml
62 lines (62 loc) · 1.07 KB
/
grpc-hc-no-proxy.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: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: foo-external
annotations:
kubernetes.io/ingress.class: "gce"
spec:
rules:
- host: foo.example.com
http:
paths:
- backend:
serviceName: foo
servicePort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: foo
annotations:
cloud.google.com/backend-config: '{"ports": {"8080":"hc-backendconfig"}}'
spec:
ports:
- port: 8080
targetPort: 8080
name: http
selector:
app: foo
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: foo
spec:
replicas: 3
selector:
matchLabels:
app: foo
template:
metadata:
labels:
app: foo
spec:
containers:
- name: hc-proxy
image: gcr.io/mygcr/healthchecker
ports:
- containerPort: 8081
- name: grpc-app
image: gcr.io/mygcr/myapp
ports:
- containerPort: 8080
---
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: hc-backend-config
spec:
healthCheck:
port: 8081
protocol: "HTTP"