World map

 

BM: Baca dalam Bahasa Melayu

World K7: Self-Driving

CRDs and operators

You will learn: how CRDs teach a cluster new kinds, and how operators run them with the same loop.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

You are here: cluster kind-dev namespace default
kubectl apply -f app.yaml fails: resource mapping not found, no matches for kind Application in version argoproj.io/v1alpha1, ensure CRDs are installed first. Terminal output: $ kubectl apply -f app.yaml error: resource mapping not found for name: "kedai-kancil" namespace: "argocd" from "app.yaml": no matches for kind "Application" in version "argoproj.io/v1alpha1" ensure CRDs are installed first

In plain words: this cluster has never heard of an Application. Nobody taught it that kind yet.

Watch

A cluster knows built-in kinds, like Pod and Deployment. A CRD (CustomResourceDefinition): Teaches the cluster a new kind of object, like adding a dish to the menu. teaches it a new kind, like adding a dish to the menu. Installing Argo CD adds Application this way.

Drag a card into a box. Or tap the card, then tap the box.

      Try it

      A new kind needs a manager too. Every manager runs the same loop. Delete a tray and watch this one.

      Want 3, see 3. Delete a pod: see 2, make 1 more.

      Want 3. See 3. All good.

      Want3written on the order for shop
      See33 ready
      Do All goodGaps fixed: 0
      Stalls: 3. Trays: 3 (3 ready). Waiting for a stall: 0.
      dev-workerOpen
      • shop·d6b6z
      • shop·zbn9j
      dev-worker2Open
      • shop·gnjxm

      Watch

      An operator: A new kind plus its own manager: a controller that runs one app, like Postgres, for you. is a new kind plus its own manager. This one, below, runs Postgres. Who makes the 3 database pods?

      Pick one answer.

      apiVersion: postgresql.cnpg.io/v1
      kind: Cluster
      metadata:
        name: kedai-db
      spec:
        instances: 3
        storage:
          size: 1Gi

      Try it

      Put the operator setup in order.

      First step at the top. Put these in order. Use the arrows, or drag.

      • The operator makes pods, Services and storage
      • Apply your object: kind Cluster, 3 instances
      • Install the CRD: the cluster learns the new kind
      • Run the operator: its controller starts watching

      Predict

      You remove the operator but keep the Cluster object. A database pod dies. What happens?

      Pick one answer.

      You did it!

      You can now explain CRDs and operators as the same loop, reused.

      Go deeper (optional)

      kubectl get crds lists the kinds your cluster learned. kubectl explain works on them too, when the CRD has a schema. Popular operators: cert-manager, CloudNativePG and the Prometheus Operator. Real rep (optional): install Argo CD on kind, then run kubectl get crds. Spot applications.argoproj.io.