1.

What is the difference between a Pod and a Job? Differentiate the answers as with examples)

Answer»

A Pod always ensure that a container is running whereas the Job ENSURES that the pods run to its completion. Job is to do a finite task.

Examples:

kubectl run mypod1 --image=nginx --restart=Never kubectl run mypod2 --image=nginx --restart=onFailure ○ → kubectl GET pods NAME           READY STATUS   RESTARTS AGE mypod1         1/1 Running   0 59s ○ → kubectl get job NAME     DESIRED SUCCESSFUL   AGE mypod1   1 0            19s


Discussion

No Comment Found

Related InterviewSolutions