Question: What is Manual certificate renewal?

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


Question: What is Copying the administrator certificate (optional)?

Answer: C l u s t e r s   b u i l t   w i t h   k u b e a d m   o f t e n   c o p y   t h e   a d m i n . c o n f   c e r t i f i c a t e   i n t o   $ H O M E / . k u b e / c o n f i g ,   a s   i n s t r u c t e d   i n   C r e a t i n g   a   c l u s t e r   w i t h   k u b e a d m .   O n   s u c h   a   s y s t e m ,   t o   u p d a t e   t h e   c o n t e n t s   o f   $ H O M E / . k u b e / c o n f i g   a f t e r   r e n e w i n g   t h e   a d m i n . c o n f ,   y o u   c o u l d   r u n   t h e   f o l l o w i n g   c o m m a n d s :   s u d o   c p   - i   / e t c / k u b e r n e t e s / a d m i n . c o n f   $ H O M E / . k u b e / c o n f i g   s u d o   c h o w n   $ ( i d   - u ) : $ ( i d   - g )   $ H O M E / . k u b e / c o n f i g


Question: What is Renew certificates with the Kubernetes certificates API?

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


Question: What is Set up a signer?

Answer: T h e   K u b e r n e t e s   C e r t i f i c a t e   A u t h o r i t y   d o e s   n o t   w o r k   o u t   o f   t h e   b o x .   Y o u   c a n   c o n f i g u r e   a n   e x t e r n a l   s i g n e r   s u c h   a s   c e r t - m a n a g e r ,   o r   y o u   c a n   u s e   t h e   b u i l t - i n   s i g n e r .   T h e   b u i l t - i n   s i g n e r   i s   p a r t   o f   k u b e - c o n t r o l l e r - m a n a g e r .   T o   a c t i v a t e   t h e   b u i l t - i n   s i g n e r ,   y o u   m u s t   p a s s   t h e   - - c l u s t e r - s i g n i n g - c e r t - f i l e   a n d   - - c l u s t e r - s i g n i n g - k e y - f i l e   f l a g s .   I f   y o u ' r e   c r e a t i n g   a   n e w   c l u s t e r ,   y o u   c a n   u s e   a   k u b e a d m   c o n f i g u r a t i o n   f i l e :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   c o n t r o l l e r M a n a g e r :   e x t r a A r g s :   -   n a m e :   " c l u s t e r - s i g n i n g - c e r t - f i l e "   v a l u e :   " / e t c / k u b e r n e t e s / p k i / c a . c r t "   -   n a m e :   " c l u s t e r - s i g n i n g - k e y - f i l e "   v a l u e :   " / e t c / k u b e r n e t e s / p k i / c a . k e y "


Question: What is Create certificate signing requests (CSR)?

Answer: S e e   C r e a t e   C e r t i f i c a t e S i g n i n g R e q u e s t   f o r   c r e a t i n g   C S R s   w i t h   t h e   K u b e r n e t e s   A P I .


Question: What is Renew certificates with external CA?

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


Question: What is Renewal by using certificate signing requests (CSR)?

Answer: R e n e w a l   o f   c e r i t f i c a t e s   i s   p o s s i b l e   b y   g e n e r a t i n g   n e w   C S R s   a n d   s i g n i n g   t h e m   w i t h   t h e   e x t e r n a l   C A .   F o r   m o r e   d e t a i l s   a b o u t   w o r k i n g   w i t h   C S R s   g e n e r a t e d   b y   k u b e a d m   s e e   t h e   s e c t i o n   S i g n i n g   c e r t i f i c a t e   s i g n i n g   r e q u e s t s   ( C S R )   g e n e r a t e d   b y   k u b e a d m .


Question: What is Certificate authority (CA) rotation?

Answer: K u b e a d m   d o e s   n o t   s u p p o r t   r o t a t i o n   o r   r e p l a c e m e n t   o f   C A   c e r t i f i c a t e s   o u t   o f   t h e   b o x .   F o r   m o r e   i n f o r m a t i o n   a b o u t   m a n u a l   r o t a t i o n   o r   r e p l a c e m e n t   o f   C A ,   s e e   m a n u a l   r o t a t i o n   o f   C A   c e r t i f i c a t e s .


Question: What is Enabling signed kubelet serving certificates?

Answer: B y   d e f a u l t   t h e   k u b e l e t   s e r v i n g   c e r t i f i c a t e   d e p l o y e d   b y   k u b e a d m   i s   s e l f - s i g n e d .   T h i s   m e a n s   a   c o n n e c t i o n   f r o m   e x t e r n a l   s e r v i c e s   l i k e   t h e   m e t r i c s - s e r v e r   t o   a   k u b e l e t   c a n n o t   b e   s e c u r e d   w i t h   T L S .   T o   c o n f i g u r e   t h e   k u b e l e t s   i n   a   n e w   k u b e a d m   c l u s t e r   t o   o b t a i n   p r o p e r l y   s i g n e d   s e r v i n g   c e r t i f i c a t e s   y o u   m u s t   p a s s   t h e   f o l l o w i n g   m i n i m a l   c o n f i g u r a t i o n   t o   k u b e a d m   i n i t :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   - - -   a p i V e r s i o n :   k u b e l e t . c o n f i g . k 8 s . i o / v 1 b e t a 1   k i n d :   K u b e l e t C o n f i g u r a t i o n   s e r v e r T L S B o o t s t r a p :   t r u e   I f   y o u   h a v e   a l r e a d y   c r e a t e d   t h e   c l u s t e r   y o u   m u s t   a d a p t   i t   b y   d o i n g   t h e   f o l l o w i n g :   F i n d   a n d   e d i t   t h e   k u b e l e t - c o n f i g   C o n f i g M a p   i n   t h e   k u b e - s y s t e m   n a m e s p a c e .   I n   t h a t   C o n f i g M a p ,   t h e   k u b e l e t   k e y   h a s   a   K u b e l e t C o n f i g u r a t i o n   d o c u m e n t   a s   i t s   v a l u e .   E d i t   t h e   K u b e l e t C o n f i g u r a t i o n   d o c u m e n t   t o   s e t   s e r v e r T L S B o o t s t r a p :   t r u e . O n   e a c h   n o d e ,   a d d   t h e   s e r v e r T L S B o o t s t r a p :   t r u e   f i e l d   i n   / v a r / l i b / k u b e l e t / c o n f i g . y a m l   a n d   r e s t a r t   t h e   k u b e l e t   w i t h   s y s t e m c t l   r e s t a r t   k u b e l e t   T h e   f i e l d   s e r v e r T L S B o o t s t r a p :   t r u


Question: What is Generating kubeconfig files for additional users?

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


Question: What is Warning:?

Answer: Y o u   c a n   u s e   t h e   k u b e a d m   k u b e c o n f i g   u s e r   c o m m a n d   t o   g e n e r a t e   k u b e c o n f i g   f i l e s   f o r   a d d i t i o n a l   u s e r s .   T h e   c o m m a n d   a c c e p t s   a   m i x t u r e   o f   c o m m a n d   l i n e   f l a g s   a n d   k u b e a d m   c o n f i g u r a t i o n   o p t i o n s .   T h e   g e n e r a t e d   k u b e c o n f i g   w i l l   b e   w r i t t e n   t o   s t d o u t   a n d   c a n   b e   p i p e d   t o   a   f i l e   u s i n g   k u b e a d m   k u b e c o n f i g   u s e r   . . .   >   s o m e f i l e . c o n f .   E x a m p l e   c o n f i g u r a t i o n   f i l e   t h a t   c a n   b e   u s e d   w i t h   - - c o n f i g :   #   e x a m p l e . y a m l   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   #   W i l l   b e   u s e d   a s   t h e   t a r g e t   " c l u s t e r "   i n   t h e   k u b e c o n f i g   c l u s t e r N a m e :   " k u b e r n e t e s "   #   W i l l   b e   u s e d   a s   t h e   " s e r v e r "   ( I P   o r   D N S   n a m e )   o f   t h i s   c l u s t e r   i n   t h e   k u b e c o n f i g   c o n t r o l P l a n e E n d p o i n t :   " s o m e - d n s - a d d r e s s : 6 4 4 3 "   #   T h e   c l u s t e r   C A   k e y   a n d   c e r t i f i c a t e   w i l l   b e   l o a d e d   f r o m   t h i s   l o c a l   d i r e c t o r y   c e r t i f i c a t e s D i r :   " / e t c / k u b e r n e t e s / p k i "   M a k e   s u r e   t h a t   t h e s e   s e t t i n g s   m a t c h   t h e   d e s i r e d   t a r g e t   c l u s t e r   s e t t i n g s .   T o   s e e   t h e   s e t t i n g s   o f   a n   e x i s t i n g   c l u s t e r   u s e :   k u b e c t l   g e t   c m   k u b e a d m - c o n f i g   - n   k u b e - s y s t e m   - o = j s o n p a t h = " { . d a t a . C l u s t e r C o n f i g u r a t i o n } "   T h e   f o l l o w i n


Question: What is Signing certificate signing requests (CSR) generated by kubeadm?

Answer: Y o u   c a n   c r e a t e   c e r t i f i c a t e   s i g n i n g   r e q u e s t s   w i t h   k u b e a d m   c e r t s   g e n e r a t e - c s r .   C a l l i n g   t h i s   c o m m a n d   w i l l   g e n e r a t e   . c s r   /   . k e y   f i l e   p a i r s   f o r   r e g u l a r   c e r t i f i c a t e s .   F o r   c e r t i f i c a t e s   e m b e d d e d   i n   k u b e c o n f i g   f i l e s ,   t h e   c o m m a n d   w i l l   g e n e r a t e   a   . c s r   /   . c o n f   p a i r   w h e r e   t h e   k e y   i s   a l r e a d y   e m b e d d e d   i n   t h e   . c o n f   f i l e .   A   C S R   f i l e   c o n t a i n s   a l l   r e l e v a n t   i n f o r m a t i o n   f o r   a   C A   t o   s i g n   a   c e r t i f i c a t e .   k u b e a d m   u s e s   a   w e l l   d e f i n e d   s p e c i f i c a t i o n   f o r   a l l   i t s   c e r t i f i c a t e s   a n d   C S R s .   T h e   d e f a u l t   c e r t i f i c a t e   d i r e c t o r y   i s   / e t c / k u b e r n e t e s / p k i ,   w h i l e   t h e   d e f a u l t   d i r e c t o r y   f o r   k u b e c o n f i g   f i l e s   i s   / e t c / k u b e r n e t e s .   T h e s e   d e f a u l t s   c a n   b e   o v e r r i d d e n   w i t h   t h e   f l a g s   - - c e r t - d i r   a n d   - - k u b e c o n f i g - d i r ,   r e s p e c t i v e l y .   T o   p a s s   c u s t o m   o p t i o n s   t o   k u b e a d m   c e r t s   g e n e r a t e - c s r   u s e   t h e   - - c o n f i g   f l a g ,   w h i c h   a c c e p t s   a   k u b e a d m   c o n f i g u r a t i o n   f i l e ,   s i m i l a r l y   t o   c o m m a n d s   s u c h   a s   k u b e a d m   i n i t .   A n y   s p e c i f i c a t i o n   s u c h   a s   e x t r a   S A N s   a n d   c u s t o m   I P   a d d r e s s e s   m u s t   b e   s t o r e d   i n   t h e   s a m e   c o n f i g u r a t i o n   f i l e   a n d   u s e d   f o r   a l l   r e l e v a n t   k u b e a d m   c o m m a n d s   b y


Question: What is Note:?

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


Question: What is Preparing CA and service account files?

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


Question: What is Note:?

Answer: I f   y o u   a r e   u s i n g   a n   e x t e r n a l   C A ,   y o u   m u s t   g e n e r a t e   t h e   s a m e   f i l e s   o u t   o f   b a n d   a n d   m a n u a l l y   c o p y   t h e m   t o   t h e   p r i m a r y   c o n t r o l   p l a n e   n o d e   i n   / e t c / k u b e r n e t e s .   O n c e   a l l   C S R s   a r e   s i g n e d ,   y o u   c a n   d e l e t e   t h e   r o o t   C A   k e y   ( c a . k e y )   a s   n o t e d   i n   t h e   E x t e r n a l   C A   m o d e   s e c t i o n .   F o r   s e c o n d a r y   c o n t r o l   p l a n e   n o d e s   ( k u b e a d m   j o i n   - - c o n t r o l - p l a n e )   t h e r e   i s   n o   n e e d   t o   c a l l   t h e   a b o v e   c o m m a n d s .   D e p e n d i n g   o n   h o w   y o u   s e t u p   t h e   H i g h   A v a i l a b i l i t y   c l u s t e r ,   y o u   e i t h e r   h a v e   t o   m a n u a l l y   c o p y   t h e   s a m e   f i l e s   f r o m   t h e   p r i m a r y   c o n t r o l   p l a n e   n o d e ,   o r   u s e   t h e   a u t o m a t e d   - - u p l o a d - c e r t s   f u n c t i o n a l i t y   o f   k u b e a d m   i n i t .


Question: What is Generate CSRs?

Answer: T h e   k u b e a d m   c e r t s   g e n e r a t e - c s r   c o m m a n d   g e n e r a t e s   C S R s   f o r   a l l   k n o w n   c e r t i f i c a t e s   m a n a g e d   b y   k u b e a d m .   O n c e   t h e   c o m m a n d   i s   d o n e   y o u   m u s t   m a n u a l l y   d e l e t e   . c s r ,   . c o n f   o r   . k e y   f i l e s   t h a t   y o u   d o n ' t   n e e d .


Question: What is Considerations for kubelet.conf?

Answer: T h i s   s e c t i o n   a p p l i e s   t o   b o t h   c o n t r o l   p l a n e   a n d   w o r k e r   n o d e s .   I f   y o u   h a v e   d e l e t e d   t h e   c a . k e y   f i l e   f r o m   c o n t r o l   p l a n e   n o d e s   ( E x t e r n a l   C A   m o d e ) ,   t h e   a c t i v 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 h i s   c l u s t e r   w i l l   n o t   b e   a b l e   t o   s i g n   k u b e l e t   c l i e n t   c e r t i f i c a t e s .   I f   n o   e x t e r n a l   m e t h o d   f o r   s i g n i n g   t h e s e   c e r t i f i c a t e s   e x i s t s   i n   y o u r   s e t u p   ( s u c h   a s   a n   e x t e r n a l   s i g n e r ) ,   y o u   c o u l d   m a n u a l l y   s i g n   t h e   k u b e l e t . c o n f . c s r   a s   e x p l a i n e d   i n   t h i s   g u i d e .   N o t e   t h a t   t h i s   a l s o   m e a n s   t h a t   t h e   a u t o m a t i c   k u b e l e t   c l i e n t   c e r t i f i c a t e   r o t a t i o n   w i l l   b e   d i s a b l e d .   I f   s o ,   c l o s e   t o   c e r t i f i c a t e   e x p i r a t i o n ,   y o u   m u s t   g e n e r a t e   a   n e w   k u b e l e t . c o n f . c s r ,   s i g n   t h e   c e r t i f i c a t e ,   e m b e d   i t   i n   k u b e l e t . c o n f   a n d   r e s t a r t   t h e   k u b e l e t .   I f   t h i s   d o e s   n o t   a p p l y   t o   y o u r   s e t u p ,   y o u   c a n   s k i p   p r o c e s s i n g   t h e   k u b e l e t . c o n f . c s r   o n   s e c o n d a r y   c o n t r o l   p l a n e   a n d   o n   w o r k e r s   n o d e s   ( a l l   n o d e s   t h a t   c a l l   k u b e a d m   j o i n   . . . ) .   T h a t   i s   b e c a u s e   t h e   a c t i v e   k u b e - c o n t r o l l e r - m a n a g e r   w i l l   b e   r e s p o n s i b l e   f o r   s i g n i n g   n e w   k u b e l e t   c l i e n t   c e r t i f i c a t e s .


Question: What is Control plane nodes?

Answer: E x e c u t e   t h e   f o l l o w i n g   c o m m a n d   o n   p r i m a r y   ( k u b e a d m   i n i t )   a n d   s e c o n d a r y   ( k u b e a d m   j o i n   - - c o n t r o l - p l a n e )   c o n t r o l   p l a n e   n o d e s   t o   g e n e r a t e   a l l   C S R   f i l e s :   s u d o   k u b e a d m   c e r t s   g e n e r a t e - c s r   I f   e x t e r n a l   e t c d   i s   t o   b e   u s e d ,   f o l l o w   t h e   E x t e r n a l   e t c d   w i t h   k u b e a d m   g u i d e   t o   u n d e r s t a n d   w h a t   C S R   f i l e s   a r e   n e e d e d   o n   t h e   k u b e a d m   a n d   e t c d   n o d e s .   O t h e r   . c s r   a n d   . k e y   f i l e s   u n d e r   / e t c / k u b e r n e t e s / p k i / e t c d   c a n   b e   r e m o v e d .   B a s e d   o n   t h e   e x p l a n a t i o n   i n   C o n s i d e r a t i o n s   f o r   k u b e l e t . c o n f   k e e p   o r   d e l e t e   t h e   k u b e l e t . c o n f   a n d   k u b e l e t . c o n f . c s r   f i l e s .


Question: What is Worker nodes?

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


Question: What is Note:?

Answer: I f   y o u   a r e   u s i n g   e x t e r n a l   C A   a n d   a l r e a d y   h a v e   C A   s e r i a l   n u m b e r   f i l e s   ( . s r l )   f o r   o p e n s s l ,   y o u   c a n   c o p y   s u c h   f i l e s   t o   a   k u b e a d m   n o d e   w h e r e   C S R s   w i l l   b e   p r o c e s s e d .   T h e   . s r l   f i l e s   t o   c o p y   a r e   / e t c / k u b e r n e t e s / p k i / c a . s r l ,   / e t c / k u b e r n e t e s / p k i / f r o n t - p r o x y - c a . s r l   a n d   / e t c / k u b e r n e t e s / p k i / e t c d / c a . s r l .   T h e   f i l e s   c a n   b e   t h e n   m o v e d   t o   a   n e w   n o d e   w h e r e   C S R   f i l e s   w i l l   b e   p r o c e s s e d .   I f   a   . s r l   f i l e   i s   m i s s i n g   f o r   a   C A   o n   a   n o d e ,   t h e   s c r i p t   b e l o w   w i l l   g e n e r a t e   a   n e w   S R L   f i l e   w i t h   a   r a n d o m   s t a r t i n g   s e r i a l   n u m b e r .   T o   r e a d   m o r e   a b o u t   . s r l   f i l e s   s e e   t h e   o p e n s s l   d o c u m e n t a t i o n   f o r   t h e   - - C A s e r i a l   f l a g .   R e p e a t   t h i s   s t e p   f o r   a l l   n o d e s   t h a t   h a v e   C S R   f i l e s .   W r i t e   t h e   f o l l o w i n g   s c r i p t   i n   t h e   / e t c / k u b e r n e t e s   d i r e c t o r y ,   n a v i g a t e   t o   t h e   d i r e c t o r y   a n d   e x e c u t e   t h e   s c r i p t .   T h e   s c r i p t   w i l l   g e n e r a t e   c e r t i f i c a t e s   f o r   a l l   C S R   f i l e s   t h a t   a r e   p r e s e n t   i n   t h e   / e t c / k u b e r n e t e s   t r e e .   # ! / b i n / b a s h   #   S e t   c e r t i f i c a t e   e x p i r a t i o n   t i m e   i n   d a y s   D A Y S = 3 6 5   #   P r o c e s s   a l l   C S R   f i l e s   e x c e p t   t h o s e   f o r   f r o n t - p r o x y   a n d   e t c d   f i n d   . /   - n a m e   " * . c s r "   |   g r


