Skip to content

Commit ecb851a

Browse files
authored
Update helloweb-service-static-ip.yaml (#1802)
The use of `.spec.loadBalancerIP` for a Service has been deprecated since Kubernetes v1.24. Replacing it with the `networking.gke.io/load-balancer-ip-addresses` annotation. The static IP name "helloweb-ip" is used in this doc: https://cloud.google.com/kubernetes-engine/docs/tutorials/configuring-domain-name-static-ip#use_a_service
1 parent a3f1a42 commit ecb851a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

quickstarts/hello-app/manifests/helloweb-service-static-ip.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ metadata:
2121
name: helloweb
2222
labels:
2323
app: hello
24+
annotations:
25+
networking.gke.io/load-balancer-ip-addresses: "helloweb-ip"
2426
spec:
2527
selector:
2628
app: hello
@@ -29,7 +31,6 @@ spec:
2931
- port: 80
3032
targetPort: 8080
3133
type: LoadBalancer
32-
loadBalancerIP: "YOUR.IP.ADDRESS.HERE"
3334
# [END container_helloapp_service]
3435
# [END gke_manifests_helloweb_service_static_ip_service_helloweb]
3536
---

0 commit comments

Comments
 (0)