Question: What is How to file great issues?

Answer: K e e p   t h e   f o l l o w i n g   i n   m i n d   w h e n   f i l i n g   a n   i s s u e :   P r o v i d e   a   c l e a r   i s s u e   d e s c r i p t i o n .   D e s c r i b e   w h a t   s p e c i f i c a l l y   i s   m i s s i n g ,   o u t   o f   d a t e ,   w r o n g ,   o r   n e e d s   i m p r o v e m e n t . E x p l a i n   t h e   s p e c i f i c   i m p a c t   t h e   i s s u e   h a s   o n   u s e r s . L i m i t   t h e   s c o p e   o f   a   g i v e n   i s s u e   t o   a   r e a s o n a b l e   u n i t   o f   w o r k .   F o r   p r o b l e m s   w i t h   a   l a r g e   s c o p e ,   b r e a k   t h e m   d o w n   i n t o   s m a l l e r   i s s u e s .   F o r   e x a m p l e ,   " F i x   t h e   s e c u r i t y   d o c s "   i s   t o o   b r o a d ,   b u t   " A d d   d e t a i l s   t o   t h e   ' R e s t r i c t i n g   n e t w o r k   a c c e s s '   t o p i c "   i s   s p e c i f i c   e n o u g h   t o   b e   a c t i o n a b l e . S e a r c h   t h e   e x i s t i n g   i s s u e s   t o   s e e   i f   t h e r e ' s   a n y t h i n g   r e l a t e d   o r   s i m i l a r   t o   t h e   n e w   i s s u e . I f   t h e   n e w   i s s u e   r e l a t e s   t o   a n o t h e r   i s s u e   o r   p u l l   r e q u e s t ,   r e f e r   t o   i t   e i t h e r   b y   i t s   f u l l   U R L   o r   b y   t h e   i s s u e   o r   p u l l   r e q u e s t   n u m b e r   p r e f i x e d   w i t h   a   #   c h a r a c t e r .   F o r   e x a m p l e ,   I n t r o d u c e d   b y   # 9 8 7 6 5 4 . F o l l o w   t h e   C o d e   o f   C o n d u c t .   R e s p e c t   y o u r   f e l l o w   c o n t r i b u t o r s .   F o r   e x a m p l e ,   " T h e   d o c s   a r e   t e r r i b l e "   i s   n o t   h e l p f u l   o r   p o l i t e


Question: What is Documenting a feature for a release?

Answer: Documenting a feature for a releaseEach major Kubernetes release introduces new features that require documentation. New releases also bring updates to existing features and documentation (such as upgrading a feature from alpha to beta).Generally, the SIG responsible for a feature submits draft documentation of the feature as a pull request to the appropriate development branch of the kubernetes/website repository, and someone on the SIG Docs team provides editorial


Question: How does Documenting a feature for a release work?

Answer: Documenting a feature for a releaseEach major Kubernetes release introduces new features that require documentation. New releases also bring updates to existing features and documentation (such as upgrading a feature from alpha to beta).Generally, the SIG responsible for a feature submits draft documentation of the feature as a pull request to the appropriate development branch of the kubernetes/website repository, and someone on the SIG Docs team provides editorial


Question: When would you use Documenting a feature for a release?

Answer: Documenting a feature for a releaseEach major Kubernetes release introduces new features that require documentation. New releases also bring updates to existing features and documentation (such as upgrading a feature from alpha to beta).Generally, the SIG responsible for a feature submits draft documentation of the feature as a pull request to the appropriate development branch of the kubernetes/website repository, and someone on the SIG Docs team provides editorial


Question: What are the benefits of Documenting a feature for a release?

Answer: Documenting a feature for a releaseEach major Kubernetes release introduces new features that require documentation. New releases also bring updates to existing features and documentation (such as upgrading a feature from alpha to beta).Generally, the SIG responsible for a feature submits draft documentation of the feature as a pull request to the appropriate development branch of the kubernetes/website repository, and someone on the SIG Docs team provides editorial


Question: What is Documenting a feature for a release?

Answer: E a c h   m a j o r   K u b e r n e t e s   r e l e a s e   i n t r o d u c e s   n e w   f e a t u r e s   t h a t   r e q u i r e   d o c u m e n t a t i o n .   N e w   r e l e a s e s   a l s o   b r i n g   u p d a t e s   t o   e x i s t i n g   f e a t u r e s   a n d   d o c u m e n t a t i o n   ( s u c h   a s   u p g r a d i n g   a   f e a t u r e   f r o m   a l p h a   t o   b e t a ) .   G e n e r a l l y ,   t h e   S I G   r e s p o n s i b l e   f o r   a   f e a t u r e   s u b m i t s   d r a f t   d o c u m e n t a t i o n   o f   t h e   f e a t u r e   a s   a   p u l l   r e q u e s t   t o   t h e   a p p r o p r i a t e   d e v e l o p m e n t   b r a n c h   o f   t h e   k u b e r n e t e s / w e b s i t e   r e p o s i t o r y ,   a n d   s o m e o n e   o n   t h e   S I G   D o c s   t e a m   p r o v i d e s   e d i t o r i a l


Question: What is For documentation contributors?

Answer: I n   g e n e r a l ,   d o c u m e n t a t i o n   c o n t r i b u t o r s   d o n ' t   w r i t e   c o n t e n t   f r o m   s c r a t c h   f o r   a   r e l e a s e .   I n s t e a d ,   t h e y   w o r k   w i t h   t h e   S I G   c r e a t i n g   a   n e w   f e a t u r e   t o   r e f i n e   t h e   d r a f t   d o c u m e n t a t i o n   a n d   m a k e   i t   r e l e a s e   r e a d y .   A f t e r   y o u ' v e   c h o s e n   a   f e a t u r e   t o   d o c u m e n t   o r   a s s i s t ,   a s k   a b o u t   i t   i n   t h e   # s i g - d o c s   S l a c k   c h a n n e l ,   i n   a   w e e k l y   S I G   D o c s   m e e t i n g ,   o r   d i r e c t l y   o n   t h e   P R   f i l e d   b y   t h e   f e a t u r e   S I G .   I f   y o u ' r e   g i v e n   t h e   g o - a h e a d ,   y o u   c a n   e d i t   i n t o   t h e   P R   u s i n g   o n e   o f   t h e   t e c h n i q u e s   d e s c r i b e d   i n   C o m m i t   i n t o   a n o t h e r   p e r s o n ' s   P R .


Question: What is Find out about upcoming features?

Answer: T o   f i n d   o u t   a b o u t   u p c o m i n g   f e a t u r e s ,   a t t e n d   t h e   w e e k l y   S I G   R e l e a s e   m e e t i n g   ( s e e   t h e   c o m m u n i t y   p a g e   f o r   u p c o m i n g   m e e t i n g s )   a n d   m o n i t o r   t h e   r e l e a s e - s p e c i f i c   d o c u m e n t a t i o n   i n   t h e   k u b e r n e t e s / s i g - r e l e a s e   r e p o s i t o r y .   E a c h   r e l e a s e   h a s   a   s u b - d i r e c t o r y   i n   t h e   / s i g - r e l e a s e / t r e e / m a s t e r / r e l e a s e s /   d i r e c t o r y .   T h e   s u b - d i r e c t o r y   c o n t a i n s   a   r e l e a s e   s c h e d u l e ,   a   d r a f t   o f   t h e   r e l e a s e   n o t e s ,   a n d   a   d o c u m e n t   l i s t i n g   e a c h   p e r s o n   o n   t h e   r e l e a s e   t e a m .   T h e   r e l e a s e   s c h e d u l e   c o n t a i n s   l i n k s   t o   a l l   o t h e r   d o c u m e n t s ,   m e e t i n g s ,   m e e t i n g   m i n u t e s ,   a n d   m i l e s t o n e s   r e l a t i n g   t o   t h e   r e l e a s e .   I t   a l s o   c o n t a i n s   i n f o r m a t i o n   a b o u t   t h e   g o a l s   a n d   t i m e l i n e   o f   t h e   r e l e a s e ,   a n d   a n y   s p e c i a l   p r o c e s s e s   i n   p l a c e   f o r   t h i s   r e l e a s e .   N e a r   t h e   b o t t o m   o f   t h e   d o c u m e n t ,   s e v e r a l   r e l e a s e - r e l a t e d   t e r m s   a r e   d e f i n e d .   T h i s   d o c u m e n t   a l s o   c o n t a i n s   a   l i n k   t o   t h e   F e a t u r e   t r a c k i n g   s h e e t ,   w h i c h   i s   t h e   o f f i c i a l   w a y   t o   f i n d   o u t   a b o u t   a l l   n e w   f e a t u r e s   s c h e d u l e d   t o   g o   i n t o   t h e   r e l e a s e .   T h e   r e l e a s e   t e a m   d o c u m e n t   l i s t s   w h o   i s   r e s p o n s i b l e   f o r   e a c h   r e l e a s e   r o l e .   I f   i t


Question: What is Feature tracking sheet?

