kubebuilder
client-go
kubebuilder | client-go | |
---|---|---|
50 | 40 | |
7,962 | 9,132 | |
1.3% | 1.0% | |
9.7 | 9.6 | |
9 days ago | 9 days ago | |
Go | Go | |
Apache License 2.0 | Apache License 2.0 |
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
-
How do Kubernetes Operators Handle Concurrency?
By default, operators built using Kubebuilder and controller-runtime process a single reconcile request at a time. This is a sensible setting, since it's easier for operator developers to reason about and debug the logic in their applications. It also constrains throughput from the controller to core Kubernetes resources like ectd and the API server.
-
How to Write a Kubernetes Operator Using client-go
client-go is the official Golang client for Kubernetes, responsible for interacting with the Kubernetes API server using REST API. In fact, client-go can do almost anything, not just for writing operators. Even the internal implementation of kubectl is based on client-go. As for more specialized frameworks used to write operators, including controller-runtime, kubebuilder, and operator-sdk, they will be introduced later in this series.
- Como construir um operador HPA baseado na fila do RabbitMQ no Kubernetes
-
From Whispers to Wildfire: Celebrating a Decade of Kubernetes
And it is only because of the focus on extensibility and interoperability that today, we can run WebAssembly workloads in Kubernetes so seamlessly. SpinKube is an open source stack of projects for running WebAssembly applications. A core piece of the stack is a containerd shim. I remember when containerd was donated to the CNCF in 2017. That took work and collaboration from several companies, most notably Docker, to make happen. SpinKube also depends on CRDs and operators. I recall seeing one the early demos of scaffolding an operator and a CRD in a SIG meeting from Phillip Wittrock, who went on to work on Kubebuilder in a Kubernetes SIG. Kubebuilder is a key piece of SpinKube’s Spin operator development. As I reflect on the last decade, I appreciate every contribution even more deeply.
-
Extending Kubernetes Functionality: A Practical Guide to Custom Resource Definitions
Kubebuilder, a framework by Kubernetes SIGs, simplifies creating Kubernetes APIs using Custom Resource Definitions.
-
SpinKube: Orchestrating light, fast and efficient WebAssembly (Wasm) workloads in Kubernetes (k8s)
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
kubebuilder: brew install kubebuilder
-
Annotations in Kubernetes Operator Design
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
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
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!
client-go
-
How do Kubernetes Operators Handle Concurrency?
Controller-runtime uses the client-go/util/workqueue library to implement its underlying reconciliation queue. In the package's doc.go file, a comment states that the workqueue supports these properties:
-
How to Write a Kubernetes Operator Using client-go
client-go is the official Golang client for Kubernetes, responsible for interacting with the Kubernetes API server using REST API. In fact, client-go can do almost anything, not just for writing operators. Even the internal implementation of kubectl is based on client-go. As for more specialized frameworks used to write operators, including controller-runtime, kubebuilder, and operator-sdk, they will be introduced later in this series.
-
The Inner Workings of Kubernetes Management Frontends — A Software Engineer’s Perspective
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?
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.
-
Can't override Kubernetes config in Kubernetes Go client
GitHub related issue https://github.com/kubernetes/client-go/issues/735
-
CUE compared to helm/kustomize...
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
-
How to list all kubernetes objects with specific label using client-go
I looked at dynamic package, but it seems like it needs GroupVersionResource, which is different for, say, Service objects and Deployment objects. Also when I pass schema.GroupVersionResource{Group: "apps", Version: "v1"} it doesn't find anything, when I pass schema.GroupVersionResource{Version: "v1"} it finds only namespace object and also doesn't looks for labels, though I provided label options:
-
What's the best way to get notified when kubernetes Deployments change using the k8s.io/client-go library?
I'm writing a script that uses the k8s.io/client-go library (godocs here) to manipulate Deployments. In particular, I want to add a label selector to every Deployment in my cluster. Deployment label selectors are immutable. So my approach is to:
- K8S Get deployment liveness probe status
What are some alternatives?
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)
operator-sdk - SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.
kustomize - Customization of kubernetes YAML configurations
kubegres - Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
celery - Distributed Task Queue (development branch)
crossplane - The Cloud Native Control Plane
apimachinery
python - Official Python client library for kubernetes
k3s - Lightweight Kubernetes
spark-operator - Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
kube-openapi - Kubernetes OpenAPI spec generation & serving