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.
GET REQUEST ENDPOINT- ‘https://api.digitalocean.com/v2/kubernetes/clusters/2dc1377e-b7cd-4748-a3ab-1172ea5e6529’
response:
{"kubernetes_cluster":{"id":"2dc1377e-b7cd-4748-a3ab-1172ea5e6529","name":"echo-cluster","region":"blr1","version":"1.25.4-do.0","cluster_subnet":"10.244.0.0/16","service_subnet":"10.245.0.0/16","vpc_uuid":"b8998521-1fe4-490c-9ca5-fefb8064bc08",
"ipv4":"",
"endpoint":"https://2dc1377e-b7cd-4748-a3ab-1172ea5e6529.k8s.ondigitalocean.com","tags":["k8s","k8s:2dc1377e-b7cd-4748-a3ab-1172ea5e6529"],"node_pools":[{"id":"db947a30-8f4e-4e18-8689-cda755ede961","name":"echo-node","size":"s-2vcpu-4gb","count":2,"tags":["k8s","k8s:2dc1377e-b7cd-4748-a3ab-1172ea5e6529","k8s:worker"],"labels":null,"taints":[],"auto_scale":false,"min_nodes":0,"max_nodes":0,"nodes":[{"id":"93408395-e057-47f8-8f6a-71bb0fec6812","name":"echo-node-mkfos","status":{"state":"running"},"droplet_id":"334227005","created_at":"2023-01-04T09:33:46Z","updated_at":"2023-01-04T09:35:14Z"},{"id":"b483769e-6897-4095-a37f-12fe73379ddf","name":"echo-node-mkfo5","status":{"state":"running"},"droplet_id":"334227004","created_at":"2023-01-04T09:33:46Z","updated_at":"2023-01-04T09:35:14Z"}]}],"maintenance_policy":{"start_time":"5:00","duration":"4h0m0s","day":"any"},"auto_upgrade":false,"status":{"state":"running"},"created_at":"2023-01-04T09:33:46Z","updated_at":"2023-01-04T09:38:34Z","surge_upgrade":false,"registry_enabled":false,"ha":false,"supported_features":["cluster-autoscaler","docr-integration","ha-control-plane","token-authentication"]}}
As you can see in the response, i am not able to get the ipv4, how i will assign domain record to IP?
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!