Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e s p a c e b o d y :   P e r s i s t e n t V o l u m e C l a i m ,   r e q u i r e d d r y R u n   ( i n   q u e r y ) :   s t r i n g d r y R u n f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g f i e l d M a n a g e r f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g f i e l d V a l i d a t i o n p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y   n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m   n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e s p a c e   b o d y :   P e r s i s t e n t V o l u m e C l a i m ,   r e q u i r e d   d r y R u n   ( i n   q u e r y ) :   s t r i n g   d r y R u n   f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g   f i e l d M a n a g e r   f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g   f i e l d V a l i d a t i o n   p r e t t y   ( i n   q u e r y ) :   s t r i n g   p r e t t y


Question: What is Response?

Answer: 2 0 0   ( P e r s i s t e n t V o l u m e C l a i m ) :   O K   2 0 1   ( P e r s i s t e n t V o l u m e C l a i m ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: P U T   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p e r s i s t e n t v o l u m e c l a i m s / { n a m e } / s t a t u s


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e s p a c e b o d y :   P e r s i s t e n t V o l u m e C l a i m ,   r e q u i r e d d r y R u n   ( i n   q u e r y ) :   s t r i n g d r y R u n f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g f i e l d M a n a g e r f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g f i e l d V a l i d a t i o n p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y   n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m   n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e s p a c e   b o d y :   P e r s i s t e n t V o l u m e C l a i m ,   r e q u i r e d   d r y R u n   ( i n   q u e r y ) :   s t r i n g   d r y R u n   f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g   f i e l d M a n a g e r   f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g   f i e l d V a l i d a t i o n   p r e t t y   ( i n   q u e r y ) :   s t r i n g   p r e t t y


Question: What is Response?

Answer: 2 0 0   ( P e r s i s t e n t V o l u m e C l a i m ) :   O K   2 0 1   ( P e r s i s t e n t V o l u m e C l a i m ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: P A T C H   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p e r s i s t e n t v o l u m e c l a i m s / { n a m e }


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e s p a c e b o d y :   P a t c h ,   r e q u i r e d d r y R u n   ( i n   q u e r y ) :   s t r i n g d r y R u n f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g f i e l d M a n a g e r f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g f i e l d V a l i d a t i o n f o r c e   ( i n   q u e r y ) :   b o o l e a n f o r c e p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y   n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m   n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e s p a c e   b o d y :   P a t c h ,   r e q u i r e d   d r y R u n   ( i n   q u e r y ) :   s t r i n g   d r y R u n   f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g   f i e l d M a n a g e r   f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g   f i e l d V a l i d a t i o n   f o r c e   ( i n   q u e r y ) :   b o o l e a n   f o r c e   p r e t t y   ( i n   q u e r y ) :   s t r i n g   p r e t t y


Question: What is Response?

Answer: 2 0 0   ( P e r s i s t e n t V o l u m e C l a i m ) :   O K   2 0 1   ( P e r s i s t e n t V o l u m e C l a i m ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: P A T C H   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p e r s i s t e n t v o l u m e c l a i m s / { n a m e } / s t a t u s


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e s p a c e b o d y :   P a t c h ,   r e q u i r e d d r y R u n   ( i n   q u e r y ) :   s t r i n g d r y R u n f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g f i e l d M a n a g e r f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g f i e l d V a l i d a t i o n f o r c e   ( i n   q u e r y ) :   b o o l e a n f o r c e p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y   n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m   n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e s p a c e   b o d y :   P a t c h ,   r e q u i r e d   d r y R u n   ( i n   q u e r y ) :   s t r i n g   d r y R u n   f i e l d M a n a g e r   ( i n   q u e r y ) :   s t r i n g   f i e l d M a n a g e r   f i e l d V a l i d a t i o n   ( i n   q u e r y ) :   s t r i n g   f i e l d V a l i d a t i o n   f o r c e   ( i n   q u e r y ) :   b o o l e a n   f o r c e   p r e t t y   ( i n   q u e r y ) :   s t r i n g   p r e t t y


Question: What is Response?

Answer: 2 0 0   ( P e r s i s t e n t V o l u m e C l a i m ) :   O K   2 0 1   ( P e r s i s t e n t V o l u m e C l a i m ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: D E L E T E   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p e r s i s t e n t v o l u m e c l a i m s / { n a m e }


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e s p a c e b o d y :   D e l e t e O p t i o n s d r y R u n   ( i n   q u e r y ) :   s t r i n g d r y R u n g r a c e P e r i o d S e c o n d s   ( i n   q u e r y ) :   i n t e g e r g r a c e P e r i o d S e c o n d s i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l   ( i n   q u e r y ) :   b o o l e a n i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y p r o p a g a t i o n P o l i c y   ( i n   q u e r y ) :   s t r i n g p r o p a g a t i o n P o l i c y   n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e   o f   t h e   P e r s i s t e n t V o l u m e C l a i m   n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e s p a c e   b o d y :   D e l e t e O p t i o n s   d r y R u n   ( i n   q u e r y ) :   s t r i n g   d r y R u n   g r a c e P e r i o d S e c o n d s   ( i n   q u e r y ) :   i n t e g e r   g r a c e P e r i o d S e c o n d s   i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l   ( i n   q u e r y ) :   b o o l e a n   i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l   p r e t t y   ( i n   q u e r y ) :   s t r i n g   p r e t t y   p r o p a g a t i o n P o l i c y   ( i n   q u e r y ) :   s t r i n g   p r o p a g a t i o n P o l i c y


Question: What is Response?

Answer: 2 0 0   ( P e r s i s t e n t V o l u m e C l a i m ) :   O K   2 0 2   ( P e r s i s t e n t V o l u m e C l a i m ) :   A c c e p t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: D E L E T E   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p e r s i s t e n t v o l u m e c l a i m s


Question: What is Parameters?

Answer: n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e s p a c e b o d y :   D e l e t e O p t i o n s c o n t i n u e   ( i n   q u e r y ) :   s t r i n g c o n t i n u e d r y R u n   ( i n   q u e r y ) :   s t r i n g d r y R u n f i e l d S e l e c t o r   ( i n   q u e r y ) :   s t r i n g f i e l d S e l e c t o r g r a c e P e r i o d S e c o n d s   ( i n   q u e r y ) :   i n t e g e r g r a c e P e r i o d S e c o n d s i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l   ( i n   q u e r y ) :   b o o l e a n i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l l a b e l S e l e c t o r   ( i n   q u e r y ) :   s t r i n g l a b e l S e l e c t o r l i m i t   ( i n   q u e r y ) :   i n t e g e r l i m i t p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y p r o p a g a t i o n P o l i c y   ( i n   q u e r y ) :   s t r i n g p r o p a g a t i o n P o l i c y r e s o u r c e V e r s i o n   ( i n   q u e r y ) :   s t r i n g r e s o u r c e V e r s i o n r e s o u r c e V e r s i o n M a t c h   ( i n   q u e r y ) :   s t r i n g r e s o u r c e V e r s i o n M a t c h s e n d I n i t i a l E v e n t s   ( i n   q u e r y ) :   b o o l e a n s e n d I n i t i a l E v e n t s t i m e o u t S e c o n d s   ( i n   q u e r y ) :   i n t e g e r t i m e o u t S e c o n d s   n a m e s p a c e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e s p a c e   b o d y :   D e l e t e O p t i o n s   c o n t i n u e   ( i n   q u e r y ) :   s t r i n g   c o n t i n u e   d r y R u n   ( i n   q u e r y ) :   s t r i n g   d r y R u n   f i e l d S e l e c t o r   ( i n   q u e r y ) :   s t r i n g   f i e l d S e l e c t o r   g r a c e P e r i o d S e c o n d s   ( i n   q u e r y ) :   i n t e g e r   g r a c e P e r i o d S e c o n d s   i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g


Question: What is Response?

Answer: 2 0 0   ( S t a t u s ) :   O K   4 0 1 :   U n a u t h o r i z e d   T h i s   p a g e   i s   a u t o m a t i c a l l y   g e n e r a t e d .   I f   y o u   p l a n   t o   r e p o r t   a n   i s s u e   w i t h   t h i s   p a g e ,   m e n t i o n   t h a t   t h e   p a g e   i s   a u t o - g e n e r a t e d   i n   y o u r   i s s u e   d e s c r i p t i o n .   T h e   f i x   m a y   n e e d   t o   h a p p e n   e l s e w h e r e   i n   t h e   K u b e r n e t e s   p r o j e c t .


Question: What is Bootstrapping clusters with kubeadm?

Answer: Bootstrapping clusters with kubeadmInstalling kubeadmTroubleshooting kubeadmCreating a cluster with kubeadmCustomizing components with the kubeadm APIOptions for Highly Available TopologyCreating Highly Available Clusters with kubeadmSet up a High Availability etcd Cluster with kubeadmConfiguring each kubelet in your cluster using kubeadmDual-stack support with kubeadm


Question: How does Bootstrapping clusters with kubeadm work?

Answer: Bootstrapping clusters with kubeadmInstalling kubeadmTroubleshooting kubeadmCreating a cluster with kubeadmCustomizing components with the kubeadm APIOptions for Highly Available TopologyCreating Highly Available Clusters with kubeadmSet up a High Availability etcd Cluster with kubeadmConfiguring each kubelet in your cluster using kubeadmDual-stack support with kubeadm


Question: When would you use Bootstrapping clusters with kubeadm?

Answer: Bootstrapping clusters with kubeadmInstalling kubeadmTroubleshooting kubeadmCreating a cluster with kubeadmCustomizing components with the kubeadm APIOptions for Highly Available TopologyCreating Highly Available Clusters with kubeadmSet up a High Availability etcd Cluster with kubeadmConfiguring each kubelet in your cluster using kubeadmDual-stack support with kubeadm


Question: What are the benefits of Bootstrapping clusters with kubeadm?

Answer: Bootstrapping clusters with kubeadmInstalling kubeadmTroubleshooting kubeadmCreating a cluster with kubeadmCustomizing components with the kubeadm APIOptions for Highly Available TopologyCreating Highly Available Clusters with kubeadmSet up a High Availability etcd Cluster with kubeadmConfiguring each kubelet in your cluster using kubeadmDual-stack support with kubeadm


Question: What is Jobs?

Answer: JobsJobs represent one-off tasks that run to completion and then stop.A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. Suspending a Job will delete its active Pods until the Job is resumed again.A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot).You can also use a Job to run multiple Pods in parallel.If you want to run a Job (either a single task, or several in parallel) on a schedule, see CronJob.Running an example JobHere is an example Job config. It computes π to 2000 places and prints it out. It takes around 10s to complete.controllers/job.yaml apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: spec: containers: - name: pi image: perl:5.34.0 command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never backoffLimit: 4 You can run the example with this command:kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml The output is similar to this:job.batch/pi created Check on the status of the Job with kubectl: Name: pi Namespace: default Selector: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi ... Annotations: batch.kubernetes.io/job-tracking: "" Parallelism: 1 Completions: 1 Start Time: Mon, 02 Dec 2019 15:20:11 +0200 Completed At: Mon, 02 Dec 2019 15:21:16 +0200 Duration: 65s Pods Statuses: 0 Running / 1 Succeeded / 0 Failed Pod Template: Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi Containers: pi: Image: perl:5.34.0 Port: <none> Host Port: <none> Command: perl -Mbignum=bpi -wle print bpi(2000) Environment: <none> Mounts: <none> Volumes: <none> Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 21s job-controller Created pod: pi-xf9p4 Normal Completed 18s job-controller Job completed apiVersion: batch/v1 kind: Job metadata: annotations: batch.kubernetes.io/job-tracking: "" ... creationTimestamp: "2022-11-10T17:53:53Z" generation: 1 labels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 batch.kubernetes.io/job-name: pi name: pi namespace: default resourceVersion: "4751" uid: 204fb678-040b-497f-9266-35ffa8716d14 spec: backoffLimit: 4 completionMode: NonIndexed completions: 1 parallelism: 1 selector: matchLabels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 suspend: false template: metadata: creationTimestamp: null labels: batch.kubern


Question: How does Jobs work?

Answer: JobsJobs represent one-off tasks that run to completion and then stop.A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. Suspending a Job will delete its active Pods until the Job is resumed again.A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot).You can also use a Job to run multiple Pods in parallel.If you want to run a Job (either a single task, or several in parallel) on a schedule, see CronJob.Running an example JobHere is an example Job config. It computes π to 2000 places and prints it out. It takes around 10s to complete.controllers/job.yaml apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: spec: containers: - name: pi image: perl:5.34.0 command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never backoffLimit: 4 You can run the example with this command:kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml The output is similar to this:job.batch/pi created Check on the status of the Job with kubectl: Name: pi Namespace: default Selector: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi ... Annotations: batch.kubernetes.io/job-tracking: "" Parallelism: 1 Completions: 1 Start Time: Mon, 02 Dec 2019 15:20:11 +0200 Completed At: Mon, 02 Dec 2019 15:21:16 +0200 Duration: 65s Pods Statuses: 0 Running / 1 Succeeded / 0 Failed Pod Template: Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi Containers: pi: Image: perl:5.34.0 Port: <none> Host Port: <none> Command: perl -Mbignum=bpi -wle print bpi(2000) Environment: <none> Mounts: <none> Volumes: <none> Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 21s job-controller Created pod: pi-xf9p4 Normal Completed 18s job-controller Job completed apiVersion: batch/v1 kind: Job metadata: annotations: batch.kubernetes.io/job-tracking: "" ... creationTimestamp: "2022-11-10T17:53:53Z" generation: 1 labels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 batch.kubernetes.io/job-name: pi name: pi namespace: default resourceVersion: "4751" uid: 204fb678-040b-497f-9266-35ffa8716d14 spec: backoffLimit: 4 completionMode: NonIndexed completions: 1 parallelism: 1 selector: matchLabels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 suspend: false template: metadata: creationTimestamp: null labels: batch.kubern


Question: When would you use Jobs?

Answer: JobsJobs represent one-off tasks that run to completion and then stop.A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. Suspending a Job will delete its active Pods until the Job is resumed again.A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot).You can also use a Job to run multiple Pods in parallel.If you want to run a Job (either a single task, or several in parallel) on a schedule, see CronJob.Running an example JobHere is an example Job config. It computes π to 2000 places and prints it out. It takes around 10s to complete.controllers/job.yaml apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: spec: containers: - name: pi image: perl:5.34.0 command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never backoffLimit: 4 You can run the example with this command:kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml The output is similar to this:job.batch/pi created Check on the status of the Job with kubectl: Name: pi Namespace: default Selector: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi ... Annotations: batch.kubernetes.io/job-tracking: "" Parallelism: 1 Completions: 1 Start Time: Mon, 02 Dec 2019 15:20:11 +0200 Completed At: Mon, 02 Dec 2019 15:21:16 +0200 Duration: 65s Pods Statuses: 0 Running / 1 Succeeded / 0 Failed Pod Template: Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi Containers: pi: Image: perl:5.34.0 Port: <none> Host Port: <none> Command: perl -Mbignum=bpi -wle print bpi(2000) Environment: <none> Mounts: <none> Volumes: <none> Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 21s job-controller Created pod: pi-xf9p4 Normal Completed 18s job-controller Job completed apiVersion: batch/v1 kind: Job metadata: annotations: batch.kubernetes.io/job-tracking: "" ... creationTimestamp: "2022-11-10T17:53:53Z" generation: 1 labels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 batch.kubernetes.io/job-name: pi name: pi namespace: default resourceVersion: "4751" uid: 204fb678-040b-497f-9266-35ffa8716d14 spec: backoffLimit: 4 completionMode: NonIndexed completions: 1 parallelism: 1 selector: matchLabels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 suspend: false template: metadata: creationTimestamp: null labels: batch.kubern


Question: What are the benefits of Jobs?

Answer: JobsJobs represent one-off tasks that run to completion and then stop.A Job creates one or more Pods and will continue to retry execution of the Pods until a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. Suspending a Job will delete its active Pods until the Job is resumed again.A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot).You can also use a Job to run multiple Pods in parallel.If you want to run a Job (either a single task, or several in parallel) on a schedule, see CronJob.Running an example JobHere is an example Job config. It computes π to 2000 places and prints it out. It takes around 10s to complete.controllers/job.yaml apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: spec: containers: - name: pi image: perl:5.34.0 command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never backoffLimit: 4 You can run the example with this command:kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml The output is similar to this:job.batch/pi created Check on the status of the Job with kubectl: Name: pi Namespace: default Selector: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi ... Annotations: batch.kubernetes.io/job-tracking: "" Parallelism: 1 Completions: 1 Start Time: Mon, 02 Dec 2019 15:20:11 +0200 Completed At: Mon, 02 Dec 2019 15:21:16 +0200 Duration: 65s Pods Statuses: 0 Running / 1 Succeeded / 0 Failed Pod Template: Labels: batch.kubernetes.io/controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c batch.kubernetes.io/job-name=pi Containers: pi: Image: perl:5.34.0 Port: <none> Host Port: <none> Command: perl -Mbignum=bpi -wle print bpi(2000) Environment: <none> Mounts: <none> Volumes: <none> Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 21s job-controller Created pod: pi-xf9p4 Normal Completed 18s job-controller Job completed apiVersion: batch/v1 kind: Job metadata: annotations: batch.kubernetes.io/job-tracking: "" ... creationTimestamp: "2022-11-10T17:53:53Z" generation: 1 labels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 batch.kubernetes.io/job-name: pi name: pi namespace: default resourceVersion: "4751" uid: 204fb678-040b-497f-9266-35ffa8716d14 spec: backoffLimit: 4 completionMode: NonIndexed completions: 1 parallelism: 1 selector: matchLabels: batch.kubernetes.io/controller-uid: 863452e6-270d-420e-9b94-53a54146c223 suspend: false template: metadata: creationTimestamp: null labels: batch.kubern


