Curlable Kubernaut API
See original GitHub issueKubernaut curl API:
Claim a cluster:
GET <URL>/claims/<client-supplied-globally-scoped-claim-name>?expires=<deadline> -> kubeconfig file
Renew a claim:
GET <URL>/claims/<client-supplied-globally-scoped-claim-name>?expires=<new-later-deadline> -> kubeconfig file
Release a cluster
GET <URL>/claims/<client-supplied-globally-scoped-claim-name>?expires=<time-in-past> -> kubeconfig file
List claims:
GET <URL>/claims/ -> json body with list of globally-scoped-claim-names
Rationale:
After having integrated kubernaut into a bunch of dev loops, I think the above curl-based API would probably be simpler/easier to work with and would avoid a bunch of the work associated with having a fat client.
FWIW, the list part isn’t actually directly needed by the integrations, but it is useful for debugging/correcting resource leaks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
cURLing the Kubernetes API server | by Niel de Wet - Medium
To interact with the Kubernetes API you need a ServiceAccount with the correct permissions, obtained through a (Cluster)Role and a RoleBinding.
Read more >How To Call Kubernetes API using Simple HTTP Client - iximiuz
There are plenty of reasons to call the Kubernetes API using a CLI (like curl) or GUI (like postman) HTTP client. For instance,...
Read more >Kubernetes is so Simple You Can Explore it with Curl - Tilt Blog
The Kubernetes API is /proc for distributed systems. Everything is a resource over HTTP. We can explore every Kubernetes resource with a few...
Read more >Receive data from Kubernetes API using curl - laury.dev
Start by running kubectl's proxy. With its help, we avoid dealing with authentication headers. Test the connection with a basic call.
Read more >Howto – cURL the kubernetes API server
Kubernetes management is abstracted via a rest API, which is served over a self signed secure connection. Frequently people run into issues ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The only reason the API isn’t a first class citizen is because everyone wanted a CLI as the UX originally and handling tokens is messy.
That workaround isn’t a super great option for me. Keep in mind I’m trying to write build files that work anywhere, and if I could count on a sane/working python environment everywhere, then I could just use the kubernaut cli.
To be clear I don’t really care about “pretty”, all I care about is how much work I need to do to leverage kubernaut for my use cases, and how brittle that work is in different environments. It really could be way easier and more portable if the server API were tweaked a little.
It would just have a 24hr limit? I mean no claim is guaranteed to last anyways, right?