Answer: T h e   f e a t u r e   t r a c k i n g   s h e e t   f o r   a   g i v e n   K u b e r n e t e s   r e l e a s e   l i s t s   e a c h   f e a t u r e   t h a t   i s   p l a n n e d   f o r   a   r e l e a s e .   E a c h   l i n e   i t e m   i n c l u d e s   t h e   n a m e   o f   t h e   f e a t u r e ,   a   l i n k   t o   t h e   f e a t u r e ' s   m a i n   G i t H u b   i s s u e ,   i t s   s t a b i l i t y   l e v e l   ( A l p h a ,   B e t a ,   o r   S t a b l e ) ,   t h e   S I G   a n d   i n d i v i d u a l   r e s p o n s i b l e   f o r   i m p l e m e n t i n g   i t ,   w h e t h e r   i t   n e e d s   d o c s ,   a   d r a f t   r e l e a s e   n o t e   f o r   t h e   f e a t u r e ,   a n d   w h e t h e r   i t   h a s   b e e n   m e r g e d .   K e e p   t h e   f o l l o w i n g   i n   m i n d :   B e t a   a n d   S t a b l e   f e a t u r e s   a r e   g e n e r a l l y   a   h i g h e r   d o c u m e n t a t i o n   p r i o r i t y   t h a n   A l p h a   f e a t u r e s . I t ' s   h a r d   t o   t e s t   ( a n d   t h e r e f o r e   t o   d o c u m e n t )   a   f e a t u r e   t h a t   h a s n ' t   b e e n   m e r g e d ,   o r   i s   a t   l e a s t   c o n s i d e r e d   f e a t u r e - c o m p l e t e   i n   i t s   P R . D e t e r m i n i n g   w h e t h e r   a   f e a t u r e   n e e d s   d o c u m e n t a t i o n   i s   a   m a n u a l   p r o c e s s .   E v e n   i f   a   f e a t u r e   i s   n o t   m a r k e d   a s   n e e d i n g   d o c s ,   y o u   m a y   n e e d   t o   d o c u m e n t   t h e   f e a t u r e .


Question: What is For developers or other SIG members?

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


Question: What is Open a placeholder PR?

Answer: O p e n   a   d r a f t   p u l l   r e q u e s t   a g a i n s t   t h e   d e v - 1 . 3 5   b r a n c h   i n   t h e   k u b e r n e t e s / w e b s i t e   r e p o s i t o r y ,   w i t h   a   s m a l l   c o m m i t   t h a t   y o u   w i l l   a m e n d   l a t e r .   T o   c r e a t e   a   d r a f t   p u l l   r e q u e s t ,   u s e   t h e   C r e a t e   P u l l   R e q u e s t   d r o p - d o w n   a n d   s e l e c t   C r e a t e   D r a f t   P u l l   R e q u e s t ,   t h e n   c l i c k   D r a f t   P u l l   R e q u e s t . E d i t   t h e   p u l l   r e q u e s t   d e s c r i p t i o n   t o   i n c l u d e   l i n k s   t o   k u b e r n e t e s / k u b e r n e t e s   P R ( s )   a n d   k u b e r n e t e s / e n h a n c e m e n t s   i s s u e ( s ) . L e a v e   a   c o m m e n t   o n   t h e   r e l a t e d   k u b e r n e t e s / e n h a n c e m e n t s   i s s u e   w i t h   a   l i n k   t o   t h e   P R   t o   n o t i f y   t h e   d o c s   p e r s o n   m a n a g i n g   t h i s   r e l e a s e   t h a t   t h e   f e a t u r e   d o c s   a r e   c o m i n g   a n d   s h o u l d   b e   t r a c k e d   f o r   t h e   r e l e a s e .   I f   y o u r   f e a t u r e   d o e s   n o t   n e e d   a n y   d o c u m e n t a t i o n   c h a n g e s ,   m a k e   s u r e   t h e   s i g - r e l e a s e   t e a m   k n o w s   t h i s ,   b y   m e n t i o n i n g   i t   i n   t h e   # s i g - r e l e a s e   S l a c k   c h a n n e l .   I f   t h e   f e a t u r e   d o e s   n e e d   d o c u m e n t a t i o n   b u t   t h e   P R   i s   n o t   c r e a t e d ,   t h e   f e a t u r e   m a y   b e   r e m o v e d   f r o m   t h e   m i l e s t o n e .


Question: What is PR ready for review?

Answer: W h e n   r e a d y ,   p o p u l a t e   y o u r   p l a c e h o l d e r   P R   w i t h   f e a t u r e   d o c u m e n t a t i o n   a n d   c h a n g e   t h e   s t a t e   o f   t h e   P R   f r o m   d r a f t   t o   r e a d y   f o r   r e v i e w .   T o   m a r k   a   p u l l   r e q u e s t   a s   r e a d y   f o r   r e v i e w ,   n a v i g a t e   t o   t h e   m e r g e   b o x   a n d   c l i c k   R e a d y   f o r   r e v i e w .   D o   y o u r   b e s t   t o   d e s c r i b e   y o u r   f e a t u r e   a n d   h o w   t o   u s e   i t .   I f   y o u   n e e d   h e l p   s t r u c t u r i n g   y o u r   d o c u m e n t a t i o n ,   a s k   i n   t h e   # s i g - d o c s   S l a c k   c h a n n e l .   W h e n   y o u   c o m p l e t e   y o u r   c o n t e n t ,   t h e   d o c u m e n t a t i o n   p e r s o n   a s s i g n e d   t o   y o u r   f e a t u r e   r e v i e w s   i t .   T o   e n s u r e   t e c h n i c a l   a c c u r a c y ,   t h e   c o n t e n t   m a y   a l s o   r e q u i r e   a   t e c h n i c a l   r e v i e w   f r o m   c o r r e s p o n d i n g   S I G ( s ) .   U s e   t h e i r   s u g g e s t i o n s   t o   g e t   t h e   c o n t e n t   t o   a   r e l e a s e   r e a d y   s t a t e .   I f   y o u r   f e a t u r e   n e e d s   d o c u m e n t a t i o n   a n d   t h e   f i r s t   d r a f t   c o n t e n t   i s   n o t   r e c e i v e d ,   t h e   f e a t u r e   m a y   b e   r e m o v e d   f r o m   t h e   m i l e s t o n e .


Question: What is Feature gates?

Answer: I f   y o u r   f e a t u r e   i s   a n   A l p h a   o r   B e t a   f e a t u r e   a n d   i s   b e h i n d   a   f e a t u r e   g a t e ,   y o u   n e e d   a   f e a t u r e   g a t e   f i l e   f o r   i t   i n s i d e   c o n t e n t / e n / d o c s / r e f e r e n c e / c o m m a n d - l i n e - t o o l s - r e f e r e n c e / f e a t u r e - g a t e s / .   T h e   n a m e   o f   t h e   f i l e   s h o u l d   b e   t h e   n a m e   o f   t h e   f e a t u r e   g a t e   w i t h   . m d   a s   t h e   s u f f i x .   Y o u   c a n   l o o k   a t   o t h e r   f i l e s   a l r e a d y   i n   t h e   s a m e   d i r e c t o r y   f o r   a   h i n t   a b o u t   w h a t   y o u r s   s h o u l d   l o o k   l i k e .   U s u a l l y   a   s i n g l e   p a r a g r a p h   i s   e n o u g h ;   f o r   l o n g e r   e x p l a n a t i o n s ,   a d d   d o c u m e n t a t i o n   e l s e w h e r e   a n d   l i n k   t o   t h a t .   A l s o ,   t o   e n s u r e   y o u r   f e a t u r e   g a t e   a p p e a r s   i n   t h e   A l p h a / B e t a   F e a t u r e   g a t e s   t a b l e ,   i n c l u d e   t h e   f o l l o w i n g   d e t a i l s   i n   t h e   f r o n t   m a t t e r   o f   y o u r   M a r k d o w n   d e s c r i p t i o n   f i l e :   s t a g e s :   -   s t a g e :   < a l p h a / b e t a / s t a b l e / d e p r e c a t e d >   #   S p e c i f y   t h e   d e v e l o p m e n t   s t a g e   o f   t h e   f e a t u r e   g a t e   d e f a u l t V a l u e :   < t r u e   o r   f a l s e >   #   S e t   t o   t r u e   i f   e n a b l e d   b y   d e f a u l t ,   f a l s e   o t h e r w i s e   f r o m V e r s i o n :   < V e r s i o n >   #   V e r s i o n   f r o m   w h i c h   t h e   f e a t u r e   g a t e   i s   a v a i l a b l e   t o V e r s i o n :   < V e r s i o n >   #   ( O p t i o n a l )   T h e   v e r s i o n   u n t i l   w h i c h   t h e   f e a t u r e   g a t e   i s   a v a i l a b l e   W i t h


Question: What is All PRs reviewed and ready to merge?

Answer: I f   y o u r   P R   h a s   n o t   y e t   b e e n   m e r g e d   i n t o   t h e   d e v - 1 . 3 5   b r a n c h   b y   t h e   r e l e a s e   d e a d l i n e ,   w o r k   w i t h   t h e   d o c s   p e r s o n   m a n a g i n g   t h e   r e l e a s e   t o   g e t   i t   i n   b y   t h e   d e a d l i n e .   I f   y o u r   f e a t u r e   n e e d s   d o c u m e n t a t i o n   a n d   t h e   d o c s   a r e   n o t   r e a d y ,   t h e   f e a t u r e   m a y   b e   r e m o v e d   f r o m   t h e   m i l e s t o n e .


Question: What is CronJob?

Answer: CronJobA CronJob starts one-time Jobs on a repeating schedule.FEATURE STATE: Kubernetes v1.21 [stable]A CronJob creates Jobs on a repeating schedule.CronJob is meant for performing regular scheduled actions such as backups, report generation, and so on. One CronJob object is like one line of a crontab (cron table) file on a Unix system. It runs a Job periodically on a given schedule, written in Cron format.CronJobs have limitations and idiosyncrasies. For example, in certain circumstances, a single CronJob can create multiple concurrent Jobs. See the limitations below.When the control plane creates new Jobs and (indirectly) Pods for a CronJob, the .metadata.name of the CronJob is part of the basis for naming those Pods. The name of a CronJob must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a DNS label. Even when the name is a DNS subdomain, the name must be no longer than 52 characters. This is because the CronJob controller will automatically append 11 characters to the name you provide and there is a constraint that the length of a Job name is no more than 63 characters.ExampleThis example CronJob manifest prints the current time and a hello message every minute:application/job/cronjob.yaml apiVersion: batch/v1 kind: CronJob metadata: name: hello spec: schedule: "* * * * *" jobTemplate: spec: template: spec: containers: - name: hello image: busybox:1.28 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - date; echo Hello from the Kubernetes cluster restartPolicy: OnFailure (Running Automated Tasks with a CronJob takes you through this example in more detail).Writing a CronJob specSchedule syntaxThe .spec.schedule field is required. The value of that field follows the Cron syntax:# ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) # │ │ │ │ │ OR sun, mon, tue, wed, thu, fri, sat # │ │ │ │ │ # │ │ │ │ │ # * * * * * For example, 0 3 * * 1 means this task is scheduled to run weekly on a Monday at 3 AM.The format also includes extended "Vixie cron" step values. As explained in the FreeBSD manual:Step values can be used in conjunction with ranges. Following a range with /<number> specifies skips of the number's value through the range. For example, 0-23/2 can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is 0,2,4,6,8,10,12,14,16,18,20,22). Steps are also permitted after an asterisk, so if you want to say "every two hours", just use */2.Note:A question mark (?) in the schedule has the same meaning as an asterisk *, that is, it stands for any of available value for a given field.Other than the standard syntax, some macros like @monthly can also be used:EntryDescriptionEquivalent to@yearly (or @


Question: How does CronJob work?

Answer: CronJobA CronJob starts one-time Jobs on a repeating schedule.FEATURE STATE: Kubernetes v1.21 [stable]A CronJob creates Jobs on a repeating schedule.CronJob is meant for performing regular scheduled actions such as backups, report generation, and so on. One CronJob object is like one line of a crontab (cron table) file on a Unix system. It runs a Job periodically on a given schedule, written in Cron format.CronJobs have limitations and idiosyncrasies. For example, in certain circumstances, a single CronJob can create multiple concurrent Jobs. See the limitations below.When the control plane creates new Jobs and (indirectly) Pods for a CronJob, the .metadata.name of the CronJob is part of the basis for naming those Pods. The name of a CronJob must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a DNS label. Even when the name is a DNS subdomain, the name must be no longer than 52 characters. This is because the CronJob controller will automatically append 11 characters to the name you provide and there is a constraint that the length of a Job name is no more than 63 characters.ExampleThis example CronJob manifest prints the current time and a hello message every minute:application/job/cronjob.yaml apiVersion: batch/v1 kind: CronJob metadata: name: hello spec: schedule: "* * * * *" jobTemplate: spec: template: spec: containers: - name: hello image: busybox:1.28 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - date; echo Hello from the Kubernetes cluster restartPolicy: OnFailure (Running Automated Tasks with a CronJob takes you through this example in more detail).Writing a CronJob specSchedule syntaxThe .spec.schedule field is required. The value of that field follows the Cron syntax:# ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) # │ │ │ │ │ OR sun, mon, tue, wed, thu, fri, sat # │ │ │ │ │ # │ │ │ │ │ # * * * * * For example, 0 3 * * 1 means this task is scheduled to run weekly on a Monday at 3 AM.The format also includes extended "Vixie cron" step values. As explained in the FreeBSD manual:Step values can be used in conjunction with ranges. Following a range with /<number> specifies skips of the number's value through the range. For example, 0-23/2 can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is 0,2,4,6,8,10,12,14,16,18,20,22). Steps are also permitted after an asterisk, so if you want to say "every two hours", just use */2.Note:A question mark (?) in the schedule has the same meaning as an asterisk *, that is, it stands for any of available value for a given field.Other than the standard syntax, some macros like @monthly can also be used:EntryDescriptionEquivalent to@yearly (or @


Question: When would you use CronJob?

Answer: CronJobA CronJob starts one-time Jobs on a repeating schedule.FEATURE STATE: Kubernetes v1.21 [stable]A CronJob creates Jobs on a repeating schedule.CronJob is meant for performing regular scheduled actions such as backups, report generation, and so on. One CronJob object is like one line of a crontab (cron table) file on a Unix system. It runs a Job periodically on a given schedule, written in Cron format.CronJobs have limitations and idiosyncrasies. For example, in certain circumstances, a single CronJob can create multiple concurrent Jobs. See the limitations below.When the control plane creates new Jobs and (indirectly) Pods for a CronJob, the .metadata.name of the CronJob is part of the basis for naming those Pods. The name of a CronJob must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a DNS label. Even when the name is a DNS subdomain, the name must be no longer than 52 characters. This is because the CronJob controller will automatically append 11 characters to the name you provide and there is a constraint that the length of a Job name is no more than 63 characters.ExampleThis example CronJob manifest prints the current time and a hello message every minute:application/job/cronjob.yaml apiVersion: batch/v1 kind: CronJob metadata: name: hello spec: schedule: "* * * * *" jobTemplate: spec: template: spec: containers: - name: hello image: busybox:1.28 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - date; echo Hello from the Kubernetes cluster restartPolicy: OnFailure (Running Automated Tasks with a CronJob takes you through this example in more detail).Writing a CronJob specSchedule syntaxThe .spec.schedule field is required. The value of that field follows the Cron syntax:# ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) # │ │ │ │ │ OR sun, mon, tue, wed, thu, fri, sat # │ │ │ │ │ # │ │ │ │ │ # * * * * * For example, 0 3 * * 1 means this task is scheduled to run weekly on a Monday at 3 AM.The format also includes extended "Vixie cron" step values. As explained in the FreeBSD manual:Step values can be used in conjunction with ranges. Following a range with /<number> specifies skips of the number's value through the range. For example, 0-23/2 can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is 0,2,4,6,8,10,12,14,16,18,20,22). Steps are also permitted after an asterisk, so if you want to say "every two hours", just use */2.Note:A question mark (?) in the schedule has the same meaning as an asterisk *, that is, it stands for any of available value for a given field.Other than the standard syntax, some macros like @monthly can also be used:EntryDescriptionEquivalent to@yearly (or @


Question: What are the benefits of CronJob?

Answer: CronJobA CronJob starts one-time Jobs on a repeating schedule.FEATURE STATE: Kubernetes v1.21 [stable]A CronJob creates Jobs on a repeating schedule.CronJob is meant for performing regular scheduled actions such as backups, report generation, and so on. One CronJob object is like one line of a crontab (cron table) file on a Unix system. It runs a Job periodically on a given schedule, written in Cron format.CronJobs have limitations and idiosyncrasies. For example, in certain circumstances, a single CronJob can create multiple concurrent Jobs. See the limitations below.When the control plane creates new Jobs and (indirectly) Pods for a CronJob, the .metadata.name of the CronJob is part of the basis for naming those Pods. The name of a CronJob must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a DNS label. Even when the name is a DNS subdomain, the name must be no longer than 52 characters. This is because the CronJob controller will automatically append 11 characters to the name you provide and there is a constraint that the length of a Job name is no more than 63 characters.ExampleThis example CronJob manifest prints the current time and a hello message every minute:application/job/cronjob.yaml apiVersion: batch/v1 kind: CronJob metadata: name: hello spec: schedule: "* * * * *" jobTemplate: spec: template: spec: containers: - name: hello image: busybox:1.28 imagePullPolicy: IfNotPresent command: - /bin/sh - -c - date; echo Hello from the Kubernetes cluster restartPolicy: OnFailure (Running Automated Tasks with a CronJob takes you through this example in more detail).Writing a CronJob specSchedule syntaxThe .spec.schedule field is required. The value of that field follows the Cron syntax:# ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) # │ │ │ │ │ OR sun, mon, tue, wed, thu, fri, sat # │ │ │ │ │ # │ │ │ │ │ # * * * * * For example, 0 3 * * 1 means this task is scheduled to run weekly on a Monday at 3 AM.The format also includes extended "Vixie cron" step values. As explained in the FreeBSD manual:Step values can be used in conjunction with ranges. Following a range with /<number> specifies skips of the number's value through the range. For example, 0-23/2 can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is 0,2,4,6,8,10,12,14,16,18,20,22). Steps are also permitted after an asterisk, so if you want to say "every two hours", just use */2.Note:A question mark (?) in the schedule has the same meaning as an asterisk *, that is, it stands for any of available value for a given field.Other than the standard syntax, some macros like @monthly can also be used:EntryDescriptionEquivalent to@yearly (or @


Question: What is CronJob?

Answer: A   C r o n J o b   c r e a t e s   J o b s   o n   a   r e p e a t i n g   s c h e d u l e .   C r o n J o b   i s   m e a n t   f o r   p e r f o r m i n g   r e g u l a r   s c h e d u l e d   a c t i o n s   s u c h   a s   b a c k u p s ,   r e p o r t   g e n e r a t i o n ,   a n d   s o   o n .   O n e   C r o n J o b   o b j e c t   i s   l i k e   o n e   l i n e   o f   a   c r o n t a b   ( c r o n   t a b l e )   f i l e   o n   a   U n i x   s y s t e m .   I t   r u n s   a   J o b   p e r i o d i c a l l y   o n   a   g i v e n   s c h e d u l e ,   w r i t t e n   i n   C r o n   f o r m a t .   C r o n J o b s   h a v e   l i m i t a t i o n s   a n d   i d i o s y n c r a s i e s .   F o r   e x a m p l e ,   i n   c e r t a i n   c i r c u m s t a n c e s ,   a   s i n g l e   C r o n J o b   c a n   c r e a t e   m u l t i p l e   c o n c u r r e n t   J o b s .   S e e   t h e   l i m i t a t i o n s   b e l o w .   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   J o b s   a n d   ( i n d i r e c t l y )   P o d s   f o r   a   C r o n J o b ,   t h e   . m e t a d a t a . n a m e   o f   t h e   C r o n 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   C r o n 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   5 2   c h a r a c t e r s .   T h i s   i s   b e c a u s e   t h e   C r o n J o b   c o n t r o l l e r   w i l l   a u t o m a t i c a l l y   a p p e n d   1 1   c h


Question: What is Example?

Answer: T h i s   e x a m p l e   C r o n J o b   m a n i f e s t   p r i n t s   t h e   c u r r e n t   t i m e   a n d   a   h e l l o   m e s s a g e   e v e r y   m i n u t e :   a p i V e r s i o n :   b a t c h / v 1   k i n d :   C r o n J o b   m e t a d a t a :   n a m e :   h e l l o   s p e c :   s c h e d u l e :   " *   *   *   *   * "   j o b T e m p l a t e :   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 :   h e l l o   i m a g e :   b u s y b o x : 1 . 2 8   i m a g e P u l l P o l i c y :   I f N o t P r e s e n t   c o m m a n d :   -   / b i n / s h   -   - c   -   d a t e ;   e c h o   H e l l o   f r o m   t h e   K u b e r n e t e s   c l u s t e r   r e s t a r t P o l i c y :   O n F a i l u r e   ( R u n n i n g   A u t o m a t e d   T a s k s   w i t h   a   C r o n J o b   t a k e s   y o u   t h r o u g h   t h i s   e x a m p l e   i n   m o r e   d e t a i l ) .


Question: What is Schedule syntax?

Answer: T h e   . s p e c . s c h e d u l e   f i e l d   i s   r e q u i r e d .   T h e   v a l u e   o f   t h a t   f i e l d   f o l l o w s   t h e   C r o n   s y n t a x :   #   ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   m i n u t e   ( 0   -   5 9 )   #   │   ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   h o u r   ( 0   -   2 3 )   #   │   │   ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   d a y   o f   t h e   m o n t h   ( 1   -   3 1 )   #   │   │   │   ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   m o n t h   ( 1   -   1 2 )   #   │   │   │   │   ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   d a y   o f   t h e   w e e k   ( 0   -   6 )   ( S u n d a y   t o   S a t u r d a y )   #   │   │   │   │   │   O R   s u n ,   m o n ,   t u e ,   w e d ,   t h u ,   f r i ,   s a t   #   │   │   │   │   │   #   │   │   │   │   │   #   *   *   *   *   *   F o r   e x a m p l e ,   0   3   *   *   1   m e a n s   t h i s   t a s k   i s   s c h e d u l e d   t o   r u n   w e e k l y   o n   a   M o n d a y   a t   3   A M .   T h e   f o r m a t   a l s o   i n c l u d e s   e x t e n d e d   " V i x i e   c r o n "   s t e p   v a l u e s .   A s   e x p l a i n e d   i n   t h e   F r e e B S D   m a n u a l :   S t e p   v a l u e s   c a n   b e   u s e d   i n   c o n j u n c t i o n   w i t h   r a n g e s .   F o l l o w i n g   a   r a n g e   w i t h   / < n u m b e r >   s p e c i f i e s   s k i p s   o f   t h e   n u m b e r ' s   v a l u e   t h r o u g h   t h e   r a n g e .   F o r   e x a m p l e ,   0 - 2 3 / 2   c a n   b e   u s e d   i n   t h e   h o u r s   f i e l d   t o   s p e c i f y   c o m m a n d   e x e c u t i o n   e v e r y   o t h e r   h o u r   ( t h e   a l t e r n a t i v e   i n   t h e   V 7   s t a n d a r d   i s   0 , 2 , 4 , 6 , 8 , 1 0 , 1 2 , 1 4 , 1 6 , 1 8 , 2 0 , 2 2 ) .   S t e p s   a r e   a l s o   p e r m i t t e d   a f t e r   a n   a s t e r i s k ,   s o   i f   y o u   w a n t   t o   s a y   " e v e r y   t w o   h o u r s " ,   j u s t   u s e   * / 2 .


Question: What is Note:?

Answer: O t h e r   t h a n   t h e   s t a n d a r d   s y n t a x ,   s o m e   m a c r o s   l i k e   @ m o n t h l y   c a n   a l s o   b e   u s e d :   T o   g e n e r a t e   C r o n J o b   s c h e d u l e   e x p r e s s i o n s ,   y o u   c a n   a l s o   u s e   w e b   t o o l s   l i k e   c r o n t a b . g u r u .


Question: What is Job template?

Answer: T h e   . s p e c . j o b T e m p l a t e   d e f i n e s   a   t e m p l a t e   f o r   t h e   J o b s   t h a t   t h e   C r o n J o b   c r e a t e s ,   a n d   i t   i s   r e q u i r e d .   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   J o b ,   e x c e p t   t h a 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 .   Y o u   c a n   s p e c i f y   c o m m o n   m e t a d a t a   f o r   t h e   t e m p l a t e d   J o b s ,   s u c h   a s   l a b e l s   o r   a n n o t a t i o n s .   F o r   i n f o r m a t i o n   a b o u t   w r i t i n g   a   J o b   . s p e c ,   s e e   W r i t i n g   a   J o b   S p e c .


Question: What is Deadline for delayed Job start?

Answer: T h e   . s p e c . s t a r t i n g D e a d l i n e S e c o n d s   f i e l d   i s   o p t i o n a l .   T h i s   f i e l d   d e f i n e s   a   d e a d l i n e   ( i n   w h o l e   s e c o n d s )   f o r   s t a r t i n g   t h e   J o b ,   i f   t h a t   J o b   m i s s e s   i t s   s c h e d u l e d   t i m e   f o r   a n y   r e a s o n .   A f t e r   m i s s i n g   t h e   d e a d l i n e ,   t h e   C r o n J o b   s k i p s   t h a t   i n s t a n c e   o f   t h e   J o b   ( f u t u r e   o c c u r r e n c e s   a r e   s t i l l   s c h e d u l e d ) .   F o r   e x a m p l e ,   i f   y o u   h a v e   a   b a c k u p   J o b   t h a t   r u n s   t w i c e   a   d a y ,   y o u   m i g h t   a l l o w   i t   t o   s t a r t   u p   t o   8   h o u r s   l a t e ,   b u t   n o   l a t e r ,   b e c a u s e   a   b a c k u p   t a k e n   a n y   l a t e r   w o u l d n ' t   b e   u s e f u l :   y o u   w o u l d   i n s t e a d   p r e f e r   t o   w a i t   f o r   t h e   n e x t   s c h e d u l e d   r u n .   F o r   J o b s   t h a t   m i s s   t h e i r   c o n f i g u r e d   d e a d l i n e ,   K u b e r n e t e s   t r e a t s   t h e m   a s   f a i l e d   J o b s .   I f   y o u   d o n ' t   s p e c i f y   s t a r t i n g D e a d l i n e S e c o n d s   f o r   a   C r o n J o b ,   t h e   J o b   o c c u r r e n c e s   h a v e   n o   d e a d l i n e .   I f   t h e   . s p e c . s t a r t i n g D e a d l i n e S e c o n d s   f i e l d   i s   s e t   ( n o t   n u l l ) ,   t h e   C r o n J o b   c o n t r o l l e r   m e a s u r e s   t h e   t i m e   b e t w e e n   w h e n   a   J o b   i s   e x p e c t e d   t o   b e   c r e a t e d   a n d   n o w .   I f   t h e   d i f f e r e n c e   i s   h i g h e r   t h a n   t h a t   l i m i t ,   i t   w i l l   s k i p   t h i s   e x e c u t i o n .   F o r   e x a m p l e ,   i f   i t   i s   s e t   t o   2 0 0 ,   i t   a l l o w s   a   J o b   t o   b e   c r


Question: What is Concurrency policy?

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


Question: What is Schedule suspension?

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


Question: What is Jobs history limits?

Answer: T h e   . s p e c . s u c c e s s f u l J o b s H i s t o r y L i m i t   a n d   . s p e c . f a i l e d J o b s H i s t o r y L i m i t   f i e l d s   s p e c i f y   h o w   m a n y   c o m p l e t e d   a n d   f a i l e d   J o b s   s h o u l d   b e   k e p t .   B o t h   f i e l d s   a r e   o p t i o n a l .   . s p e c . s u c c e s s f u l J o b s H i s t o r y L i m i t :   T h i s   f i e l d   s p e c i f i e s   t h e   n u m b e r   o f   s u c c e s s f u l   f i n i s h e d   j o b s   t o   k e e p .   T h e   d e f a u l t   v a l u e   i s   3 .   S e t t i n g   t h i s   f i e l d   t o   0   w i l l   n o t   k e e p   a n y   s u c c e s s f u l   j o b s . . s p e c . f a i l e d J o b s H i s t o r y L i m i t :   T h i s   f i e l d   s p e c i f i e s   t h e   n u m b e r   o f   f a i l e d   f i n i s h e d   j o b s   t o   k e e p .   T h e   d e f a u l t   v a l u e   i s   1 .   S e t t i n g   t h i s   f i e l d   t o   0   w i l l   n o t   k e e p   a n y   f a i l e d   j o b s .   . s p e c . s u c c e s s f u l J o b s H i s t o r y L i m i t :   T h i s   f i e l d   s p e c i f i e s   t h e   n u m b e r   o f   s u c c e s s f u l   f i n i s h e d   j o b s   t o   k e e p .   T h e   d e f a u l t   v a l u e   i s   3 .   S e t t i n g   t h i s   f i e l d   t o   0   w i l l   n o t   k e e p   a n y   s u c c e s s f u l   j o b s .   . s p e c . f a i l e d J o b s H i s t o r y L i m i t :   T h i s   f i e l d   s p e c i f i e s   t h e   n u m b e r   o f   f a i l e d   f i n i s h e d   j o b s   t o   k e e p .   T h e   d e f a u l t   v a l u e   i s   1 .   S e t t i n g   t h i s   f i e l d   t o   0   w i l l   n o t   k e e p   a n y   f a i l e d   j o b s .   F o r   a n o t h e r   w a y   t o   c l e a n   u p   J o b s   a u t o m a t i c a l l y ,   s e e   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 .


Question: What is Time zones?