Question: What is Jobs?

Answer: A   J o b   c r e a t e s   o n e   o r   m o r e   P o d s   a n d   w i l l   c o n t i n u e   t o   r e t r y   e x e c u t i o n   o f   t h e   P o d s   u n t i l   a   s p e c i f i e d   n u m b e r   o f   t h e m   s u c c e s s f u l l y   t e r m i n a t e .   A s   p o d s   s u c c e s s f u l l y   c o m p l e t e ,   t h e   J o b   t r a c k s   t h e   s u c c e s s f u l   c o m p l e t i o n s .   W h e n   a   s p e c i f i e d   n u m b e r   o f   s u c c e s s f u l   c o m p l e t i o n s   i s   r e a c h e d ,   t h e   t a s k   ( i e ,   J o b )   i s   c o m p l e t e .   D e l e t i n g   a   J o b   w i l l   c l e a n   u p   t h e   P o d s   i t   c r e a t e d .   S u s p e n d i n g   a   J o b   w i l l   d e l e t e   i t s   a c t i v e   P o d s   u n t i l   t h e   J o b   i s   r e s u m e d   a g a i n .   A   s i m p l e   c a s e   i s   t o   c r e a t e   o n e   J o b   o b j e c t   i n   o r d e r   t o   r e l i a b l y   r u n   o n e   P o d   t o   c o m p l e t i o n .   T h e   J o b   o b j e c t   w i l l   s t a r t   a   n e w   P o d   i f   t h e   f i r s t   P o d   f a i l s   o r   i s   d e l e t e d   ( f o r   e x a m p l e   d u e   t o   a   n o d e   h a r d w a r e   f a i l u r e   o r   a   n o d e   r e b o o t ) .   Y o u   c a n   a l s o   u s e   a   J o b   t o   r u n   m u l t i p l e   P o d s   i n   p a r a l l e l .   I f   y o u   w a n t   t o   r u n   a   J o b   ( e i t h e r   a   s i n g l e   t a s k ,   o r   s e v e r a l   i n   p a r a l l e l )   o n   a   s c h e d u l e ,   s e e   C r o n J o b .


Question: What is Running an example Job?

Answer: H e r e   i s   a n   e x a m p l e   J o b   c o n f i g .   I t   c o m p u t e s   π   t o   2 0 0 0   p l a c e s   a n d   p r i n t s   i t   o u t .   I t   t a k e s   a r o u n d   1 0 s   t o   c o m p l e t e .   a p i V e r s i o n :   b a t c h / v 1   k i n d :   J o b   m e t a d a t a :   n a m e :   p i   s p e c :   t e m p l a t e :   s p e c :   c o n t a i n e r s :   -   n a m e :   p i   i m a g e :   p e r l : 5 . 3 4 . 0   c o m m a n d :   [ " p e r l " ,   " - M b i g n u m = b p i " ,   " - w l e " ,   " p r i n t   b p i ( 2 0 0 0 ) " ]   r e s t a r t P o l i c y :   N e v e r   b a c k o f f L i m i t :   4   Y o u   c a n   r u n   t h e   e x a m p l e   w i t h   t h i s   c o m m a n d :   k u b e c t l   a p p l y   - f   h t t p s : / / k u b e r n e t e s . i o / e x a m p l e s / c o n t r o l l e r s / j o b . y a m l   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   j o b . b a t c h / p i   c r e a t e d   C h e c k   o n   t h e   s t a t u s   o f   t h e   J o b   w i t h   k u b e c t l :   N a m e :   p i   N a m e s p a c e :   d e f a u l t   S e l e c t o r :   b a t c h . k u b e r n e t e s . i o / c o n t r o l l e r - u i d = c 9 9 4 8 3 0 7 - e 5 6 d - 4 b 5 d - 8 3 0 2 - a e 2 d 7 b 7 d a 6 7 c   L a b e l s :   b a t c h . k u b e r n e t e s . i o / c o n t r o l l e r - u i d = c 9 9 4 8 3 0 7 - e 5 6 d - 4 b 5 d - 8 3 0 2 - a e 2 d 7 b 7 d a 6 7 c   b a t c h . k u b e r n e t e s . i o / j o b - n a m e = p i   . . .   A n n o t a t i o n s :   b a t c h . k u b e r n e t e s . i o / j o b - t r a c k i n g :   " "   P a r a l l e l i s m :   1   C o m p l e t i o n s :   1   S t a r t   T i m e :   M o n ,   0 2   D e c   2 0 1 9   1 5 : 2 0 : 1 1   + 0 2 0 0   C o m p l e t e d   A t :   M o n ,   0 2   D e c   2 0 1 9   1 5 : 2 1 : 1 6   + 0 2 0 0   D u r a t i o n :   6 5 s   P o d s   S t a t u s e s :   0   R u n n i n g   /   1   S u c c e e d e d   /   0   F a i l e d   P o d   T e m


Question: What is Writing a Job spec?

Answer: A s   w i t h   a l l   o t h e r   K u b e r n e t e s   c o n f i g ,   a   J o b   n e e d s   a p i V e r s i o n ,   k i n d ,   a n d   m e t a d a t a   f i e l d s .   W h e n   t h e   c o n t r o l   p l a n e   c r e a t e s   n e w   P o d s   f o r   a   J o b ,   t h e   . m e t a d a t a . n a m e   o f   t h e   J o b   i s   p a r t   o f   t h e   b a s i s   f o r   n a m i n g   t h o s e   P o d s .   T h e   n a m e   o f   a   J o b   m u s t   b e   a   v a l i d   D N S   s u b d o m a i n   v a l u e ,   b u t   t h i s   c a n   p r o d u c e   u n e x p e c t e d   r e s u l t s   f o r   t h e   P o d   h o s t n a m e s .   F o r   b e s t   c o m p a t i b i l i t y ,   t h e   n a m e   s h o u l d   f o l l o w   t h e   m o r e   r e s t r i c t i v e   r u l e s   f o r   a   D N S   l a b e l .   E v e n   w h e n   t h e   n a m e   i s   a   D N S   s u b d o m a i n ,   t h e   n a m e   m u s t   b e   n o   l o n g e r   t h a n   6 3   c h a r a c t e r s .   A   J o b   a l s o   n e e d s   a   . s p e c   s e c t i o n .


Question: What is Job Labels?

Answer: J o b   l a b e l s   w i l l   h a v e   b a t c h . k u b e r n e t e s . i o /   p r e f i x   f o r   j o b - n a m e   a n d   c o n t r o l l e r - u i d .


