Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b65919c

Browse filesBrowse files
lookuptableJon Wayne Parrott
authored andcommitted
Add Kubernetes config examples for endpoints + gRPC (GoogleCloudPlatform#666)
1 parent 9036dcb commit b65919c
Copy full SHA for b65919c

File tree

Expand file treeCollapse file tree

2 files changed

+56
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+56
-0
lines changed

‎endpoints/kubernetes/README.md

Copy file name to clipboard
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Kubernetes Configuration Example for running Cloud Endpoints with gRPC Bookstore Backend
2+
+54Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2016 Google Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License
14+
15+
apiVersion: v1
16+
kind: Service
17+
metadata:
18+
name: esp-grpc-bookstore
19+
spec:
20+
ports:
21+
# Port that accepts gRPC and JSON/HTTP2 requests over HTTP.
22+
- port: 9000
23+
protocol: TCP
24+
name: http2
25+
selector:
26+
app: esp-grpc-bookstore
27+
type: LoadBalancer
28+
---
29+
apiVersion: extensions/v1beta1
30+
kind: Deployment
31+
metadata:
32+
name: esp-grpc-bookstore
33+
spec:
34+
replicas: 1
35+
template:
36+
metadata:
37+
labels:
38+
app: esp-grpc-bookstore
39+
spec:
40+
containers:
41+
- name: esp
42+
image: b.gcr.io/endpoints/endpoints-runtime:1
43+
args: [
44+
"-P", "9000",
45+
"-s", "SERVICE_NAME",
46+
"-v", "SERVICE_CONFIG_ID",
47+
"-a", "grpc://127.0.0.1:8000"
48+
]
49+
ports:
50+
- containerPort: 9000
51+
- name: bookstore
52+
image: gcr.io/endpointsv2/python-grpc-bookstore-server:1
53+
ports:
54+
- containerPort: 8000

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.