How to reference the exposed Google Cloud Endpoint programmatically?

46 Views Asked by At

I am new to Kubernetes and Google Cloud in general.

I created a cluster and then deployed a web application on it. Every time I do that, Google Cloud assigns to me a different endpoint that I can obtain running:

kubectl get service my-deployed-app-service

and checking the relative EXTERNAL-IP (for example, http://34.95.62.152:5001/).

Now if I want to reference that webapp (for example to run a Locust swarm), I have to manually check what IP I've been assigned every time. Is there a way to do that programmatically? I would think about an alias of the IP, or a way to obtain a static IP?

0

There are 0 best solutions below