Question: What is Pod Template?

Answer: T h e   . s p e c . t e m p l a t e   i s   t h e   o n l y   r e q u i r e d   f i e l d   o f   t h e   . s p e c .   T h e   . s p e c . t e m p l a t e   i s   a   p o d   t e m p l a t e .   I t   h a s   e x a c t l y   t h e   s a m e   s c h e m a   a s   a   P o d ,   e x c e p t   i t   i s   n e s t e d   a n d   d o e s   n o t   h a v e   a n   a p i V e r s i o n   o r   k i n d .   I n   a d d i t i o n   t o   r e q u i r e d   f i e l d s   f o r   a   P o d ,   a   p o d   t e m p l a t e   i n   a   J o b   m u s t   s p e c i f y   a p p r o p r i a t e   l a b e l s   ( s e e   p o d   s e l e c t o r )   a n d   a n   a p p r o p r i a t e   r e s t a r t   p o l i c y .   O n l y   a   R e s t a r t P o l i c y   e q u a l   t o   N e v e r   o r   O n F a i l u r e   i s   a l l o w e d .


Question: What is Pod selector?

Answer: T h e   . s p e c . s e l e c t o r   f i e l d   i s   o p t i o n a l .   I n   a l m o s t   a l l   c a s e s   y o u   s h o u l d   n o t   s p e c i f y   i t .   S e e   s e c t i o n   s p e c i f y i n g   y o u r   o w n   p o d   s e l e c t o r .


Question: What is Parallel execution for Jobs?

Answer: T h e r e   a r e   t h r e e   m a i n   t y p e s   o f   t a s k   s u i t a b l e   t o   r u n   a s   a   J o b :   N o n - p a r a l l e l   J o b s n o r m a l l y ,   o n l y   o n e   P o d   i s   s t a r t e d ,   u n l e s s   t h e   P o d   f a i l s . t h e   J o b   i s   c o m p l e t e   a s   s o o n   a s   i t s   P o d   t e r m i n a t e s   s u c c e s s f u l l y . P a r a l l e l   J o b s   w i t h   a   f i x e d   c o m p l e t i o n   c o u n t : s p e c i f y   a   n o n - z e r o   p o s i t i v e   v a l u e   f o r   . s p e c . c o m p l e t i o n s . t h e   J o b   r e p r e s e n t s   t h e   o v e r a l l   t a s k ,   a n d   i s   c o m p l e t e   w h e n   t h e r e   a r e   . s p e c . c o m p l e t i o n s   s u c c e s s f u l   P o d s . w h e n   u s i n g   . s p e c . c o m p l e t i o n M o d e = " I n d e x e d " ,   e a c h   P o d   g e t s   a   d i f f e r e n t   i n d e x   i n   t h e   r a n g e   0   t o   . s p e c . c o m p l e t i o n s - 1 . P a r a l l e l   J o b s   w i t h   a   w o r k   q u e u e : d o   n o t   s p e c i f y   . s p e c . c o m p l e t i o n s ,   d e f a u l t   t o   . s p e c . p a r a l l e l i s m . t h e   P o d s   m u s t   c o o r d i n a t e   a m o n g s t   t h e m s e l v e s   o r   a n   e x t e r n a l   s e r v i c e   t o   d e t e r m i n e   w h a t   e a c h   s h o u l d   w o r k   o n .   F o r   e x a m p l e ,   a   P o d   m i g h t   f e t c h   a   b a t c h   o f   u p   t o   N   i t e m s   f r o m   t h e   w o r k   q u e u e . e a c h   P o d   i s   i n d e p e n d e n t l y   c a p a b l e   o f   d e t e r m i n i n g   w h e t h e r   o r   n o t   a l l   i t s   p e e r s   a r e   d o n e ,   a n d   t h u s   t h a t   t h e   e n t i r e   J o b   i s   d o n e . w h e n   a n y   P o d   f r o m   t h e   J o b   t e r m i n a t e s   w i t h   s u c c e s s ,   n o   n e w   P o d s   a r e   c r e a t e d . o n c e   a t   l e a


Question: What is Controlling parallelism?

Answer: T h e   r e q u e s t e d   p a r a l l e l i s m   ( . s p e c . p a r a l l e l i s m )   c a n   b e   s e t   t o   a n y   n o n - n e g a t i v e   v a l u e .   I f   i t   i s   u n s p e c i f i e d ,   i t   d e f a u l t s   t o   1 .   I f   i t   i s   s p e c i f i e d   a s   0 ,   t h e n   t h e   J o b   i s   e f f e c t i v e l y   p a u s e d   u n t i l   i t   i s   i n c r e a s e d .   A c t u a l   p a r a l l e l i s m   ( n u m b e r   o f   p o d s   r u n n i n g   a t   a n y   i n s t a n t )   m a y   b e   m o r e   o r   l e s s   t h a n   r e q u e s t e d   p a r a l l e l i s m ,   f o r   a   v a r i e t y   o f   r e a s o n s :   F o r   f i x e d   c o m p l e t i o n   c o u n t   J o b s ,   t h e   a c t u a l   n u m b e r   o f   p o d s   r u n n i n g   i n   p a r a l l e l   w i l l   n o t   e x c e e d   t h e   n u m b e r   o f   r e m a i n i n g   c o m p l e t i o n s .   H i g h e r   v a l u e s   o f   . s p e c . p a r a l l e l i s m   a r e   e f f e c t i v e l y   i g n o r e d . F o r   w o r k   q u e u e   J o b s ,   n o   n e w   P o d s   a r e   s t a r t e d   a f t e r   a n y   P o d   h a s   s u c c e e d e d   - -   r e m a i n i n g   P o d s   a r e   a l l o w e d   t o   c o m p l e t e ,   h o w e v e r . I f   t h e   J o b   C o n t r o l l e r   h a s   n o t   h a d   t i m e   t o   r e a c t . I f   t h e   J o b   c o n t r o l l e r   f a i l e d   t o   c r e a t e   P o d s   f o r   a n y   r e a s o n   ( l a c k   o f   R e s o u r c e Q u o t a ,   l a c k   o f   p e r m i s s i o n ,   e t c . ) ,   t h e n   t h e r e   m a y   b e   f e w e r   p o d s   t h a n   r e q u e s t e d . T h e   J o b   c o n t r o l l e r   m a y   t h r o t t l e   n e w   P o d   c r e a t i o n   d u e   t o   e x c e s s i v e   p r e v i o u s   p o d   f a i l u r e s   i n   t h e   s a m e   J o b . W h e n   a   P o d   i s   g r a c e f u l l y   s h u t   d o w n ,   i t


Question: What is Completion mode?

Answer: J o b s   w i t h   f i x e d   c o m p l e t i o n   c o u n t   -   t h a t   i s ,   j o b s   t h a t   h a v e   n o n   n u l l   . s p e c . c o m p l e t i o n s   -   c a n   h a v e   a   c o m p l e t i o n   m o d e   t h a t   i s   s p e c i f i e d   i n   . s p e c . c o m p l e t i o n M o d e :   N o n I n d e x e d   ( d e f a u l t ) :   t h e   J o b   i s   c o n s i d e r e d   c o m p l e t e   w h e n   t h e r e   h a v e   b e e n   . s p e c . c o m p l e t i o n s   s u c c e s s f u l l y   c o m p l e t e d   P o d s .   I n   o t h e r   w o r d s ,   e a c h   P o d   c o m p l e t i o n   i s   h o m o l o g o u s   t o   e a c h   o t h e r .   N o t e   t h a t   J o b s   t h a t   h a v e   n u l l   . s p e c . c o m p l e t i o n s   a r e   i m p l i c i t l y   N o n I n d e x e d . I n d e x e d :   t h e   P o d s   o f   a   J o b   g e t   a n   a s s o c i a t e d   c o m p l e t i o n   i n d e x   f r o m   0   t o   . s p e c . c o m p l e t i o n s - 1 .   T h e   i n d e x   i s   a v a i l a b l e   t h r o u g h   f o u r   m e c h a n i s m s : T h e   P o d   a n n o t a t i o n   b a t c h . k u b e r n e t e s . i o / j o b - c o m p l e t i o n - i n d e x . T h e   P o d   l a b e l   b a t c h . k u b e r n e t e s . i o / j o b - c o m p l e t i o n - i n d e x   ( f o r   v 1 . 2 8   a n d   l a t e r ) .   N o t e   t h e   f e a t u r e   g a t e   P o d I n d e x L a b e l   m u s t   b e   e n a b l e d   t o   u s e   t h i s   l a b e l ,   a n d   i t   i s   e n a b l e d   b y   d e f a u l t . A s   p a r t   o f   t h e   P o d   h o s t n a m e ,   f o l l o w i n g   t h e   p a t t e r n   $ ( j o b - n a m e ) - $ ( i n d e x ) .   W h e n   y o u   u s e   a n   I n d e x e d   J o b   i n   c o m b i n a t i o n   w i t h   a   S e r v i c e ,   P o d s   w i t h i n   t h e   J o b   c a n   u s e   t h e   d e t e r m i n i s t i c   h o s t n a m e s   t o   a d d r e s s   e a c h


Question: What is Handling Pod and container failures?

Answer: A   c o n t a i n e r   i n   a   P o d   m a y   f a i l   f o r   a   n u m b e r   o f   r e a s o n s ,   s u c h   a s   b e c a u s e   t h e   p r o c e s s   i n   i t   e x i t e d   w i t h   a   n o n - z e r o   e x i t   c o d e ,   o r   t h e   c o n t a i n e r   w a s   k i l l e d   f o r   e x c e e d i n g   a   m e m o r y   l i m i t ,   e t c .   I f   t h i s   h a p p e n s ,   a n d   t h e   . s p e c . t e m p l a t e . s p e c . r e s t a r t P o l i c y   =   " O n F a i l u r e " ,   t h e n   t h e   P o d   s t a y s   o n   t h e   n o d e ,   b u t   t h e   c o n t a i n e r   i s   r e - r u n .   T h e r e f o r e ,   y o u r   p r o g r a m   n e e d s   t o   h a n d l e   t h e   c a s e   w h e n   i t   i s   r e s t a r t e d   l o c a l l y ,   o r   e l s e   s p e c i f y   . s p e c . t e m p l a t e . s p e c . r e s t a r t P o l i c y   =   " N e v e r " .   S e e   p o d   l i f e c y c l e   f o r   m o r e   i n f o r m a t i o n   o n   r e s t a r t P o l i c y .   A n   e n t i r e   P o d   c a n   a l s o   f a i l ,   f o r   a   n u m b e r   o f   r e a s o n s ,   s u c h   a s   w h e n   t h e   p o d   i s   k i c k e d   o f f   t h e   n o d e   ( n o d e   i s   u p g r a d e d ,   r e b o o t e d ,   d e l e t e d ,   e t c . ) ,   o r   i f   a   c o n t a i n e r   o f   t h e   P o d   f a i l s   a n d   t h e   . s p e c . t e m p l a t e . s p e c . r e s t a r t P o l i c y   =   " N e v e r " .   W h e n   a   P o d   f a i l s ,   t h e n   t h e   J o b   c o n t r o l l e r   s t a r t s   a   n e w   P o d .   T h i s   m e a n s   t h a t   y o u r   a p p l i c a t i o n   n e e d s   t o   h a n d l e   t h e   c a s e   w h e n   i t   i s   r e s t a r t e d   i n   a   n e w   p o d .   I n   p a r t i c u l a r ,   i t   n e e d s   t o   h a n d l e   t e m p o r a r y   f i l e s ,   l o c k s ,   i n c o m p l e t e   o u t p u t   a n d   t h e   l i k e   c a u s e d   b y


Question: What is Pod backoff failure policy?