Answer: F o r   C r o n J o b s   w i t h   n o   t i m e   z o n e   s p e c i f i e d ,   t h e   k u b e - c o n t r o l l e r - m a n a g e r   i n t e r p r e t s   s c h e d u l e s   r e l a t i v e   t o   i t s   l o c a l   t i m e   z o n e .   Y o u   c a n   s p e c i f y   a   t i m e   z o n e   f o r   a   C r o n J o b   b y   s e t t i n g   . s p e c . t i m e Z o n e   t o   t h e   n a m e   o f   a   v a l i d   t i m e   z o n e .   F o r   e x a m p l e ,   s e t t i n g   . s p e c . t i m e Z o n e :   " E t c / U T C "   i n s t r u c t s   K u b e r n e t e s   t o   i n t e r p r e t   t h e   s c h e d u l e   r e l a t i v e   t o   C o o r d i n a t e d   U n i v e r s a l   T i m e .   A   t i m e   z o n e   d a t a b a s e   f r o m   t h e   G o   s t a n d a r d   l i b r a r y   i s   i n c l u d e d   i n   t h e   b i n a r i e s   a n d   u s e d   a s   a   f a l l b a c k   i n   c a s e   a n   e x t e r n a l   d a t a b a s e   i s   n o t   a v a i l a b l e   o n   t h e   s y s t e m .


Question: What is Unsupported TimeZone specification?

Answer: S p e c i f y i n g   a   t i m e z o n e   u s i n g   C R O N _ T Z   o r   T Z   v a r i a b l e s   i n s i d e   . s p e c . s c h e d u l e   i s   n o t   o f f i c i a l l y   s u p p o r t e d   ( a n d   n e v e r   h a s   b e e n ) .   I f   y o u   t r y   t o   s e t   a   s c h e d u l e   t h a t   i n c l u d e s   T Z   o r   C R O N _ T Z   t i m e z o n e   s p e c i f i c a t i o n ,   K u b e r n e t e s   w i l l   f a i l   t o   c r e a t e   o r   u p d a t e   t h e   r e s o u r c e   w i t h   a   v a l i d a t i o n   e r r o r .   Y o u   s h o u l d   s p e c i f y   t i m e   z o n e s   u s i n g   t h e   t i m e   z o n e   f i e l d ,   i n s t e a d .


Question: What is Modifying a CronJob?

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


Question: What is Job creation?

Answer: A   C r o n J o b   c r e a t e s   a   J o b   o b j e c t   a p p r o x i m a t e l y   o n c e   p e r   e x e c u t i o n   t i m e   o f   i t s   s c h e d u l e .   T h e   s c h e d u l i n g   i s   a p p r o x i m a t e   b e c a u s e   t h e r e   a r e   c e r t a i n   c i r c u m s t a n c e s   w h e r e   t w o   J o b s   m i g h t   b e   c r e a t e d ,   o r   n o   J o b   m i g h t   b e   c r e a t e d .   K u b e r n e t e s   t r i e s   t o   a v o i d   t h o s e   s i t u a t i o n s ,   b u t   d o e s   n o t   c o m p l e t e l y   p r e v e n t   t h e m .   T h e r e f o r e ,   t h e   J o b s   t h a t   y o u   d e f i n e   s h o u l d   b e   i d e m p o t e n t .   S t a r t i n g   w i t h   K u b e r n e t e s   v 1 . 3 2 ,   C r o n J o b s   a p p l y   a n   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 / c r o n j o b - s c h e d u l e d - t i m e s t a m p   t o   t h e i r   c r e a t e d   J o b s .   T h i s   a n n o t a t i o n   i n d i c a t e s   t h e   o r i g i n a l l y   s c h e d u l e d   c r e a t i o n   t i m e   f o r   t h e   J o b   a n d   i s   f o r m a t t e d   i n   R F C 3 3 3 9 .   I f   s t a r t i n g D e a d l i n e S e c o n d s   i s   s e t   t o   a   l a r g e   v a l u e   o r   l e f t   u n s e t   ( t h e   d e f a u l t )   a n d   i f   c o n c u r r e n c y P o l i c y   i s   s e t   t o   A l l o w ,   t h e   J o b s   w i l l   a l w a y s   r u n   a t   l e a s t   o n c e .


Question: What is Caution:?

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


Question: What is What's next?

Answer: L e a r n   a b o u t   P o d s   a n d   J o b s ,   t w o   c o n c e p t s   t h a t   C r o n J o b s   r e l y   u p o n . R e a d   a b o u t   t h e   d e t a i l e d   f o r m a t   o f   C r o n J o b   . s p e c . s c h e d u l e   f i e l d s . F o r   i n s t r u c t i o n s   o n   c r e a t i n g   a n d   w o r k i n g   w i t h   C r o n J o b s ,   a n d   f o r   a n   e x a m p l e   o f   a   C r o n J o b   m a n i f e s t ,   s e e   R u n n i n g   a u t o m a t e d   t a s k s   w i t h   C r o n J o b s . C r o n 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   C r o n J o b   A P I   r e f e r e n c e   f o r   m o r e   d e t a i l s .


Question: What is Configure Access to Multiple Clusters?

Answer: Configure Access to Multiple ClustersThis page shows how to configure access to multiple clusters by using configuration files. After your clusters, users, and contexts are defined in one or more configuration files, you can quickly switch between clusters by using the kubectl config use-context command.Note:A file that is used to configure access to a cluster is sometimes called a kubeconfig file. This is a generic way of referring to configuration files. It does not mean that there is a file named kubeconfig.Warning:Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure. If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check that kubectl is installed, run kubectl version --client. The kubectl version should be within one minor version of your cluster's API server.Define clusters, users, and contextsSuppose you have two clusters, one for development work and one for test work. In the development cluster, your frontend developers work in a namespace called frontend, and your storage developers work in a namespace called storage. In your test cluster, developers work in the default namespace, or they create auxiliary namespaces as they see fit. Access to the development cluster requires authentication by certificate. Access to the test cluster requires authentication by username and password.Create a directory named config-exercise. In your config-exercise directory, create a file named config-demo with this content:apiVersion: v1 kind: Config preferences: {} clusters: - cluster: name: development - cluster: name: test users: - name: developer - name: experimenter contexts: - context: name: dev-frontend - context: name: dev-storage - context: name: exp-test A configuration file describes clusters, users, and contexts. Your config-demo file has the framework to describe two clusters, two users, and three contexts.Go to your config-exercise directory. Enter these commands to add cluster details to your configuration file:kubectl config --kubeconfig=config-demo set-cluster development --server=https://1.2.3.4 --certificate-authority=fake-ca-file kubectl config --kubeconfig=config-demo set-cluster test --server=https://5.6.7.8 --insecure-skip-tls-verify Add user details to your configuration file:Caution:Storing passwords in Kubernetes client config is risky. A better alternative would be to use a credential plugin and store them separately. See: client-go credential pl


Question: How does Configure Access to Multiple Clusters work?

Answer: Configure Access to Multiple ClustersThis page shows how to configure access to multiple clusters by using configuration files. After your clusters, users, and contexts are defined in one or more configuration files, you can quickly switch between clusters by using the kubectl config use-context command.Note:A file that is used to configure access to a cluster is sometimes called a kubeconfig file. This is a generic way of referring to configuration files. It does not mean that there is a file named kubeconfig.Warning:Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure. If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check that kubectl is installed, run kubectl version --client. The kubectl version should be within one minor version of your cluster's API server.Define clusters, users, and contextsSuppose you have two clusters, one for development work and one for test work. In the development cluster, your frontend developers work in a namespace called frontend, and your storage developers work in a namespace called storage. In your test cluster, developers work in the default namespace, or they create auxiliary namespaces as they see fit. Access to the development cluster requires authentication by certificate. Access to the test cluster requires authentication by username and password.Create a directory named config-exercise. In your config-exercise directory, create a file named config-demo with this content:apiVersion: v1 kind: Config preferences: {} clusters: - cluster: name: development - cluster: name: test users: - name: developer - name: experimenter contexts: - context: name: dev-frontend - context: name: dev-storage - context: name: exp-test A configuration file describes clusters, users, and contexts. Your config-demo file has the framework to describe two clusters, two users, and three contexts.Go to your config-exercise directory. Enter these commands to add cluster details to your configuration file:kubectl config --kubeconfig=config-demo set-cluster development --server=https://1.2.3.4 --certificate-authority=fake-ca-file kubectl config --kubeconfig=config-demo set-cluster test --server=https://5.6.7.8 --insecure-skip-tls-verify Add user details to your configuration file:Caution:Storing passwords in Kubernetes client config is risky. A better alternative would be to use a credential plugin and store them separately. See: client-go credential pl


Question: When would you use Configure Access to Multiple Clusters?

Answer: Configure Access to Multiple ClustersThis page shows how to configure access to multiple clusters by using configuration files. After your clusters, users, and contexts are defined in one or more configuration files, you can quickly switch between clusters by using the kubectl config use-context command.Note:A file that is used to configure access to a cluster is sometimes called a kubeconfig file. This is a generic way of referring to configuration files. It does not mean that there is a file named kubeconfig.Warning:Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure. If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check that kubectl is installed, run kubectl version --client. The kubectl version should be within one minor version of your cluster's API server.Define clusters, users, and contextsSuppose you have two clusters, one for development work and one for test work. In the development cluster, your frontend developers work in a namespace called frontend, and your storage developers work in a namespace called storage. In your test cluster, developers work in the default namespace, or they create auxiliary namespaces as they see fit. Access to the development cluster requires authentication by certificate. Access to the test cluster requires authentication by username and password.Create a directory named config-exercise. In your config-exercise directory, create a file named config-demo with this content:apiVersion: v1 kind: Config preferences: {} clusters: - cluster: name: development - cluster: name: test users: - name: developer - name: experimenter contexts: - context: name: dev-frontend - context: name: dev-storage - context: name: exp-test A configuration file describes clusters, users, and contexts. Your config-demo file has the framework to describe two clusters, two users, and three contexts.Go to your config-exercise directory. Enter these commands to add cluster details to your configuration file:kubectl config --kubeconfig=config-demo set-cluster development --server=https://1.2.3.4 --certificate-authority=fake-ca-file kubectl config --kubeconfig=config-demo set-cluster test --server=https://5.6.7.8 --insecure-skip-tls-verify Add user details to your configuration file:Caution:Storing passwords in Kubernetes client config is risky. A better alternative would be to use a credential plugin and store them separately. See: client-go credential pl


