Responsible for a resource type

Waits for events for this kind

Converges the state toward the description

Custom Resource (Definition)

Builtin resource types, e.g. Pod

Custom resources to extend Kubernetes

Many controllers ship with a custom resource type

Custom resource are described in a Custom Resource Definition (CRD)

Custom Resource (Definition)

Can have validation since 1.16

Accepted without validation only before 1.22 was deprecated and…

…is superceded by

Controllers must ship updated CRDs

API deprecations are documented

Demo: Controller

Quick and dirty

Written in bash (yes, that is possible)


CRD for controlling replicas

kind: ReplicaConfig
  name: nginx
  kind: Deployment
  name: nginx
  replicas: 3

Controllers for external services

Controllers can control the state of external services

Custom resource describes that desired state

Controller synchronized this state

The external service is updated when the custom resource is…




Enables infrastructure management from Kubernetes