Metacontroller - Custom Kubernetes Controllers The Easy Way

  Рет қаралды 11,342

DevOps Toolkit

DevOps Toolkit

Күн бұрын

Пікірлер
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
What do you think of Metacontroller? Does it motivate you to create your own Kubernetes controllers?
@rafhue
@rafhue 2 жыл бұрын
Thanks for your videos ! This one make sense for me that let us a little more freedom to customize k8s behavior.
@dirien
@dirien 2 жыл бұрын
Now you spark my interest! Rarely see you so happy about a project! Thanks Viktor for the video!
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
See you in a couple of weeks in Edinburgh :)
@popovicmiro
@popovicmiro 2 жыл бұрын
Tnx from Dataverse!
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
Thanks a ton!
@frangalarza
@frangalarza 2 жыл бұрын
I've been trying to replicate this behaviour with a combination of Crossplane, Helm, Kustomize and custom code and gave up due to the sheer pain. As you mentioned in your IDP video, our job is to make the platform easy to consume. But if it takes us 3 months to write an operator then we are slowing down the business and we have failed. Speed of development is important. Metacontroller looks promising in that regard, specially because you can use a language you already know. This is important too due to the current market conditions where specialized engineers are hard to find and hire. Not many people are proficient in Golang, but you can tap into the fact that the entire internet runs on Javascript and find great developers that can write competent operators in TypeScript, giving you the best of both worlds ♥
@itamarmarom7550
@itamarmarom7550 2 жыл бұрын
As someone who knows Kubebuilder pretty good, and after seeing this video I'll say this: Metacontroller seems to be very simple from the perspective of code and integrating with Kubernetes. But, it is not mature enough for even a bit more complicated use cases. Kubebuilder has some great features that are very important: - You are describing the API (CRD) as a go struct. That's good because: kubebuilder generates for you the CRD YAMLs, and you can use your CRD in your code easily, and also let other controllers or code integrate with your CRD by importing your package. - Kubebuilder generates almost everything for you starting from the CRD API and YAMLs, the controller integration with the manager, and Kubernetes (you only need to write your code in one `reconcile` function) - Generates for you the entire code + YAMLs for deploying admission controllers to mutate/validate requests - Easy debugging, you can run your controller locally against a Kubernetes cluster - Easy to communicate with every Kubernetes resource (just get the right package) - Amazing Makefile to generate code and manifests, easy to build and deploy locally and remotely and much more. I don't see Metacontroller even close to Kubebuilder currently...
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
Those are indeed very valid points.
@lingxiankong4791
@lingxiankong4791 2 жыл бұрын
Thanks for sharing this! Looks like Metacontroller is aiming at dealing with simple use cases, however, for those simple cases, using Argo Events & Workflows should be a better option IMHO.
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
Whether the use case is simple or not depends on what you have as the code of the controller. Argo events and workflows are very different. Neither of them allows creation of controllers associated with custom CRDs.
@felipeozoski
@felipeozoski Жыл бұрын
Awesome channel ❤
@alexandrgumeniuc431
@alexandrgumeniuc431 2 жыл бұрын
Thank you for the review, Victor. According to the guide, CompositeController object can watch only one parentResource and that is a big disadvantage comparing to kubebuilder.
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
Oh yeah. That's one (not the only one) disadvantage. Even though I never have more than one parent resource, I can imagine that others do. Ultimately, I don't think that Metacontroller will ever be on-par with KubeBuilder. Its focus is on simplicity and being language agnostic. That is sometimes an advantage, while at other times insuficient. It all depends on what one needs.
@KrishP17
@KrishP17 11 ай бұрын
Hey, your videos are amazing. I've been trying to build my own custom K8S controller which imitates the dynamic port changing behavior like Rancher (a Kubernetes management platform). What are your suggestions on it? Can you please guide me?
@DevOpsToolkit
@DevOpsToolkit 11 ай бұрын
I'm not sure I understood. What should that controller do?
@rubbercable
@rubbercable 2 жыл бұрын
How is metacontroller different from Operators? It looks simpler - but does it do polling .. or is it only external event driven? I worked so hard to learn to golang and kubebuilder. 😑
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
It's a simple way to create a controller that triggers events to other processes. It's not a replacement for KubeBuilder but, rather, an easier (more convenient) way to create controllers or, to be more precise, to avoid creating boiler-plate code.
@Jarek.
@Jarek. 2 жыл бұрын
I tend to say that what was presented here is more an Operator. Looking at this definition: An operator is a specialized form of controller. Operators implement the controller pattern, meaning they move the cluster towards a defined state, but they possess some extra characteristics too. Operators are tailored to specific applications. They add Kubernetes API extensions via *custom resource definitions* , creating new object types that are used by the application they manage
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
Metacontroller is not focused (only) on managing the state. In the nutshell, it help with triggering events into a process that does whatever you'd like it to do. In a way, it removed the need to create the booler-plate code and leaves you to focus exclusively on the code that will be executed as a result of some event.
@rubbercable
@rubbercable 2 жыл бұрын
Yup. It looks more like an admission/mutation controller. The Golang heels like syntactic sugar. I like it, but definitely not operator functionality.(No constant reconcile phase)
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
@@rubbercable That's correct. There is no constant reconcile phase unless you implement it in your code, which might not be the best idea. Using KubeBuilder makes more sense for those use-cases.
@manitaggarwal
@manitaggarwal 2 жыл бұрын
When composite controller is hitting the webhook url, what fields is it sending? How to know that?
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
Which composite controller is hitting the webhook is available in the logs of the controller itself. There might be other places, but, if there are, I don't know about them. The fields that it is sending are the fields of the payload augmented with the info from the API itself (e.g., operation). That being said, Metacontroller has a way to go in that area. Debugging (in general) is far from being good.
@manitaggarwal
@manitaggarwal 2 жыл бұрын
@@DevOpsToolkit How did you figure out the fields from request in app.py like image, port, etc?
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
Sorry for not responding earlier. KZbin "decided" to block quite a few messages and I did not see this one until now. Typically, you know what the fields are from the spec. That spec might be coming from Kubernetes itself if it's baked in (e.g., kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/), third-party CRDs, or yourself if you created the CRD. Also, besides the documentation, you can always output the request and see what it contains.
@LazarTas
@LazarTas 2 жыл бұрын
Nice. Which cluster are you using on Mac? Kind, minikube?
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
I use Rancher Desktop exclusively. You'll find a couple of videos about it on this channel.
@ihorpysmennyi2559
@ihorpysmennyi2559 2 жыл бұрын
Are there any advantages Metacontroller compared with Kopf?
@DevOpsToolkit
@DevOpsToolkit 2 жыл бұрын
I haven't used kopf (yet) so I cannot compare those two :(
@__noob__coder__
@__noob__coder__ Жыл бұрын
I just noticed you have such thin eyebrows!!
What The Heck Are Kubernetes Resources, CRs, CRDs, Operators, etc.?
21:08
How To Build A Control Plane To Manage Kubernetes Clusters With kcp?
22:42
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 41 М.
Is This the End of Crossplane? Compose Kubernetes Resources with kro
30:01
Why I Changed My Mind About Backstage? A Brutally Honest Opinion
28:36
DevOps Toolkit
Рет қаралды 1,8 М.
Top Kubernetes Interview Questions Answers (From Container Specialist)
34:47
Kubernetes Notifications, Troubleshooting, And Automation With Robusta
29:46
Kubernetes Controllers in Rust: Fast, Safe, Sane - Matei David, Buoyant
32:34
CNCF [Cloud Native Computing Foundation]
Рет қаралды 2,1 М.
Should We Run Databases In Kubernetes? CloudNativePG (CNPG) PostgreSQL
19:10
Garden - Build, Deploy, And Test Cloud And Kubernetes Applications
41:44
Get on board with Kubernetes Operators!
37:27
Null Labs
Рет қаралды 8 М.