Writing an Operator from scratch

This page summarizes the projects mentioned and recommended in the original post on /r/kubernetes

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • kubebuilder

    Kubebuilder - SDK for building Kubernetes APIs using CRDs

  • kubernetes

    Production-Grade Container Scheduling and Management

  • The CSR cleaner is one of the more straightforward controllers you will find in k8s source.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • tgik-controller

    Example controller for TGIK talk

  • sample-controller

    Repository for sample controller. Complements sample-apiserver

  • The most low-level approach I have seen is using the client-go package. Both kubebuilder and controller-runtime are based on this package. You can see an official example here: https://github.com/kubernetes/sample-controller/blob/master/docs/controller-client-go.md But even that sample requires some code generation on top of it https://cloud.redhat.com/blog/kubernetes-deep-dive-code-generation-customresources

  • metacontroller

    Writing kubernetes controllers can be simple

  • Codegen is not magic, but if you want to make it simple stupid, supportable and prod-usable I'd go for metacontroller. There's not much magic to it - just common admission/validation webhooks propagated to your controller implementation, alongside the simplest possible reconciliation cycle. We had adopted Knative driven metacontrollers and it's a pretty solid approach.

  • kopf

    Discontinued A Python framework to write Kubernetes operators in just few lines of code. (by zalando-incubator)

  • Zalando's had been archived since 2020, and Nolar's one has some bugs (I mean a lot).They're mostly updating deps and bumping k8s support, instead of fixing actual pending issues - you have to fix anything and everything on your own ...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts