Skip to content
Captain's Academy0
← Kubernetes sea chart
Island 1 · Core Concepts · Port 1.19

Imperative vs declarative

Instagram
Stop writing YAML from scratch. Let kubectl write it. The CKA trick everyone should know.
You'll learn to

choose create/run vs apply, and generate YAML with --dry-run=client -o yaml

Recap

  1. 1Commands for speed (imperative)
  2. 2Files + apply for keeps (declarative)
  3. 3--dry-run=client -o yaml writes your YAML
Check yourself

Which flag stops kubectl from creating the object?

1.19

Stamp this lesson

Watched it and passed the check? Mark it in your logbook.

Words from this port