Question: What is Embedding certificates in kubeconfig files?

Answer: R e p e a t   t h i s   s t e p   f o r   a l l   n o d e s   t h a t   h a v e   C S R   f i l e s .   W r i t e   t h e   f o l l o w i n g   s c r i p t   i n   t h e   / e t c / k u b e r n e t e s   d i r e c t o r y ,   n a v i g a t e   t o   t h e   d i r e c t o r y   a n d   e x e c u t e   t h e   s c r i p t .   T h e   s c r i p t   w i l l   t a k e   t h e   . c r t   f i l e s   t h a t   w e r e   s i g n e d   f o r   k u b e c o n f i g   f i l e s   f r o m   C S R s   i n   t h e   p r e v i o u s   s t e p   a n d   w i l l   e m b e d   t h e m   i n   t h e   k u b e c o n f i g   f i l e s .   # ! / b i n / b a s h   C L U S T E R = k u b e r n e t e s   f i n d   . /   - n a m e   " * . c o n f "   |   w h i l e   r e a d   - r   F I L E ;   d o   e c h o   " *   P r o c e s s i n g   $ { F I L E }   . . . "   K U B E C O N F I G = " $ { F I L E } "   k u b e c t l   c o n f i g   s e t - c l u s t e r   " $ { 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   . / p k i / c a . c r t   - - e m b e d - c e r t s   U S E R = $ ( K U B E C O N F I G = " $ { F I L E } "   k u b e c t l   c o n f i g   v i e w   - o   j s o n p a t h = ' { . u s e r s [ 0 ] . n a m e } ' )   K U B E C O N F I G = " $ { F I L E } "   k u b e c t l   c o n f i g   s e t - c r e d e n t i a l s   " $ { U S E R } "   - - c l i e n t - c e r t i f i c a t e   " $ { F I L E } . c r t "   - - e m b e d - c e r t s   d o n e


Question: What is Performing cleanup?

Answer: P e r f o r m   t h i s   s t e p   o n   a l l   n o d e s   t h a t   h a v e   C S R   f i l e s .   W r i t e   t h e   f o l l o w i n g   s c r i p t   i n   t h e   / e t c / k u b e r n e t e s   d i r e c t o r y ,   n a v i g a t e   t o   t h e   d i r e c t o r y   a n d   e x e c u t e   t h e   s c r i p t .   # ! / b i n / b a s h   #   C l e a n u p   C S R   f i l e s   r m   - f   . / * . c s r   . / p k i / * . c s r   . / p k i / e t c d / * . c s r   #   C l e a n   a l l   C S R   f i l e s   #   C l e a n u p   C R T   f i l e s   t h a t   w e r e   a l r e a d y   e m b e d d e d   i n   k u b e c o n f i g   f i l e s   r m   - f   . / * . c r t   O p t i o n a l l y ,   m o v e   . s r l   f i l e s   t o   t h e   n e x t   n o d e   t o   b e   p r o c e s s e d .   O p t i o n a l l y ,   i f   u s i n g   e x t e r n a l   C A   r e m o v e   t h e   / e t c / k u b e r n e t e s / p k i / c a . k e y   f i l e ,   a s   e x p l a i n e d   i n   t h e   E x t e r n a l   C A   n o d e   s e c t i o n .


Question: What is kubeadm node initialization?

Answer: O n c e   C S R   f i l e s   h a v e   b e e n   s i g n e d   a n d   r e q u i r e d   c e r t i f i c a t e s   a r e   i n   p l a c e   o n   t h e   h o s t s   y o u   w a n t   t o   u s e   a s   n o d e s ,   y o u   c a n   u s e   t h e   c o m m a n d s   k u b e a d m   i n i t   a n d   k u b e a d m   j o i n   t o   c r e a t e   a   K u b e r n e t e s   c l u s t e r   f r o m   t h e s e   n o d e s .   D u r i n g   i n i t   a n d   j o i n ,   k u b e a d m   u s e s   e x i s t i n g   c e r t i f i c a t e s ,   e n c r y p t i o n   k e y s   a n d   k u b e c o n f i g   f i l e s   t h a t   i t   f i n d s   i n   t h e   / e t c / k u b e r n e t e s   t r e e   o n   t h e   h o s t ' s   l o c a l   f i l e s y s t e m .   I t e m s   o n   t h i s   p a g e   r e f e r   t o   t h i r d   p a r t y   p r o d u c t s   o r   p r o j e c t s   t h a t   p r o v i d e   f u n c t i o n a l i t y   r e q u i r e d   b y   K u b e r n e t e s .   T h e   K u b e r n e t e s   p r o j e c t   a u t h o r s   a r e n ' t   r e s p o n s i b l e   f o r   t h o s e   t h i r d - p a r t y   p r o d u c t s   o r   p r o j e c t s .   S e e   t h e   C N C F   w e b s i t e   g u i d e l i n e s   f o r   m o r e   d e t a i l s .   Y o u   s h o u l d   r e a d   t h e   c o n t e n t   g u i d e   b e f o r e   p r o p o s i n g   a   c h a n g e   t h a t   a d d s   a n   e x t r a   t h i r d - p a r t y   l i n k .


Question: What is Set up a High Availability etcd Cluster with kubeadm?

Answer: Set up a High Availability etcd Cluster with kubeadmBy default, kubeadm runs a local etcd instance on each control plane node. It is also possible to treat the etcd cluster as external and provision etcd instances on separate hosts. The differences between the two approaches are covered in the Options for Highly Available topology page.This task walks through the process of creating a high availability external etcd cluster of three members that can be used by kubeadm during cluster creation.Before you beginThree hosts that can talk to each other over TCP ports 2379 and 2380. This document assumes these default ports. However, they are configurable through the kubeadm config file.Each host must have systemd and a bash compatible shell installed.Each host must have a container runtime, kubelet, and kubeadm installed.Each host should have access to the Kubernetes container image registry (registry.k8s.io) or list/pull the required etcd image using kubeadm config images list/pull. This guide will set up etcd instances as static pods managed by a kubelet.Some infrastructure to copy files between hosts. For example ssh and scp can satisfy this requirement.Setting up the clusterThe general approach is to generate all certs on one node and only distribute the necessary files to the other nodes.Note:kubeadm contains all the necessary cryptographic machinery to generate the certificates described below; no other cryptographic tooling is required for this example.Note:The examples below use IPv4 addresses but you can also configure kubeadm, the kubelet and etcd to use IPv6 addresses. Dual-stack is supported by some Kubernetes options, but not by etcd. For more details on Kubernetes dual-stack support see Dual-stack support with kubeadm.Configure the kubelet to be a service manager for etcd.Note:You must do this on every host where etcd should be running.Since etcd was created first, you must override the service priority by creating a new unit file that has higher precedence than the kubeadm-provided kubelet unit file.cat << EOF > /etc/systemd/system/kubelet.service.d/kubelet.conf # Replace "systemd" with the cgroup driver of your container runtime. The default value in the kubelet is "cgroupfs". # Replace the value of "containerRuntimeEndpoint" for a different container runtime if needed. # apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow cgroupDriver: systemd address: 127.0.0.1 containerRuntimeEndpoint: unix:///var/run/containerd/containerd.sock staticPodPath: /etc/kubernetes/manifests EOF cat << EOF > /etc/systemd/system/kubelet.service.d/20-etcd-service-manager.conf [Service] ExecStart= ExecStart=/usr/bin/kubelet --config=/etc/systemd/system/kubelet.service.d/kubelet.conf Restart=always EOF systemctl daemon-reload systemctl restart kubelet Check the kubelet status to ensure it is running.systemctl status kubelet Create configuration fi


Question: How does Set up a High Availability etcd Cluster with kubeadm work?

