How to write your own Kubernetes Operator in
ฝัง
- เผยแพร่เมื่อ 12 ก.ย. 2024
- How to write your own Kubernetes Operator in #golang, with the controller runtime library instead of code generating tools. Kubebuilder also uses the controller runtime, so it's a good video to understand what kubebuilder does for you.
The code used can be found at github.com/war...
My Golang Udemy Course: www.udemy.com/...
More Golang content and our Cloud & DevOps Podcast: community.in4i...
I don't understand why you need 2 clients (mgr client and client set). In my opinion you can use only one client from manager for operations with any types of k8s resources. Can you explain it please?
In theory that should work indeed, but in practice, it didn't work out that well, because of version differences between the custom API packages you need in combination with a client that you need for a specific kubernetes version.
@@EdwardViaene Thanks)
Can you please create more in depth videos series on this topic with more realistic go lang operator examples!
What are you looking for exactly? Managing specific external services or something else?
Great video. Do I need to register a scheme even if I want to work with secrets?
If you're working with a build-in resource and not a custom resource, then you don't need to register a custom scheme. You can find an example of this here: github.com/kubernetes-sigs/controller-runtime/blob/main/examples/builtins/main.go#L67
@@EdwardViaene Thank you
Hey I think you have somecourses in udemy. Could you please suggest some good books to learn these things in depth along side Golang. All though i have your golang course with cloud and devops. But i want to go little deep.
I’m not aware of any books that go deeper. At some point you just need to dig in the Kubernetes docs and what’s available on GitHub in the kubernetes packages. Using the kubernetes go client can help you to ge more insights for sure.
I have few doubts regarding go lang operators, wanted to connect with you
You can find me on LinkedIn, twitter, or udemy if you want to message me directly.