Learn Everything

Paths/DevOps Engineer/Kubernetes / YAML Manifests

Guided Taskbeginnerkubernetes 1.30 (kind)Ask AI

Apply a Manifest

Imperative commands are for learning; YAML manifests are for real life. Write a Pod manifest and apply it — the declarative workflow behind GitOps and ArgoCD.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • File ~/manifests/pod.yaml exists○
  • Pod web-yaml is Running○

02Walkthrough

6 steps
  1. 01

    Create the manifests directory

    Manifests live in the repository in real projects — one place, reviewable.

    mkdir ~/manifests
  2. 02

    Write the manifest

    One echo with \n separators writes the whole file. apiVersion/kind say WHAT the object is; metadata.name names it; spec.containers declares the container. Note the two-space indentation — it's meaningful in YAML.

    echo 'apiVersion: v1\nkind: Pod\nmetadata:\n name: web-yaml\nspec:\n containers:\n - name: nginx\n image: nginx:1.27' > ~/manifests/pod.yaml
  3. 03

    Review the manifest

    cat prints the file. If the indentation looks wrong, rewrite it — YAML is whitespace-sensitive.

    cat ~/manifests/pod.yaml
  4. 04

    Apply it

    kubectl apply -f reads the file and makes the cluster match it. Then kubectl get pods shows web-yaml Running.

    kubectl apply -f ~/manifests/pod.yaml
  5. 05

    Verify

    kubectl get pods should list web-yaml with STATUS Running.

    kubectl get pods
  6. 06

    Submit for validation

    The validator checks the manifest file and the resulting Pod.

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — kubernetes 1.30 (kind)

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list