How to retrieve ipv4 of a running kubernetes cluster using DigitalOcean API?

I manually created a Kubernetes cluster using DO. Once it is provisioned, I requested the retrieve cluster API to get the “ipv4” of the cluster.






As you can see in the response, i am not able to get the ipv4, how i will assign domain record to IP?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
January 9, 2023

Hi there,

The API request that you have looks correct, however keep in mind the public IPv4 address of the Kubernetes master node will not be set if high availability is configured on the cluster. Can you confirm if this is the case for your cluster?



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel