How do you create a Kubernetes job job1 with image busybox that will be executed 3 times and maximum of 2 job instances will run in parallel? The command executed in a job should be sleep 10 && echo "Hello world"
Experience Level: Medior
Tags: Kubernetes
Answer
Run the following command:
Edit the job.yaml by running the following command:
Add the following fields to spec:
Save the file and run the following:
Related Kubernetes job interview questions
What is a Kubernetes service account?
Kubernetes JuniorHow do you list Kubernetes service accounts?
Kubernetes JuniorHow can you display a list of Kubernetes pods that will automatically rerender when a pod status changes?
Kubernetes JuniorWhat are the three kinds of object management supported in Kubernetes?
Kubernetes JuniorHow do you create a temporary pod and verify a http connectivity to a service svc1 that exposed a port 80?
Kubernetes Senior