Hands-on Lab·Certified Kubernetes Administrator
Custom Resources and Operators
A CRD gives you a real Kubernetes resource with validation, printer columns, RBAC and kubectl support, for the cost of one YAML file. It gives you no behaviour at all, and the gap between those two facts is what an operator fills.
Cluster Architecture and Configuration Guide 20 of 103 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 35 min
apiextensions.k8s.io/v1 requires a structural schema, so the permissive CRDs from older tutorials no longer apply cleanly.
- CRD APIapiextensions.k8s.io/v1
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when you need to know what a CRD gives you and where an operator has to take over. This matters because a CustomResourceDefinition buys a real Kubernetes resource - validation, RBAC, kubectl support - and no behaviour whatsoever.
- adding an entire resource type to the API server with one YAML file
- creating and listing instances that behave exactly like built-in resources
- watching the API server reject an object that violates the schema
- splitting
statusfromspecwith the status subresource, and patching it separately - confirming nothing happens without an operator, then deleting the CRD and taking every object with it
Before you start
- The API objects and kubectl guides.
- The RBAC guide, since custom resources need their own rules.
- Cluster-admin, because creating a CRD changes the cluster's API surface.
-
One YAML file adds a resource type
-
It behaves like a built-in resource
-
Validation is enforced by the API server
-
The status subresource, and why it is separate
-
Nothing happens, and that is the whole point of an operator
-
Deleting the CRD deletes every object of that kind