Select, filter and scope
- 12 min
- 5 steps
- The API and the loop
Steps
0 of 5 done
Read labels, write a set-based selector, clean up with a field selector, repair a namespace selector that matches nothing, and retire a canary by label.
Step 1 of 5
The
shopnamespace runs a storefront, a canary of it, a cache and two finished seed pods. List the pods inshoptogether with their labels, and find the label that tells the canary apart.Checked against what your commands print.
Step 2, not started: With one label selector, list only the storefront pods (
app.kubernetes.io/name=web) inshopthat are not canaries.Step 3, not started: The two seed pods finished long ago. Delete every pod in
shopwhose phase isSucceeded, with one command that does not name them.Step 4, not started: The prober in the
monitoringnamespace cannot reachhttp://web.shop.svc.cluster.local/, although the NetworkPolicyweb-from-monitoringinshopis meant to allow it. Find why its namespace selector matches nothing, and fix the policy so that the prober gets through.Step 5, not started: The canary is done. Delete every Deployment in
shopthat carries the canary's track label, with one command that selects by label, and leave the stable storefront running.
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.