Kubernetes Countdown Job Setup Guide

Create Countdown Job in Kubernetes
How to Set Up a Countdown Job in Kubernetes
Tasks
- Create a job named - countdown-datacenter.
- Name the spec template - countdown-datacenter(under metadata), and name the container- container-countdown-datacenter.
- Use the image - fedorawith the- latesttag (specify as- fedora:latest), and set the restart policy to- Never.
- Execute the command - sleep 5.
Steps
- Create a - job.yamlmanifest file.- apiVersion: batch/v1 kind: Job metadata: name: countdown-datacenter spec: template: metadata: name: countdown-datacenter spec: containers: - name: container-countdown-datacenter image: fedora:latest command: ["sleep", "5"] restartPolicy: Never- cat <<EOF > job.yaml apiVersion: batch/v1 kind: Job metadata: name: countdown-datacenter spec: template: metadata: name: countdown-datacenter spec: containers: - name: container-countdown-datacenter image: fedora:latest command: ["sleep", "5"] restartPolicy: Never EOF 
- Apply the manifest file. - k apply -f job.yaml 
- Now describe - job.- k describe job - #k8s #coundown #devops #happylearning