kubebuilder VS client-go

Compare kubebuilder vs client-go and see what are their differences.

kubebuilder

Kubebuilder - SDK for building Kubernetes APIs using CRDs (by kubernetes-sigs)

client-go

Go client for Kubernetes. (by kubernetes)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
kubebuilder client-go
45 38
7,367 8,586
1.5% 1.5%
9.2 9.3
6 days ago 5 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.

kubebuilder

Posts with mentions or reviews of kubebuilder. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-14.
  • SpinKube: Orchestrating light, fast and efficient WebAssembly (Wasm) workloads in Kubernetes (k8s)
    5 projects | dev.to | 14 Mar 2024
    The Spin operator uses the Kubebuilder framework and contains a Spin App Custom Resource Definition (CRD) and controller. It watches Spin App Custom Resources and realizes the desired state in the K8s cluster. Aside from the immediate benefits gained by running Wasm workloads in k8s, additional optimizations such as Horizontal Pod Scaling (HPA) and k8s Event-driven Autoscaling (KEDA) can be achieved in a pinch.
  • Building a Kubernetes Operator with the Operator Framework
    10 projects | dev.to | 7 Jan 2024
    kubebuilder: brew install kubebuilder
  • Annotations in Kubernetes Operator Design
    4 projects | dev.to | 26 Nov 2023
    The operator that I've been working on is designed to manage the full lifecycle of a QuestDB database instance, including version and hardware upgrades, config changes, backups, and (eventually) recovery from node failure. I used the Operator SDK and kubebuilder frameworks to provide scaffolding and API support.
  • Kubebuilder Tips and Tricks
    2 projects | dev.to | 22 Aug 2023
    Recently, I've been spending a lot of time writing a Kubernetes operator using the go operator-sdk, which is built on top of the Kubebuilder framework. This is a list of a few tips and tricks that I've compiled over the past few months working with these frameworks.
  • We moved our Cloud operations to a Kubernetes Operator
    3 projects | dev.to | 15 Aug 2023
    Since we built our operator using the Kubebuilder framework, most standard monitoring tasks were handled for us out-of-the-box. Our operator automatically exposes a rich set of Prometheus metrics that measure reconciliation performance, the number of k8s API calls, workqueue statistics, and memory-related metrics. We we were able to ingest these metrics into pre-built dashboards by leveraging the grafana/v1-alpha plugin, which scaffolds two Grafana dashboards to monitor Operator resource usage and performance. All we had to do was add these to our existing Grafana manifests and we were good to go!
  • Has anyone ever tried to learn how k8s works?
    4 projects | /r/golang | 11 Jul 2023
    I wrote a CSI driver and some operators. I admire K8s, because you can find solution to almost any problem in the source code - API versioning, load balancing, request throttling, optimistic concurrency, security, and much much more. I recommend https://book.kubebuilder.io/ It is similar to Operator SDK, but without Openshift-specific stuff. It gradually introduces you to many k8s concepts, and follows design patterns that k8s uses internally.
  • What Is A Kubernetes Operator?
    3 projects | dev.to | 7 Jul 2023
  • Writing a Kubernetes Operator
    11 projects | news.ycombinator.com | 9 Mar 2023
    A better way to write an operator these days is to use kubebuilder [1].

    My complaint is that I have seen orgs write operators for random stuff, often reinventing the wheel. Lot of operators in orgs are result of resume driven development. Having said that it often comes handy for complex orchestration.

    [1]https://github.com/kubernetes-sigs/kubebuilder

  • Question: Resources to learn K8s operator programming
    4 projects | /r/kubernetes | 28 Feb 2023
  • Which subreddit for questions about developing Kubernetes controllers?
    2 projects | /r/golang | 23 Feb 2023

client-go

Posts with mentions or reviews of client-go. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-14.
  • The Inner Workings of Kubernetes Management Frontends — A Software Engineer’s Perspective
    4 projects | dev.to | 14 Feb 2024
    The Kubernetes clients (e.g., Go client) support developers with both methods to connect to a cluster, as we can see in the following examples.
  • Has anyone ever tried to learn how k8s works?
    4 projects | /r/golang | 11 Jul 2023
    My suggestion would be to start looking at things like https://github.com/kubernetes/client-go first in order to get a feel for the API and how data plane k8s components interact with the apiserver (it's the same thing that kubelet uses). Then move on to trying to build your own k8s operator to get a feel for how people expand and customize k8s functionality without having to modify upstream at all. IMO the codebase itself is too messy and in constant flux to make too much sense of it unless you are planning to contribute to upstream.
  • CUE compared to helm/kustomize...
    3 projects | /r/kubernetes | 5 Jul 2023
    CUE is cool and all but as soon as I start writing real code structures I want to reach for client-go.
  • Go 1.21 will (probably) download newer toolchains on demand by default
    4 projects | news.ycombinator.com | 23 Jun 2023
    I'm... really not sure I agree with this, from a philosophical point of view. It feels like this is making "eh, we'll just upgrade our Go version next quarter" too easy; ultimately some responsibility toward updating your application's Go version to work with what new dependencies require should fall on Us, the application developers. Sure, we're bad at it. Everyone's lived through running years-old versions of some toolchain. But I think this just makes the problem worse, not better.

    Its compounded by the problem that, when you're setting up a new library, the `go` directive in the mod file defaults to your current toolchain; most likely a very current one. It would take a not-insignificant effort on the library author's part to change that to assert the true-minimum version of Go required, based on libraries and language features and such. That's an effort most devs won't take on.

    I'd also guess that many developers, up-to this point if not indefinitely because education is hard, interpreted that `go` directive to mean more-of "the version of go this was built with"; not necessarily "the version of go minimally required". There are really major libraries (kubernetes/client-go [1]) which assert a minimum go version of 1.20; the latest version (see, for comparison, the aws-sdk, which specifies a more reasonable go1.11 [2]). I haven't, you know, fully audited these libraries, but 1.20 wasn't exactly a major release with huge language and library changes; do they really need 1.20? If devs haven't traditionally operated in this world where keeping this value super-current results in actually significant downstream costs in network bandwidth (go1.20 is 100mb!) and CI runtime, do we have confidence that the community will adapt? There's millions of Go packages out there.

    Or, will a future version of Go patch a security update, not backport it more than one version or so, and libraries have to specify the newest `go` directive version, because manifest security scanning and policy and whatever? Like, yeah, I get the rosy worldview of "your minimum version encodes required language and library features", but its not obvious to me that this is how this field is, or even will be, used.

    Just a LOT of tertiary costs to this change which I hope the team has thought through.

    [1] https://github.com/kubernetes/client-go/blob/master/go.mod#L...

    [2] https://github.com/aws/aws-sdk-go/blob/main/go.mod

  • My LFX Mentorship experience with OpenELB
    8 projects | dev.to | 6 Oct 2022
    Then on June 18th, 2022, I got a chance to meet our mentors and the other mentee of OpenELB (the mentee and the mentors of OpenFunction were also there). There I was informed about how to start working on the project, so I started learning about using the Kubernetes API client. After experimenting with the official Kubernetes Client, I learned that it's not very feasible to use that for dealing with CRDs (custom resource definitions), so I explored the controller-runtime client as per what I found in many sources, and found that it was a great fit for the backend of our project. During that time, I also built a simple project to see if everything would work as expected or not (as this was the first time I dealt with a Kubernetes client, I considered that debugging would be easier in a smaller project).
  • Automatically import Secrets INTO Vault
    5 projects | /r/kubernetes | 10 Sep 2022
  • Using client-go to `kubectl apply` against the Kubernetes API directly with multiple types in a single YAML file
    6 projects | /r/codehunter | 14 Aug 2022
    I'm using https://github.com/kubernetes/client-go and all works well.
  • 深入解析kubernetes中的选举机制
    2 projects | dev.to | 31 Jul 2022
  • Golang for devops
    2 projects | /r/devops | 26 Apr 2022
    with this https://github.com/kubernetes/client-go (get, delete, create deployments, secrets, pods...)
  • k8s controller to scale up and down namespaces on demand, with an embedded friendly UI
    3 projects | /r/kubernetes | 4 Apr 2022
    I directly used the client-go package from Kubernetes, as we wrote a controller which does not handle CRDs. If you are already a little bit comfortable with Go (I'm definitely not an expert), you should be able to get on the rails pretty quickly, especially with their examples. I'll be happy to help if needed!

What are some alternatives?

When comparing kubebuilder and client-go you can also consider the following projects:

helm-operator - Successor: https://github.com/fluxcd/helm-controller — The Flux Helm Operator, once upon a time a solution for declarative Helming.

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

kustomize - Customization of kubernetes YAML configurations

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

crossplane - The Cloud Native Control Plane

kubegres - Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.

python - Official Python client library for kubernetes

spark-operator - Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.

celery - Distributed Task Queue (development branch)

apimachinery

k3s - Lightweight Kubernetes

Concourse - Concourse is a container-based continuous thing-doer written in Go.