Image modified from [Kubernetes Icons Set](https://github.com/kubernetes/community/tree/master/icons)

(1) What are Kubernetes Operators and Custom Resources?

Kubernetes API Resources I assume that you have a basic understanding of Kubernetes and know how to use kubectl. Pod, ReplicaSet, Service, and even Namespace are actually types of API Resources. You can use kubectl api-resources to view all the API Resources currently available in your Kubernetes cluster. $ kubectl api-resources NAME SHORTNAMES APIVERSION NAMESPACED KIND bindings v1 true Binding componentstatuses cs v1 false ComponentStatus configmaps cm v1 true ConfigMap endpoints ep v1 true Endpoints events ev v1 true Event limitranges limits v1 true LimitRange namespaces ns v1 false Namespace nodes no v1 false Node persistentvolumeclaims pvc v1 true PersistentVolumeClaim persistentvolumes pv v1 false PersistentVolume pods po v1 true Pod podtemplates v1 true PodTemplate replicationcontrollers rc v1 true ReplicationController resourcequotas quota v1 true ResourceQuota secrets v1 true Secret serviceaccounts sa v1 true ServiceAccount services svc v1 true Service ... ...

Posted on: 2024-08-29 · Edited on: 2024-08-31 · Chi-Sheng Liu
Interaction between client-go and Kubernetes operator. Image from [sample-controller](https://github.com/kubernetes/sample-controller/blob/master/docs/images/client-go-controller-interaction.jpeg)

(2) How to Write a Kubernetes Operator Using client-go

What is 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. ...

Posted on: 2024-09-14 · Edited on: 2024-09-14 · Chi-Sheng Liu