Question: What are the benefits of Configure Access to Multiple Clusters?

Answer: Configure Access to Multiple ClustersThis page shows how to configure access to multiple clusters by using configuration files. After your clusters, users, and contexts are defined in one or more configuration files, you can quickly switch between clusters by using the kubectl config use-context command.Note:A file that is used to configure access to a cluster is sometimes called a kubeconfig file. This is a generic way of referring to configuration files. It does not mean that there is a file named kubeconfig.Warning:Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure. If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check that kubectl is installed, run kubectl version --client. The kubectl version should be within one minor version of your cluster's API server.Define clusters, users, and contextsSuppose you have two clusters, one for development work and one for test work. In the development cluster, your frontend developers work in a namespace called frontend, and your storage developers work in a namespace called storage. In your test cluster, developers work in the default namespace, or they create auxiliary namespaces as they see fit. Access to the development cluster requires authentication by certificate. Access to the test cluster requires authentication by username and password.Create a directory named config-exercise. In your config-exercise directory, create a file named config-demo with this content:apiVersion: v1 kind: Config preferences: {} clusters: - cluster: name: development - cluster: name: test users: - name: developer - name: experimenter contexts: - context: name: dev-frontend - context: name: dev-storage - context: name: exp-test A configuration file describes clusters, users, and contexts. Your config-demo file has the framework to describe two clusters, two users, and three contexts.Go to your config-exercise directory. Enter these commands to add cluster details to your configuration file:kubectl config --kubeconfig=config-demo set-cluster development --server=https://1.2.3.4 --certificate-authority=fake-ca-file kubectl config --kubeconfig=config-demo set-cluster test --server=https://5.6.7.8 --insecure-skip-tls-verify Add user details to your configuration file:Caution:Storing passwords in Kubernetes client config is risky. A better alternative would be to use a credential plugin and store them separately. See: client-go credential pl


Question: What is Configure Access to Multiple Clusters?

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


Question: What is Before you begin?

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


Question: What is Define clusters, users, and contexts?

Answer: S u p p o s e   y o u   h a v e   t w o   c l u s t e r s ,   o n e   f o r   d e v e l o p m e n t   w o r k   a n d   o n e   f o r   t e s t   w o r k .   I n   t h e   d e v e l o p m e n t   c l u s t e r ,   y o u r   f r o n t e n d   d e v e l o p e r s   w o r k   i n   a   n a m e s p a c e   c a l l e d   f r o n t e n d ,   a n d   y o u r   s t o r a g e   d e v e l o p e r s   w o r k   i n   a   n a m e s p a c e   c a l l e d   s t o r a g e .   I n   y o u r   t e s t   c l u s t e r ,   d e v e l o p e r s   w o r k   i n   t h e   d e f a u l t   n a m e s p a c e ,   o r   t h e y   c r e a t e   a u x i l i a r y   n a m e s p a c e s   a s   t h e y   s e e   f i t .   A c c e s s   t o   t h e   d e v e l o p m e n t   c l u s t e r   r e q u i r e s   a u t h e n t i c a t i o n   b y   c e r t i f i c a t e .   A c c e s s   t o   t h e   t e s t   c l u s t e r   r e q u i r e s   a u t h e n t i c a t i o n   b y   u s e r n a m e   a n d   p a s s w o r d .   C r e a t e   a   d i r e c t o r y   n a m e d   c o n f i g - e x e r c i s e .   I n   y o u r   c o n f i g - e x e r c i s e   d i r e c t o r y ,   c r e a t e   a   f i l e   n a m e d   c o n f i g - d e m o   w i t h   t h i s   c o n t e n t :   a p i V e r s i o n :   v 1   k i n d :   C o n f i g   p r e f e r e n c e s :   { }   c l u s t e r s :   -   c l u s t e r :   n a m e :   d e v e l o p m e n t   -   c l u s t e r :   n a m e :   t e s t   u s e r s :   -   n a m e :   d e v e l o p e r   -   n a m e :   e x p e r i m e n t e r   c o n t e x t s :   -   c o n t e x t :   n a m e :   d e v - f r o n t e n d   -   c o n t e x t :   n a m e :   d e v - s t o r a g e   -   c o n t e x t :   n a m e :   e x p - t e s t   A   c o n f i g u r a t i o n   f i l e   d e s c r i b e s   c l u s t e r s ,   u s e r s ,   a n d   c o n t e x t s .   Y o u r   c o n f i g - d e m o   f i l e   h a s   t h e   f r a m e w o r k   t o   d e s c r i b e   t w o   c l u s t e r


Question: What is Caution:?

Answer: k u b e c t l   c o n f i g   - - k u b e c o n f i g = c o n f i g - d e m o   s e t - c r e d e n t i a l s   d e v e l o p e r   - - c l i e n t - c e r t i f i c a t e = f a k e - c e r t - f i l e   - - c l i e n t - k e y = f a k e - k e y - s e e f i l e   k u b e c t l   c o n f i g   - - k u b e c o n f i g = c o n f i g - d e m o   s e t - c r e d e n t i a l s   e x p e r i m e n t e r   - - u s e r n a m e = e x p   - - p a s s w o r d = s o m e - p a s s w o r d


Question: What is Note:?

Answer: T o   d e l e t e   a   u s e r   y o u   c a n   r u n   k u b e c t l   - - k u b e c o n f i g = c o n f i g - d e m o   c o n f i g   u n s e t   u s e r s . < n a m e > T o   r e m o v e   a   c l u s t e r ,   y o u   c a n   r u n   k u b e c t l   - - k u b e c o n f i g = c o n f i g - d e m o   c o n f i g   u n s e t   c l u s t e r s . < n a m e > T o   r e m o v e   a   c o n t e x t ,   y o u   c a n   r u n   k u b e c t l   - - k u b e c o n f i g = c o n f i g - d e m o   c o n f i g   u n s e t   c o n t e x t s . < n a m e >   A d d   c o n t e x t   d e t a i l s   t o   y o u r   c o n f i g u r a t i o n   f i l e :   k u b e c t l   c o n f i g   - - k u b e c o n f i g = c o n f i g - d e m o   s e t - c o n t e x t   d e v - f r o n t e n d   - - c l u s t e r = d e v e l o p m e n t   - - n a m e s p a c e = f r o n t e n d   - - u s e r = d e v e l o p e r   k u b e c t l   c o n f i g   - - k u b e c o n f i g = c o n f i g - d e m o   s e t - c o n t e x t   d e v - s t o r a g e   - - c l u s t e r = d e v e l o p m e n t   - - n a m e s p a c e = s t o r a g e   - - u s e r = d e v e l o p e r   k u b e c t l   c o n f i g   - - k u b e c o n f i g = c o n f i g - d e m o   s e t - c o n t e x t   e x p - t e s t   - - c l u s t e r = t e s t   - - n a m e s p a c e = d e f a u l t   - - u s e r = e x p e r i m e n t e r   O p e n   y o u r   c o n f i g - d e m o   f i l e   t o   s e e   t h e   a d d e d   d e t a i l s .   A s   a n   a l t e r n a t i v e   t o   o p e n i n g   t h e   c o n f i g - d e m o   f i l e ,   y o u   c a n   u s e   t h e   c o n f i g   v i e w   c o m m a n d .   k u b e c t l   c o n f i g   - - k u b e c o n f i g = c o n f i g - d e m o   v i e w   T h e   o u t p u t   s h o w s   t h e   t w o   c l u s t e r s ,   t w o   u s e r s ,   a n d   t h r e e   c o n t e x t s :   a p i V e r s i o n :   v 1   c l u s t e r s :   -   c l u s t e r :   c e r t i f i c a t e - a u t h o r i t y :   f


Question: What is Create a second configuration file?

Answer: I n   y o u r   c o n f i g - e x e r c i s e   d i r e c t o r y ,   c r e a t e   a   f i l e   n a m e d   c o n f i g - d e m o - 2   w i t h   t h i s   c o n t e n t :   a p i V e r s i o n :   v 1   k i n d :   C o n f i g   p r e f e r e n c e s :   { }   c o n t e x t s :   -   c o n t e x t :   c l u s t e r :   d e v e l o p m e n t   n a m e s p a c e :   r a m p   u s e r :   d e v e l o p e r   n a m e :   d e v - r a m p - u p   T h e   p r e c e d i n g   c o n f i g u r a t i o n   f i l e   d e f i n e s   a   n e w   c o n t e x t   n a m e d   d e v - r a m p - u p .


Question: What is Set the KUBECONFIG environment variable?

Answer: S e e   w h e t h e r   y o u   h a v e   a n   e n v i r o n m e n t   v a r i a b l e   n a m e d   K U B E C O N F I G .   I f   s o ,   s a v e   t h e   c u r r e n t   v a l u e   o f   y o u r   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e ,   s o   y o u   c a n   r e s t o r e   i t   l a t e r .   F o r   e x a m p l e :


Question: What is Linux?

Answer: e x p o r t   K U B E C O N F I G _ S A V E D = " $ K U B E C O N F I G "


Question: What is Windows PowerShell?

Answer: $ E n v : K U B E C O N F I G _ S A V E D = $ E N V : K U B E C O N F I G   T h e   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e   i s   a   l i s t   o f   p a t h s   t o   c o n f i g u r a t i o n   f i l e s .   T h e   l i s t   i s   c o l o n - d e l i m i t e d   f o r   L i n u x   a n d   M a c ,   a n d   s e m i c o l o n - d e l i m i t e d   f o r   W i n d o w s .   I f   y o u   h a v e   a   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e ,   f a m i l i a r i z e   y o u r s e l f   w i t h   t h e   c o n f i g u r a t i o n   f i l e s   i n   t h e   l i s t .   T e m p o r a r i l y   a p p e n d   t w o   p a t h s   t o   y o u r   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e .   F o r   e x a m p l e :


