When you touch on containerized apps today, Kubernetes usually comes up as their orchestrator. Sure, Kubernetes is great for managing your containe...
For further actions, you may consider blocking this person and/or reporting abuse
Is there a way to know if values in CRs changed when the controller analyzes them out-of-the-box? For example, do controllers get a list of diffs from the last applied CR or do I need to implement that logic myself?
Great article as always!
Controllers leverage the watch mechanism of K8s API and get the whole resource and its updated state. You can use tools like kubebuilder to develop controllers in golang
Great, I'll look into that. Thanks!
Great summary, can you explain what needs to be done for our custom object to be schedulled on some worker node? For example if our apple is actually a service that does something like Cyclops
Nice question! But you can't say that an
Apple
is running on a node.You can run a pod on a specific node since you will be running pod containers on a node, but, for example, if we are talking about a Kubernetes service, you are not scheduling it on a node. Service is just a resource living in clusters etcd, and other controllers are able to read its configuration and act upon it.
The same thing applies to
Apples
and other CRDs. You don't schedule a CR to a node, but you can implement a controller around a CRD, which will then create pods and other resources. Scheduling to nodes is specific to pods since they define containers that need to be run on worker nodes.Another example are Deployments. Deployment configuration is just stored in the etcd and the controller manager will use that configuration to create pods from it, but Deployments are not directly running on worker nodes.
In my question a service is something like a API, database (something deployed through a pod)... Maybe I had poor choice of words. Anyway, I think you answered my question, in order to make use of our CRDs we need to have a controller that knows what to do with them
Exactly, you can store custom resources in your Kubernetes cluster, but you need to implement the logic around it through a controller
Thanks a lot 😄
Very nice observation on how to misuse a feature. I wish more tutorials would tell you outright what use cases to avoid when using a tool.
Can you give a concrete example what would be a good case for CRDs?
Thanks Jura!
CRDs are great if you want the object to be an abstraction over a collection of resources.
Check out the CRDs we use at Cyclops to understand what it can look like!
CRD's aren't that easy to explain, you did a great job here!
Thanks Jake!
Tried my best 😁
Great read!
Thanks Domagoj 🙌
Very nice explanation of CRDs
Thanks Luka 🫶
Great write-up! 🙂
Thanks Bap 🙏
Another great blog from the Cyclops team. Keep them coming!
Glad you enjoy them! 🙌