Best Practices on writing a Kubernetes Operator: my lessons from Capsule

Writing a Kubernetes Operator is easy, they said, and it is: you just need to embrace the Kubernetes patterns and the provided code-base. Nobody shared it, so I decided to sum up all the ups and downs I faced during the development phase of my first open-sourced Kubernetes operator.

Abstract

Writing a Kubernetes Operator is easy, they said, and it is: you just need to embrace the Kubernetes patterns and the provided code-base. Nobody shared it, so I decided to sum up all the ups and downs I faced during the development phase of my first open-sourced Kubernetes operator. Capsule is an open-source Operator that leverages Kubernetes multi-tenancy capabilities, providing a new abstraction layer named Tenant that allows to group several Namespaces under the same roof. During my development journey, I had the pleasure to bang my head against the wall and find out some best practices that could help you out writing your first Operator: no need to try to reinvent the wheel, the way is the Operator Pattern and the useful packages provided by the official code-base that sometimes aren't so promoted in the hello-world examples. I'll provide a brief Kubernetes overview to help out your understanding of the context, with the goal of Capsule and the challenges I faced while writing the reconciliation loops for the resources that Operator aims to manage.

Video

GoLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".


Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2024 GoLab | The international conference on Go in Florence-Design & devCantiere Creativo-Made withDatoCMS