Answer: Set up a High Availability etcd Cluster with kubeadmBy default, kubeadm runs a local etcd instance on each control plane node. It is also possible to treat the etcd cluster as external and provision etcd instances on separate hosts. The differences between the two approaches are covered in the Options for Highly Available topology page.This task walks through the process of creating a high availability external etcd cluster of three members that can be used by kubeadm during cluster creation.Before you beginThree hosts that can talk to each other over TCP ports 2379 and 2380. This document assumes these default ports. However, they are configurable through the kubeadm config file.Each host must have systemd and a bash compatible shell installed.Each host must have a container runtime, kubelet, and kubeadm installed.Each host should have access to the Kubernetes container image registry (registry.k8s.io) or list/pull the required etcd image using kubeadm config images list/pull. This guide will set up etcd instances as static pods managed by a kubelet.Some infrastructure to copy files between hosts. For example ssh and scp can satisfy this requirement.Setting up the clusterThe general approach is to generate all certs on one node and only distribute the necessary files to the other nodes.Note:kubeadm contains all the necessary cryptographic machinery to generate the certificates described below; no other cryptographic tooling is required for this example.Note:The examples below use IPv4 addresses but you can also configure kubeadm, the kubelet and etcd to use IPv6 addresses. Dual-stack is supported by some Kubernetes options, but not by etcd. For more details on Kubernetes dual-stack support see Dual-stack support with kubeadm.Configure the kubelet to be a service manager for etcd.Note:You must do this on every host where etcd should be running.Since etcd was created first, you must override the service priority by creating a new unit file that has higher precedence than the kubeadm-provided kubelet unit file.cat << EOF > /etc/systemd/system/kubelet.service.d/kubelet.conf # Replace "systemd" with the cgroup driver of your container runtime. The default value in the kubelet is "cgroupfs". # Replace the value of "containerRuntimeEndpoint" for a different container runtime if needed. # apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow cgroupDriver: systemd address: 127.0.0.1 containerRuntimeEndpoint: unix:///var/run/containerd/containerd.sock staticPodPath: /etc/kubernetes/manifests EOF cat << EOF > /etc/systemd/system/kubelet.service.d/20-etcd-service-manager.conf [Service] ExecStart= ExecStart=/usr/bin/kubelet --config=/etc/systemd/system/kubelet.service.d/kubelet.conf Restart=always EOF systemctl daemon-reload systemctl restart kubelet Check the kubelet status to ensure it is running.systemctl status kubelet Create configuration fi


Question: When would you use Set up a High Availability etcd Cluster with kubeadm?

Answer: Set up a High Availability etcd Cluster with kubeadmBy default, kubeadm runs a local etcd instance on each control plane node. It is also possible to treat the etcd cluster as external and provision etcd instances on separate hosts. The differences between the two approaches are covered in the Options for Highly Available topology page.This task walks through the process of creating a high availability external etcd cluster of three members that can be used by kubeadm during cluster creation.Before you beginThree hosts that can talk to each other over TCP ports 2379 and 2380. This document assumes these default ports. However, they are configurable through the kubeadm config file.Each host must have systemd and a bash compatible shell installed.Each host must have a container runtime, kubelet, and kubeadm installed.Each host should have access to the Kubernetes container image registry (registry.k8s.io) or list/pull the required etcd image using kubeadm config images list/pull. This guide will set up etcd instances as static pods managed by a kubelet.Some infrastructure to copy files between hosts. For example ssh and scp can satisfy this requirement.Setting up the clusterThe general approach is to generate all certs on one node and only distribute the necessary files to the other nodes.Note:kubeadm contains all the necessary cryptographic machinery to generate the certificates described below; no other cryptographic tooling is required for this example.Note:The examples below use IPv4 addresses but you can also configure kubeadm, the kubelet and etcd to use IPv6 addresses. Dual-stack is supported by some Kubernetes options, but not by etcd. For more details on Kubernetes dual-stack support see Dual-stack support with kubeadm.Configure the kubelet to be a service manager for etcd.Note:You must do this on every host where etcd should be running.Since etcd was created first, you must override the service priority by creating a new unit file that has higher precedence than the kubeadm-provided kubelet unit file.cat << EOF > /etc/systemd/system/kubelet.service.d/kubelet.conf # Replace "systemd" with the cgroup driver of your container runtime. The default value in the kubelet is "cgroupfs". # Replace the value of "containerRuntimeEndpoint" for a different container runtime if needed. # apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow cgroupDriver: systemd address: 127.0.0.1 containerRuntimeEndpoint: unix:///var/run/containerd/containerd.sock staticPodPath: /etc/kubernetes/manifests EOF cat << EOF > /etc/systemd/system/kubelet.service.d/20-etcd-service-manager.conf [Service] ExecStart= ExecStart=/usr/bin/kubelet --config=/etc/systemd/system/kubelet.service.d/kubelet.conf Restart=always EOF systemctl daemon-reload systemctl restart kubelet Check the kubelet status to ensure it is running.systemctl status kubelet Create configuration fi


Question: What are the benefits of Set up a High Availability etcd Cluster with kubeadm?

Answer: Set up a High Availability etcd Cluster with kubeadmBy default, kubeadm runs a local etcd instance on each control plane node. It is also possible to treat the etcd cluster as external and provision etcd instances on separate hosts. The differences between the two approaches are covered in the Options for Highly Available topology page.This task walks through the process of creating a high availability external etcd cluster of three members that can be used by kubeadm during cluster creation.Before you beginThree hosts that can talk to each other over TCP ports 2379 and 2380. This document assumes these default ports. However, they are configurable through the kubeadm config file.Each host must have systemd and a bash compatible shell installed.Each host must have a container runtime, kubelet, and kubeadm installed.Each host should have access to the Kubernetes container image registry (registry.k8s.io) or list/pull the required etcd image using kubeadm config images list/pull. This guide will set up etcd instances as static pods managed by a kubelet.Some infrastructure to copy files between hosts. For example ssh and scp can satisfy this requirement.Setting up the clusterThe general approach is to generate all certs on one node and only distribute the necessary files to the other nodes.Note:kubeadm contains all the necessary cryptographic machinery to generate the certificates described below; no other cryptographic tooling is required for this example.Note:The examples below use IPv4 addresses but you can also configure kubeadm, the kubelet and etcd to use IPv6 addresses. Dual-stack is supported by some Kubernetes options, but not by etcd. For more details on Kubernetes dual-stack support see Dual-stack support with kubeadm.Configure the kubelet to be a service manager for etcd.Note:You must do this on every host where etcd should be running.Since etcd was created first, you must override the service priority by creating a new unit file that has higher precedence than the kubeadm-provided kubelet unit file.cat << EOF > /etc/systemd/system/kubelet.service.d/kubelet.conf # Replace "systemd" with the cgroup driver of your container runtime. The default value in the kubelet is "cgroupfs". # Replace the value of "containerRuntimeEndpoint" for a different container runtime if needed. # apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow cgroupDriver: systemd address: 127.0.0.1 containerRuntimeEndpoint: unix:///var/run/containerd/containerd.sock staticPodPath: /etc/kubernetes/manifests EOF cat << EOF > /etc/systemd/system/kubelet.service.d/20-etcd-service-manager.conf [Service] ExecStart= ExecStart=/usr/bin/kubelet --config=/etc/systemd/system/kubelet.service.d/kubelet.conf Restart=always EOF systemctl daemon-reload systemctl restart kubelet Check the kubelet status to ensure it is running.systemctl status kubelet Create configuration fi


Question: What is Set up a High Availability etcd Cluster with kubeadm?

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


Question: What is Before you begin?

Answer: T h r e e   h o s t s   t h a t   c a n   t a l k   t o   e a c h   o t h e r   o v e r   T C P   p o r t s   2 3 7 9   a n d   2 3 8 0 .   T h i s   d o c u m e n t   a s s u m e s   t h e s e   d e f a u l t   p o r t s .   H o w e v e r ,   t h e y   a r e   c o n f i g u r a b l e   t h r o u g h   t h e   k u b e a d m   c o n f i g   f i l e . E a c h   h o s t   m u s t   h a v e   s y s t e m d   a n d   a   b a s h   c o m p a t i b l e   s h e l l   i n s t a l l e d . E a c h   h o s t   m u s t   h a v e   a   c o n t a i n e r   r u n t i m e ,   k u b e l e t ,   a n d   k u b e a d m   i n s t a l l e d . E a c h   h o s t   s h o u l d   h a v e   a c c e s s   t o   t h e   K u b e r n e t e s   c o n t a i n e r   i m a g e   r e g i s t r y   ( r e g i s t r y . k 8 s . i o )   o r   l i s t / p u l l   t h e   r e q u i r e d   e t c d   i m a g e   u s i n g   k u b e a d m   c o n f i g   i m a g e s   l i s t / p u l l .   T h i s   g u i d e   w i l l   s e t   u p   e t c d   i n s t a n c e s   a s   s t a t i c   p o d s   m a n a g e d   b y   a   k u b e l e t . S o m e   i n f r a s t r u c t u r e   t o   c o p y   f i l e s   b e t w e e n   h o s t s .   F o r   e x a m p l e   s s h   a n d   s c p   c a n   s a t i s f y   t h i s   r e q u i r e m e n t .


Question: What is Setting up the cluster?

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


Question: What is Note:?

Answer: C o n f i g u r e   t h e   k u b e l e t   t o   b e   a   s e r v i c e   m a n a g e r   f o r   e t c d . N o t e : Y o u   m u s t   d o   t h i s   o n   e v e r y   h o s t   w h e r e   e t c d   s h o u l d   b e   r u n n i n g . S i n c e   e t c d   w a s   c r e a t e d   f i r s t ,   y o u   m u s t   o v e r r i d e   t h e   s e r v i c e   p r i o r i t y   b y   c r e a t i n g   a   n e w   u n i t   f i l e   t h a t   h a s   h i g h e r   p r e c e d e n c e   t h a n   t h e   k u b e a d m - p r o v i d e d   k u b e l e t   u n i t   f i l e . c a t   < <   E O F   >   / e t c / s y s t e m d / s y s t e m / k u b e l e t . s e r v i c e . d / k u b e l e t . c o n f   #   R e p l a c e   " s y s t e m d "   w i t h   t h e   c g r o u p   d r i v e r   o f   y o u r   c o n t a i n e r   r u n t i m e .   T h e   d e f a u l t   v a l u e   i n   t h e   k u b e l e t   i s   " c g r o u p f s " .   #   R e p l a c e   t h e   v a l u e   o f   " c o n t a i n e r R u n t i m e E n d p o i n t "   f o r   a   d i f f e r e n t   c o n t a i n e r   r u n t i m e   i f   n e e d e d .   #   a p i V e r s i o n :   k u b e l e t . c o n f i g . k 8 s . i o / v 1 b e t a 1   k i n d :   K u b e l e t C o n f i g u r a t i o n   a u t h e n t i c a t i o n :   a n o n y m o u s :   e n a b l e d :   f a l s e   w e b h o o k :   e n a b l e d :   f a l s e   a u t h o r i z a t i o n :   m o d e :   A l w a y s A l l o w   c g r o u p D r i v e r :   s y s t e m d   a d d r e s s :   1 2 7 . 0 . 0 . 1   c o n t a i n e r R u n t i m e E n d p o i n t :   u n i x : / / / v a r / r u n / c o n t a i n e r d / c o n t a i n e r d . s o c k   s t a t i c P o d P a t h :   / e t c / k u b e r n e t e s / m a n i f e s t s   E O F   c a t   < <   E O F   >   / e t c / s y s t e m d / s y s t e m / k u b e l e t . s e r v i c e . d / 2 0 - e t c d - s e r v i c e - m a n a g e r . c o n f   [ S e r v i c e ]   E x e c S t a r t =   E x e c S t a r t