Question: What is Linux?

Answer: e x p o r t   K U B E C O N F I G = " $ { K U B E C O N F I G } : c o n f i g - d e m o : c o n f i g - d e m o - 2 "


Question: What is Windows PowerShell?

Answer: $ E n v : K U B E C O N F I G = ( " c o n f i g - d e m o ; c o n f i g - d e m o - 2 " )   I n   y o u r   c o n f i g - e x e r c i s e   d i r e c t o r y ,   e n t e r   t h i s   c o m m a n d :   k u b e c t l   c o n f i g   v i e w   T h e   o u t p u t   s h o w s   m e r g e d   i n f o r m a t i o n   f r o m   a l l   t h e   f i l e s   l i s t e d   i n   y o u r   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e .   I n   p a r t i c u l a r ,   n o t i c e   t h a t   t h e   m e r g e d   i n f o r m a t i o n   h a s   t h e   d e v - r a m p - u p   c o n t e x t   f r o m   t h e   c o n f i g - d e m o - 2   f i l e   a n d   t h e   t h r e e   c o n t e x t s   f r o m   t h e   c o n f i g - d e m o   f i l e :   c o n t e x t s :   -   c o n t e x t :   c l u s t e r :   d e v e l o p m e n t   n a m e s p a c e :   f r o n t e n d   u s e r :   d e v e l o p e r   n a m e :   d e v - f r o n t e n d   -   c o n t e x t :   c l u s t e r :   d e v e l o p m e n t   n a m e s p a c e :   r a m p   u s e r :   d e v e l o p e r   n a m e :   d e v - r a m p - u p   -   c o n t e x t :   c l u s t e r :   d e v e l o p m e n t   n a m e s p a c e :   s t o r a g e   u s e r :   d e v e l o p e r   n a m e :   d e v - s t o r a g e   -   c o n t e x t :   c l u s t e r :   t e s t   n a m e s p a c e :   d e f a u l t   u s e r :   e x p e r i m e n t e r   n a m e :   e x p - t e s t   F o r   m o r e   i n f o r m a t i o n   a b o u t   h o w   k u b e c o n f i g   f i l e s   a r e   m e r g e d ,   s e e   O r g a n i z i n g   C l u s t e r   A c c e s s   U s i n g   k u b e c o n f i g   F i l e s


Question: What is Explore the $HOME/.kube directory?

Answer: I f   y o u   a l r e a d y   h a v e   a   c l u s t e r ,   a n d   y o u   c a n   u s e   k u b e c t l   t o   i n t e r a c t   w i t h   t h e   c l u s t e r ,   t h e n   y o u   p r o b a b l y   h a v e   a   f i l e   n a m e d   c o n f i g   i n   t h e   $ H O M E / . k u b e   d i r e c t o r y .   G o   t o   $ H O M E / . k u b e ,   a n d   s e e   w h a t   f i l e s   a r e   t h e r e .   T y p i c a l l y ,   t h e r e   i s   a   f i l e   n a m e d   c o n f i g .   T h e r e   m i g h t   a l s o   b e   o t h e r   c o n f i g u r a t i o n   f i l e s   i n   t h i s   d i r e c t o r y .   B r i e f l y   f a m i l i a r i z e   y o u r s e l f   w i t h   t h e   c o n t e n t s   o f   t h e s e   f i l e s .


Question: What is Append $HOME/.kube/config to your KUBECONFIG environment variable?

Answer: I f   y o u   h a v e   a   $ H O M E / . k u b e / c o n f i g   f i l e ,   a n d   i t ' s   n o t   a l r e a d y   l i s t e d   i n   y o u r   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e ,   a p p e n d   i t   t o   y o u r   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e   n o w .   F o r   e x a m p l e :


Question: What is Linux?

Answer: e x p o r t   K U B E C O N F I G = " $ { K U B E C O N F I G } : $ { H O M E } / . k u b e / c o n f i g "


Question: What is Windows Powershell?

Answer: $ E n v : K U B E C O N F I G = " $ E n v : K U B E C O N F I G ; $ H O M E \ . k u b e \ c o n f i g "   V i e w   c o n f i g u r a t i o n   i n f o r m a t i o n   m e r g e d   f r o m   a l l   t h e   f i l e s   t h a t   a r e   n o w   l i s t e d   i n   y o u r   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e .   I n   y o u r   c o n f i g - e x e r c i s e   d i r e c t o r y ,   e n t e r :   k u b e c t l   c o n f i g   v i e w


Question: What is Clean up?

Answer: R e t u r n   y o u r   K U B E C O N F I G   e n v i r o n m e n t   v a r i a b l e   t o   i t s   o r i g i n a l   v a l u e .   F o r   e x a m p l e :


Question: What is Linux?

Answer: e x p o r t   K U B E C O N F I G = " $ K U B E C O N F I G _ S A V E D "


Question: What is Windows PowerShell?

Answer: $ E n v : K U B E C O N F I G = $ E N V : K U B E C O N F I G _ S A V E D


Question: What is Check the subject represented by the kubeconfig?

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


Question: What is What's next?

Answer: O r g a n i z i n g   C l u s t e r   A c c e s s   U s i n g   k u b e c o n f i g   F i l e s k u b e c t l   c o n f i g


Question: What is Pod?

Answer: PodPod is a collection of containers that can run on a host.apiVersion: v1import "k8s.io/api/core/v1"PodPod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.apiVersion: v1kind: Podmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusstatus (PodStatus)Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodSpecPodSpec is a description of a pod.Containerscontainers ([]Container), requiredPatch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.initContainers ([]Container)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ephemeralContainers ([]EphemeralContainer)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.imagePullSecrets ([]LocalObjectReference)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info:


Question: How does Pod work?

Answer: PodPod is a collection of containers that can run on a host.apiVersion: v1import "k8s.io/api/core/v1"PodPod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.apiVersion: v1kind: Podmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusstatus (PodStatus)Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodSpecPodSpec is a description of a pod.Containerscontainers ([]Container), requiredPatch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.initContainers ([]Container)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ephemeralContainers ([]EphemeralContainer)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.imagePullSecrets ([]LocalObjectReference)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info:


Question: When would you use Pod?

Answer: PodPod is a collection of containers that can run on a host.apiVersion: v1import "k8s.io/api/core/v1"PodPod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.apiVersion: v1kind: Podmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusstatus (PodStatus)Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodSpecPodSpec is a description of a pod.Containerscontainers ([]Container), requiredPatch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.initContainers ([]Container)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ephemeralContainers ([]EphemeralContainer)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.imagePullSecrets ([]LocalObjectReference)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info:


Question: What are the benefits of Pod?

Answer: PodPod is a collection of containers that can run on a host.apiVersion: v1import "k8s.io/api/core/v1"PodPod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.apiVersion: v1kind: Podmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusstatus (PodStatus)Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodSpecPodSpec is a description of a pod.Containerscontainers ([]Container), requiredPatch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.initContainers ([]Container)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ephemeralContainers ([]EphemeralContainer)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeList of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.imagePullSecrets ([]LocalObjectReference)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info:


Question: What is Pod?

Answer: a p i V e r s i o n :   v 1   i m p o r t   " k 8 s . i o / a p i / c o r e / v 1 "


Question: What is Pod?

Answer: P o d   i s   a   c o l l e c t i o n   o f   c o n t a i n e r s   t h a t   c a n   r u n   o n   a   h o s t .   T h i s   r e s o u r c e   i s   c r e a t e d   b y   c l i e n t s   a n d   s c h e d u l e d   o n t o   h o s t s .   a p i V e r s i o n :   v 1 k i n d :   P o d m e t a d a t a   ( O b j e c t M e t a ) S t a n d a r d   o b j e c t ' s   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # m e t a d a t a s p e c   ( P o d S p e c ) S p e c i f i c a t i o n   o f   t h e   d e s i r e d   b e h a v i o r   o f   t h e   p o d .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # s p e c - a n d - s t a t u s s t a t u s   ( P o d S t a t u s ) M o s t   r e c e n t l y   o b s e r v e d   s t a t u s   o f   t h e   p o d .   T h i s   d a t a   m a y   n o t   b e   u p   t o   d a t e .   P o p u l a t e d   b y   t h e   s y s t e m .   R e a d - o n l y .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # s p e c - a n d - s t a t u s   a p i V e r s i o n :   v 1   k i n d :   P o d   m e t a d a t a   ( O b j e c t M e t a )   S t a n d a r d   o b j e c t ' s   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # m e t a d a t a   s p e c   ( P o d S p e c )   S p e c i f i c a t i o n   o f   t h e   d e s i r e d   b e h a v i o r   o f   t h e   p o d .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b


Question: What is PodSpec?

Answer: P o d S p e c   i s   a   d e s c r i p t i o n   o f   a   p o d .


Question: What is Containers?

