Create Countdown Job in Kubernetes
How to Set Up a Countdown Job in Kubernetes

Infosec Poet and CAP-certified DevOps/SecOps Engineer, passionate about security, creativity, and continuous learning.
Tasks
Create a job named
countdown-datacenter.Name the spec template
countdown-datacenter(under metadata), and name the containercontainer-countdown-datacenter.Use the image
fedorawith thelatesttag (specify asfedora:latest), and set the restart policy toNever.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: Nevercat <<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