Question: What is Note:?

Answer: c a t   < <   E O F   >   / e t c / s y s t e m d / s y s t e m / k u b e l e t . s e r v i c e . d / k u b e l e t . c o n f   #   R e p l a c e   " s y s t e m d "   w i t h   t h e   c g r o u p   d r i v e r   o f   y o u r   c o n t a i n e r   r u n t i m e .   T h e   d e f a u l t   v a l u e   i n   t h e   k u b e l e t   i s   " c g r o u p f s " .   #   R e p l a c e   t h e   v a l u e   o f   " c o n t a i n e r R u n t i m e E n d p o i n t "   f o r   a   d i f f e r e n t   c o n t a i n e r   r u n t i m e   i f   n e e d e d .   #   a p i V e r s i o n :   k u b e l e t . c o n f i g . k 8 s . i o / v 1 b e t a 1   k i n d :   K u b e l e t C o n f i g u r a t i o n   a u t h e n t i c a t i o n :   a n o n y m o u s :   e n a b l e d :   f a l s e   w e b h o o k :   e n a b l e d :   f a l s e   a u t h o r i z a t i o n :   m o d e :   A l w a y s A l l o w   c g r o u p D r i v e r :   s y s t e m d   a d d r e s s :   1 2 7 . 0 . 0 . 1   c o n t a i n e r R u n t i m e E n d p o i n t :   u n i x : / / / v a r / r u n / c o n t a i n e r d / c o n t a i n e r d . s o c k   s t a t i c P o d P a t h :   / e t c / k u b e r n e t e s / m a n i f e s t s   E O F   c a t   < <   E O F   >   / e t c / s y s t e m d / s y s t e m / k u b e l e t . s e r v i c e . d / 2 0 - e t c d - s e r v i c e - m a n a g e r . c o n f   [ S e r v i c e ]   E x e c S t a r t =   E x e c S t a r t = / u s r / b i n / k u b e l e t   - - c o n f i g = / e t c / s y s t e m d / s y s t e m / k u b e l e t . s e r v i c e . d / k u b e l e t . c o n f   R e s t a r t = a l w a y s   E O F   s y s t e m c t l   d a e m o n - r e l o a d   s y s t e m c t l   r e s t a r t   k u b e l e t   C h e c k   t h e   k u b e l e t   s t a t u s   t o   e n s u r e   i t   i s   r u n n i n g .   s y s t e m c t l   s t a t u s   k u b e l e t   C r e a t e   c o n f i g u r a t i o n   f i l e s   f o r   k u b e a d m .   G e n e r a t e   o n e   k u b e a d m   c o n f i


Question: What is What's next?

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


Question: What is Binding?

Answer: BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1import "k8s.io/api/core/v1"BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1kind: Bindingmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatarget (ObjectReference), requiredThe target object that you want to bind to the standard object.Operationscreate create a BindingHTTP RequestPOST /api/v1/namespaces/{namespace}/bindingsParametersnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: Unauthorizedcreate create binding of a PodHTTP RequestPOST /api/v1/namespaces/{namespace}/pods/{name}/bindingParametersname (in path): string, requiredname of the Bindingnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: How does Binding work?

Answer: BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1import "k8s.io/api/core/v1"BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1kind: Bindingmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatarget (ObjectReference), requiredThe target object that you want to bind to the standard object.Operationscreate create a BindingHTTP RequestPOST /api/v1/namespaces/{namespace}/bindingsParametersnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: Unauthorizedcreate create binding of a PodHTTP RequestPOST /api/v1/namespaces/{namespace}/pods/{name}/bindingParametersname (in path): string, requiredname of the Bindingnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: When would you use Binding?

Answer: BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1import "k8s.io/api/core/v1"BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1kind: Bindingmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatarget (ObjectReference), requiredThe target object that you want to bind to the standard object.Operationscreate create a BindingHTTP RequestPOST /api/v1/namespaces/{namespace}/bindingsParametersnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: Unauthorizedcreate create binding of a PodHTTP RequestPOST /api/v1/namespaces/{namespace}/pods/{name}/bindingParametersname (in path): string, requiredname of the Bindingnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: What are the benefits of Binding?

Answer: BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1import "k8s.io/api/core/v1"BindingBinding ties one object to another; for example, a pod is bound to a node by a scheduler.apiVersion: v1kind: Bindingmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatarget (ObjectReference), requiredThe target object that you want to bind to the standard object.Operationscreate create a BindingHTTP RequestPOST /api/v1/namespaces/{namespace}/bindingsParametersnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: Unauthorizedcreate create binding of a PodHTTP RequestPOST /api/v1/namespaces/{namespace}/pods/{name}/bindingParametersname (in path): string, requiredname of the Bindingnamespace (in path): string, requirednamespacebody: Binding, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Binding): OK201 (Binding): Created202 (Binding): Accepted401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: What is Binding?

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 Binding?

Answer: B i n d i n g   t i e s   o n e   o b j e c t   t o   a n o t h e r ;   f o r   e x a m p l e ,   a   p o d   i s   b o u n d   t o   a   n o d e   b y   a   s c h e d u l e r .   a p i V e r s i o n :   v 1 k i n d :   B i n d i n g 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 t a r g e t   ( O b j e c t R e f e r e n c e ) ,   r e q u i r e d T h e   t a r g e t   o b j e c t   t h a t   y o u   w a n t   t o   b i n d   t o   t h e   s t a n d a r d   o b j e c t .   a p i V e r s i o n :   v 1   k i n d :   B i n d i n g   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   t a r g e t   ( O b j e c t R e f e r e n c e ) ,   r e q u i r e d   T h e   t a r g e t   o b j e c t   t h a t   y o u   w a n t   t o   b i n d   t o   t h e   s t a n d a r d   o b j e c t .


Question: What is HTTP Request?

Answer: P O S T   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / b i n d i n g s


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( B i n d i n g ) :   O K   2 0 1   ( B i n d i n g ) :   C r e a t e d   2 0 2   ( B i n d i n g ) :   A c c e p t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: P O S T   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d s / { n a m e } / b i n d i n g


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is Configuration Best Practices?

Answer: Configuration Best PracticesThis document highlights and consolidates configuration best practices that are introduced throughout the user guide, Getting Started documentation, and examples.This is a living document. If you think of something that is not on this list but might be useful to others, please don't hesitate to file an issue or submit a PR.General Configuration TipsWhen defining configurations, specify the latest stable API version.Configuration files should be stored in version control before being pushed to the cluster. This allows you to quickly roll back a configuration change if necessary. It also aids cluster re-creation and restoration.Write your configuration files using YAML rather than JSON. Though these formats can be used interchangeably in almost all scenarios, YAML tends to be more user-friendly.Group related objects into a single file whenever it makes sense. One file is often easier to manage than several. See the guestbook-all-in-one.yaml file as an example of this syntax.Note also that many kubectl commands can be called on a directory. For example, you can call kubectl apply on a directory of config files.Don't specify default values unnecessarily: simple, minimal configuration will make errors less likely.Put object descriptions in annotations, to allow better introspection.Note:There is a breaking change introduced in the YAML 1.2 boolean values specification with respect to YAML 1.1. This is a known issue in Kubernetes. YAML 1.2 only recognizes true and false as valid booleans, while YAML 1.1 also accepts yes, no, on, and off as booleans. However, Kubernetes uses YAML parsers that are mostly compatible with YAML 1.1, which means that using yes or no instead of true or false in a YAML manifest may cause unexpected errors or behaviors. To avoid this issue, it is recommended to always use true or false for boolean values in YAML manifests, and to quote any strings that may be confused with booleans, such as "yes" or "no".Besides booleans, there are additional specifications changes between YAML versions. Please refer to the YAML Specification Changes documentation for a comprehensive list."Naked" Pods versus ReplicaSets, Deployments, and JobsDon't use naked Pods (that is, Pods not bound to a ReplicaSet or Deployment) if you can avoid it. Naked Pods will not be rescheduled in the event of a node failure.A Deployment, which both creates a ReplicaSet to ensure that the desired number of Pods is always available, and specifies a strategy to replace Pods (such as RollingUpdate), is almost always preferable to creating Pods directly, except for some explicit restartPolicy: Never scenarios. A Job may also be appropriate.ServicesCreate a Service before its corresponding backend workloads (Deployments or ReplicaSets), and before any workloads that need to access it. When Kubernetes starts a container, it provides environment variables pointing to all the Services which were running when the container was started. For example,


Question: How does Configuration Best Practices work?