Answer: c o n t a i n e r s   ( [ ] C o n t a i n e r ) ,   r e q u i r e d P a t c h   s t r a t e g y :   m e r g e   o n   k e y   n a m e M a p :   u n i q u e   v a l u e s   o n   k e y   n a m e   w i l l   b e   k e p t   d u r i n g   a   m e r g e L i s t   o f   c o n t a i n e r s   b e l o n g i n g   t o   t h e   p o d .   C o n t a i n e r s   c a n n o t   c u r r e n t l y   b e   a d d e d   o r   r e m o v e d .   T h e r e   m u s t   b e   a t   l e a s t   o n e   c o n t a i n e r   i n   a   P o d .   C a n n o t   b e   u p d a t e d . i n i t C o n t a i n e r s   ( [ ] C o n t a i n e r ) P a t c h   s t r a t e g y :   m e r g e   o n   k e y   n a m e M a p :   u n i q u e   v a l u e s   o n   k e y   n a m e   w i l l   b e   k e p t   d u r i n g   a   m e r g e L i s t   o f   i n i t i a l i z a t i o n   c o n t a i n e r s   b e l o n g i n g   t o   t h e   p o d .   I n i t   c o n t a i n e r s   a r e   e x e c u t e d   i n   o r d e r   p r i o r   t o   c o n t a i n e r s   b e i n g   s t a r t e d .   I f   a n y   i n i t   c o n t a i n e r   f a i l s ,   t h e   p o d   i s   c o n s i d e r e d   t o   h a v e   f a i l e d   a n d   i s   h a n d l e d   a c c o r d i n g   t o   i t s   r e s t a r t P o l i c y .   T h e   n a m e   f o r   a n   i n i t   c o n t a i n e r   o r   n o r m a l   c o n t a i n e r   m u s t   b e   u n i q u e   a m o n g   a l l   c o n t a i n e r s .   I n i t   c o n t a i n e r s   m a y   n o t   h a v e   L i f e c y c l e   a c t i o n s ,   R e a d i n e s s   p r o b e s ,   L i v e n e s s   p r o b e s ,   o r   S t a r t u p   p r o b e s .   T h e   r e s o u r c e R e q u i r e m e n t s   o f   a n   i n i t   c o n t a i n e r   a r e   t a k e n   i n t o   a c c o u n t   d u r i n g   s c h e d u l i n g   b y   f i n d i n g   t h e   h i g h e s t   r e q u e s t / l i m i t   f o r   e a c h   r e s o u r c e   t y p e ,   a n d   t h e n   u s i n g   t h e   m a


Question: What is Volumes?

Answer: v o l u m e s   ( [ ] V o l u m e ) P a t c h   s t r a t e g i e s :   r e t a i n K e y s ,   m e r g e   o n   k e y   n a m e M a p :   u n i q u e   v a l u e s   o n   k e y   n a m e   w i l l   b e   k e p t   d u r i n g   a   m e r g e L i s t   o f   v o l u m e s   t h a t   c a n   b e   m o u n t e d   b y   c o n t a i n e r s   b e l o n g i n g   t o   t h e   p o d .   M o r e   i n f o :   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / s t o r a g e / v o l u m e s   v o l u m e s   ( [ ] V o l u m e )   P a t c h   s t r a t e g i e s :   r e t a i n K e y s ,   m e r g e   o n   k e y   n a m e   M a p :   u n i q u e   v a l u e s   o n   k e y   n a m e   w i l l   b e   k e p t   d u r i n g   a   m e r g e   L i s t   o f   v o l u m e s   t h a t   c a n   b e   m o u n t e d   b y   c o n t a i n e r s   b e l o n g i n g   t o   t h e   p o d .   M o r e   i n f o :   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / s t o r a g e / v o l u m e s


Question: What is Scheduling?

Answer: n o d e S e l e c t o r   ( m a p [ s t r i n g ] s t r i n g ) N o d e S e l e c t o r   i s   a   s e l e c t o r   w h i c h   m u s t   b e   t r u e   f o r   t h e   p o d   t o   f i t   o n   a   n o d e .   S e l e c t o r   w h i c h   m u s t   m a t c h   a   n o d e ' s   l a b e l s   f o r   t h e   p o d   t o   b e   s c h e d u l e d   o n   t h a t   n o d e .   M o r e   i n f o :   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / c o n f i g u r a t i o n / a s s i g n - p o d - n o d e / n o d e N a m e   ( s t r i n g ) N o d e N a m e   i n d i c a t e s   i n   w h i c h   n o d e   t h i s   p o d   i s   s c h e d u l e d .   I f   e m p t y ,   t h i s   p o d   i s   a   c a n d i d a t e   f o r   s c h e d u l i n g   b y   t h e   s c h e d u l e r   d e f i n e d   i n   s c h e d u l e r N a m e .   O n c e   t h i s   f i e l d   i s   s e t ,   t h e   k u b e l e t   f o r   t h i s   n o d e   b e c o m e s   r e s p o n s i b l e   f o r   t h e   l i f e c y c l e   o f   t h i s   p o d .   T h i s   f i e l d   s h o u l d   n o t   b e   u s e d   t o   e x p r e s s   a   d e s i r e   f o r   t h e   p o d   t o   b e   s c h e d u l e d   o n   a   s p e c i f i c   n o d e .   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / s c h e d u l i n g - e v i c t i o n / a s s i g n - p o d - n o d e / # n o d e n a m e a f f i n i t y   ( A f f i n i t y ) I f   s p e c i f i e d ,   t h e   p o d ' s   s c h e d u l i n g   c o n s t r a i n t s A f f i n i t y   i s   a   g r o u p   o f   a f f i n i t y   s c h e d u l i n g   r u l e s . a f f i n i t y . n o d e A f f i n i t y   ( N o d e A f f i n i t y ) D e s c r i b e s   n o d e   a f f i n i t y   s c h e d u l i n g   r u l e s   f o r   t h e   p o d . a f f i n i t y . p o d A f f i n i t y   ( P o d A f f i n i t y ) D e s c r i b e s   p o d   a f f i n i t y   s c h e d u l i n g   r u l e s   ( e . g .   c o -


Question: What is Lifecycle?

Answer: r e s t a r t P o l i c y   ( s t r i n g ) R e s t a r t   p o l i c y   f o r   a l l   c o n t a i n e r s   w i t h i n   t h e   p o d .   O n e   o f   A l w a y s ,   O n F a i l u r e ,   N e v e r .   I n   s o m e   c o n t e x t s ,   o n l y   a   s u b s e t   o f   t h o s e   v a l u e s   m a y   b e   p e r m i t t e d .   D e f a u l t   t o   A l w a y s .   M o r e   i n f o :   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / w o r k l o a d s / p o d s / p o d - l i f e c y c l e / # r e s t a r t - p o l i c y 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   ( i n t 6 4 ) O p t i o n a l   d u r a t i o n   i n   s e c o n d s   t h e   p o d   n e e d s   t o   t e r m i n a t e   g r a c e f u l l y .   M a y   b e   d e c r e a s e d   i n   d e l e t e   r e q u e s t .   V a l u e   m u s t   b e   n o n - n e g a t i v e   i n t e g e r .   T h e   v a l u e   z e r o   i n d i c a t e s   s t o p   i m m e d i a t e l y   v i a   t h e   k i l l   s i g n a l   ( n o   o p p o r t u n i t y   t o   s h u t   d o w n ) .   I f   t h i s   v a l u e   i s   n i l ,   t h e   d e f a u l t   g r a c e   p e r i o d   w i l l   b e   u s e d   i n s t e a d .   T h e   g r a c e   p e r i o d   i s   t h e   d u r a t i o n   i n   s e c o n d s   a f t e r   t h e   p r o c e s s e s   r u n n i n g   i n   t h e   p o d   a r e   s e n t   a   t e r m i n a t i o n   s i g n a l   a n d   t h e   t i m e   w h e n   t h e   p r o c e s s e s   a r e   f o r c i b l y   h a l t e d   w i t h   a   k i l l   s i g n a l .   S e t   t h i s   v a l u e   l o n g e r   t h a n   t h e   e x p e c t e d   c l e a n u p   t i m e   f o r   y o u r   p r o c e s s .   D e f a u l t s   t o   3 0   s e c o n d s . a c t i v e D e a d l i n e S e c o n d s   ( i n t 6 4 ) O p t i o n a l   d u r a t i o n   i n   s e c o n d s   t h e   p o d   m a y   b e   a c t i v e   o n   t h e   n o d e   r e l a t i v e


Question: What is Hostname and Name resolution?

Answer: h o s t n a m e   ( s t r i n g ) S p e c i f i e s   t h e   h o s t n a m e   o f   t h e   P o d   I f   n o t   s p e c i f i e d ,   t h e   p o d ' s   h o s t n a m e   w i l l   b e   s e t   t o   a   s y s t e m - d e f i n e d   v a l u e . h o s t n a m e O v e r r i d e   ( s t r i n g ) H o s t n a m e O v e r r i d e   s p e c i f i e s   a n   e x p l i c i t   o v e r r i d e   f o r   t h e   p o d ' s   h o s t n a m e   a s   p e r c e i v e d   b y   t h e   p o d .   T h i s   f i e l d   o n l y   s p e c i f i e s   t h e   p o d ' s   h o s t n a m e   a n d   d o e s   n o t   a f f e c t   i t s   D N S   r e c o r d s .   W h e n   t h i s   f i e l d   i s   s e t   t o   a   n o n - e m p t y   s t r i n g :   -   I t   t a k e s   p r e c e d e n c e   o v e r   t h e   v a l u e s   s e t   i n   h o s t n a m e   a n d   s u b d o m a i n .   -   T h e   P o d ' s   h o s t n a m e   w i l l   b e   s e t   t o   t h i s   v a l u e .   -   s e t H o s t n a m e A s F Q D N   m u s t   b e   n i l   o r   s e t   t o   f a l s e .   -   h o s t N e t w o r k   m u s t   b e   s e t   t o   f a l s e . T h i s   f i e l d   m u s t   b e   a   v a l i d   D N S   s u b d o m a i n   a s   d e f i n e d   i n   R F C   1 1 2 3   a n d   c o n t a i n   a t   m o s t   6 4   c h a r a c t e r s .   R e q u i r e s   t h e   H o s t n a m e O v e r r i d e   f e a t u r e   g a t e   t o   b e   e n a b l e d . s e t H o s t n a m e A s F Q D N   ( b o o l e a n ) I f   t r u e   t h e   p o d ' s   h o s t n a m e   w i l l   b e   c o n f i g u r e d   a s   t h e   p o d ' s   F Q D N ,   r a t h e r   t h a n   t h e   l e a f   n a m e   ( t h e   d e f a u l t ) .   I n   L i n u x   c o n t a i n e r s ,   t h i s   m e a n s   s e t t i n g   t h e   F Q D N   i n   t h e   h o s t n a m e   f i e l d   o f   t h e   k e r n e l   ( t h e   n o d e n a m e   f i e l d   o f   s t r u c t   u t s n a m e ) .   I n   W i n d o w s