Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions quickstarts/whereami/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ If gRPC is enabled for a given pod, that `whereami` pod will not respond to HTTP

#### Step 1 - Deploy the whereami-grpc backend

Deploy the `whereami-grpc` backend using the manifests from [k8s-grpc-backend-overlay-example](k8s-grpc-backend-overlay-example):
Deploy the `whereami-grpc` backend using the manifests from [k8s-grpc-clusterip-backend-overlay-example](k8s-grpc-clusterip-backend-overlay-example):

```bash
$ kubectl apply -k k8s-grpc-backend-overlay-example
$ kubectl apply -k k8s-grpc-clusterip-backend-overlay-example
serviceaccount/whereami-grpc-backend created
configmap/whereami-grpc-backend created
service/whereami-grpc-backend created
Expand All @@ -432,6 +432,8 @@ deployment.apps/whereami-grpc-backend created

This backend will listen for gRPC requests from the frontend service deployed in the following step.

> Note: use the [headless service example](k8s-grpc-headless-backend-overlay-example) for more efficient gRPC load balancing if you're not using something like a service mesh

#### Step 2 - Deploy the whereami-grpc frontend

Now we're going to deploy the `whereami-grpc` frontend from the [k8s-grpc-frontend-overlay-example](k8s-grpc-frontend-overlay-example):
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START gke_k8s_grpc_clusterip_backend_overlay_example_cm_flag_configmap_whereami_grpc_configmap]
apiVersion: v1
kind: ConfigMap
metadata:
name: whereami-grpc
data:
BACKEND_ENABLED: "False"
# when defining the BACKEND_SERVICE using an HTTP protocol, indicate HTTP or HTTPS; if using gRPC, use the host name only
BACKEND_SERVICE: "whereami-grpc-backend:9090" # substitute with corresponding service name - this example assumes both services are in the same namespace; make sure to include the port
METADATA: "grpc-backend"
GRPC_ENABLED: "True"
# [END gke_k8s_grpc_clusterip_backend_overlay_example_cm_flag_configmap_whereami_grpc_configmap]
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START gke_k8s_grpc_clusterip_backend_overlay_example_kustomization]
nameSuffix: "-backend"
labels:
- includeSelectors: true
includeTemplates: true
pairs:
app: whereami-grpc-backend
resources:
- ../k8s-grpc
patches:
- path: cm-flag.yaml
target:
kind: ConfigMap
- path: service-type.yaml
target:
kind: Service
# [END gke_k8s_grpc_clusterip_backend_overlay_example_kustomization]
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START gke_k8s_grpc_backend_overlay_example_service_type_service_whereami_grpc]
# [START gke_k8s_grpc_clusterip_backend_overlay_example_service_type_service_whereami_grpc]
apiVersion: v1
kind: Service
metadata:
name: whereami-grpc
spec:
type: ClusterIP
# [END gke_k8s_grpc_backend_overlay_example_service_type_service_whereami_grpc]
# [END gke_k8s_grpc_clusterip_backend_overlay_example_service_type_service_whereami_grpc]
---
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START gke_k8s_grpc_backend_overlay_example_cm_flag_configmap_whereami_grpc_configmap]
# [START gke_k8s_grpc_headless_backend_overlay_example_cm_flag_configmap_whereami_grpc_configmap]
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -24,5 +24,5 @@ data:
BACKEND_SERVICE: "whereami-grpc-backend:9090" # substitute with corresponding service name - this example assumes both services are in the same namespace; make sure to include the port
METADATA: "grpc-backend"
GRPC_ENABLED: "True"
# [END gke_k8s_grpc_backend_overlay_example_cm_flag_configmap_whereami_grpc_configmap]
# [END gke_k8s_grpc_headless_backend_overlay_example_cm_flag_configmap_whereami_grpc_configmap]
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START gke_k8s_grpc_headless_backend_overlay_example_kustomization]
nameSuffix: "-backend"
labels:
- includeSelectors: true
includeTemplates: true
pairs:
app: whereami-grpc-backend
resources:
- ../k8s-grpc
patches:
- path: cm-flag.yaml
target:
kind: ConfigMap
- path: service-type.yaml
target:
kind: Service
# [END gke_k8s_grpc_headless_backend_overlay_example_kustomization]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START gke_k8s_grpc_headless_backend_overlay_example_service_type_service_whereami_grpc]
apiVersion: v1
kind: Service
metadata:
name: whereami-grpc
spec:
type: ClusterIP
clusterIP: None
# [END gke_k8s_grpc_headless_backend_overlay_example_service_type_service_whereami_grpc]
---