Difficulty: Beginner
Estimated Time: 15 minutes


This scenario takes you through the essentials of defining new Kubernetes Custom Resource Definitions (CRDs). You will extend Kubernetes by creating new resources beyond the standard ones you normally get with any Kubernetes cluster. Once you understand CRDs, you will learn how to further extend Kubernetes using the powerful Operator pattern.

In this scenario you will learn how to:

  • Create a CRD and define custom attributes
  • Discover how your CRD becomes a new resource
  • Add, inspect, and remove instances of a custom resource

CRDs are a mechanism used to add new kinds into a Kubernetes cluster. CRDs are all part of the extensibility of Kubernetes and its API. CRDs are in widespread use as a Kubernetes extensibility mechanism and have been available in beta since the 1.7 release. The 1.16 release marks the graduation of CRDs to general availability (GA). When added CRDs are connected to custom controllers, it leads you to the Operator pattern. You now have a solid introduction to the powerful Operator pattern.

Lessons Learned

With these steps you have learned:

  • ✔ How to create a CRD and define custom attributes
  • ✔ How how your CRD becomes a new resource
  • ✔ How to add, inspect, and remove instances of a custom resource

Special Thank You

To Ken Sipe as he inspired this scenario from his labs found here.


For a deeper understanding of these topics and more, join
Jonathan Johnson
at various conferences, symposiums, workshops, and meetups.

Software Architectures ★ Speaker ★ Workshop Hosting ★ Kubernetes & Java Specialist

Custom Resource Definitions

Step 1 of 7

Your Kubernetes Cluster

For this scenario, Katacoda started a fresh Kubernetes cluster for you. Verify it's ready for your use:

kubectl version --short && \ kubectl get componentstatus && \ kubectl get nodes && \ kubectl cluster-info

The Helm package manager used for installing applications on Kubernetes is also available:

helm version --short

Kubernetes Dashboard

You can administer your cluster with the kubectl CLI tool or use the visual Kubernetes Dashboard. Use this script to access the protected Dashboard: