Point kubectl at a namespace and preview a change
- 14 min
- 7 steps
- The API and the loop
Steps
0 of 7 done
Set a default namespace on your context, pull exact fields out of objects, scaffold a manifest with a generator, and use a server dry run and a diff before and after you apply it.
Step 1 of 7
Everything in this lab lives in
shop. Makeshopthe default namespace of your current context, then confirm the context shows it.Checked against what your commands print.
Step 2, not started: List the pods in
shopas a two-column table: the pod name underNAMEand the node it runs on underNODE.Step 3, not started: Print only the image the
frontendDeployment's container runs, with nothing else around it.Step 4, not started: Write a manifest for a Deployment named
cacherunningredis:8.8intocache.yaml, without creating anything in the cluster. Show the file.Step 5, not started: Have the API server check
cache.yamlthrough admission and validation without storing it.Step 6, not started: Create
cacheinshopfrom the file and wait for it to become available.Step 7, not started: Scale
cacheto three replicas by command, then show what applyingcache.yamlagain would change.
Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.