How do you make the [K8s Gateway Resource](https://cloud.google.com/kubernetes-engine/docs/how-to/deploying-gateways#enable-gateway-existing-cl...) on an existing autopilot cluster?
The docs say to upgrade the cluster to a version of 1.26. I did that via the UI. Here's a screenshot.
However, the CRD doesn't appear to be there. The only gateway resource I have is the ISTIO gateway.
kubectl get crd | grep gateway
gateways.networking.istio.io 2023-04-26T18:15:39Z
kubectl api-resources --verbs=list --namespaced -o name | grep gateway
gateways.networking.istio.io
Solved! Go to Solution.
I ran the following command
!gcloud container clusters update dev \
--gateway-api=standard \
--region=us-west1
And that appears to have worked.
kubectl get crd | grep gateway gatewayclasses.gateway.networking.k8s.io 2023-04-26T22:05:40Z gateways.gateway.networking.k8s.io 2023-04-26T22:05:40Z gateways.networking.istio.io 2023-04-26T18:15:39Z gcpgatewaypolicies.networking.gke.io 2023-04-26T22:05:40Z httproutes.gateway.networking.k8s.io 2023-04-26T22:05:41Z referencegrants.gateway.networking.k8s.io 2023-04-26T22:05:41Z
So it looks like the documentation is incorrect and you need to run that command for Autopilot clusters as well.
I ran the following command
!gcloud container clusters update dev \
--gateway-api=standard \
--region=us-west1
And that appears to have worked.
kubectl get crd | grep gateway gatewayclasses.gateway.networking.k8s.io 2023-04-26T22:05:40Z gateways.gateway.networking.k8s.io 2023-04-26T22:05:40Z gateways.networking.istio.io 2023-04-26T18:15:39Z gcpgatewaypolicies.networking.gke.io 2023-04-26T22:05:40Z httproutes.gateway.networking.k8s.io 2023-04-26T22:05:41Z referencegrants.gateway.networking.k8s.io 2023-04-26T22:05:41Z
So it looks like the documentation is incorrect and you need to run that command for Autopilot clusters as well.
This bit me today on a cluster running 1.27 😢
Thanks for posting the solution... I wish the docs would get fixed to call this out for autopilot clusters