Answer: Configuration Best PracticesThis document highlights and consolidates configuration best practices that are introduced throughout the user guide, Getting Started documentation, and examples.This is a living document. If you think of something that is not on this list but might be useful to others, please don't hesitate to file an issue or submit a PR.General Configuration TipsWhen defining configurations, specify the latest stable API version.Configuration files should be stored in version control before being pushed to the cluster. This allows you to quickly roll back a configuration change if necessary. It also aids cluster re-creation and restoration.Write your configuration files using YAML rather than JSON. Though these formats can be used interchangeably in almost all scenarios, YAML tends to be more user-friendly.Group related objects into a single file whenever it makes sense. One file is often easier to manage than several. See the guestbook-all-in-one.yaml file as an example of this syntax.Note also that many kubectl commands can be called on a directory. For example, you can call kubectl apply on a directory of config files.Don't specify default values unnecessarily: simple, minimal configuration will make errors less likely.Put object descriptions in annotations, to allow better introspection.Note:There is a breaking change introduced in the YAML 1.2 boolean values specification with respect to YAML 1.1. This is a known issue in Kubernetes. YAML 1.2 only recognizes true and false as valid booleans, while YAML 1.1 also accepts yes, no, on, and off as booleans. However, Kubernetes uses YAML parsers that are mostly compatible with YAML 1.1, which means that using yes or no instead of true or false in a YAML manifest may cause unexpected errors or behaviors. To avoid this issue, it is recommended to always use true or false for boolean values in YAML manifests, and to quote any strings that may be confused with booleans, such as "yes" or "no".Besides booleans, there are additional specifications changes between YAML versions. Please refer to the YAML Specification Changes documentation for a comprehensive list."Naked" Pods versus ReplicaSets, Deployments, and JobsDon't use naked Pods (that is, Pods not bound to a ReplicaSet or Deployment) if you can avoid it. Naked Pods will not be rescheduled in the event of a node failure.A Deployment, which both creates a ReplicaSet to ensure that the desired number of Pods is always available, and specifies a strategy to replace Pods (such as RollingUpdate), is almost always preferable to creating Pods directly, except for some explicit restartPolicy: Never scenarios. A Job may also be appropriate.ServicesCreate a Service before its corresponding backend workloads (Deployments or ReplicaSets), and before any workloads that need to access it. When Kubernetes starts a container, it provides environment variables pointing to all the Services which were running when the container was started. For example,


Question: When would you use Configuration Best Practices?

Answer: Configuration Best PracticesThis document highlights and consolidates configuration best practices that are introduced throughout the user guide, Getting Started documentation, and examples.This is a living document. If you think of something that is not on this list but might be useful to others, please don't hesitate to file an issue or submit a PR.General Configuration TipsWhen defining configurations, specify the latest stable API version.Configuration files should be stored in version control before being pushed to the cluster. This allows you to quickly roll back a configuration change if necessary. It also aids cluster re-creation and restoration.Write your configuration files using YAML rather than JSON. Though these formats can be used interchangeably in almost all scenarios, YAML tends to be more user-friendly.Group related objects into a single file whenever it makes sense. One file is often easier to manage than several. See the guestbook-all-in-one.yaml file as an example of this syntax.Note also that many kubectl commands can be called on a directory. For example, you can call kubectl apply on a directory of config files.Don't specify default values unnecessarily: simple, minimal configuration will make errors less likely.Put object descriptions in annotations, to allow better introspection.Note:There is a breaking change introduced in the YAML 1.2 boolean values specification with respect to YAML 1.1. This is a known issue in Kubernetes. YAML 1.2 only recognizes true and false as valid booleans, while YAML 1.1 also accepts yes, no, on, and off as booleans. However, Kubernetes uses YAML parsers that are mostly compatible with YAML 1.1, which means that using yes or no instead of true or false in a YAML manifest may cause unexpected errors or behaviors. To avoid this issue, it is recommended to always use true or false for boolean values in YAML manifests, and to quote any strings that may be confused with booleans, such as "yes" or "no".Besides booleans, there are additional specifications changes between YAML versions. Please refer to the YAML Specification Changes documentation for a comprehensive list."Naked" Pods versus ReplicaSets, Deployments, and JobsDon't use naked Pods (that is, Pods not bound to a ReplicaSet or Deployment) if you can avoid it. Naked Pods will not be rescheduled in the event of a node failure.A Deployment, which both creates a ReplicaSet to ensure that the desired number of Pods is always available, and specifies a strategy to replace Pods (such as RollingUpdate), is almost always preferable to creating Pods directly, except for some explicit restartPolicy: Never scenarios. A Job may also be appropriate.ServicesCreate a Service before its corresponding backend workloads (Deployments or ReplicaSets), and before any workloads that need to access it. When Kubernetes starts a container, it provides environment variables pointing to all the Services which were running when the container was started. For example,


Question: What are the benefits of Configuration Best Practices?

Answer: Configuration Best PracticesThis document highlights and consolidates configuration best practices that are introduced throughout the user guide, Getting Started documentation, and examples.This is a living document. If you think of something that is not on this list but might be useful to others, please don't hesitate to file an issue or submit a PR.General Configuration TipsWhen defining configurations, specify the latest stable API version.Configuration files should be stored in version control before being pushed to the cluster. This allows you to quickly roll back a configuration change if necessary. It also aids cluster re-creation and restoration.Write your configuration files using YAML rather than JSON. Though these formats can be used interchangeably in almost all scenarios, YAML tends to be more user-friendly.Group related objects into a single file whenever it makes sense. One file is often easier to manage than several. See the guestbook-all-in-one.yaml file as an example of this syntax.Note also that many kubectl commands can be called on a directory. For example, you can call kubectl apply on a directory of config files.Don't specify default values unnecessarily: simple, minimal configuration will make errors less likely.Put object descriptions in annotations, to allow better introspection.Note:There is a breaking change introduced in the YAML 1.2 boolean values specification with respect to YAML 1.1. This is a known issue in Kubernetes. YAML 1.2 only recognizes true and false as valid booleans, while YAML 1.1 also accepts yes, no, on, and off as booleans. However, Kubernetes uses YAML parsers that are mostly compatible with YAML 1.1, which means that using yes or no instead of true or false in a YAML manifest may cause unexpected errors or behaviors. To avoid this issue, it is recommended to always use true or false for boolean values in YAML manifests, and to quote any strings that may be confused with booleans, such as "yes" or "no".Besides booleans, there are additional specifications changes between YAML versions. Please refer to the YAML Specification Changes documentation for a comprehensive list."Naked" Pods versus ReplicaSets, Deployments, and JobsDon't use naked Pods (that is, Pods not bound to a ReplicaSet or Deployment) if you can avoid it. Naked Pods will not be rescheduled in the event of a node failure.A Deployment, which both creates a ReplicaSet to ensure that the desired number of Pods is always available, and specifies a strategy to replace Pods (such as RollingUpdate), is almost always preferable to creating Pods directly, except for some explicit restartPolicy: Never scenarios. A Job may also be appropriate.ServicesCreate a Service before its corresponding backend workloads (Deployments or ReplicaSets), and before any workloads that need to access it. When Kubernetes starts a container, it provides environment variables pointing to all the Services which were running when the container was started. For example,


Question: What is Configuration Best Practices?

Answer: T h i s   d o c u m e n t   h i g h l i g h t s   a n d   c o n s o l i d a t e s   c o n f i g u r a t i o n   b e s t   p r a c t i c e s   t h a t   a r e   i n t r o d u c e d   t h r o u g h o u t   t h e   u s e r   g u i d e ,   G e t t i n g   S t a r t e d   d o c u m e n t a t i o n ,   a n d   e x a m p l e s .   T h i s   i s   a   l i v i n g   d o c u m e n t .   I f   y o u   t h i n k   o f   s o m e t h i n g   t h a t   i s   n o t   o n   t h i s   l i s t   b u t   m i g h t   b e   u s e f u l   t o   o t h e r s ,   p l e a s e   d o n ' t   h e s i t a t e   t o   f i l e   a n   i s s u e   o r   s u b m i t   a   P R .


Question: What is General Configuration Tips?

Answer: W h e n   d e f i n i n g   c o n f i g u r a t i o n s ,   s p e c i f y   t h e   l a t e s t   s t a b l e   A P I   v e r s i o n . C o n f i g u r a t i o n   f i l e s   s h o u l d   b e   s t o r e d   i n   v e r s i o n   c o n t r o l   b e f o r e   b e i n g   p u s h e d   t o   t h e   c l u s t e r .   T h i s   a l l o w s   y o u   t o   q u i c k l y   r o l l   b a c k   a   c o n f i g u r a t i o n   c h a n g e   i f   n e c e s s a r y .   I t   a l s o   a i d s   c l u s t e r   r e - c r e a t i o n   a n d   r e s t o r a t i o n . W r i t e   y o u r   c o n f i g u r a t i o n   f i l e s   u s i n g   Y A M L   r a t h e r   t h a n   J S O N .   T h o u g h   t h e s e   f o r m a t s   c a n   b e   u s e d   i n t e r c h a n g e a b l y   i n   a l m o s t   a l l   s c e n a r i o s ,   Y A M L   t e n d s   t o   b e   m o r e   u s e r - f r i e n d l y . G r o u p   r e l a t e d   o b j e c t s   i n t o   a   s i n g l e   f i l e   w h e n e v e r   i t   m a k e s   s e n s e .   O n e   f i l e   i s   o f t e n   e a s i e r   t o   m a n a g e   t h a n   s e v e r a l .   S e e   t h e   g u e s t b o o k - a l l - i n - o n e . y a m l   f i l e   a s   a n   e x a m p l e   o f   t h i s   s y n t a x . N o t e   a l s o   t h a t   m a n y   k u b e c t l   c o m m a n d s   c a n   b e   c a l l e d   o n   a   d i r e c t o r y .   F o r   e x a m p l e ,   y o u   c a n   c a l l   k u b e c t l   a p p l y   o n   a   d i r e c t o r y   o f   c o n f i g   f i l e s . D o n ' t   s p e c i f y   d e f a u l t   v a l u e s   u n n e c e s s a r i l y :   s i m p l e ,   m i n i m a l   c o n f i g u r a t i o n   w i l l   m a k e   e r r o r s   l e s s   l i k e l y . P u t   o b j e c t   d e s c r i p t i o n s   i n   a n n o t a t i o n s ,   t o   a l l o w   b e t t e r   i n t r o s p e c t i o n .   W h e n   d e f i n i n g   c o n f i g u r a t i o n s ,   s p e c i f y   t h e   l a t e s t   s t a


