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?
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