Answer: T h e r e   a r e   s i t u a t i o n s   w h e r e   y o u   w a n t   t o   f a i l   a   J o b   a f t e r   s o m e   a m o u n t   o f   r e t r i e s   d u e   t o   a   l o g i c a l   e r r o r   i n   c o n f i g u r a t i o n   e t c .   T o   d o   s o ,   s e t   . s p e c . b a c k o f f L i m i t   t o   s p e c i f y   t h e   n u m b e r   o f   r e t r i e s   b e f o r e   c o n s i d e r i n g   a   J o b   a s   f a i l e d .   T h e   . s p e c . b a c k o f f L i m i t   i s   s e t   b y   d e f a u l t   t o   6 ,   u n l e s s   t h e   b a c k o f f   l i m i t   p e r   i n d e x   ( o n l y   I n d e x e d   J o b )   i s   s p e c i f i e d .   W h e n   . s p e c . b a c k o f f L i m i t P e r I n d e x   i s   s p e c i f i e d ,   t h e n   . s p e c . b a c k o f f L i m i t   d e f a u l t s   t o   2 1 4 7 4 8 3 6 4 7   ( M a x I n t 3 2 ) .   F a i l e d   P o d s   a s s o c i a t e d   w i t h   t h e   J o b   a r e   r e c r e a t e d   b y   t h e   J o b   c o n t r o l l e r   w i t h   a n   e x p o n e n t i a l   b a c k - o f f   d e l a y   ( 1 0 s ,   2 0 s ,   4 0 s   . . . )   c a p p e d   a t   s i x   m i n u t e s .   T h e   n u m b e r   o f   r e t r i e s   i s   c a l c u l a t e d   i n   t w o   w a y s :   T h e   n u m b e r   o f   P o d s   w i t h   . s t a t u s . p h a s e   =   " F a i l e d " . W h e n   u s i n g   r e s t a r t P o l i c y   =   " O n F a i l u r e " ,   t h e   n u m b e r   o f   r e t r i e s   i n   a l l   t h e   c o n t a i n e r s   o f   P o d s   w i t h   . s t a t u s . p h a s e   e q u a l   t o   P e n d i n g   o r   R u n n i n g .   I f   e i t h e r   o f   t h e   c a l c u l a t i o n s   r e a c h e s   t h e   . s p e c . b a c k o f f L i m i t ,   t h e   J o b   i s   c o n s i d e r e d   f a i l e d .


Question: What is Backoff limit per index?

Answer: W h e n   y o u   r u n   a n   i n d e x e d   J o b ,   y o u   c a n   c h o o s e   t o   h a n d l e   r e t r i e s   f o r   p o d   f a i l u r e s   i n d e p e n d e n t l y   f o r   e a c h   i n d e x .   T o   d o   s o ,   s e t   t h e   . s p e c . b a c k o f f L i m i t P e r I n d e x   t o   s p e c i f y   t h e   m a x i m a l   n u m b e r   o f   p o d   f a i l u r e s   p e r   i n d e x .   W h e n   t h e   p e r - i n d e x   b a c k o f f   l i m i t   i s   e x c e e d e d   f o r   a n   i n d e x ,   K u b e r n e t e s   c o n s i d e r s   t h e   i n d e x   a s   f a i l e d   a n d   a d d s   i t   t o   t h e   . s t a t u s . f a i l e d I n d e x e s   f i e l d .   T h e   s u c c e e d e d   i n d e x e s ,   t h o s e   w i t h   a   s u c c e s s f u l l y   e x e c u t e d   p o d s ,   a r e   r e c o r d e d   i n   t h e   . s t a t u s . c o m p l e t e d I n d e x e s   f i e l d ,   r e g a r d l e s s   o f   w h e t h e r   y o u   s e t   t h e   b a c k o f f L i m i t P e r I n d e x   f i e l d .   N o t e   t h a t   a   f a i l i n g   i n d e x   d o e s   n o t   i n t e r r u p t   e x e c u t i o n   o f   o t h e r   i n d e x e s .   O n c e   a l l   i n d e x e s   f i n i s h   f o r   a   J o b   w h e r e   y o u   s p e c i f i e d   a   b a c k o f f   l i m i t   p e r   i n d e x ,   i f   a t   l e a s t   o n e   o f   t h o s e   i n d e x e s   d i d   f a i l ,   t h e   J o b   c o n t r o l l e r   m a r k s   t h e   o v e r a l l   J o b   a s   f a i l e d ,   b y   s e t t i n g   t h e   F a i l e d   c o n d i t i o n   i n   t h e   s t a t u s .   T h e   J o b   g e t s   m a r k e d   a s   f a i l e d   e v e n   i f   s o m e ,   p o t e n t i a l l y   n e a r l y   a l l ,   o f   t h e   i n d e x e s   w e r e   p r o c e s s e d   s u c c e s s f u l l y .   Y o u   c a n   a d d i t i o n a l l y   l i m i t   t h e   m a x i m a l   n u m b e r   o f   i n d e x e


Question: What is Pod failure policy?

Answer: A   P o d   f a i l u r e   p o l i c y ,   d e f i n e d   w i t h   t h e   . s p e c . p o d F a i l u r e P o l i c y   f i e l d ,   e n a b l e s   y o u r   c l u s t e r   t o   h a n d l e   P o d   f a i l u r e s   b a s e d   o n   t h e   c o n t a i n e r   e x i t   c o d e s   a n d   t h e   P o d   c o n d i t i o n s .   I n   s o m e   s i t u a t i o n s ,   y o u   m a y   w a n t   t o   h a v e   a   b e t t e r   c o n t r o l   w h e n   h a n d l i n g   P o d   f a i l u r e s   t h a n   t h e   c o n t r o l   p r o v i d e d   b y   t h e   P o d   b a c k o f f   f a i l u r e   p o l i c y ,   w h i c h   i s   b a s e d   o n   t h e   J o b ' s   . s p e c . b a c k o f f L i m i t .   T h e s e   a r e   s o m e   e x a m p l e s   o f   u s e   c a s e s :   T o   o p t i m i z e   c o s t s   o f   r u n n i n g   w o r k l o a d s   b y   a v o i d i n g   u n n e c e s s a r y   P o d   r e s t a r t s ,   y o u   c a n   t e r m i n a t e   a   J o b   a s   s o o n   a s   o n e   o f   i t s   P o d s   f a i l s   w i t h   a n   e x i t   c o d e   i n d i c a t i n g   a   s o f t w a r e   b u g . T o   g u a r a n t e e   t h a t   y o u r   J o b   f i n i s h e s   e v e n   i f   t h e r e   a r e   d i s r u p t i o n s ,   y o u   c a n   i g n o r e   P o d   f a i l u r e s   c a u s e d   b y   d i s r u p t i o n s   ( s u c h   a s   p r e e m p t i o n ,   A P I - i n i t i a t e d   e v i c t i o n   o r   t a i n t - b a s e d   e v i c t i o n )   s o   t h a t   t h e y   d o n ' t   c o u n t   t o w a r d s   t h e   . s p e c . b a c k o f f L i m i t   l i m i t   o f   r e t r i e s .   Y o u   c a n   c o n f i g u r e   a   P o d   f a i l u r e   p o l i c y ,   i n   t h e   . s p e c . p o d F a i l u r e P o l i c y   f i e l d ,   t o   m e e t   t h e   a b o v e   u s e   c a s e s .   T h i s   p o l i c y   c a n   h a n d l e   P o d   f a i l u r e s   b a s e d   o n   t h e   c o n t


Question: What is Note:?

Answer: T h e   s e c o n d   r u l e   o f   t h e   P o d   f a i l u r e   p o l i c y ,   s p e c i f y i n g   t h e   I g n o r e   a c t i o n   f o r   f a i l e d   P o d s   w i t h   c o n d i t i o n   D i s r u p t i o n T a r g e t   e x c l u d e s   P o d   d i s r u p t i o n s   f r o m   b e i n g   c o u n t e d   t o w a r d s   t h e   . s p e c . b a c k o f f L i m i t   l i m i t   o f   r e t r i e s .


Question: What is Note:?

Answer: T h e s e   a r e   s o m e   r e q u i r e m e n t s   a n d   s e m a n t i c s   o f   t h e   A P I :   i f   y o u   w a n t   t o   u s e   a   . s p e c . p o d F a i l u r e P o l i c y   f i e l d   f o r   a   J o b ,   y o u   m u s t   a l s o   d e f i n e   t h a t   J o b ' s   p o d   t e m p l a t e   w i t h   . s p e c . r e s t a r t P o l i c y   s e t   t o   N e v e r . t h e   P o d   f a i l u r e   p o l i c y   r u l e s   y o u   s p e c i f y   u n d e r   s p e c . p o d F a i l u r e P o l i c y . r u l e s   a r e   e v a l u a t e d   i n   o r d e r .   O n c e   a   r u l e   m a t c h e s   a   P o d   f a i l u r e ,   t h e   r e m a i n i n g   r u l e s   a r e   i g n o r e d .   W h e n   n o   r u l e   m a t c h e s   t h e   P o d   f a i l u r e ,   t h e   d e f a u l t   h a n d l i n g   a p p l i e s . y o u   m a y   w a n t   t o   r e s t r i c t   a   r u l e   t o   a   s p e c i f i c   c o n t a i n e r   b y   s p e c i f y i n g   i t s   n a m e   i n s p e c . p o d F a i l u r e P o l i c y . r u l e s [ * ] . o n E x i t C o d e s . c o n t a i n e r N a m e .   W h e n   n o t   s p e c i f i e d   t h e   r u l e   a p p l i e s   t o   a l l   c o n t a i n e r s .   W h e n   s p e c i f i e d ,   i t   s h o u l d   m a t c h   o n e   t h e   c o n t a i n e r   o r   i n i t C o n t a i n e r   n a m e s   i n   t h e   P o d   t e m p l a t e . y o u   m a y   s p e c i f y   t h e   a c t i o n   t a k e n   w h e n   a   P o d   f a i l u r e   p o l i c y   i s   m a t c h e d   b y   s p e c . p o d F a i l u r e P o l i c y . r u l e s [ * ] . a c t i o n .   P o s s i b l e   v a l u e s   a r e : F a i l J o b :   u s e   t o   i n d i c a t e   t h a t   t h e   P o d ' s   j o b   s h o u l d   b e   m a r k e d   a s   F a i l e d   a n d   a l l   r u n n i n g   P o d s   s h o u l d   b e   t e r m i n a t e d . I g n o r e :   u s e   t o   i n d i c a t e   t h a t   t h e   c o u


Question: What is Note:?

Answer: W h e n   y o u   u s e   t h e   p o d F a i l u r e P o l i c y ,   a n d   t h e   J o b   f a i l s   d u e   t o   t h e   p o d   m a t c h i n g   t h e   r u l e   w i t h   t h e   F a i l J o b   a c t i o n ,   t h e n   t h e   J o b   c o n t r o l l e r   t r i g g e r s   t h e   J o b   t e r m i n a t i o n   p r o c e s s   b y   a d d i n g   t h e   F a i l u r e T a r g e t   c o n d i t i o n .   F o r   m o r e   d e t a i l s ,   s e e   J o b   t e r m i n a t i o n   a n d   c l e a n u p .


Question: What is Success policy?

Answer: W h e n   c r e a t i n g   a n   I n d e x e d   J o b ,   y o u   c a n   d e f i n e   w h e n   a   J o b   c a n   b e   d e c l a r e d   a s   s u c c e e d e d   u s i n g   a   . s p e c . s u c c e s s P o l i c y ,   b a s e d   o n   t h e   p o d s   t h a t   s u c c e e d e d .   B y   d e f a u l t ,   a   J o b   s u c c e e d s   w h e n   t h e   n u m b e r   o f   s u c c e e d e d   P o d s   e q u a l s   . s p e c . c o m p l e t i o n s .   T h e s e   a r e   s o m e   s i t u a t i o n s   w h e r e   y o u   m i g h t   w a n t   a d d i t i o n a l   c o n t r o l   f o r   d e c l a r i n g   a   J o b   s u c c e e d e d :   W h e n   r u n n i n g   s i m u l a t i o n s   w i t h   d i f f e r e n t   p a r a m e t e r s ,   y o u   m i g h t   n o t   n e e d   a l l   t h e   s i m u l a t i o n s   t o   s u c c e e d   f o r   t h e   o v e r a l l   J o b   t o   b e   s u c c e s s f u l . W h e n   f o l l o w i n g   a   l e a d e r - w o r k e r   p a t t e r n ,   o n l y   t h e   s u c c e s s   o f   t h e   l e a d e r   d e t e r m i n e s   t h e   s u c c e s s   o r   f a i l u r e   o f   a   J o b .   E x a m p l e s   o f   t h i s   a r e   f r a m e w o r k s   l i k e   M P I   a n d   P y T o r c h   e t c .   Y o u   c a n   c o n f i g u r e   a   s u c c e s s   p o l i c y ,   i n   t h e   . s p e c . s u c c e s s P o l i c y   f i e l d ,   t o   m e e t   t h e   a b o v e   u s e   c a s e s .   T h i s   p o l i c y   c a n   h a n d l e   J o b   s u c c e s s   b a s e d   o n   t h e   s u c c e e d e d   p o d s .   A f t e r   t h e   J o b   m e e t s   t h e   s u c c e s s   p o l i c y ,   t h e   j o b   c o n t r o l l e r   t e r m i n a t e s   t h e   l i n g e r i n g   P o d s .   A   s u c c e s s   p o l i c y   i s   d e f i n e d   b y   r u l e s .   E a c h   r u l e   c a n   t a k e   o n e   o f   t h e   f o l l o w i n g   f o r m s :   W h e n   y o u   s p e c i f y   t


Question: What is Job termination and cleanup?

Answer: W h e n   a   J o b   c o m p l e t e s ,   n o   m o r e   P o d s   a r e   c r e a t e d ,   b u t   t h e   P o d s   a r e   u s u a l l y   n o t   d e l e t e d   e i t h e r .   K e e p i n g   t h e m   a r o u n d   a l l o w s   y o u   t o   s t i l l   v i e w   t h e   l o g s   o f   c o m p l e t e d   p o d s   t o   c h e c k   f o r   e r r o r s ,   w a r n i n g s ,   o r   o t h e r   d i a g n o s t i c   o u t p u t .   T h e   j o b   o b j e c t   a l s o   r e m a i n s   a f t e r   i t   i s   c o m p l e t e d   s o   t h a t   y o u   c a n   v i e w   i t s   s t a t u s .   I t   i s   u p   t o   t h e   u s e r   t o   d e l e t e   o l d   j o b s   a f t e r   n o t i n g   t h e i r   s t a t u s .   D e l e t e   t h e   j o b   w i t h   k u b e c t l   ( e . g .   k u b e c t l   d e l e t e   j o b s / p i   o r   k u b e c t l   d e l e t e   - f   . / j o b . y a m l ) .   W h e n   y o u   d e l e t e   t h e   j o b   u s i n g   k u b e c t l ,   a l l   t h e   p o d s   i t   c r e a t e d   a r e   d e l e t e d   t o o .   B y   d e f a u l t ,   a   J o b   w i l l   r u n   u n i n t e r r u p t e d   u n l e s s   a   P o d   f a i l s   ( r e s t a r t P o l i c y = N e v e r )   o r   a   C o n t a i n e r   e x i t s   i n   e r r o r   ( r e s t a r t P o l i c y = O n F a i l u r e ) ,   a t   w h i c h   p o i n t   t h e   J o b   d e f e r s   t o   t h e   . s p e c . b a c k o f f L i m i t   d e s c r i b e d   a b o v e .   O n c e   . s p e c . b a c k o f f L i m i t   h a s   b e e n   r e a c h e d   t h e   J o b   w i l l   b e   m a r k e d   a s   f a i l e d   a n d   a n y   r u n n i n g   P o d s   w i l l   b e   t e r m i n a t e d .   A n o t h e r   w a y   t o   t e r m i n a t e   a   J o b   i s   b y   s e t t i n g   a n   a c t i v e   d e a d l i n e .   D o   t h i s   b y   s e t t i n g   t h e   . s p e c . a c t i v e D e a d l i n e S e c o n d s   f i e l d   o f   t h e


Question: What is Terminal Job conditions?

Answer: A   J o b   h a s   t w o   p o s s i b l e   t e r m i n a l   s t a t e s ,   e a c h   o f   w h i c h   h a s   a   c o r r e s p o n d i n g   J o b   c o n d i t i o n :   S u c c e e d e d :   J o b   c o n d i t i o n   C o m p l e t e F a i l e d :   J o b   c o n d i t i o n   F a i l e d   J o b s   f a i l   f o r   t h e   f o l l o w i n g   r e a s o n s :   T h e   n u m b e r   o f   P o d   f a i l u r e s   e x c e e d e d   t h e   s p e c i f i e d   . s p e c . b a c k o f f L i m i t   i n   t h e   J o b   s p e c i f i c a t i o n .   F o r   d e t a i l s ,   s e e   P o d   b a c k o f f   f a i l u r e   p o l i c y . T h e   J o b   r u n t i m e   e x c e e d e d   t h e   s p e c i f i e d   . s p e c . a c t i v e D e a d l i n e S e c o n d s A n   i n d e x e d   J o b   t h a t   u s e d   . s p e c . b a c k o f f L i m i t P e r I n d e x   h a s   f a i l e d   i n d e x e s .   F o r   d e t a i l s ,   s e e   B a c k o f f   l i m i t   p e r   i n d e x . T h e   n u m b e r   o f   f a i l e d   i n d e x e s   i n   t h e   J o b   e x c e e d e d   t h e   s p e c i f i e d   s p e c . m a x F a i l e d I n d e x e s .   F o r   d e t a i l s ,   s e e   B a c k o f f   l i m i t   p e r   i n d e x A   f a i l e d   P o d   m a t c h e s   a   r u l e   i n   . s p e c . p o d F a i l u r e P o l i c y   t h a t   h a s   t h e   F a i l J o b   a c t i o n .   F o r   d e t a i l s   a b o u t   h o w   P o d   f a i l u r e   p o l i c y   r u l e s   m i g h t   a f f e c t   f a i l u r e   e v a l u a t i o n ,   s e e   P o d   f a i l u r e   p o l i c y .   J o b s   s u c c e e d   f o r   t h e   f o l l o w i n g   r e a s o n s :   T h e   n u m b e r   o f   s u c c e e d e d   P o d s   r e a c h e d   t h e   s p e c i f i e d   . s p e c . c o m p l e t i o n s T h e   c r i t e r i a   s p e c i f i e d   i n   . s p e c . s u c c e s s P o l i c y   a r e   m e t .   F o r   d e t a i l s ,   s e e   S


Question: What is Termination of Job pods?

Answer: T h e   J o b   c o n t r o l l e r   a d d s   t h e   F a i l u r e T a r g e t   c o n d i t i o n   o r   t h e   S u c c e s s C r i t e r i a M e t   c o n d i t i o n   t o   t h e   J o b   t o   t r i g g e r   P o d   t e r m i n a t i o n   a f t e r   a   J o b   m e e t s   e i t h e r   t h e   s u c c e s s   o r   f a i l u r e   c r i t e r i a .   F a c t o r s   l i k e   t e r m i n a t i o n G r a c e P e r i o d S e c o n d s   m i g h t   i n c r e a s e   t h e   a m o u n t   o f   t i m e   f r o m   t h e   m o m e n t   t h a t   t h e   J o b   c o n t r o l l e r   a d d s   t h e   F a i l u r e T a r g e t   c o n d i t i o n   o r   t h e   S u c c e s s C r i t e r i a M e t   c o n d i t i o n   t o   t h e   m o m e n t   t h a t   a l l   o f   t h e   J o b   P o d s   t e r m i n a t e   a n d   t h e   J o b   c o n t r o l l e r   a d d s   a   t e r m i n a l   c o n d i t i o n   ( F a i l e d   o r   C o m p l e t e ) .   Y o u   c a n   u s e   t h e   F a i l u r e T a r g e t   o r   t h e   S u c c e s s C r i t e r i a M e t   c o n d i t i o n   t o   e v a l u a t e   w h e t h e r   t h e   J o b   h a s   f a i l e d   o r   s u c c e e d e d   w i t h o u t   h a v i n g   t o   w a i t   f o r   t h e   c o n t r o l l e r   t o   a d d   a   t e r m i n a l   c o n d i t i o n .   F o r   e x a m p l e ,   y o u   m i g h t   w a n t   t o   d e c i d e   w h e n   t o   c r e a t e   a   r e p l a c e m e n t   J o b   t h a t   r e p l a c e s   a   f a i l e d   J o b .   I f   y o u   r e p l a c e   t h e   f a i l e d   J o b   w h e n   t h e   F a i l u r e T a r g e t   c o n d i t i o n   a p p e a r s ,   y o u r   r e p l a c e m e n t   J o b   r u n s   s o o n e r ,   b u t   c o u l d   r e s u l t   i n   P o d s   f r o m   t h e   f a i l e d   a n d   t h e   r e p l a c e m e n t   J o b   r u n n i n g   a t   t h e   s a m e   t i m e ,   u s i n g   e x t r a   c o m p u t e   r e s o u


Question: What is Clean up finished jobs automatically?

Answer: F i n i s h e d   J o b s   a r e   u s u a l l y   n o   l o n g e r   n e e d e d   i n   t h e   s y s t e m .   K e e p i n g   t h e m   a r o u n d   i n   t h e   s y s t e m   w i l l   p u t   p r e s s u r e   o n   t h e   A P I   s e r v e r .   I f   t h e   J o b s   a r e   m a n a g e d   d i r e c t l y   b y   a   h i g h e r   l e v e l   c o n t r o l l e r ,   s u c h   a s   C r o n J o b s ,   t h e   J o b s   c a n   b e   c l e a n e d   u p   b y   C r o n J o b s   b a s e d   o n   t h e   s p e c i f i e d   c a p a c i t y - b a s e d   c l e a n u p   p o l i c y .


Question: What is TTL mechanism for finished Jobs?

Answer: A n o t h e r   w a y   t o   c l e a n   u p   f i n i s h e d   J o b s   ( e i t h e r   C o m p l e t e   o r   F a i l e d )   a u t o m a t i c a l l y   i s   t o   u s e   a   T T L   m e c h a n i s m   p r o v i d e d   b y   a   T T L   c o n t r o l l e r   f o r   f i n i s h e d   r e s o u r c e s ,   b y   s p e c i f y i n g   t h e   . s p e c . t t l S e c o n d s A f t e r F i n i s h e d   f i e l d   o f   t h e   J o b .   W h e n   t h e   T T L   c o n t r o l l e r   c l e a n s   u p   t h e   J o b ,   i t   w i l l   d e l e t e   t h e   J o b   c a s c a d i n g l y ,   i . e .   d e l e t e   i t s   d e p e n d e n t   o b j e c t s ,   s u c h   a s   P o d s ,   t o g e t h e r   w i t h   t h e   J o b .   N o t e   t h a t   w h e n   t h e   J o b   i s   d e l e t e d ,   i t s   l i f e c y c l e   g u a r a n t e e s ,   s u c h   a s   f i n a l i z e r s ,   w i l l   b e   h o n o r e d .   F o r   e x a m p l e :   a p i V e r s i o n :   b a t c h / v 1   k i n d :   J o b   m e t a d a t a :   n a m e :   p i - w i t h - t t l   s p e c :   t t l S e c o n d s A f t e r F i n i s h e d :   1 0 0   t e m p l a t e :   s p e c :   c o n t a i n e r s :   -   n a m e :   p i   i m a g e :   p e r l : 5 . 3 4 . 0   c o m m a n d :   [ " p e r l " ,   " - M b i g n u m = b p i " ,   " - w l e " ,   " p r i n t   b p i ( 2 0 0 0 ) " ]   r e s t a r t P o l i c y :   N e v e r   T h e   J o b   p i - w i t h - t t l   w i l l   b e   e l i g i b l e   t o   b e   a u t o m a t i c a l l y   d e l e t e d ,   1 0 0   s e c o n d s   a f t e r   i t   f i n i s h e s .   I f   t h e   f i e l d   i s   s e t   t o   0 ,   t h e   J o b   w i l l   b e   e l i g i b l e   t o   b e   a u t o m a t i c a l l y   d e l e t e d   i m m e d i a t e l y   a f t e r   i t   f i n i s h e s .   I f   t h e   f i e l d   i s   u n s e t ,   t h i s   J o b   w o n ' t   b e   c l e a n e d   u p   b y   t h e   T T L   c o n t r o l l e


Question: What is Note:?

