Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes API get service endpoint IP when available

I have a process where I use a Kubernetes client to build a deployment and a service. This process works fine but I have to wait some time for google to assign it an external IP. I cant seem to find anything in googles docs about a possible event emitter for when this process is done. Is there a way to programmatically pass or configure a request that can be made to a REST api that could go out and retrieve the info once it its ready?

like image 572
pwborodich Avatar asked Dec 07 '25 03:12

pwborodich


1 Answers

Yes. I assume that you mean to assign a LoadBalancer type of address to your Kubernetes service. You can manually query the GCP API to see if your Load Balancer IP has been allocated. For example, GET a resource address.

You can also use the gcloud command.

Here is a list of all the GCP APIs related to load balancing that you can use.

like image 129
Rico Avatar answered Dec 08 '25 17:12

Rico