0

I need to get the Kubernetes Service IP address (internal and external) using the Google Cloud Provider APIs. How do I get the Kubernetes Services IP address using GCP APIs?

Thanks

  • isn't is something one would do with an api call to a cluster itself and not to a hosting platform underneath? – jabbson Dec 11 '20 at 19:34

1 Answers1

0

If you wanted to know the IP service on your cluster, you have to run the following command on your cloud shell console:

~$ gcloud container clusters describe NAME-OF-THE-CLUSTER --zone ZONE-WHERE-THE-CLUSTER-WAS-CREATED

If you wanted to know the service network range, please use:

~$ gcloud container clusters describe NAME-OF-THE-CLUSTER --zone ZONE-WHERE-THE-CLUSTER-WAS-CREATED | grep service

And, if you wanted to know the endpoint IP Address, please use:

~$ gcloud container clusters describe NAME-OF-THE-CLUSTER --zone ZONE-WHERE-THE-CLUSTER-WAS-CREATED | grep endpoint.

About the API, please review this

  • I don't believe any of the listed commands will reveal an internal and externall IP address of a service in Kubernetes, including the api call linked. @Cleosson, please clarify if you are looking to get info similar to what you would get with kubectl get svc – jabbson Dec 11 '20 at 22:51