Answer: I t   i s   r e c o m m e n d e d   t o   s e t   t t l S e c o n d s A f t e r F i n i s h e d   f i e l d   b e c a u s e   u n m a n a g e d   j o b s   ( J o b s   t h a t   y o u   c r e a t e d   d i r e c t l y ,   a n d   n o t   i n d i r e c t l y   t h r o u g h   o t h e r   w o r k l o a d   A P I s   s u c h   a s   C r o n J o b )   h a v e   a   d e f a u l t   d e l e t i o n   p o l i c y   o f   o r p h a n D e p e n d e n t s   c a u s i n g   P o d s   c r e a t e d   b y   a n   u n m a n a g e d   J o b   t o   b e   l e f t   a r o u n d   a f t e r   t h a t   J o b   i s   f u l l y   d e l e t e d .   E v e n   t h o u g h   t h e   c o n t r o l   p l a n e   e v e n t u a l l y   g a r b a g e   c o l l e c t s   t h e   P o d s   f r o m   a   d e l e t e d   J o b   a f t e r   t h e y   e i t h e r   f a i l   o r   c o m p l e t e ,   s o m e t i m e s   t h o s e   l i n g e r i n g   p o d s   m a y   c a u s e   c l u s t e r   p e r f o r m a n c e   d e g r a d a t i o n   o r   i n   w o r s t   c a s e   c a u s e   t h e   c l u s t e r   t o   g o   o f f l i n e   d u e   t o   t h i s   d e g r a d a t i o n .   Y o u   c a n   u s e   L i m i t R a n g e s   a n d   R e s o u r c e Q u o t a s   t o   p l a c e   a   c a p   o n   t h e   a m o u n t   o f   r e s o u r c e s   t h a t   a   p a r t i c u l a r   n a m e s p a c e   c a n   c o n s u m e .


Question: What is Job patterns?

Answer: T h e   J o b   o b j e c t   c a n   b e   u s e d   t o   p r o c e s s   a   s e t   o f   i n d e p e n d e n t   b u t   r e l a t e d   w o r k   i t e m s .   T h e s e   m i g h t   b e   e m a i l s   t o   b e   s e n t ,   f r a m e s   t o   b e   r e n d e r e d ,   f i l e s   t o   b e   t r a n s c o d e d ,   r a n g e s   o f   k e y s   i n   a   N o S Q L   d a t a b a s e   t o   s c a n ,   a n d   s o   o n .   I n   a   c o m p l e x   s y s t e m ,   t h e r e   m a y   b e   m u l t i p l e   d i f f e r e n t   s e t s   o f   w o r k   i t e m s .   H e r e   w e   a r e   j u s t   c o n s i d e r i n g   o n e   s e t   o f   w o r k   i t e m s   t h a t   t h e   u s e r   w a n t s   t o   m a n a g e   t o g e t h e r   —   a   b a t c h   j o b .   T h e r e   a r e   s e v e r a l   d i f f e r e n t   p a t t e r n s   f o r   p a r a l l e l   c o m p u t a t i o n ,   e a c h   w i t h   s t r e n g t h s   a n d   w e a k n e s s e s .   T h e   t r a d e o f f s   a r e :   O n e   J o b   o b j e c t   f o r   e a c h   w o r k   i t e m ,   v e r s u s   a   s i n g l e   J o b   o b j e c t   f o r   a l l   w o r k   i t e m s .   O n e   J o b   p e r   w o r k   i t e m   c r e a t e s   s o m e   o v e r h e a d   f o r   t h e   u s e r   a n d   f o r   t h e   s y s t e m   t o   m a n a g e   l a r g e   n u m b e r s   o f   J o b   o b j e c t s .   A   s i n g l e   J o b   f o r   a l l   w o r k   i t e m s   i s   b e t t e r   f o r   l a r g e   n u m b e r s   o f   i t e m s . N u m b e r   o f   P o d s   c r e a t e d   e q u a l s   n u m b e r   o f   w o r k   i t e m s ,   v e r s u s   e a c h   P o d   c a n   p r o c e s s   m u l t i p l e   w o r k   i t e m s .   W h e n   t h e   n u m b e r   o f   P o d s   e q u a l s   t h e   n u m b e r   o f   w o r k   i t e m s ,   t h e   P o d s   t y p i c a l l y   r e q u i r e s   l e s s   m o d i f i c a t i o n   t o   e x i s t i n g   c o


Question: What is Suspending a Job?

Answer: W h e n   a   J o b   i s   c r e a t e d ,   t h e   J o b   c o n t r o l l e r   w i l l   i m m e d i a t e l y   b e g i n   c r e a t i n g   P o d s   t o   s a t i s f y   t h e   J o b ' s   r e q u i r e m e n t s   a n d   w i l l   c o n t i n u e   t o   d o   s o   u n t i l   t h e   J o b   i s   c o m p l e t e .   H o w e v e r ,   y o u   m a y   w a n t   t o   t e m p o r a r i l y   s u s p e n d   a   J o b ' s   e x e c u t i o n   a n d   r e s u m e   i t   l a t e r ,   o r   s t a r t   J o b s   i n   s u s p e n d e d   s t a t e   a n d   h a v e   a   c u s t o m   c o n t r o l l e r   d e c i d e   l a t e r   w h e n   t o   s t a r t   t h e m .   T o   s u s p e n d   a   J o b ,   y o u   c a n   u p d a t e   t h e   . s p e c . s u s p e n d   f i e l d   o f   t h e   J o b   t o   t r u e ;   l a t e r ,   w h e n   y o u   w a n t   t o   r e s u m e   i t   a g a i n ,   u p d a t e   i t   t o   f a l s e .   C r e a t i n g   a   J o b   w i t h   . s p e c . s u s p e n d   s e t   t o   t r u e   w i l l   c r e a t e   i t   i n   t h e   s u s p e n d e d   s t a t e .   W h e n   a   J o b   i s   r e s u m e d   f r o m   s u s p e n s i o n ,   i t s   . s t a t u s . s t a r t T i m e   f i e l d   w i l l   b e   r e s e t   t o   t h e   c u r r e n t   t i m e .   T h i s   m e a n s   t h a t   t h e   . s p e c . a c t i v e D e a d l i n e S e c o n d s   t i m e r   w i l l   b e   s t o p p e d   a n d   r e s e t   w h e n   a   J o b   i s   s u s p e n d e d   a n d   r e s u m e d .   W h e n   y o u   s u s p e n d   a   J o b ,   a n y   r u n n i n g   P o d s   t h a t   d o n ' t   h a v e   a   s t a t u s   o f   C o m p l e t e d   w i l l   b e   t e r m i n a t e d   w i t h   a   S I G T E R M   s i g n a l .   T h e   P o d ' s   g r a c e f u l   t e r m i n a t i o n   p e r i o d   w i l l   b e   h o n o r e d   a n d   y o u r   P o d   m u s t   h a n d l e   t h i s   s i g n a l


Question: What is Mutable Scheduling Directives?

Answer: I n   m o s t   c a s e s ,   a   p a r a l l e l   j o b   w i l l   w a n t   t h e   p o d s   t o   r u n   w i t h   c o n s t r a i n t s ,   l i k e   a l l   i n   t h e   s a m e   z o n e ,   o r   a l l   e i t h e r   o n   G P U   m o d e l   x   o r   y   b u t   n o t   a   m i x   o f   b o t h .   T h e   s u s p e n d   f i e l d   i s   t h e   f i r s t   s t e p   t o w a r d s   a c h i e v i n g   t h o s e   s e m a n t i c s .   S u s p e n d   a l l o w s   a   c u s t o m   q u e u e   c o n t r o l l e r   t o   d e c i d e   w h e n   a   j o b   s h o u l d   s t a r t ;   H o w e v e r ,   o n c e   a   j o b   i s   u n s u s p e n d e d ,   a   c u s t o m   q u e u e   c o n t r o l l e r   h a s   n o   i n f l u e n c e   o n   w h e r e   t h e   p o d s   o f   a   j o b   w i l l   a c t u a l l y   l a n d .   T h i s   f e a t u r e   a l l o w s   u p d a t i n g   a   J o b ' s   s c h e d u l i n g   d i r e c t i v e s   b e f o r e   i t   s t a r t s ,   w h i c h   g i v e s   c u s t o m   q u e u e   c o n t r o l l e r s   t h e   a b i l i t y   t o   i n f l u e n c e   p o d   p l a c e m e n t   w h i l e   a t   t h e   s a m e   t i m e   o f f l o a d i n g   a c t u a l   p o d - t o - n o d e   a s s i g n m e n t   t o   k u b e - s c h e d u l e r .   T h i s   i s   a l l o w e d   o n l y   f o r   s u s p e n d e d   J o b s   t h a t   h a v e   n e v e r   b e e n   u n s u s p e n d e d   b e f o r e .   T h e   f i e l d s   i n   a   J o b ' s   p o d   t e m p l a t e   t h a t   c a n   b e   u p d a t e d   a r e   n o d e   a f f i n i t y ,   n o d e   s e l e c t o r ,   t o l e r a t i o n s ,   l a b e l s ,   a n n o t a t i o n s   a n d   s c h e d u l i n g   g a t e s .


Question: What is Specifying your own Pod selector?

Answer: N o r m a l l y ,   w h e n   y o u   c r e a t e   a   J o b   o b j e c t ,   y o u   d o   n o t   s p e c i f y   . s p e c . s e l e c t o r .   T h e   s y s t e m   d e f a u l t i n g   l o g i c   a d d s   t h i s   f i e l d   w h e n   t h e   J o b   i s   c r e a t e d .   I t   p i c k s   a   s e l e c t o r   v a l u e   t h a t   w i l l   n o t   o v e r l a p   w i t h   a n y   o t h e r   j o b s .   H o w e v e r ,   i n   s o m e   c a s e s ,   y o u   m i g h t   n e e d   t o   o v e r r i d e   t h i s   a u t o m a t i c a l l y   s e t   s e l e c t o r .   T o   d o   t h i s ,   y o u   c a n   s p e c i f y   t h e   . s p e c . s e l e c t o r   o f   t h e   J o b .   B e   v e r y   c a r e f u l   w h e n   d o i n g   t h i s .   I f   y o u   s p e c i f y   a   l a b e l   s e l e c t o r   w h i c h   i s   n o t   u n i q u e   t o   t h e   p o d s   o f   t h a t   J o b ,   a n d   w h i c h   m a t c h e s   u n r e l a t e d   P o d s ,   t h e n   p o d s   o f   t h e   u n r e l a t e d   j o b   m a y   b e   d e l e t e d ,   o r   t h i s   J o b   m a y   c o u n t   o t h e r   P o d s   a s   c o m p l e t i n g   i t ,   o r   o n e   o r   b o t h   J o b s   m a y   r e f u s e   t o   c r e a t e   P o d s   o r   r u n   t o   c o m p l e t i o n .   I f   a   n o n - u n i q u e   s e l e c t o r   i s   c h o s e n ,   t h e n   o t h e r   c o n t r o l l e r s   ( e . g .   R e p l i c a t i o n C o n t r o l l e r )   a n d   t h e i r   P o d s   m a y   b e h a v e   i n   u n p r e d i c t a b l e   w a y s   t o o .   K u b e r n e t e s   w i l l   n o t   s t o p   y o u   f r o m   m a k i n g   a   m i s t a k e   w h e n   s p e c i f y i n g   . s p e c . s e l e c t o r .   H e r e   i s   a n   e x a m p l e   o f   a   c a s e   w h e n   y o u   m i g h t   w a n t   t o   u s e   t h i s   f e a t u r e .   S a y   J o b   o l d   i s   a l r e a d y   r u n n i n g .   Y o u   w a n t


Question: What is Job tracking with finalizers?

Answer: T h e   c o n t r o l   p l a n e   k e e p s   t r a c k   o f   t h e   P o d s   t h a t   b e l o n g   t o   a n y   J o b   a n d   n o t i c e s   i f   a n y   s u c h   P o d   i s   r e m o v e d   f r o m   t h e   A P I   s e r v e r .   T o   d o   t h a t ,   t h e   J o b   c o n t r o l l e r   c r e a t e s   P o d s   w i t h   t h e   f i n a l i z e r   b a t c h . k u b e r n e t e s . i o / j o b - t r a c k i n g .   T h e   c o n t r o l l e r   r e m o v e s   t h e   f i n a l i z e r   o n l y   a f t e r   t h e   P o d   h a s   b e e n   a c c o u n t e d   f o r   i n   t h e   J o b   s t a t u s ,   a l l o w i n g   t h e   P o d   t o   b e   r e m o v e d   b y   o t h e r   c o n t r o l l e r s   o r   u s e r s .


