Kubernetes Simulator
intermediate · ~8 min
A room each
Two teams share this cluster, checkout and search, and both called their app web. Both deployed to the default namespace — so the second deploy simply replaced the first. Only one web runs, and nobody is sure whose.
A namespace is a room inside the cluster: names only have to be unique within one, and quotas and permissions are set per namespace. -n NAME points a command at one; kubectl config set-context --current --namespace=NAME changes where commands go by default.
Objectives
- Give each team a namespace: checkout and search
- Run web (nginx:1.27, 2 replicas) in both namespaces
- Clear the shared web out of default
- Bonus: Switch your default namespace with kubectl config set-context
Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.