Working with Kubernetes API - π§΅ with resources
Kubernetes API is huge. It has over 100 endpoints, an advanced structure, and a dozen specialized concepts - API Groups, Namespaces, Resources, Kinds, Objects, and whatnot.
However, under the hood, it's a good old REST API.

1. Learn the Main Kubernetes API Constructs
Before jumping to calling the API, familiarize yourself with the main concepts: Resources, Kinds, and Objects. With a clear API structure in mind, it'll be much easier to approach the hands-on problems.
iximiuz.com/en/posts/kuberβ¦
Before jumping to calling the API, familiarize yourself with the main concepts: Resources, Kinds, and Objects. With a clear API structure in mind, it'll be much easier to approach the hands-on problems.
iximiuz.com/en/posts/kuberβ¦
2. Call Kubernetes API using cURL
If you sneak-peek at kubectl talking to your cluster using the `-v 8` flag, you'll notice that the API requests it makes look surprisingly simple - it's a good old REST HTTP API. So you can learn how to call it, too!
iximiuz.com/en/posts/kuberβ¦
If you sneak-peek at kubectl talking to your cluster using the `-v 8` flag, you'll notice that the API requests it makes look surprisingly simple - it's a good old REST HTTP API. So you can learn how to call it, too!
iximiuz.com/en/posts/kuberβ¦
3. Call Kubernetes API from Go
If you made it this far, you already know:
- Main Kubernetes API constructs
- How to authenticate requests
- How to call the API from the command line
Time to learn how to call the API programmatically.
iximiuz.com/en/posts/kuberβ¦
If you made it this far, you already know:
- Main Kubernetes API constructs
- How to authenticate requests
- How to call the API from the command line
Time to learn how to call the API programmatically.
iximiuz.com/en/posts/kuberβ¦
4. Practice writing Kubernetes programs
Before jumping to writing Kubernetes controllers with higher-level frameworks like Kubebuilder, it's a good idea to write a few simpler programs using the bare Go client to call the cluster API.
A few examples github.com/iximiuz/clientβ¦
Before jumping to writing Kubernetes controllers with higher-level frameworks like Kubebuilder, it's a good idea to write a few simpler programs using the bare Go client to call the cluster API.
A few examples github.com/iximiuz/clientβ¦
5. Setting up a Kubernetes development environment
One thing you don't want to do is use your production (or even development) cluster to test your first controllers. An ephemeral (and disposable) Kubernetes cluster would be a much better choice π
labs.iximiuz.com/playgrounds/k8β¦
One thing you don't want to do is use your production (or even development) cluster to test your first controllers. An ephemeral (and disposable) Kubernetes cluster would be a much better choice π
labs.iximiuz.com/playgrounds/k8β¦
Happy hacking!
Generated by Thread Navigator
Press β + S to quick-export
