Custom Resource
- A k8s resource is something like pods, containers, and etc, that you can interact with API; a k8s custom resource is to create any resource you want such as
alvinPod, and then you can use k8s API to interact with it
Custom resources are extensions of the Kubernetes API.
Custom Resource Definition
- To define custom resource
Defining a CRD object that creates a new custom resource with a name and schema that you specify. The Kubernetes API serves and handles the storage of your custom resource.
Custom Resource Controller
- Custom resource controller is like the normal k8s controller that has the information of the desired state as well as k8s API
- You can write custom code to do whatever you want using k8s API
- Ex: this custom controller can control the lifecycle of
alvinPodwith ad-hoc business logic you write
You can use custom controllers to encode domain knowledge for specific applications into an extension of the Kubernetes API.