controller-runtime VS sample-controller

Compare controller-runtime vs sample-controller and see what are their differences.

controller-runtime

Repo for the controller-runtime subproject of kubebuilder (sig-apimachinery) (by kubernetes-sigs)

sample-controller

Repository for sample controller. Complements sample-apiserver (by kubernetes)
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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
controller-runtime sample-controller
53 7
2,305 3,025
1.0% 0.8%
9.4 0.0
5 days ago 2 days ago
Go Go
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

controller-runtime

Posts with mentions or reviews of controller-runtime. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-23.

sample-controller

Posts with mentions or reviews of sample-controller. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-25.
  • Is there a tutorial on how to write an Operator in Go?
    4 projects | /r/kubernetes | 25 Nov 2022
    - Sample controller: https://github.com/kubernetes/sample-controller
  • Writing an Operator from scratch
    7 projects | /r/kubernetes | 5 Nov 2022
    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
  • Container in cluster which can control cluster
    1 project | /r/kubernetes | 21 Dec 2021
    I would still recommend gitOps tools or if you want to create your own abstraction (CRD) that encapsulates whatever behaviour you want to watch/act upon, take a look into kubernetes sample controller (https://github.com/kubernetes/sample-controller) or the kubernetes operator pattern https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
  • Anybody use both kubebuilder and operator-sdk to create controllers/operators?
    1 project | /r/kubernetes | 20 Dec 2021
    Either should be fine. In case though you want something more basic then consider sample-controller: https://github.com/kubernetes/sample-controller
  • How to get to the next Level in Kubernetes?
    3 projects | /r/kubernetes | 31 Aug 2021
    As far as Operator development goes, if you are comfortable with golang then I would recommend checking out sample-controller https://github.com/kubernetes/sample-controller It does not abstract the underlying client-go machinery and so provides a good way to understand how various parts of an Operator come together. On the other hand, if you don't want to get exposed to that much details then either Operator SDK or Kubebuilder will be good options. In case you are not into golang then there are SDKs for other languages as well (Python, Java, etc.).
  • Opensource K8s operator developed in Go to contribute
    4 projects | /r/kubernetes | 18 Jun 2021
    Cool! Given that you mention you are a beginner in K8s operator development, here is a plan that I would like to suggest. 1. Get basic understanding of Kubernetes custom controllers first. The sample controller repo is a good place to start. https://github.com/kubernetes/sample-controller
  • How to start combining kubernetes and go knowledge
    5 projects | /r/kubernetes | 17 Mar 2021
    the sample controller using client-go to learn about informers: https://github.com/kubernetes/sample-controller

What are some alternatives?

When comparing controller-runtime and sample-controller you can also consider the following projects:

client-go - Go client for Kubernetes.

kubebuilder - Kubebuilder - SDK for building Kubernetes APIs using CRDs

controller-tools - Tools to use with the controller-runtime libraries

percona-xtradb-cluster-operator - Percona Operator for MySQL based on Percona XtraDB Cluster

operator-sdk - SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.

kubeplus - Kubernetes Operator to create multi-instance SaaS from Helm charts using Kubernetes-native APIs

yaml - A better way to marshal and unmarshal YAML in Golang

percona-server-mongodb-operator - Percona Operator for MongoDB

golang-design-pattern - 设计模式 Golang实现-《研磨设计模式》读书笔记

metacontroller - Writing kubernetes controllers can be simple

sample-controller-kubebuilder - This is Sample Controller(Foo Controller) developed by Kubebuilder

apimachinery