Currently, the only way to access Kubernetes is by downloading the config file on the dashboard: https://cloud.digitalocean.com/kubernetes/clusters/mycluster , and adding it into ~/.kube/config . By default, this config file lives a few days at most.
Is there a way to either get extended lease on this config, or generate a permanent authorization config for development?
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!
Accepted Answer
For anyone else who’s interested. This API is undocumented, but if you have an api token with read access, this will get you the current valid kubeconfig.
curl --request GET \
--url https://api.digitalocean.com/v2/kubernetes/clusters/<cluster-id>/kubeconfig \
--header 'authorization: Bearer <digitalocean-token>'
That’s all you’d need for your CI config.
I think it’s in the known issues here: https://www.digitalocean.com/docs/kubernetes/overview/
The Certificate Authority, Client Certificate, and Client Key data in the kubeconfig.yaml file are rotated weekly.
I understand why. I just wish it was easy to generate one restricted to a namespace, or to retrieve the config somehow via an api using an API token. My CI builds fail every week because of this.
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.