Question: What is Note:?

Answer: T h e r e   i s   a   b r e a k i n g   c h a n g e   i n t r o d u c e d   i n   t h e   Y A M L   1 . 2   b o o l e a n   v a l u e s   s p e c i f i c a t i o n   w i t h   r e s p e c t   t o   Y A M L   1 . 1 .   T h i s   i s   a   k n o w n   i s s u e   i n   K u b e r n e t e s .   Y A M L   1 . 2   o n l y   r e c o g n i z e s   t r u e   a n d   f a l s e   a s   v a l i d   b o o l e a n s ,   w h i l e   Y A M L   1 . 1   a l s o   a c c e p t s   y e s ,   n o ,   o n ,   a n d   o f f   a s   b o o l e a n s .   H o w e v e r ,   K u b e r n e t e s   u s e s   Y A M L   p a r s e r s   t h a t   a r e   m o s t l y   c o m p a t i b l e   w i t h   Y A M L   1 . 1 ,   w h i c h   m e a n s   t h a t   u s i n g   y e s   o r   n o   i n s t e a d   o f   t r u e   o r   f a l s e   i n   a   Y A M L   m a n i f e s t   m a y   c a u s e   u n e x p e c t e d   e r r o r s   o r   b e h a v i o r s .   T o   a v o i d   t h i s   i s s u e ,   i t   i s   r e c o m m e n d e d   t o   a l w a y s   u s e   t r u e   o r   f a l s e   f o r   b o o l e a n   v a l u e s   i n   Y A M L   m a n i f e s t s ,   a n d   t o   q u o t e   a n y   s t r i n g s   t h a t   m a y   b e   c o n f u s e d   w i t h   b o o l e a n s ,   s u c h   a s   " y e s "   o r   " n o " .   B e s i d e s   b o o l e a n s ,   t h e r e   a r e   a d d i t i o n a l   s p e c i f i c a t i o n s   c h a n g e s   b e t w e e n   Y A M L   v e r s i o n s .   P l e a s e   r e f e r   t o   t h e   Y A M L   S p e c i f i c a t i o n   C h a n g e s   d o c u m e n t a t i o n   f o r   a   c o m p r e h e n s i v e   l i s t .


Question: What is "Naked" Pods versus ReplicaSets, Deployments, and Jobs?

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


Question: What is Services?

Answer: C r e a t e   a   S e r v i c e   b e f o r e   i t s   c o r r e s p o n d i n g   b a c k e n d   w o r k l o a d s   ( D e p l o y m e n t s   o r   R e p l i c a S e t s ) ,   a n d   b e f o r e   a n y   w o r k l o a d s   t h a t   n e e d   t o   a c c e s s   i t .   W h e n   K u b e r n e t e s   s t a r t s   a   c o n t a i n e r ,   i t   p r o v i d e s   e n v i r o n m e n t   v a r i a b l e s   p o i n t i n g   t o   a l l   t h e   S e r v i c e s   w h i c h   w e r e   r u n n i n g   w h e n   t h e   c o n t a i n e r   w a s   s t a r t e d .   F o r   e x a m p l e ,   i f   a   S e r v i c e   n a m e d   f o o   e x i s t s ,   a l l   c o n t a i n e r s   w i l l   g e t   t h e   f o l l o w i n g   v a r i a b l e s   i n   t h e i r   i n i t i a l   e n v i r o n m e n t : F O O _ S E R V I C E _ H O S T = < t h e   h o s t   t h e   S e r v i c e   i s   r u n n i n g   o n >   F O O _ S E R V I C E _ P O R T = < t h e   p o r t   t h e   S e r v i c e   i s   r u n n i n g   o n >   T h i s   d o e s   i m p l y   a n   o r d e r i n g   r e q u i r e m e n t   -   a n y   S e r v i c e   t h a t   a   P o d   w a n t s   t o   a c c e s s   m u s t   b e   c r e a t e d   b e f o r e   t h e   P o d   i t s e l f ,   o r   e l s e   t h e   e n v i r o n m e n t   v a r i a b l e s   w i l l   n o t   b e   p o p u l a t e d .   D N S   d o e s   n o t   h a v e   t h i s   r e s t r i c t i o n . A n   o p t i o n a l   ( t h o u g h   s t r o n g l y   r e c o m m e n d e d )   c l u s t e r   a d d - o n   i s   a   D N S   s e r v e r .   T h e   D N S   s e r v e r   w a t c h e s   t h e   K u b e r n e t e s   A P I   f o r   n e w   S e r v i c e s   a n d   c r e a t e s   a   s e t   o f   D N S   r e c o r d s   f o r   e a c h .   I f   D N S   h a s   b e e n   e n a b l e d   t h r o u g h o u t   t h e   c l u s t e r   t h e n   a l l   P o d s   s h o u l d   b e   a b l e   t o   d o   n a m e   r e s o l u t


Question: What is Using Labels?

Answer: D e f i n e   a n d   u s e   l a b e l s   t h a t   i d e n t i f y   s e m a n t i c   a t t r i b u t e s   o f   y o u r   a p p l i c a t i o n   o r   D e p l o y m e n t ,   s u c h   a s   {   a p p . k u b e r n e t e s . i o / n a m e :   M y A p p ,   t i e r :   f r o n t e n d ,   p h a s e :   t e s t ,   d e p l o y m e n t :   v 3   } .   Y o u   c a n   u s e   t h e s e   l a b e l s   t o   s e l e c t   t h e   a p p r o p r i a t e   P o d s   f o r   o t h e r   r e s o u r c e s ;   f o r   e x a m p l e ,   a   S e r v i c e   t h a t   s e l e c t s   a l l   t i e r :   f r o n t e n d   P o d s ,   o r   a l l   p h a s e :   t e s t   c o m p o n e n t s   o f   a p p . k u b e r n e t e s . i o / n a m e :   M y A p p .   S e e   t h e   g u e s t b o o k   a p p   f o r   e x a m p l e s   o f   t h i s   a p p r o a c h . A   S e r v i c e   c a n   b e   m a d e   t o   s p a n   m u l t i p l e   D e p l o y m e n t s   b y   o m i t t i n g   r e l e a s e - s p e c i f i c   l a b e l s   f r o m   i t s   s e l e c t o r .   W h e n   y o u   n e e d   t o   u p d a t e   a   r u n n i n g   s e r v i c e   w i t h o u t   d o w n t i m e ,   u s e   a   D e p l o y m e n t . A   d e s i r e d   s t a t e   o f   a n   o b j e c t   i s   d e s c r i b e d   b y   a   D e p l o y m e n t ,   a n d   i f   c h a n g e s   t o   t h a t   s p e c   a r e   a p p l i e d ,   t h e   d e p l o y m e n t   c o n t r o l l e r   c h a n g e s   t h e   a c t u a l   s t a t e   t o   t h e   d e s i r e d   s t a t e   a t   a   c o n t r o l l e d   r a t e . U s e   t h e   K u b e r n e t e s   c o m m o n   l a b e l s   f o r   c o m m o n   u s e   c a s e s .   T h e s e   s t a n d a r d i z e d   l a b e l s   e n r i c h   t h e   m e t a d a t a   i n   a   w a y   t h a t   a l l o w s   t o o l s ,   i n c l u d i n g   k u b e c t l   a n d   d a s h b o a r d ,   t o   w o r k   i n   a n   i n t e r o p e r a b l e   w


Question: What is Using kubectl?

Answer: U s e   k u b e c t l   a p p l y   - f   < d i r e c t o r y > .   T h i s   l o o k s   f o r   K u b e r n e t e s   c o n f i g u r a t i o n   i n   a l l   . y a m l ,   . y m l ,   a n d   . j s o n   f i l e s   i n   < d i r e c t o r y >   a n d   p a s s e s   i t   t o   a p p l y . U s e   l a b e l   s e l e c t o r s   f o r   g e t   a n d   d e l e t e   o p e r a t i o n s   i n s t e a d   o f   s p e c i f i c   o b j e c t   n a m e s .   S e e   t h e   s e c t i o n s   o n   l a b e l   s e l e c t o r s   a n d   u s i n g   l a b e l s   e f f e c t i v e l y . U s e   k u b e c t l   c r e a t e   d e p l o y m e n t   a n d   k u b e c t l   e x p o s e   t o   q u i c k l y   c r e a t e   s i n g l e - c o n t a i n e r   D e p l o y m e n t s   a n d   S e r v i c e s .   S e e   U s e   a   S e r v i c e   t o   A c c e s s   a n   A p p l i c a t i o n   i n   a   C l u s t e r   f o r   a n   e x a m p l e .   U s e   k u b e c t l   a p p l y   - f   < d i r e c t o r y > .   T h i s   l o o k s   f o r   K u b e r n e t e s   c o n f i g u r a t i o n   i n   a l l   . y a m l ,   . y m l ,   a n d   . j s o n   f i l e s   i n   < d i r e c t o r y >   a n d   p a s s e s   i t   t o   a p p l y .   U s e   l a b e l   s e l e c t o r s   f o r   g e t   a n d   d e l e t e   o p e r a t i o n s   i n s t e a d   o f   s p e c i f i c   o b j e c t   n a m e s .   S e e   t h e   s e c t i o n s   o n   l a b e l   s e l e c t o r s   a n d   u s i n g   l a b e l s   e f f e c t i v e l y .   U s e   k u b e c t l   c r e a t e   d e p l o y m e n t   a n d   k u b e c t l   e x p o s e   t o   q u i c k l y   c r e a t e   s i n g l e - c o n t a i n e r   D e p l o y m e n t s   a n d   S e r v i c e s .   S e e   U s e   a   S e r v i c e   t o   A c c e s s   a n   A p p l i c a t i o n   i n   a   C l u s t e r   f o r   a n   e x a m p l e .


