Knowledgebase

Writing Kubernetes Manifests Print

  • 0

Describing what you want.

WHAT A MANIFEST IS

A file describing an object.

WHAT EVERY ONE CONTAINS

The version of the interface The kind of object Metadata, including a name The specification

WHAT LABELS ARE FOR

Identifying and grouping objects.

WHY THEY MATTER MORE THAN THEY APPEAR

Services select pods by label, and a mismatch means no traffic reaches anything.

WHAT THE COMMONEST BEGINNER FAULT IS

Labels on the pod not matching the service's selector.

WHAT TO CHECK WHEN NOTHING WORKS

Whether the service has any endpoints.

WHAT A DEPLOYMENT SPECIFICATION CONTAINS

The number of replicas The label selector The pod template

WHAT THE POD TEMPLATE CONTAINS

Containers, with images, ports, environment, resources and probes.

WHAT TO ALWAYS SET

Resource requests and limits Liveness and readiness probes

WHY REQUESTS MATTER

They determine where pods are placed.

WHY LIMITS MATTER

They prevent one pod affecting others.

WHAT TO KEEP IN VERSION CONTROL

Every manifest.

WHAT TO AVOID

Changing objects directly in the cluster.

WHY

The change exists nowhere else, and is lost on the next apply.

WHAT TO USE FOR ENVIRONMENT DIFFERENCES

Overlays or templating, rather than copies.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot