Kubernetes Simulator

intermediate · ~8 min

Run it once

Not everything should run forever. A Deployment keeps its pods running and restarts them when they stop; a Job runs pods until they *succeed*, then stops — the right shape for a report, a migration, a backup.

Make a Job called daily-report that runs busybox with this command: sh -c "echo counting orders; sleep 5; echo 1,204 orders yesterday". Everything after -- in kubectl create job is the container's command.

Objectives

Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.