Question: What is Elastic Indexed Jobs?

Answer: Y o u   c a n   s c a l e   I n d e x e d   J o b s   u p   o r   d o w n   b y   m u t a t i n g   b o t h   . s p e c . p a r a l l e l i s m   a n d   . s p e c . c o m p l e t i o n s   t o g e t h e r   s u c h   t h a t   . s p e c . p a r a l l e l i s m   = =   . s p e c . c o m p l e t i o n s .   W h e n   s c a l i n g   d o w n ,   K u b e r n e t e s   r e m o v e s   t h e   P o d s   w i t h   h i g h e r   i n d e x e s .   U s e   c a s e s   f o r   e l a s t i c   I n d e x e d   J o b s   i n c l u d e   b a t c h   w o r k l o a d s   w h i c h   r e q u i r e   s c a l i n g   a n   i n d e x e d   J o b ,   s u c h   a s   M P I ,   H o r o v o d ,   R a y ,   a n d   P y T o r c h   t r a i n i n g   j o b s .


Question: What is Delayed creation of replacement pods?

Answer: B y   d e f a u l t ,   t h e   J o b   c o n t r o l l e r   r e c r e a t e s   P o d s   a s   s o o n   t h e y   e i t h e r   f a i l   o r   a r e   t e r m i n a t i n g   ( h a v e   a   d e l e t i o n   t i m e s t a m p ) .   T h i s   m e a n s   t h a t ,   a t   a   g i v e n   t i m e ,   w h e n   s o m e   o f   t h e   P o d s   a r e   t e r m i n a t i n g ,   t h e   n u m b e r   o f   r u n n i n g   P o d s   f o r   a   J o b   c a n   b e   g r e a t e r   t h a n   p a r a l l e l i s m   o r   g r e a t e r   t h a n   o n e   P o d   p e r   i n d e x   ( i f   y o u   a r e   u s i n g   a n   I n d e x e d   J o b ) .   Y o u   m a y   c h o o s e   t o   c r e a t e   r e p l a c e m e n t   P o d s   o n l y   w h e n   t h e   t e r m i n a t i n g   P o d   i s   f u l l y   t e r m i n a l   ( h a s   s t a t u s . p h a s e :   F a i l e d ) .   T o   d o   t h i s ,   s e t   t h e   . s p e c . p o d R e p l a c e m e n t P o l i c y :   F a i l e d .   T h e   d e f a u l t   r e p l a c e m e n t   p o l i c y   d e p e n d s   o n   w h e t h e r   t h e   J o b   h a s   a   p o d F a i l u r e P o l i c y   s e t .   W i t h   n o   P o d   f a i l u r e   p o l i c y   d e f i n e d   f o r   a   J o b ,   o m i t t i n g   t h e   p o d R e p l a c e m e n t P o l i c y   f i e l d   s e l e c t s   t h e   T e r m i n a t i n g O r F a i l e d   r e p l a c e m e n t   p o l i c y :   t h e   c o n t r o l   p l a n e   c r e a t e s   r e p l a c e m e n t   P o d s   i m m e d i a t e l y   u p o n   P o d   d e l e t i o n   ( a s   s o o n   a s   t h e   c o n t r o l   p l a n e   s e e s   t h a t   a   P o d   f o r   t h i s   J o b   h a s   d e l e t i o n T i m e s t a m p   s e t ) .   F o r   J o b s   w i t h   a   P o d   f a i l u r e   p o l i c y   s e t ,   t h e   d e f a u l t   p o d R e p l a c e m e n t P o l i c y   i s   F a i l e d ,   a n d   n o   o t h e r   v a l u e   i s   p e r m i t


Question: What is Note:?

Answer: T h i s   f e a t u r e   a l l o w s   y o u   t o   d i s a b l e   t h e   b u i l t - i n   J o b   c o n t r o l l e r ,   f o r   a   s p e c i f i c   J o b ,   a n d   d e l e g a t e   r e c o n c i l i a t i o n   o f   t h e   J o b   t o   a n   e x t e r n a l   c o n t r o l l e r .   Y o u   i n d i c a t e   t h e   c o n t r o l l e r   t h a t   r e c o n c i l e s   t h e   J o b   b y   s e t t i n g   a   c u s t o m   v a l u e   f o r   t h e   s p e c . m a n a g e d B y   f i e l d   -   a n y   v a l u e   o t h e r   t h a n   k u b e r n e t e s . i o / j o b - c o n t r o l l e r .   T h e   v a l u e   o f   t h e   f i e l d   i s   i m m u t a b l e .


Question: What is Note:?

Answer: W h e n   d e v e l o p i n g   a n   e x t e r n a l   J o b   c o n t r o l l e r   b e   a w a r e   t h a t   y o u r   c o n t r o l l e r   n e e d s   t o   o p e r a t e   i n   a   f a s h i o n   c o n f o r m a n t   w i t h   t h e   d e f i n i t i o n s   o f   t h e   A P I   s p e c   a n d   s t a t u s   f i e l d s   o f   t h e   J o b   o b j e c t .   P l e a s e   r e v i e w   t h e s e   i n   d e t a i l   i n   t h e   J o b   A P I .   W e   a l s o   r e c o m m e n d   t h a t   y o u   r u n   t h e   e 2 e   c o n f o r m a n c e   t e s t s   f o r   t h e   J o b   o b j e c t   t o   v e r i f y   y o u r   i m p l e m e n t a t i o n .   F i n a l l y ,   w h e n   d e v e l o p i n g   a n   e x t e r n a l   J o b   c o n t r o l l e r   m a k e   s u r e   i t   d o e s   n o t   u s e   t h e   b a t c h . k u b e r n e t e s . i o / j o b - t r a c k i n g   f i n a l i z e r ,   r e s e r v e d   f o r   t h e   b u i l t - i n   c o n t r o l l e r .


Question: What is Bare Pods?

Answer: W h e n   t h e   n o d e   t h a t   a   P o d   i s   r u n n i n g   o n   r e b o o t s   o r   f a i l s ,   t h e   p o d   i s   t e r m i n a t e d   a n d   w i l l   n o t   b e   r e s t a r t e d .   H o w e v e r ,   a   J o b   w i l l   c r e a t e   n e w   P o d s   t o   r e p l a c e   t e r m i n a t e d   o n e s .   F o r   t h i s   r e a s o n ,   w e   r e c o m m e n d   t h a t   y o u   u s e   a   J o b   r a t h e r   t h a n   a   b a r e   P o d ,   e v e n   i f   y o u r   a p p l i c a t i o n   r e q u i r e s   o n l y   a   s i n g l e   P o d .


Question: What is Replication Controller?

Answer: J o b s   a r e   c o m p l e m e n t a r y   t o   R e p l i c a t i o n   C o n t r o l l e r s .   A   R e p l i c a t i o n   C o n t r o l l e r   m a n a g e s   P o d s   w h i c h   a r e   n o t   e x p e c t e d   t o   t e r m i n a t e   ( e . g .   w e b   s e r v e r s ) ,   a n d   a   J o b   m a n a g e s   P o d s   t h a t   a r e   e x p e c t e d   t o   t e r m i n a t e   ( e . g .   b a t c h   t a s k s ) .   A s   d i s c u s s e d   i n   P o d   L i f e c y c l e ,   J o b   i s   o n l y   a p p r o p r i a t e   f o r   p o d s   w i t h   R e s t a r t P o l i c y   e q u a l   t o   O n F a i l u r e   o r   N e v e r .   ( N o t e :   I f   R e s t a r t P o l i c y   i s   n o t   s e t ,   t h e   d e f a u l t   v a l u e   i s   A l w a y s . )


Question: What is Single Job starts controller Pod?

Answer: A n o t h e r   p a t t e r n   i s   f o r   a   s i n g l e   J o b   t o   c r e a t e   a   P o d   w h i c h   t h e n   c r e a t e s   o t h e r   P o d s ,   a c t i n g   a s   a   s o r t   o f   c u s t o m   c o n t r o l l e r   f o r   t h o s e   P o d s .   T h i s   a l l o w s   t h e   m o s t   f l e x i b i l i t y ,   b u t   m a y   b e   s o m e w h a t   c o m p l i c a t e d   t o   g e t   s t a r t e d   w i t h   a n d   o f f e r s   l e s s   i n t e g r a t i o n   w i t h   K u b e r n e t e s .   O n e   e x a m p l e   o f   t h i s   p a t t e r n   w o u l d   b e   a   J o b   w h i c h   s t a r t s   a   P o d   w h i c h   r u n s   a   s c r i p t   t h a t   i n   t u r n   s t a r t s   a   S p a r k   m a s t e r   c o n t r o l l e r   ( s e e   s p a r k   e x a m p l e ) ,   r u n s   a   s p a r k   d r i v e r ,   a n d   t h e n   c l e a n s   u p .   A n   a d v a n t a g e   o f   t h i s   a p p r o a c h   i s   t h a t   t h e   o v e r a l l   p r o c e s s   g e t s   t h e   c o m p l e t i o n   g u a r a n t e e   o f   a   J o b   o b j e c t ,   b u t   m a i n t a i n s   c o m p l e t e   c o n t r o l   o v e r   w h a t   P o d s   a r e   c r e a t e d   a n d   h o w   w o r k   i s   a s s i g n e d   t o   t h e m .


Question: What is What's next?

Answer: L e a r n   a b o u t   P o d s . R e a d   a b o u t   d i f f e r e n t   w a y s   o f   r u n n i n g   J o b s : C o a r s e   P a r a l l e l   P r o c e s s i n g   U s i n g   a   W o r k   Q u e u e F i n e   P a r a l l e l   P r o c e s s i n g   U s i n g   a   W o r k   Q u e u e U s e   a n   i n d e x e d   J o b   f o r   p a r a l l e l   p r o c e s s i n g   w i t h   s t a t i c   w o r k   a s s i g n m e n t C r e a t e   m u l t i p l e   J o b s   b a s e d   o n   a   t e m p l a t e :   P a r a l l e l   P r o c e s s i n g   u s i n g   E x p a n s i o n s F o l l o w   t h e   l i n k s   w i t h i n   C l e a n   u p   f i n i s h e d   j o b s   a u t o m a t i c a l l y   t o   l e a r n   m o r e   a b o u t   h o w   y o u r   c l u s t e r   c a n   c l e a n   u p   c o m p l e t e d   a n d   /   o r   f a i l e d   t a s k s . J o b   i s   p a r t   o f   t h e   K u b e r n e t e s   R E S T   A P I .   R e a d   t h e   J o b   o b j e c t   d e f i n i t i o n   t o   u n d e r s t a n d   t h e   A P I   f o r   j o b s . R e a d   a b o u t   C r o n J o b ,   w h i c h   y o u   c a n   u s e   t o   d e f i n e   a   s e r i e s   o f   J o b s   t h a t   w i l l   r u n   b a s e d   o n   a   s c h e d u l e ,   s i m i l a r   t o   t h e   U N I X   t o o l   c r o n . P r a c t i c e   h o w   t o   c o n f i g u r e   h a n d l i n g   o f   r e t r i a b l e   a n d   n o n - r e t r i a b l e   p o d   f a i l u r e s   u s i n g   p o d F a i l u r e P o l i c y ,   b a s e d   o n   t h e   s t e p - b y - s t e p   e x a m p l e s .   C o a r s e   P a r a l l e l   P r o c e s s i n g   U s i n g   a   W o r k   Q u e u e F i n e   P a r a l l e l   P r o c e s s i n g   U s i n g   a   W o r k   Q u e u e U s e   a n   i n d e x e d   J o b   f o r   p a r a l l e l   p r o c e s s i n g   w i t h   s t a t i c   w o r k   a s s i g n m e n t C r e a t e   m u l t i p l e   J o b s   b a s e d   o n   a   t


Question: What is kubectl create poddisruptionbudget?

