Hands-on task
k8s: Job that runs to completion
Prepare in /root/job.yaml a Job object (batch/v1) pi: a single container from the busybox:1.36 image computes π with the command awk 'BEGIN { printf "%.5f\n", atan2(0, -1) }' and exits; the pod's restartPolicy is Never. You don't have to write it by hand — it's easier to generate the manifest with a kubectl command and --dry-run=client -o yaml; look at it in the Editor tab. Then run the Job in this sandbox's Kubernetes cluster (kubectl is already configured) and wait until it finishes: 3.14159 must show up in its logs.
- kubernetes
- job
- kubectl create
- dry-run
- yaml manifests
- kubectl apply
- kubectl logs