Question: What is Declarative Management of Kubernetes Objects Using Configuration Files?

Answer: Declarative Management of Kubernetes Objects Using Configuration FilesKubernetes objects can be created, updated, and deleted by storing multiple object configuration files in a directory and using kubectl apply to recursively create and update those objects as needed. This method retains writes made to live objects without merging the changes back into the object configuration files. kubectl diff also gives you a preview of what changes apply will make.Before you beginInstall kubectl.You 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 the version, enter kubectl version.Trade-offsThe kubectl tool supports three kinds of object management:Imperative commandsImperative object configurationDeclarative object configurationSee Kubernetes Object Management for a discussion of the advantages and disadvantage of each kind of object management.OverviewDeclarative object configuration requires a firm understanding of the Kubernetes object definitions and configuration. Read and complete the following documents if you have not already:Managing Kubernetes Objects Using Imperative CommandsImperative Management of Kubernetes Objects Using Configuration FilesFollowing are definitions for terms used in this document:object configuration file / configuration file: A file that defines the configuration for a Kubernetes object. This topic shows how to pass configuration files to kubectl apply. Configuration files are typically stored in source control, such as Git.live object configuration / live configuration: The live configuration values of an object, as observed by the Kubernetes cluster. These are kept in the Kubernetes cluster storage, typically etcd.declarative configuration writer / declarative writer: A person or software component that makes updates to a live object. The live writers referred to in this topic make changes to object configuration files and run kubectl apply to write the changes.How to create objectsUse kubectl apply to create all objects, except those that already exist, defined by configuration files in a specified directory:kubectl apply -f <directory> This sets the kubectl.kubernetes.io/last-applied-configuration: '{...}' annotation on each object. The annotation contains the contents of the object configuration file that was used to create the object.Note:Add the -R flag to recursively process directories.Here's an example of an object configuration file:application/simple_deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels: app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: con


Question: How does Declarative Management of Kubernetes Objects Using Configuration Files work?

Answer: Declarative Management of Kubernetes Objects Using Configuration FilesKubernetes objects can be created, updated, and deleted by storing multiple object configuration files in a directory and using kubectl apply to recursively create and update those objects as needed. This method retains writes made to live objects without merging the changes back into the object configuration files. kubectl diff also gives you a preview of what changes apply will make.Before you beginInstall kubectl.You 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 the version, enter kubectl version.Trade-offsThe kubectl tool supports three kinds of object management:Imperative commandsImperative object configurationDeclarative object configurationSee Kubernetes Object Management for a discussion of the advantages and disadvantage of each kind of object management.OverviewDeclarative object configuration requires a firm understanding of the Kubernetes object definitions and configuration. Read and complete the following documents if you have not already:Managing Kubernetes Objects Using Imperative CommandsImperative Management of Kubernetes Objects Using Configuration FilesFollowing are definitions for terms used in this document:object configuration file / configuration file: A file that defines the configuration for a Kubernetes object. This topic shows how to pass configuration files to kubectl apply. Configuration files are typically stored in source control, such as Git.live object configuration / live configuration: The live configuration values of an object, as observed by the Kubernetes cluster. These are kept in the Kubernetes cluster storage, typically etcd.declarative configuration writer / declarative writer: A person or software component that makes updates to a live object. The live writers referred to in this topic make changes to object configuration files and run kubectl apply to write the changes.How to create objectsUse kubectl apply to create all objects, except those that already exist, defined by configuration files in a specified directory:kubectl apply -f <directory> This sets the kubectl.kubernetes.io/last-applied-configuration: '{...}' annotation on each object. The annotation contains the contents of the object configuration file that was used to create the object.Note:Add the -R flag to recursively process directories.Here's an example of an object configuration file:application/simple_deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels: app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: con


Question: When would you use Declarative Management of Kubernetes Objects Using Configuration Files?

Answer: Declarative Management of Kubernetes Objects Using Configuration FilesKubernetes objects can be created, updated, and deleted by storing multiple object configuration files in a directory and using kubectl apply to recursively create and update those objects as needed. This method retains writes made to live objects without merging the changes back into the object configuration files. kubectl diff also gives you a preview of what changes apply will make.Before you beginInstall kubectl.You 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 the version, enter kubectl version.Trade-offsThe kubectl tool supports three kinds of object management:Imperative commandsImperative object configurationDeclarative object configurationSee Kubernetes Object Management for a discussion of the advantages and disadvantage of each kind of object management.OverviewDeclarative object configuration requires a firm understanding of the Kubernetes object definitions and configuration. Read and complete the following documents if you have not already:Managing Kubernetes Objects Using Imperative CommandsImperative Management of Kubernetes Objects Using Configuration FilesFollowing are definitions for terms used in this document:object configuration file / configuration file: A file that defines the configuration for a Kubernetes object. This topic shows how to pass configuration files to kubectl apply. Configuration files are typically stored in source control, such as Git.live object configuration / live configuration: The live configuration values of an object, as observed by the Kubernetes cluster. These are kept in the Kubernetes cluster storage, typically etcd.declarative configuration writer / declarative writer: A person or software component that makes updates to a live object. The live writers referred to in this topic make changes to object configuration files and run kubectl apply to write the changes.How to create objectsUse kubectl apply to create all objects, except those that already exist, defined by configuration files in a specified directory:kubectl apply -f <directory> This sets the kubectl.kubernetes.io/last-applied-configuration: '{...}' annotation on each object. The annotation contains the contents of the object configuration file that was used to create the object.Note:Add the -R flag to recursively process directories.Here's an example of an object configuration file:application/simple_deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels: app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: con


Question: What are the benefits of Declarative Management of Kubernetes Objects Using Configuration Files?

Answer: Declarative Management of Kubernetes Objects Using Configuration FilesKubernetes objects can be created, updated, and deleted by storing multiple object configuration files in a directory and using kubectl apply to recursively create and update those objects as needed. This method retains writes made to live objects without merging the changes back into the object configuration files. kubectl diff also gives you a preview of what changes apply will make.Before you beginInstall kubectl.You 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 the version, enter kubectl version.Trade-offsThe kubectl tool supports three kinds of object management:Imperative commandsImperative object configurationDeclarative object configurationSee Kubernetes Object Management for a discussion of the advantages and disadvantage of each kind of object management.OverviewDeclarative object configuration requires a firm understanding of the Kubernetes object definitions and configuration. Read and complete the following documents if you have not already:Managing Kubernetes Objects Using Imperative CommandsImperative Management of Kubernetes Objects Using Configuration FilesFollowing are definitions for terms used in this document:object configuration file / configuration file: A file that defines the configuration for a Kubernetes object. This topic shows how to pass configuration files to kubectl apply. Configuration files are typically stored in source control, such as Git.live object configuration / live configuration: The live configuration values of an object, as observed by the Kubernetes cluster. These are kept in the Kubernetes cluster storage, typically etcd.declarative configuration writer / declarative writer: A person or software component that makes updates to a live object. The live writers referred to in this topic make changes to object configuration files and run kubectl apply to write the changes.How to create objectsUse kubectl apply to create all objects, except those that already exist, defined by configuration files in a specified directory:kubectl apply -f <directory> This sets the kubectl.kubernetes.io/last-applied-configuration: '{...}' annotation on each object. The annotation contains the contents of the object configuration file that was used to create the object.Note:Add the -R flag to recursively process directories.Here's an example of an object configuration file:application/simple_deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels: app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: con


Question: What is Declarative Management of Kubernetes Objects Using Configuration Files?

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


Question: What is Before you begin?

Answer: I n s t a l l   k u b e c t l .   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 e   v e r s i o n ,   e n t e r   k u b e c t l   v e r s i o n .   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 e   v e r s i o n ,   e n t e r   k u b e c t l   v e r s i o n .


Question: What is Trade-offs?

Answer: T h e   k u b e c t l   t o o l   s u p p o r t s   t h r e e   k i n d s   o f   o b j e c t   m a n a g e m e n t :   I m p e r a t i v e   c o m m a n d s I m p e r a t i v e   o b j e c t   c o n f i g u r a t i o n D e c l a r a t i v e   o b j e c t   c o n f i g u r a t i o n   S e e   K u b e r n e t e s   O b j e c t   M a n a g e m e n t   f o r   a   d i s c u s s i o n   o f   t h e   a d v a n t a g e s   a n d   d i s a d v a n t a g e   o f   e a c h   k i n d   o f   o b j e c t   m a n a g e m e n t .