CKAD — Kubernetes API

less than 1 minute read

Extending Kubernetes

Kubernetes is extensible by design. You can define new resource types beyond the built-in Pods, Services, and Deployments. This lets teams model their own objects — databases, certificates, message queues — as native Kubernetes resources.

This chapter covers Custom Resource Definitions (CRDs) and the Operator pattern from the Application Environment, Configuration & Security domain.

Understanding the Kubernetes API

Before creating custom resources, understand how the API is structured.

API Groups and Versions

# List all API resources
kubectl api-resources | head -20

# List API resources for a specific group
kubectl api-resources --api-group=apps

# Check which API versions are available
kubectl api-versions | sort

Every resource belongs to an API group and has a version:

Resource API Group Version
Pod core (v1) v1
Deployment apps apps/v1
Ingress networking.k8s.io networking.k8s.io/v1
CronJob batch batch/v1

How kubectl Works with Resources

When you run kubectl get pods, kubectl:

  1. Discovers the API endpoint from the API server
  2. Sends a GET request to /api/v1/namespaces/default/pods
  3. The API server authenticates, authorizes, and returns data

Custom resources work the same way — once defined, kubectl treats them like built-in resources.


Next: Creating CRDs →

Updated: