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

Stay connected

You can subscribe to our newsletter to stay updated on the latest news and announcements. Follow us on social media to join our community and engage with other attendees, speakers, and staff. We're on Twitter, Mastodon, Youtube and Facebook. Don't forget to use our official hashtag #GoLab2023 to share your experience and connect with other attendees on social media.

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.
©2023 GoLab | The international conference on Go in Florence-Design & devCantiere Creativo-Made withDatoCMS