Answer: kubectl create poddisruptionbudgetSynopsisCreate a pod disruption budget with the specified name, selector, and desired minimum available pods.kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run=server|client|none] Examples # Create a pod disruption budget named my-pdb that will select all pods with the app=rails label # and require at least one of them being available at any point in time kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1 # Create a pod disruption budget named my-pdb that will select all pods with the app=nginx label # and require at least half of the pods selected to be available at any point in time kubectl create pdb my-pdb --selector=app=nginx --min-available=50% Options--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--dry-run string[="unchanged"] Default: "none"Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.--field-manager string Default: "kubectl-create"Name of the manager used to track field ownership.-h, --helphelp for poddisruptionbudget--max-unavailable stringThe maximum number or percentage of unavailable pods this budget requires.--min-available stringThe minimum number or percentage of available pods this budget requires.-o, --output stringOutput format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).--save-configIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.--selector stringA label selector to use for this budget. Only equality-based selector requirements are supported.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--template stringTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].--validate string[="strict"] Default: "strict"Must be one of: strict (or true), warn, ignore (or false). "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise. "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields.Parent Options Inherited--as s


Question: How does kubectl create poddisruptionbudget work?

Answer: kubectl create poddisruptionbudgetSynopsisCreate a pod disruption budget with the specified name, selector, and desired minimum available pods.kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run=server|client|none] Examples # Create a pod disruption budget named my-pdb that will select all pods with the app=rails label # and require at least one of them being available at any point in time kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1 # Create a pod disruption budget named my-pdb that will select all pods with the app=nginx label # and require at least half of the pods selected to be available at any point in time kubectl create pdb my-pdb --selector=app=nginx --min-available=50% Options--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--dry-run string[="unchanged"] Default: "none"Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.--field-manager string Default: "kubectl-create"Name of the manager used to track field ownership.-h, --helphelp for poddisruptionbudget--max-unavailable stringThe maximum number or percentage of unavailable pods this budget requires.--min-available stringThe minimum number or percentage of available pods this budget requires.-o, --output stringOutput format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).--save-configIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.--selector stringA label selector to use for this budget. Only equality-based selector requirements are supported.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--template stringTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].--validate string[="strict"] Default: "strict"Must be one of: strict (or true), warn, ignore (or false). "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise. "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields.Parent Options Inherited--as s


Question: When would you use kubectl create poddisruptionbudget?

Answer: kubectl create poddisruptionbudgetSynopsisCreate a pod disruption budget with the specified name, selector, and desired minimum available pods.kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run=server|client|none] Examples # Create a pod disruption budget named my-pdb that will select all pods with the app=rails label # and require at least one of them being available at any point in time kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1 # Create a pod disruption budget named my-pdb that will select all pods with the app=nginx label # and require at least half of the pods selected to be available at any point in time kubectl create pdb my-pdb --selector=app=nginx --min-available=50% Options--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--dry-run string[="unchanged"] Default: "none"Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.--field-manager string Default: "kubectl-create"Name of the manager used to track field ownership.-h, --helphelp for poddisruptionbudget--max-unavailable stringThe maximum number or percentage of unavailable pods this budget requires.--min-available stringThe minimum number or percentage of available pods this budget requires.-o, --output stringOutput format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).--save-configIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.--selector stringA label selector to use for this budget. Only equality-based selector requirements are supported.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--template stringTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].--validate string[="strict"] Default: "strict"Must be one of: strict (or true), warn, ignore (or false). "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise. "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields.Parent Options Inherited--as s


Question: What are the benefits of kubectl create poddisruptionbudget?

Answer: kubectl create poddisruptionbudgetSynopsisCreate a pod disruption budget with the specified name, selector, and desired minimum available pods.kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run=server|client|none] Examples # Create a pod disruption budget named my-pdb that will select all pods with the app=rails label # and require at least one of them being available at any point in time kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1 # Create a pod disruption budget named my-pdb that will select all pods with the app=nginx label # and require at least half of the pods selected to be available at any point in time kubectl create pdb my-pdb --selector=app=nginx --min-available=50% Options--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--dry-run string[="unchanged"] Default: "none"Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.--field-manager string Default: "kubectl-create"Name of the manager used to track field ownership.-h, --helphelp for poddisruptionbudget--max-unavailable stringThe maximum number or percentage of unavailable pods this budget requires.--min-available stringThe minimum number or percentage of available pods this budget requires.-o, --output stringOutput format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).--save-configIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.--selector stringA label selector to use for this budget. Only equality-based selector requirements are supported.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--template stringTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].--validate string[="strict"] Default: "strict"Must be one of: strict (or true), warn, ignore (or false). "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise. "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields.Parent Options Inherited--as s


Question: What is Synopsis?

Answer: C r e a t e   a   p o d   d i s r u p t i o n   b u d g e t   w i t h   t h e   s p e c i f i e d   n a m e ,   s e l e c t o r ,   a n d   d e s i r e d   m i n i m u m   a v a i l a b l e   p o d s .   k u b e c t l   c r e a t e   p o d d i s r u p t i o n b u d g e t   N A M E   - - s e l e c t o r = S E L E C T O R   - - m i n - a v a i l a b l e = N   [ - - d r y - r u n = s e r v e r | c l i e n t | n o n e ]


Question: What is Examples?

Answer: #   C r e a t e   a   p o d   d i s r u p t i o n   b u d g e t   n a m e d   m y - p d b   t h a t   w i l l   s e l e c t   a l l   p o d s   w i t h   t h e   a p p = r a i l s   l a b e l   #   a n d   r e q u i r e   a t   l e a s t   o n e   o f   t h e m   b e i n g   a v a i l a b l e   a t   a n y   p o i n t   i n   t i m e   k u b e c t l   c r e a t e   p o d d i s r u p t i o n b u d g e t   m y - p d b   - - s e l e c t o r = a p p = r a i l s   - - m i n - a v a i l a b l e = 1   #   C r e a t e   a   p o d   d i s r u p t i o n   b u d g e t   n a m e d   m y - p d b   t h a t   w i l l   s e l e c t   a l l   p o d s   w i t h   t h e   a p p = n g i n x   l a b e l   #   a n d   r e q u i r e   a t   l e a s t   h a l f   o f   t h e   p o d s   s e l e c t e d   t o   b e   a v a i l a b l e   a t   a n y   p o i n t   i n   t i m e   k u b e c t l   c r e a t e   p d b   m y - p d b   - - s e l e c t o r = a p p = n g i n x   - - m i n - a v a i l a b l e = 5 0 %


Question: What is Options?

Answer: I f   t r u e ,   i g n o r e   a n y   e r r o r s   i n   t e m p l a t e s   w h e n   a   f i e l d   o r   m a p   k e y   i s   m i s s i n g   i n   t h e   t e m p l a t e .   O n l y   a p p l i e s   t o   g o l a n g   a n d   j s o n p a t h   o u t p u t   f o r m a t s .   M u s t   b e   " n o n e " ,   " s e r v e r " ,   o r   " c l i e n t " .   I f   c l i e n t   s t r a t e g y ,   o n l y   p r i n t   t h e   o b j e c t   t h a t   w o u l d   b e   s e n t ,   w i t h o u t   s e n d i n g   i t .   I f   s e r v e r   s t r a t e g y ,   s u b m i t   s e r v e r - s i d e   r e q u e s t   w i t h o u t   p e r s i s t i n g   t h e   r e s o u r c e .   N a m e   o f   t h e   m a n a g e r   u s e d   t o   t r a c k   f i e l d   o w n e r s h i p .   h e l p   f o r   p o d d i s r u p t i o n b u d g e t   T h e   m a x i m u m   n u m b e r   o r   p e r c e n t a g e   o f   u n a v a i l a b l e   p o d s   t h i s   b u d g e t   r e q u i r e s .   T h e   m i n i m u m   n u m b e r   o r   p e r c e n t a g e   o f   a v a i l a b l e   p o d s   t h i s   b u d g e t   r e q u i r e s .   O u t p u t   f o r m a t .   O n e   o f :   ( j s o n ,   y a m l ,   n a m e ,   g o - t e m p l a t e ,   g o - t e m p l a t e - f i l e ,   t e m p l a t e ,   t e m p l a t e f i l e ,   j s o n p a t h ,   j s o n p a t h - a s - j s o n ,   j s o n p a t h - f i l e ) .   I f   t r u e ,   t h e   c o n f i g u r a t i o n   o f   c u r r e n t   o b j e c t   w i l l   b e   s a v e d   i n   i t s   a n n o t a t i o n .   O t h e r w i s e ,   t h e   a n n o t a t i o n   w i l l   b e   u n c h a n g e d .   T h i s   f l a g   i s   u s e f u l   w h e n   y o u   w a n t   t o   p e r f o r m   k u b e c t l   a p p l y   o n   t h i s   o b j e c t   i n   t h e   f u t u r e .   A   l a b e l   s e l e c t o r   t o   u s e   f o r   t h i s   b u d g e t .   O n l y   e q u a l i t y - b a s e d   s e l e c t o r   r e q u


Question: What is Parent Options Inherited?

Answer: U s e r n a m e   t o   i m p e r s o n a t e   f o r   t h e   o p e r a t i o n .   U s e r   c o u l d   b e   a   r e g u l a r   u s e r   o r   a   s e r v i c e   a c c o u n t   i n   a   n a m e s p a c e .   G r o u p   t o   i m p e r s o n a t e   f o r   t h e   o p e r a t i o n ,   t h i s   f l a g   c a n   b e   r e p e a t e d   t o   s p e c i f y   m u l t i p l e   g r o u p s .   U I D   t o   i m p e r s o n a t e   f o r   t h e   o p e r a t i o n .   D e f a u l t   c a c h e   d i r e c t o r y   P a t h   t o   a   c e r t   f i l e   f o r   t h e   c e r t i f i c a t e   a u t h o r i t y   P a t h   t o   a   c l i e n t   c e r t i f i c a t e   f i l e   f o r   T L S   P a t h   t o   a   c l i e n t   k e y   f i l e   f o r   T L S   T h e   n a m e   o f   t h e   k u b e c o n f i g   c l u s t e r   t o   u s e   T h e   n a m e   o f   t h e   k u b e c o n f i g   c o n t e x t   t o   u s e   I f   t r u e ,   o p t - o u t   o f   r e s p o n s e   c o m p r e s s i o n   f o r   a l l   r e q u e s t s   t o   t h e   s e r v e r   I f   t r u e ,   t h e   s e r v e r ' s   c e r t i f i c a t e   w i l l   n o t   b e   c h e c k e d   f o r   v a l i d i t y .   T h i s   w i l l   m a k e   y o u r   H T T P S   c o n n e c t i o n s   i n s e c u r e   P a t h   t o   t h e   k u b e c o n f i g   f i l e   t o   u s e   f o r   C L I   r e q u e s t s .   P a t h   t o   t h e   k u b e r c   f i l e   t o   u s e   f o r   p r e f e r e n c e s .   T h i s   c a n   b e   d i s a b l e d   b y   e x p o r t i n g   K U B E C T L _ K U B E R C = f a l s e   f e a t u r e   g a t e   o r   t u r n i n g   o f f   t h e   f e a t u r e   K U B E R C = o f f .   R e q u i r e   s e r v e r   v e r s i o n   t o   m a t c h   c l i e n t   v e r s i o n   I f   p r e s e n t ,   t h e   n a m e s p a c e   s c o p e   f o r   t h i s   C L I   r e q u e s t   P a s s w o r d   f o r   b a s i c   a u t h e n t i c a t


Question: What is See Also?

Answer: k u b e c t l   c r e a t e   -   C r e a t e   a   r e s o u r c e   f r o m   a   f i l e   o r   f r o m   s t d i n   T h i s   p a g e   i s   a u t o m a t i c a l l y   g e n e r a t e d .   I f   y o u   p l a n   t o   r e p o r t   a n   i s s u e   w i t h   t h i s   p a g e ,   m e n t i o n   t h a t   t h e   p a g e   i s   a u t o - g e n e r a t e d   i n   y o u r   i s s u e   d e s c r i p t i o n .   T h e   f i x   m a y   n e e d   t o   h a p p e n   e l s e w h e r e   i n   t h e   K u b e r n e t e s   p r o j e c t .