Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Issue Retrieving Kubernetes Gateways Using gcloud SDK

I need to retrieve the k8s gateways using the gcloud SDK. I used the following command:

 

gcloud api-gateway gateways list

 

But I see "Listed 0 items" even though there are gateways. Am I using the wrong command, or is there any other way that I can retrieve k8s gateways?

1 2 171
2 REPLIES 2

Use "--location" to make sure you are in the right project.

gcloud api-gateway gateways list --location=us-central1

By Kubnernetes Gateways, I imagine you mean Gateways created using the GKE Gateway Controller?  If so, there is not a gcloud command for this as the gateways are k8s resources.  So you will need to use kubectl for this, for example 

kubectl get gateways

 

Top Labels in this Space