Question: What is How a ReplicationController works?

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


Question: What is Running an example ReplicationController?

Answer: T h i s   e x a m p l e   R e p l i c a t i o n C o n t r o l l e r   c o n f i g   r u n s   t h r e e   c o p i e s   o f   t h e   n g i n x   w e b   s e r v e r .   a p i V e r s i o n :   v 1   k i n d :   R e p l i c a t i o n C o n t r o l l e r   m e t a d a t a :   n a m e :   n g i n x   s p e c :   r e p l i c a s :   3   s e l e c t o r :   a p p :   n g i n x   t e m p l a t e :   m e t a d a t a :   n a m e :   n g i n x   l a b e l s :   a p p :   n g i n x   s p e c :   c o n t a i n e r s :   -   n a m e :   n g i n x   i m a g e :   n g i n x   p o r t s :   -   c o n t a i n e r P o r t :   8 0   R u n   t h e   e x a m p l e   j o b   b y   d o w n l o a d i n g   t h e   e x a m p l e   f i l e   a n d   t h e n   r u n n i n g   t h i s   c o m m a n d :   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / c o n t r o l l e r s / r e p l i c a t i o n . y a m l   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   r e p l i c a t i o n c o n t r o l l e r / n g i n x   c r e a t e d   C h e c k   o n   t h e   s t a t u s   o f   t h e   R e p l i c a t i o n C o n t r o l l e r   u s i n g   t h i s   c o m m a n d :   k u b e c t l   d e s c r i b e   r e p l i c a t i o n c o n t r o l l e r s / n g i n x   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   N a m e :   n g i n x   N a m e s p a c e :   d e f a u l t   S e l e c t o r :   a p p = n g i n x   L a b e l s :   a p p = n g i n x   A n n o t a t i o n s :   < n o n e >   R e p l i c a s :   3   c u r r e n t   /   3   d e s i r e d   P o d s   S t a t u s :   0   R u n n i n g   /   3   W a i t i n g   /   0   S u c c e e d e d   /   0   F a i l e d   P o d   T e m p l a t e :   L a b e l s :   a p p = n g i n x   C o n t a i n e r s :   n g i n x :   I m a g e :   n g i n x   P o r t :   8 0 / T C P   E n v i r o n m e n t :   < n o n e >   M o u n t s :   < n o n e >   V o l u m e s :   < n o n e >   E v e n t s :   F i r s t


Question: What is Writing a ReplicationController Manifest?

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


Question: What is Pod Template?

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


Question: What is Labels on the ReplicationController?

Answer: T h e   R e p l i c a t i o n C o n t r o l l e r   c a n   i t s e l f   h a v e   l a b e l s   ( . m e t a d a t a . l a b e l s ) .   T y p i c a l l y ,   y o u   w o u l d   s e t   t h e s e   t h e   s a m e   a s   t h e   . s p e c . t e m p l a t e . m e t a d a t a . l a b e l s ;   i f   . m e t a d a t a . l a b e l s   i s   n o t   s p e c i f i e d   t h e n   i t   d e f a u l t s   t o   . s p e c . t e m p l a t e . m e t a d a t a . l a b e l s .   H o w e v e r ,   t h e y   a r e   a l l o w e d   t o   b e   d i f f e r e n t ,   a n d   t h e   . m e t a d a t a . l a b e l s   d o   n o t   a f f e c t   t h e   b e h a v i o r   o f   t h e   R e p l i c a t i o n C o n t r o l l e r .


Question: What is Pod Selector?

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


Question: What is Multiple Replicas?

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


Question: What is Deleting a ReplicationController and its Pods?

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


Question: What is Deleting only a ReplicationController?

Answer: Y o u   c a n   d e l e t e   a   R e p l i c a t i o n C o n t r o l l e r   w i t h o u t   a f f e c t i n g   a n y   o f   i t s   p o d s .   U s i n g   k u b e c t l ,   s p e c i f y   t h e   - - c a s c a d e = o r p h a n   o p t i o n   t o   k u b e c t l   d e l e t e .   W h e n   u s i n g   t h e   R E S T   A P I   o r   c l i e n t   l i b r a r y ,   y o u   c a n   d e l e t e   t h e   R e p l i c a t i o n C o n t r o l l e r   o b j e c t .   O n c e   t h e   o r i g i n a l   i s   d e l e t e d ,   y o u   c a n   c r e a t e   a   n e w   R e p l i c a t i o n C o n t r o l l e r   t o   r e p l a c e   i t .   A s   l o n g   a s   t h e   o l d   a n d   n e w   . s p e c . s e l e c t o r   a r e   t h e   s a m e ,   t h e n   t h e   n e w   o n e   w i l l   a d o p t   t h e   o l d   p o d s .   H o w e v e r ,   i t   w i l l   n o t   m a k e   a n y   e f f o r t   t o   m a k e   e x i s t i n g   p o d s   m a t c h   a   n e w ,   d i f f e r e n t   p o d   t e m p l a t e .   T o   u p d a t e   p o d s   t o   a   n e w   s p e c   i n   a   c o n t r o l l e d   w a y ,   u s e   a   r o l l i n g   u p d a t e .


Question: What is Isolating pods from a ReplicationController?

Answer: P o d s   m a y   b e   r e m o v e d   f r o m   a   R e p l i c a t i o n C o n t r o l l e r ' s   t a r g e t   s e t   b y   c h a n g i n g   t h e i r   l a b e l s .   T h i s   t e c h n i q u e   m a y   b e   u s e d   t o   r e m o v e   p o d s   f r o m   s e r v i c e   f o r   d e b u g g i n g   a n d   d a t a   r e c o v e r y .   P o d s   t h a t   a r e   r e m o v e d   i n   t h i s   w a y   w i l l   b e   r e p l a c e d   a u t o m a t i c a l l y   ( a s s u m i n g   t h a t   t h e   n u m b e r   o f   r e p l i c a s   i s   n o t   a l s o   c h a n g e d ) .


Question: What is Rescheduling?

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


Question: What is Scaling?

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


Question: What is Rolling updates?

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


Question: What is Multiple release tracks?

Answer: I n   a d d i t i o n   t o   r u n n i n g   m u l t i p l e   r e l e a s e s   o f   a n   a p p l i c a t i o n   w h i l e   a   r o l l i n g   u p d a t e   i s   i n   p r o g r e s s ,   i t ' s   c o m m o n   t o   r u n   m u l t i p l e   r e l e a s e s   f o r   a n   e x t e n d e d   p e r i o d   o f   t i m e ,   o r   e v e n   c o n t i n u o u s l y ,   u s i n g   m u l t i p l e   r e l e a s e   t r a c k s .   T h e   t r a c k s   w o u l d   b e   d i f f e r e n t i a t e d   b y   l a b e l s .   F o r   i n s t a n c e ,   a   s e r v i c e   m i g h t   t a r g e t   a l l   p o d s   w i t h   t i e r   i n   ( f r o n t e n d ) ,   e n v i r o n m e n t   i n   ( p r o d ) .   N o w   s a y   y o u   h a v e   1 0   r e p l i c a t e d   p o d s   t h a t   m a k e   u p   t h i s   t i e r .   B u t   y o u   w a n t   t o   b e   a b l e   t o   ' c a n a r y '   a   n e w   v e r s i o n   o f   t h i s   c o m p o n e n t .   Y o u   c o u l d   s e t   u p   a   R e p l i c a t i o n C o n t r o l l e r   w i t h   r e p l i c a s   s e t   t o   9   f o r   t h e   b u l k   o f   t h e   r e p l i c a s ,   w i t h   l a b e l s   t i e r = f r o n t e n d ,   e n v i r o n m e n t = p r o d ,   t r a c k = s t a b l e ,   a n d   a n o t h e r   R e p l i c a t i o n C o n t r o l l e r   w i t h   r e p l i c a s   s e t   t o   1   f o r   t h e   c a n a r y ,   w i t h   l a b e l s   t i e r = f r o n t e n d ,   e n v i r o n m e n t = p r o d ,   t r a c k = c a n a r y .   N o w   t h e   s e r v i c e   i s   c o v e r i n g   b o t h   t h e   c a n a r y   a n d   n o n - c a n a r y   p o d s .   B u t   y o u   c a n   m e s s   w i t h   t h e   R e p l i c a t i o n C o n t r o l l e r s   s e p a r a t e l y   t o   t e s t   t h i n g s   o u t ,   m o n i t o r   t h e   r e s u l t s ,   e t c .


Question: What is Using ReplicationControllers with Services?

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


Question: What is Writing programs for Replication?

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


Question: What is Responsibilities of the ReplicationController?

Answer: T h e   R e p l i c a t i o n C o n t r o l l e r   e n s u r e s   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   m a t c h e s   i t s   l a b e l   s e l e c t o r   a n d   a r e   o p e r a t i o n a l .   C u r r e n t l y ,   o n l y   t e r m i n a t e d   p o d s   a r e   e x c l u d e d   f r o m   i t s   c o u n t .   I n   t h e   f u t u r e ,   r e a d i n e s s   a n d   o t h e r   i n f o r m a t i o n   a v a i l a b l e   f r o m   t h e   s y s t e m   m a y   b e   t a k e n   i n t o   a c c o u n t ,   w e   m a y   a d d   m o r e   c o n t r o l s   o v e r   t h e   r e p l a c e m e n t   p o l i c y ,   a n d   w e   p l a n   t o   e m i t   e v e n t s   t h a t   c o u l d   b e   u s e d   b y   e x t e r n a l   c l i e n t s   t o   i m p l e m e n t   a r b i t r a r i l y   s o p h i s t i c a t e d   r e p l a c e m e n t   a n d / o r   s c a l e - d o w n   p o l i c i e s .   T h e   R e p l i c a t i o n C o n t r o l l e r   i s   f o r e v e r   c o n s t r a i n e d   t o   t h i s   n a r r o w   r e s p o n s i b i l i t y .   I t   i t s e l f   w i l l   n o t   p e r f o r m   r e a d i n e s s   n o r   l i v e n e s s   p r o b e s .   R a t h e r   t h a n   p e r f o r m i n g   a u t o - s c a l i n g ,   i t   i s   i n t e n d e d   t o   b e   c o n t r o l l e d   b y   a n   e x t e r n a l   a u t o - s c a l e r   ( a s   d i s c u s s e d   i n   # 4 9 2 ) ,   w h i c h   w o u l d   c h a n g e   i t s   r e p l i c a s   f i e l d .   W e   w i l l   n o t   a d d   s c h e d u l i n g   p o l i c i e s   ( f o r   e x a m p l e ,   s p r e a d i n g )   t o   t h e   R e p l i c a t i o n C o n t r o l l e r .   N o r   s h o u l d   i t   v e r i f y   t h a t   t h e   p o d s   c o n t r o l l e d   m a t c h   t h e   c u r r e n t l y   s p e c i f i e d   t e m p l a t e ,   a s   t h a t   w o u l d   o b s t r u c t   a u t o - s i z i n g   a n d   o t h e r   a u t o m a t


Question: What is API Object?

Answer: R e p l i c a t i o n   c o n t r o l l e r   i s   a   t o p - l e v e l   r e s o u r c e   i n   t h e   K u b e r n e t e s   R E S T   A P I .   M o r e   d e t a i l s   a b o u t   t h e   A P I   o b j e c t   c a n   b e   f o u n d   a t :   R e p l i c a t i o n C o n t r o l l e r   A P I   o b j e c t .


Question: What is ReplicaSet?

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


Question: What is Deployment (Recommended)?

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


Question: What is Bare Pods?

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


Question: What is Job?

Answer: U s e   a   J o b   i n s t e a d   o f   a   R e p l i c a t i o n C o n t r o l l e r   f o r   p o d s   t h a t   a r e   e x p e c t e d   t o   t e r m i n a t e   o n   t h e i r   o w n   ( t h a t   i s ,   b a t c h   j o b s ) .


Question: What is DaemonSet?

Answer: U s e   a   D a e m o n S e t   i n s t e a d   o f   a   R e p l i c a t i o n C o n t r o l l e r   f o r   p o d s   t h a t   p r o v i d e   a   m a c h i n e - l e v e l   f u n c t i o n ,   s u c h   a s   m a c h i n e   m o n i t o r i n g   o r   m a c h i n e   l o g g i n g .   T h e s e   p o d s   h a v e   a   l i f e t i m e   t h a t   i s   t i e d   t o   a   m a c h i n e   l i f e t i m e :   t h e   p o d   n e e d s   t o   b e   r u n n i n g   o n   t h e   m a c h i n e   b e f o r e   o t h e r   p o d s   s t a r t ,   a n d   a r e   s a f e   t o   t e r m i n a t e   w h e n   t h e   m a c h i n e   i s   o t h e r w i s e   r e a d y   t o   b e   r e b o o t e d / s h u t d o w n .


Question: What is What's next?

Answer: L e a r n   a b o u t   P o d s . L e a r n   a b o u t   D e p l o y m e n t ,   t h e   r e p l a c e m e n t   f o r   R e p l i c a t i o n C o n t r o l l e r . R e p l i c a t i o n C o n t r o l l e r   i s   p a r t   o f   t h e   K u b e r n e t e s   R E S T   A P I .   R e a d   t h e   R e p l i c a t i o n C o n t r o l l e r   o b j e c t   d e f i n i t i o n   t o   u n d e r s t a n d   t h e   A P I   f o r   r e p l i c a t i o n   c o n t r o l l e r s .


Question: What is 3 - Autoscaling Workloads?

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


Question: What is Scaling workloads manually?

Answer: K u b e r n e t e s   s u p p o r t s   m a n u a l   s c a l i n g   o f   w o r k l o a d s .   H o r i z o n t a l   s c a l i n g   c a n   b e   d o n e   u s i n g   t h e   k u b e c t l   C L I .   F o r   v e r t i c a l   s c a l i n g ,   y o u   n e e d   t o   p a t c h   t h e   r e s o u r c e   d e f i n i t i o n   o f   y o u r   w o r k l o a d .   S e e   b e l o w   f o r   e x a m p l e s   o f   b o t h   s t r a t e g i e s .   H o r i z o n t a l   s c a l i n g :   R u n n i n g   m u l t i p l e   i n s t a n c e s   o f   y o u r   a p p V e r t i c a l   s c a l i n g :   R e s i z i n g   C P U   a n d   m e m o r y   r e s o u r c e s   a s s i g n e d   t o   c o n t a i n e r s


Question: What is Scaling workloads automatically?

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


Question: What is Scaling workloads horizontally?

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


Question: What is Scaling workloads vertically?

Answer: Y o u   c a n   a u t o m a t i c a l l y   s c a l e   a   w o r k l o a d   v e r t i c a l l y   u s i n g   a   V e r t i c a l P o d A u t o s c a l e r   ( V P A ) .   U n l i k e   t h e   H P A ,   t h e   V P A   d o e s n ' t   c o m e   w i t h   K u b e r n e t e s   b y   d e f a u l t ,   b u t   i s   a   s e p a r a t e   p r o j e c t   t h a t   c a n   b e   f o u n d   o n   G i t H u b .   O n c e   i n s t a l l e d ,   i t   a l l o w s   y o u   t o   c r e a t e   C u s t o m R e s o u r c e D e f i n i t i o n s   ( C R D s )   f o r   y o u r   w o r k l o a d s   w h i c h   d e f i n e   h o w   a n d   w h e n   t o   s c a l e   t h e   r e s o u r c e s   o f   t h e   m a n a g e d   r e p l i c a s .


Question: What is Note:?

Answer: A t   t h e   m o m e n t ,   t h e   V P A   c a n   o p e r a t e   i n   f o u r   d i f f e r e n t   m o d e s :


Question: What is In-place pod vertical scaling?

Answer: A s   o f   K u b e r n e t e s   1 . 3 4 ,   V P A   d o e s   n o t   s u p p o r t   r e s i z i n g   p o d s   i n - p l a c e ,   b u t   t h i s   i n t e g r a t i o n   i s   b e i n g   w o r k e d   o n .   F o r   m a n u a l l y   r e s i z i n g   p o d s   i n - p l a c e ,   s e e   R e s i z e   C o n t a i n e r   R e s o u r c e s   I n - P l a c e .


Question: What is Autoscaling based on cluster size?

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


Question: What is Event driven Autoscaling?

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


Question: What is Autoscaling based on schedules?

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


Question: What is Scaling cluster infrastructure?

Answer: I f   s c a l i n g   w o r k l o a d s   i s n ' t   e n o u g h   t o   m e e t   y o u r   n e e d s ,   y o u   c a n   a l s o   s c a l e   y o u r   c l u s t e r   i n f r a s t r u c t u r e   i t s e l f .   S c a l i n g   t h e   c l u s t e r   i n f r a s t r u c t u r e   n o r m a l l y   m e a n s   a d d i n g   o r   r e m o v i n g   n o d e s .   R e a d   N o d e   a u t o s c a l i n g   f o r   m o r e   i n f o r m a t i o n .


Question: What is What's next?

Answer: L e a r n   m o r e   a b o u t   s c a l i n g   h o r i z o n t a l l y S c a l e   a   S t a t e f u l S e t H o r i z o n t a l P o d A u t o s c a l e r   W a l k t h r o u g h R e s i z e   C o n t a i n e r   R e s o u r c e s   I n - P l a c e A u t o s c a l e   t h e   D N S   S e r v i c e   i n   a   C l u s t e r L e a r n   a b o u t   N o d e   a u t o s c a l i n g   S c a l e   a   S t a t e f u l S e t H o r i z o n t a l P o d A u t o s c a l e r   W a l k t h r o u g h


Question: What is 4 - Managing Workloads?

Answer: Y o u ' v e   d e p l o y e d   y o u r   a p p l i c a t i o n   a n d   e x p o s e d   i t   v i a   a   S e r v i c e .   N o w   w h a t ?   K u b e r n e t e s   p r o v i d e s   a   n u m b e r   o f   t o o l s   t o   h e l p   y o u   m a n a g e   y o u r   a p p l i c a t i o n   d e p l o y m e n t ,   i n c l u d i n g   s c a l i n g   a n d   u p d a t i n g .


Question: What is Organizing resource configurations?

Answer: M a n y   a p p l i c a t i o n s   r e q u i r e   m u l t i p l e   r e s o u r c e s   t o   b e   c r e a t e d ,   s u c h   a s   a   D e p l o y m e n t   a l o n g   w i t h   a   S e r v i c e .   M a n a g e m e n t   o f   m u l t i p l e   r e s o u r c e s   c a n   b e   s i m p l i f i e d   b y   g r o u p i n g   t h e m   t o g e t h e r   i n   t h e   s a m e   f i l e   ( s e p a r a t e d   b y   - - -   i n   Y A M L ) .   F o r   e x a m p l e :   a p i V e r s i o n :   v 1   k i n d :   S e r v i c e   m e t a d a t a :   n a m e :   m y - n g i n x - s v c   l a b e l s :   a p p :   n g i n x   s p e c :   t y p e :   L o a d B a l a n c e r   p o r t s :   -   p o r t :   8 0   s e l e c t o r :   a p p :   n g i n x   - - -   a p i V e r s i o n :   a p p s / v 1   k i n d :   D e p l o y m e n t   m e t a d a t a :   n a m e :   m y - n g i n x   l a b e l s :   a p p :   n g i n x   s p e c :   r e p l i c a s :   3   s e l e c t o r :   m a t c h L a b e l s :   a p p :   n g i n x   t e m p l a t e :   m e t a d a t a :   l a b e l s :   a p p :   n g i n x   s p e c :   c o n t a i n e r s :   -   n a m e :   n g i n x   i m a g e :   n g i n x : 1 . 1 4 . 2   p o r t s :   -   c o n t a i n e r P o r t :   8 0   M u l t i p l e   r e s o u r c e s   c a n   b e   c r e a t e d   t h e   s a m e   w a y   a s   a   s i n g l e   r e s o u r c e :   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / a p p l i c a t i o n / n g i n x - a p p . y a m l   s e r v i c e / m y - n g i n x - s v c   c r e a t e d   d e p l o y m e n t . a p p s / m y - n g i n x   c r e a t e d   T h e   r e s o u r c e s   w i l l   b e   c r e a t e d   i n   t h e   o r d e r   t h e y   a p p e a r   i n   t h e   m a n i f e s t .   T h e r e f o r e ,   i t ' s   b e s t   t o   s p e c i f y   t h e   S e r v i c e   f i r s t ,   s i n c e   t h a t   w i l l   e n s u r e   t h e   s c h e d u l e r   c a n   s p r


Question: What is External tools?

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


Question: What is Helm?

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


Question: What is Kustomize?

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


Question: What is Bulk operations in kubectl?

Answer: R e s o u r c e   c r e a t i o n   i s n ' t   t h e   o n l y   o p e r a t i o n   t h a t   k u b e c t l   c a n   p e r f o r m   i n   b u l k .   I t   c a n   a l s o   e x t r a c t   r e s o u r c e   n a m e s   f r o m   c o n f i g u r a t i o n   f i l e s   i n   o r d e r   t o   p e r f o r m   o t h e r   o p e r a t i o n s ,   i n   p a r t i c u l a r   t o   d e l e t e   t h e   s a m e   r e s o u r c e s   y o u   c r e a t e d :   k u b e c t l   d e l e t e   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / a p p l i c a t i o n / n g i n x - a p p . y a m l   d e p l o y m e n t . a p p s   " m y - n g i n x "   d e l e t e d   s e r v i c e   " m y - n g i n x - s v c "   d e l e t e d   I n   t h e   c a s e   o f   t w o   r e s o u r c e s ,   y o u   c a n   s p e c i f y   b o t h   r e s o u r c e s   o n   t h e   c o m m a n d   l i n e   u s i n g   t h e   r e s o u r c e / n a m e   s y n t a x :   k u b e c t l   d e l e t e   d e p l o y m e n t s / m y - n g i n x   s e r v i c e s / m y - n g i n x - s v c   F o r   l a r g e r   n u m b e r s   o f   r e s o u r c e s ,   y o u ' l l   f i n d   i t   e a s i e r   t o   s p e c i f y   t h e   s e l e c t o r   ( l a b e l   q u e r y )   s p e c i f i e d   u s i n g   - l   o r   - - s e l e c t o r ,   t o   f i l t e r   r e s o u r c e s   b y   t h e i r   l a b e l s :   k u b e c t l   d e l e t e   d e p l o y m e n t , s e r v i c e s   - l   a p p = n g i n x   d e p l o y m e n t . a p p s   " m y - n g i n x "   d e l e t e d   s e r v i c e   " m y - n g i n x - s v c "   d e l e t e d


Question: What is Chaining and filtering?

Answer: B e c a u s e   k u b e c t l   o u t p u t s   r e s o u r c e   n a m e s   i n   t h e   s a m e   s y n t a x   i t   a c c e p t s ,   y o u   c a n   c h a i n   o p e r a t i o n s   u s i n g   $ ( )   o r   x a r g s :   k u b e c t l   g e t   $ ( k u b e c t l   c r e a t e   - f   d o c s / c o n c e p t s / c l u s t e r - a d m i n i s t r a t i o n / n g i n x /   - o   n a m e   |   g r e p   s e r v i c e /   )   k u b e c t l   c r e a t e   - f   d o c s / c o n c e p t s / c l u s t e r - a d m i n i s t r a t i o n / n g i n x /   - o   n a m e   |   g r e p   s e r v i c e /   |   x a r g s   - i   k u b e c t l   g e t   ' { } '   T h e   o u t p u t   m i g h t   b e   s i m i l a r   t o :   N A M E   T Y P E   C L U S T E R - I P   E X T E R N A L - I P   P O R T ( S )   A G E   m y - n g i n x - s v c   L o a d B a l a n c e r   1 0 . 0 . 0 . 2 0 8   < p e n d i n g >   8 0 / T C P   0 s   W i t h   t h e   a b o v e   c o m m a n d s ,   f i r s t   y o u   c r e a t e   r e s o u r c e s   u n d e r   e x a m p l e s / a p p l i c a t i o n / n g i n x /   a n d   p r i n t   t h e   r e s o u r c e s   c r e a t e d   w i t h   - o   n a m e   o u t p u t   f o r m a t   ( p r i n t   e a c h   r e s o u r c e   a s   r e s o u r c e / n a m e ) .   T h e n   y o u   g r e p   o n l y   t h e   S e r v i c e ,   a n d   t h e n   p r i n t   i t   w i t h   k u b e c t l   g e t .


Question: What is Recursive operations on local files?

Answer: I f   y o u   h a p p e n   t o   o r g a n i z e   y o u r   r e s o u r c e s   a c r o s s   s e v e r a l   s u b d i r e c t o r i e s   w i t h i n   a   p a r t i c u l a r   d i r e c t o r y ,   y o u   c a n   r e c u r s i v e l y   p e r f o r m   t h e   o p e r a t i o n s   o n   t h e   s u b d i r e c t o r i e s   a l s o ,   b y   s p e c i f y i n g   - - r e c u r s i v e   o r   - R   a l o n g s i d e   t h e   - - f i l e n a m e / - f   a r g u m e n t .   F o r   i n s t a n c e ,   a s s u m e   t h e r e   i s   a   d i r e c t o r y   p r o j e c t / k 8 s / d e v e l o p m e n t   t h a t   h o l d s   a l l   o f   t h e   m a n i f e s t s   n e e d e d   f o r   t h e   d e v e l o p m e n t   e n v i r o n m e n t ,   o r g a n i z e d   b y   r e s o u r c e   t y p e :   p r o j e c t / k 8 s / d e v e l o p m e n t   ├ ─ ─   c o n f i g m a p   │   └ ─ ─   m y - c o n f i g m a p . y a m l   ├ ─ ─   d e p l o y m e n t   │   └ ─ ─   m y - d e p l o y m e n t . y a m l   └ ─ ─   p v c   └ ─ ─   m y - p v c . y a m l   B y   d e f a u l t ,   p e r f o r m i n g   a   b u l k   o p e r a t i o n   o n   p r o j e c t / k 8 s / d e v e l o p m e n t   w i l l   s t o p   a t   t h e   f i r s t   l e v e l   o f   t h e   d i r e c t o r y ,   n o t   p r o c e s s i n g   a n y   s u b d i r e c t o r i e s .   I f   y o u   h a d   t r i e d   t o   c r e a t e   t h e   r e s o u r c e s   i n   t h i s   d i r e c t o r y   u s i n g   t h e   f o l l o w i n g   c o m m a n d ,   w e   w o u l d   h a v e   e n c o u n t e r e d   a n   e r r o r :   k u b e c t l   a p p l y   - f   p r o j e c t / k 8 s / d e v e l o p m e n t   e r r o r :   y o u   m u s t   p r o v i d e   o n e   o r   m o r e   r e s o u r c e s   b y   a r g u m e n t   o r   f i l e n a m e   ( . j s o n | . y a m l | . y m l | s t d i n )   I n s t e a d ,   s p e c i f y   t h e   - - r e c u r s i v e   o r   - R   c o m m a n d   l i n e   a r g u


Question: What is Updating your application without an outage?

Answer: A t   s o m e   p o i n t ,   y o u ' l l   e v e n t u a l l y   n e e d   t o   u p d a t e   y o u r   d e p l o y e d   a p p l i c a t i o n ,   t y p i c a l l y   b y   s p e c i f y i n g   a   n e w   i m a g e   o r   i m a g e   t a g .   k u b e c t l   s u p p o r t s   s e v e r a l   u p d a t e   o p e r a t i o n s ,   e a c h   o f   w h i c h   i s   a p p l i c a b l e   t o   d i f f e r e n t   s c e n a r i o s .   Y o u   c a n   r u n   m u l t i p l e   c o p i e s   o f   y o u r   a p p ,   a n d   u s e   a   r o l l o u t   t o   g r a d u a l l y   s h i f t   t h e   t r a f f i c   t o   n e w   h e a l t h y   P o d s .   E v e n t u a l l y ,   a l l   t h e   r u n n i n g   P o d s   w o u l d   h a v e   t h e   n e w   s o f t w a r e .   T h i s   s e c t i o n   o f   t h e   p a g e   g u i d e s   y o u   t h r o u g h   h o w   t o   c r e a t e   a n d   u p d a t e   a p p l i c a t i o n s   w i t h   D e p l o y m e n t s .   L e t ' s   s a y   y o u   w e r e   r u n n i n g   v e r s i o n   1 . 1 4 . 2   o f   n g i n x :   k u b e c t l   c r e a t e   d e p l o y m e n t   m y - n g i n x   - - i m a g e = n g i n x : 1 . 1 4 . 2   d e p l o y m e n t . a p p s / m y - n g i n x   c r e a t e d   E n s u r e   t h a t   t h e r e   i s   1   r e p l i c a :   k u b e c t l   s c a l e   - - r e p l i c a s   1   d e p l o y m e n t s / m y - n g i n x   - - s u b r e s o u r c e = ' s c a l e '   - - t y p e = ' m e r g e '   - p   ' { " s p e c " : { " r e p l i c a s " :   1 } } '   d e p l o y m e n t . a p p s / m y - n g i n x   s c a l e d   a n d   a l l o w   K u b e r n e t e s   t o   a d d   m o r e   t e m p o r a r y   r e p l i c a s   d u r i n g   a   r o l l o u t ,   b y   s e t t i n g   a   s u r g e   m a x i m u m   o f   1 0 0 % :   k u b e c t l   p a t c h   - - t y p e = ' m e r g e '   - p   ' { " s p e c " : { " s t r a t e g y " : { " r o l l i n g U p d a t e " : { " m a x S u r g e


Question: What is Managing rollouts?

Answer: Y o u   c a n   u s e   k u b e c t l   r o l l o u t   t o   m a n a g e   a   p r o g r e s s i v e   u p d a t e   o f   a n   e x i s t i n g   a p p l i c a t i o n .   F o r   e x a m p l e :   k u b e c t l   a p p l y   - f   m y - d e p l o y m e n t . y a m l   #   w a i t   f o r   r o l l o u t   t o   f i n i s h   k u b e c t l   r o l l o u t   s t a t u s   d e p l o y m e n t / m y - d e p l o y m e n t   - - t i m e o u t   1 0 m   #   1 0   m i n u t e   t i m e o u t   o r   k u b e c t l   a p p l y   - f   b a c k i n g - s t a t e f u l - c o m p o n e n t . y a m l   #   d o n ' t   w a i t   f o r   r o l l o u t   t o   f i n i s h ,   j u s t   c h e c k   t h e   s t a t u s   k u b e c t l   r o l l o u t   s t a t u s   s t a t e f u l s e t s / b a c k i n g - s t a t e f u l - c o m p o n e n t   - - w a t c h = f a l s e   Y o u   c a n   a l s o   p a u s e ,   r e s u m e   o r   c a n c e l   a   r o l l o u t .   V i s i t   k u b e c t l   r o l l o u t   t o   l e a r n   m o r e .


Question: What is Canary deployments?

Answer: A n o t h e r   s c e n a r i o   w h e r e   m u l t i p l e   l a b e l s   a r e   n e e d e d   i s   t o   d i s t i n g u i s h   d e p l o y m e n t s   o f   d i f f e r e n t   r e l e a s e s   o r   c o n f i g u r a t i o n s   o f   t h e   s a m e   c o m p o n e n t .   I t   i s   c o m m o n   p r a c t i c e   t o   d e p l o y   a   c a n a r y   o f   a   n e w   a p p l i c a t i o n   r e l e a s e   ( s p e c i f i e d   v i a   i m a g e   t a g   i n   t h e   p o d   t e m p l a t e )   s i d e   b y   s i d e   w i t h   t h e   p r e v i o u s   r e l e a s e   s o   t h a t   t h e   n e w   r e l e a s e   c a n   r e c e i v e   l i v e   p r o d u c t i o n   t r a f f i c   b e f o r e   f u l l y   r o l l i n g   i t   o u t .   F o r   i n s t a n c e ,   y o u   c a n   u s e   a   t r a c k   l a b e l   t o   d i f f e r e n t i a t e   d i f f e r e n t   r e l e a s e s .   T h e   p r i m a r y ,   s t a b l e   r e l e a s e   w o u l d   h a v e   a   t r a c k   l a b e l   w i t h   v a l u e   a s   s t a b l e :   n a m e :   f r o n t e n d   r e p l i c a s :   3   . . .   l a b e l s :   a p p :   g u e s t b o o k   t i e r :   f r o n t e n d   t r a c k :   s t a b l e   . . .   i m a g e :   g b - f r o n t e n d : v 3   a n d   t h e n   y o u   c a n   c r e a t e   a   n e w   r e l e a s e   o f   t h e   g u e s t b o o k   f r o n t e n d   t h a t   c a r r i e s   t h e   t r a c k   l a b e l   w i t h   d i f f e r e n t   v a l u e   ( i . e .   c a n a r y ) ,   s o   t h a t   t w o   s e t s   o f   p o d s   w o u l d   n o t   o v e r l a p :   n a m e :   f r o n t e n d - c a n a r y   r e p l i c a s :   1   . . .   l a b e l s :   a p p :   g u e s t b o o k   t i e r :   f r o n t e n d   t r a c k :   c a n a r y   . . .   i m a g e :   g b - f r o n t e n d : v 4   T h e   f r o n t e n d   s e r v i c e   w o u l d   s p a n   b o t h   s e t s   o f   r e p l i c a s   b y   s e l e c t


Question: What is Updating annotations?

Answer: S o m e t i m e s   y o u   w o u l d   w a n t   t o   a t t a c h   a n n o t a t i o n s   t o   r e s o u r c e s .   A n n o t a t i o n s   a r e   a r b i t r a r y   n o n - i d e n t i f y i n g   m e t a d a t a   f o r   r e t r i e v a l   b y   A P I   c l i e n t s   s u c h   a s   t o o l s   o r   l i b r a r i e s .   T h i s   c a n   b e   d o n e   w i t h   k u b e c t l   a n n o t a t e .   F o r   e x a m p l e :   k u b e c t l   a n n o t a t e   p o d s   m y - n g i n x - v 4 - 9 g w 1 9   d e s c r i p t i o n = ' m y   f r o n t e n d   r u n n i n g   n g i n x '   k u b e c t l   g e t   p o d s   m y - n g i n x - v 4 - 9 g w 1 9   - o   y a m l   a p i V e r s i o n :   v 1   k i n d :   p o d   m e t a d a t a :   a n n o t a t i o n s :   d e s c r i p t i o n :   m y   f r o n t e n d   r u n n i n g   n g i n x   . . .   F o r   m o r e   i n f o r m a t i o n ,   s e e   a n n o t a t i o n s   a n d   k u b e c t l   a n n o t a t e .


Question: What is Scaling your application?

Answer: W h e n   l o a d   o n   y o u r   a p p l i c a t i o n   g r o w s   o r   s h r i n k s ,   u s e   k u b e c t l   t o   s c a l e   y o u r   a p p l i c a t i o n .   F o r   i n s t a n c e ,   t o   d e c r e a s e   t h e   n u m b e r   o f   n g i n x   r e p l i c a s   f r o m   3   t o   1 ,   d o :   k u b e c t l   s c a l e   d e p l o y m e n t / m y - n g i n x   - - r e p l i c a s = 1   d e p l o y m e n t . a p p s / m y - n g i n x   s c a l e d   N o w   y o u   o n l y   h a v e   o n e   p o d   m a n a g e d   b y   t h e   d e p l o y m e n t .   k u b e c t l   g e t   p o d s   - l   a p p = n g i n x   N A M E   R E A D Y   S T A T U S   R E S T A R T S   A G E   m y - n g i n x - 2 0 3 5 3 8 4 2 1 1 - j 5 f h i   1 / 1   R u n n i n g   0   3 0 m   T o   h a v e   t h e   s y s t e m   a u t o m a t i c a l l y   c h o o s e   t h e   n u m b e r   o f   n g i n x   r e p l i c a s   a s   n e e d e d ,   r a n g i n g   f r o m   1   t o   3 ,   d o :   #   T h i s   r e q u i r e s   a n   e x i s t i n g   s o u r c e   o f   c o n t a i n e r   a n d   P o d   m e t r i c s   k u b e c t l   a u t o s c a l e   d e p l o y m e n t / m y - n g i n x   - - m i n = 1   - - m a x = 3   h o r i z o n t a l p o d a u t o s c a l e r . a u t o s c a l i n g / m y - n g i n x   a u t o s c a l e d   N o w   y o u r   n g i n x   r e p l i c a s   w i l l   b e   s c a l e d   u p   a n d   d o w n   a s   n e e d e d ,   a u t o m a t i c a l l y .   F o r   m o r e   i n f o r m a t i o n ,   p l e a s e   s e e   k u b e c t l   s c a l e ,   k u b e c t l   a u t o s c a l e   a n d   h o r i z o n t a l   p o d   a u t o s c a l e r   d o c u m e n t .


Question: What is In-place updates of resources?

Answer: S o m e t i m e s   i t ' s   n e c e s s a r y   t o   m a k e   n a r r o w ,   n o n - d i s r u p t i v e   u p d a t e s   t o   r e s o u r c e s   y o u ' v e   c r e a t e d .


Question: What is kubectl apply?

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


Question: What is kubectl edit?

Answer: A l t e r n a t i v e l y ,   y o u   m a y   a l s o   u p d a t e   r e s o u r c e s   w i t h   k u b e c t l   e d i t :   k u b e c t l   e d i t   d e p l o y m e n t / m y - n g i n x   T h i s   i s   e q u i v a l e n t   t o   f i r s t   g e t   t h e   r e s o u r c e ,   e d i t   i t   i n   t e x t   e d i t o r ,   a n d   t h e n   a p p l y   t h e   r e s o u r c e   w i t h   t h e   u p d a t e d   v e r s i o n :   k u b e c t l   g e t   d e p l o y m e n t   m y - n g i n x   - o   y a m l   >   / t m p / n g i n x . y a m l   v i   / t m p / n g i n x . y a m l   #   d o   s o m e   e d i t ,   a n d   t h e n   s a v e   t h e   f i l e   k u b e c t l   a p p l y   - f   / t m p / n g i n x . y a m l   d e p l o y m e n t . a p p s / m y - n g i n x   c o n f i g u r e d   r m   / t m p / n g i n x . y a m l   T h i s   a l l o w s   y o u   t o   d o   m o r e   s i g n i f i c a n t   c h a n g e s   m o r e   e a s i l y .   N o t e   t h a t   y o u   c a n   s p e c i f y   t h e   e d i t o r   w i t h   y o u r   E D I T O R   o r   K U B E _ E D I T O R   e n v i r o n m e n t   v a r i a b l e s .   F o r   m o r e   i n f o r m a t i o n ,   p l e a s e   s e e   k u b e c t l   e d i t .


Question: What is kubectl patch?

Answer: Y o u   c a n   u s e   k u b e c t l   p a t c h   t o   u p d a t e   A P I   o b j e c t s   i n   p l a c e .   T h i s   s u b c o m m a n d   s u p p o r t s   J S O N   p a t c h ,   J S O N   m e r g e   p a t c h ,   a n d   s t r a t e g i c   m e r g e   p a t c h .   S e e   U p d a t e   A P I   O b j e c t s   i n   P l a c e   U s i n g   k u b e c t l   p a t c h   f o r   m o r e   d e t a i l s .


Question: What is Disruptive updates?

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


Question: What is What's next?

Answer: L e a r n   a b o u t   h o w   t o   u s e   k u b e c t l   f o r   a p p l i c a t i o n   i n t r o s p e c t i o n   a n d   d e b u g g i n g .   ©   2 0 2 5   T h e   K u b e r n e t e s   A u t h o r s   |   D o c u m e n t a t i o n   D i s t r i b u t e d   u n d e r   C C   B Y   4 . 0   ©   2 0 2 5   T h e   L i n u x   F o u n d a t i o n   ® .   A l l   r i g h t s   r e s e r v e d .   T h e   L i n u x   F o u n d a t i o n   h a s   r e g i s t e r e d   t r a d e m a r k s   a n d   u s e s   t r a d e m a r k s .   F o r   a   l i s t   o f   t r a d e m a r k s   o f   T h e   L i n u x   F o u n d a t i o n ,   p l e a s e   s e e   o u r   T r a d e m a r k   U s a g e   p a g e   I C P   l i c e n s e :   京 I C P 备 1 7 0 7 4 2 6 6 号 - 3


Question: What is kubectl config get-users?

Answer: kubectl config get-usersSynopsisDisplay users defined in the kubeconfig.kubectl config get-users [flags] Examples # List the users that kubectl knows about kubectl config get-users Options-h, --helphelp for get-usersParent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringuse a particular kubeconfig file--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profile.pprof"Name of the file to write the profile to--request-timeout string Default: "0"The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.-s, --server stringThe address and port of the Kubernetes API server--storage-driver-buffer-duration duration Default: 1m0sWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction--storage-driver-db string Default: "cadvisor"database name--storage-driver-host string Default: "localhost:8086"database host:port--storage-driver-password string Default: "root"database password--storage-driver-secureuse secure connection with database--storage-driver-table string Default: "stats"table name--storage-driver-user string Default: "root"database username--tls-server-name stringServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used--token stringBearer token for authentication to the API server--user stringThe name of the kubeconfig user to use--username stringUsername for basic authentication to the API server--version version[=true]--version, --version=


Question: How does kubectl config get-users work?

Answer: kubectl config get-usersSynopsisDisplay users defined in the kubeconfig.kubectl config get-users [flags] Examples # List the users that kubectl knows about kubectl config get-users Options-h, --helphelp for get-usersParent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringuse a particular kubeconfig file--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profile.pprof"Name of the file to write the profile to--request-timeout string Default: "0"The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.-s, --server stringThe address and port of the Kubernetes API server--storage-driver-buffer-duration duration Default: 1m0sWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction--storage-driver-db string Default: "cadvisor"database name--storage-driver-host string Default: "localhost:8086"database host:port--storage-driver-password string Default: "root"database password--storage-driver-secureuse secure connection with database--storage-driver-table string Default: "stats"table name--storage-driver-user string Default: "root"database username--tls-server-name stringServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used--token stringBearer token for authentication to the API server--user stringThe name of the kubeconfig user to use--username stringUsername for basic authentication to the API server--version version[=true]--version, --version=


Question: When would you use kubectl config get-users?

Answer: kubectl config get-usersSynopsisDisplay users defined in the kubeconfig.kubectl config get-users [flags] Examples # List the users that kubectl knows about kubectl config get-users Options-h, --helphelp for get-usersParent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringuse a particular kubeconfig file--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profile.pprof"Name of the file to write the profile to--request-timeout string Default: "0"The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.-s, --server stringThe address and port of the Kubernetes API server--storage-driver-buffer-duration duration Default: 1m0sWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction--storage-driver-db string Default: "cadvisor"database name--storage-driver-host string Default: "localhost:8086"database host:port--storage-driver-password string Default: "root"database password--storage-driver-secureuse secure connection with database--storage-driver-table string Default: "stats"table name--storage-driver-user string Default: "root"database username--tls-server-name stringServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used--token stringBearer token for authentication to the API server--user stringThe name of the kubeconfig user to use--username stringUsername for basic authentication to the API server--version version[=true]--version, --version=


Question: What are the benefits of kubectl config get-users?

Answer: kubectl config get-usersSynopsisDisplay users defined in the kubeconfig.kubectl config get-users [flags] Examples # List the users that kubectl knows about kubectl config get-users Options-h, --helphelp for get-usersParent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringuse a particular kubeconfig file--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profile.pprof"Name of the file to write the profile to--request-timeout string Default: "0"The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.-s, --server stringThe address and port of the Kubernetes API server--storage-driver-buffer-duration duration Default: 1m0sWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction--storage-driver-db string Default: "cadvisor"database name--storage-driver-host string Default: "localhost:8086"database host:port--storage-driver-password string Default: "root"database password--storage-driver-secureuse secure connection with database--storage-driver-table string Default: "stats"table name--storage-driver-user string Default: "root"database username--tls-server-name stringServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used--token stringBearer token for authentication to the API server--user stringThe name of the kubeconfig user to use--username stringUsername for basic authentication to the API server--version version[=true]--version, --version=


Question: What is Synopsis?

Answer: D i s p l a y   u s e r s   d e f i n e d   i n   t h e   k u b e c o n f i g .   k u b e c t l   c o n f i g   g e t - u s e r s   [ f l a g s ]


Question: What is Examples?

Answer: #   L i s t   t h e   u s e r s   t h a t   k u b e c t l   k n o w s   a b o u t   k u b e c t l   c o n f i g   g e t - u s e r s


Question: What is Options?

Answer: h e l p   f o r   g e t - u s e r s


Question: What is Parent Options Inherited?

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


Question: What is See Also?

Answer: k u b e c t l   c o n f i g   -   M o d i f y   k u b e c o n f i g   f i l e s   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 kubectl describe?

Answer: kubectl describeSynopsisShow details of a specific resource or group of resources.Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: $ kubectl describe TYPE NAME_PREFIX will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME_PREFIX.Use "kubectl api-resources" for a complete list of supported resources.kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) Examples # Describe a node kubectl describe nodes kubernetes-node-emt8.c.myproject.internal # Describe a pod kubectl describe pods/nginx # Describe a pod identified by type and name in "pod.json" kubectl describe -f pod.json # Describe all pods kubectl describe pods # Describe pods by label name=myLabel kubectl describe pods -l name=myLabel # Describe all pods managed by the 'frontend' replication controller # (rc-created pods get the name of the rc as a prefix in the pod name) kubectl describe pods frontend Options-A, --all-namespacesIf present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.--chunk-size int Default: 500Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.-f, --filename stringsFilename, directory, or URL to files containing the resource to describe-h, --helphelp for describe-k, --kustomize stringProcess the kustomization directory. This flag can't be used together with -f or -R.-R, --recursiveProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.-l, --selector stringSelector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.--show-events Default: trueIf true, display events related to the described object.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf t


Question: How does kubectl describe work?

Answer: kubectl describeSynopsisShow details of a specific resource or group of resources.Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: $ kubectl describe TYPE NAME_PREFIX will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME_PREFIX.Use "kubectl api-resources" for a complete list of supported resources.kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) Examples # Describe a node kubectl describe nodes kubernetes-node-emt8.c.myproject.internal # Describe a pod kubectl describe pods/nginx # Describe a pod identified by type and name in "pod.json" kubectl describe -f pod.json # Describe all pods kubectl describe pods # Describe pods by label name=myLabel kubectl describe pods -l name=myLabel # Describe all pods managed by the 'frontend' replication controller # (rc-created pods get the name of the rc as a prefix in the pod name) kubectl describe pods frontend Options-A, --all-namespacesIf present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.--chunk-size int Default: 500Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.-f, --filename stringsFilename, directory, or URL to files containing the resource to describe-h, --helphelp for describe-k, --kustomize stringProcess the kustomization directory. This flag can't be used together with -f or -R.-R, --recursiveProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.-l, --selector stringSelector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.--show-events Default: trueIf true, display events related to the described object.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf t


Question: When would you use kubectl describe?

Answer: kubectl describeSynopsisShow details of a specific resource or group of resources.Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: $ kubectl describe TYPE NAME_PREFIX will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME_PREFIX.Use "kubectl api-resources" for a complete list of supported resources.kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) Examples # Describe a node kubectl describe nodes kubernetes-node-emt8.c.myproject.internal # Describe a pod kubectl describe pods/nginx # Describe a pod identified by type and name in "pod.json" kubectl describe -f pod.json # Describe all pods kubectl describe pods # Describe pods by label name=myLabel kubectl describe pods -l name=myLabel # Describe all pods managed by the 'frontend' replication controller # (rc-created pods get the name of the rc as a prefix in the pod name) kubectl describe pods frontend Options-A, --all-namespacesIf present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.--chunk-size int Default: 500Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.-f, --filename stringsFilename, directory, or URL to files containing the resource to describe-h, --helphelp for describe-k, --kustomize stringProcess the kustomization directory. This flag can't be used together with -f or -R.-R, --recursiveProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.-l, --selector stringSelector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.--show-events Default: trueIf true, display events related to the described object.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf t


Question: What are the benefits of kubectl describe?

Answer: kubectl describeSynopsisShow details of a specific resource or group of resources.Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: $ kubectl describe TYPE NAME_PREFIX will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME_PREFIX.Use "kubectl api-resources" for a complete list of supported resources.kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) Examples # Describe a node kubectl describe nodes kubernetes-node-emt8.c.myproject.internal # Describe a pod kubectl describe pods/nginx # Describe a pod identified by type and name in "pod.json" kubectl describe -f pod.json # Describe all pods kubectl describe pods # Describe pods by label name=myLabel kubectl describe pods -l name=myLabel # Describe all pods managed by the 'frontend' replication controller # (rc-created pods get the name of the rc as a prefix in the pod name) kubectl describe pods frontend Options-A, --all-namespacesIf present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.--chunk-size int Default: 500Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.-f, --filename stringsFilename, directory, or URL to files containing the resource to describe-h, --helphelp for describe-k, --kustomize stringProcess the kustomization directory. This flag can't be used together with -f or -R.-R, --recursiveProcess the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.-l, --selector stringSelector (label query) to filter on, supports '=', '==', '!=', 'in', 'notin'.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.--show-events Default: trueIf true, display events related to the described object.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf t


Question: What is Synopsis?

Answer: S h o w   d e t a i l s   o f   a   s p e c i f i c   r e s o u r c e   o r   g r o u p   o f   r e s o u r c e s .   P r i n t   a   d e t a i l e d   d e s c r i p t i o n   o f   t h e   s e l e c t e d   r e s o u r c e s ,   i n c l u d i n g   r e l a t e d   r e s o u r c e s   s u c h   a s   e v e n t s   o r   c o n t r o l l e r s .   Y o u   m a y   s e l e c t   a   s i n g l e   o b j e c t   b y   n a m e ,   a l l   o b j e c t s   o f   t h a t   t y p e ,   p r o v i d e   a   n a m e   p r e f i x ,   o r   l a b e l   s e l e c t o r .   F o r   e x a m p l e :   $   k u b e c t l   d e s c r i b e   T Y P E   N A M E _ P R E F I X   w i l l   f i r s t   c h e c k   f o r   a n   e x a c t   m a t c h   o n   T Y P E   a n d   N A M E _ P R E F I X .   I f   n o   s u c h   r e s o u r c e   e x i s t s ,   i t   w i l l   o u t p u t   d e t a i l s   f o r   e v e r y   r e s o u r c e   t h a t   h a s   a   n a m e   p r e f i x e d   w i t h   N A M E _ P R E F I X .   U s e   " k u b e c t l   a p i - r e s o u r c e s "   f o r   a   c o m p l e t e   l i s t   o f   s u p p o r t e d   r e s o u r c e s .   k u b e c t l   d e s c r i b e   ( - f   F I L E N A M E   |   T Y P E   [ N A M E _ P R E F I X   |   - l   l a b e l ]   |   T Y P E / N A M E )


Question: What is Examples?

Answer: #   D e s c r i b e   a   n o d e   k u b e c t l   d e s c r i b e   n o d e s   k u b e r n e t e s - n o d e - e m t 8 . c . m y p r o j e c t . i n t e r n a l   #   D e s c r i b e   a   p o d   k u b e c t l   d e s c r i b e   p o d s / n g i n x   #   D e s c r i b e   a   p o d   i d e n t i f i e d   b y   t y p e   a n d   n a m e   i n   " p o d . j s o n "   k u b e c t l   d e s c r i b e   - f   p o d . j s o n   #   D e s c r i b e   a l l   p o d s   k u b e c t l   d e s c r i b e   p o d s   #   D e s c r i b e   p o d s   b y   l a b e l   n a m e = m y L a b e l   k u b e c t l   d e s c r i b e   p o d s   - l   n a m e = m y L a b e l   #   D e s c r i b e   a l l   p o d s   m a n a g e d   b y   t h e   ' f r o n t e n d '   r e p l i c a t i o n   c o n t r o l l e r   #   ( r c - c r e a t e d   p o d s   g e t   t h e   n a m e   o f   t h e   r c   a s   a   p r e f i x   i n   t h e   p o d   n a m e )   k u b e c t l   d e s c r i b e   p o d s   f r o n t e n d


Question: What is Options?

Answer: I f   p r e s e n t ,   l i s t   t h e   r e q u e s t e d   o b j e c t ( s )   a c r o s s   a l l   n a m e s p a c e s .   N a m e s p a c e   i n   c u r r e n t   c o n t e x t   i s   i g n o r e d   e v e n   i f   s p e c i f i e d   w i t h   - - n a m e s p a c e .   R e t u r n   l a r g e   l i s t s   i n   c h u n k s   r a t h e r   t h a n   a l l   a t   o n c e .   P a s s   0   t o   d i s a b l e .   T h i s   f l a g   i s   b e t a   a n d   m a y   c h a n g e   i n   t h e   f u t u r e .   F i l e n a m e ,   d i r e c t o r y ,   o r   U R L   t o   f i l e s   c o n t a i n i n g   t h e   r e s o u r c e   t o   d e s c r i b e   h e l p   f o r   d e s c r i b e   P r o c e s s   t h e   k u s t o m i z a t i o n   d i r e c t o r y .   T h i s   f l a g   c a n ' t   b e   u s e d   t o g e t h e r   w i t h   - f   o r   - R .   P r o c e s s   t h e   d i r e c t o r y   u s e d   i n   - f ,   - - f i l e n a m e   r e c u r s i v e l y .   U s e f u l   w h e n   y o u   w a n t   t o   m a n a g e   r e l a t e d   m a n i f e s t s   o r g a n i z e d   w i t h i n   t h e   s a m e   d i r e c t o r y .   S e l e c t o r   ( l a b e l   q u e r y )   t o   f i l t e r   o n ,   s u p p o r t s   ' = ' ,   ' = = ' ,   ' ! = ' ,   ' i n ' ,   ' n o t i n ' . ( e . g .   - l   k e y 1 = v a l u e 1 , k e y 2 = v a l u e 2 , k e y 3   i n   ( v a l u e 3 ) ) .   M a t c h i n g   o b j e c t s   m u s t   s a t i s f y   a l l   o f   t h e   s p e c i f i e d   l a b e l   c o n s t r a i n t s .   I f   t r u e ,   d i s p l a y   e v e n t s   r e l a t e d   t o   t h e   d e s c r i b e d   o b j e c t .


Question: What is Parent Options Inherited?

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


Question: What is See Also?

Answer: k u b e c t l   -   k u b e c t l   c o n t r o l s   t h e   K u b e r n e t e s   c l u s t e r   m a n a g e r   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 Mapping PodSecurityPolicies to Pod Security Standards?

Answer: Mapping PodSecurityPolicies to Pod Security StandardsThe tables below enumerate the configuration parameters on PodSecurityPolicy objects, whether the field mutates and/or validates pods, and how the configuration values map to the Pod Security Standards.For each applicable parameter, the allowed values for the Baseline and Restricted profiles are listed. Anything outside the allowed values for those profiles would fall under the Privileged profile. "No opinion" means all values are allowed under all Pod Security Standards.For a step-by-step migration guide, see Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller.PodSecurityPolicy SpecThe fields enumerated in this table are part of the PodSecurityPolicySpec, which is specified under the .spec field path.Mapping PodSecurityPolicySpec fields to Pod Security StandardsPodSecurityPolicySpecTypePod Security Standards EquivalentprivilegedValidatingBaseline & Restricted: false / undefined / nildefaultAddCapabilitiesMutating & ValidatingRequirements match allowedCapabilities below.allowedCapabilitiesValidatingBaseline: subset ofAUDIT_WRITECHOWNDAC_OVERRIDEFOWNERFSETIDKILLMKNODNET_BIND_SERVICESETFCAPSETGIDSETPCAPSETUIDSYS_CHROOTRestricted: empty / undefined / nil OR a list containing only NET_BIND_SERVICErequiredDropCapabilitiesMutating & ValidatingBaseline: no opinionRestricted: must include ALLvolumesValidatingBaseline: anything excepthostPath*Restricted: subset ofconfigMapcsidownwardAPIemptyDirephemeralpersistentVolumeClaimprojectedsecrethostNetworkValidatingBaseline & Restricted: false / undefined / nilhostPortsValidatingBaseline & Restricted: undefined / nil / emptyhostPIDValidatingBaseline & Restricted: false / undefined / nilhostIPCValidatingBaseline & Restricted: false / undefined / nilseLinuxMutating & ValidatingBaseline & Restricted: seLinux.rule is MustRunAs, with the following optionsuser is unset ("" / undefined / nil)role is unset ("" / undefined / nil)type is unset or one of: container_t, container_init_t, container_kvm_t, container_engine_tlevel is anythingrunAsUserMutating & ValidatingBaseline: AnythingRestricted: rule is MustRunAsNonRootrunAsGroupMutating (MustRunAs) & ValidatingNo opinionsupplementalGroupsMutating & ValidatingNo opinionfsGroupMutating & ValidatingNo opinionreadOnlyRootFilesystemMutating & ValidatingNo opiniondefaultAllowPrivilegeEscalationMutatingNo opinion (non-validating)allowPrivilegeEscalationMutating & ValidatingOnly mutating if set to falseBaseline: No opinionRestricted: falseallowedHostPathsValidatingNo opinion (volumes takes precedence)allowedFlexVolumesValidatingNo opinion (volumes takes precedence)allowedCSIDriversValidatingNo opinion (volumes takes precedence)allowedUnsafeSysctlsValidatingBaseline & Restricted: undefined / nil / emptyforbiddenSysctlsValidatingNo opinionallowedProcMountTypes(alpha feature)ValidatingBaseline & Restricted: ["Default"] OR undefined / nil / emptyruntimeClass .defaultRuntimeClassNameMutatingNo opinionrunt


Question: How does Mapping PodSecurityPolicies to Pod Security Standards work?

Answer: Mapping PodSecurityPolicies to Pod Security StandardsThe tables below enumerate the configuration parameters on PodSecurityPolicy objects, whether the field mutates and/or validates pods, and how the configuration values map to the Pod Security Standards.For each applicable parameter, the allowed values for the Baseline and Restricted profiles are listed. Anything outside the allowed values for those profiles would fall under the Privileged profile. "No opinion" means all values are allowed under all Pod Security Standards.For a step-by-step migration guide, see Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller.PodSecurityPolicy SpecThe fields enumerated in this table are part of the PodSecurityPolicySpec, which is specified under the .spec field path.Mapping PodSecurityPolicySpec fields to Pod Security StandardsPodSecurityPolicySpecTypePod Security Standards EquivalentprivilegedValidatingBaseline & Restricted: false / undefined / nildefaultAddCapabilitiesMutating & ValidatingRequirements match allowedCapabilities below.allowedCapabilitiesValidatingBaseline: subset ofAUDIT_WRITECHOWNDAC_OVERRIDEFOWNERFSETIDKILLMKNODNET_BIND_SERVICESETFCAPSETGIDSETPCAPSETUIDSYS_CHROOTRestricted: empty / undefined / nil OR a list containing only NET_BIND_SERVICErequiredDropCapabilitiesMutating & ValidatingBaseline: no opinionRestricted: must include ALLvolumesValidatingBaseline: anything excepthostPath*Restricted: subset ofconfigMapcsidownwardAPIemptyDirephemeralpersistentVolumeClaimprojectedsecrethostNetworkValidatingBaseline & Restricted: false / undefined / nilhostPortsValidatingBaseline & Restricted: undefined / nil / emptyhostPIDValidatingBaseline & Restricted: false / undefined / nilhostIPCValidatingBaseline & Restricted: false / undefined / nilseLinuxMutating & ValidatingBaseline & Restricted: seLinux.rule is MustRunAs, with the following optionsuser is unset ("" / undefined / nil)role is unset ("" / undefined / nil)type is unset or one of: container_t, container_init_t, container_kvm_t, container_engine_tlevel is anythingrunAsUserMutating & ValidatingBaseline: AnythingRestricted: rule is MustRunAsNonRootrunAsGroupMutating (MustRunAs) & ValidatingNo opinionsupplementalGroupsMutating & ValidatingNo opinionfsGroupMutating & ValidatingNo opinionreadOnlyRootFilesystemMutating & ValidatingNo opiniondefaultAllowPrivilegeEscalationMutatingNo opinion (non-validating)allowPrivilegeEscalationMutating & ValidatingOnly mutating if set to falseBaseline: No opinionRestricted: falseallowedHostPathsValidatingNo opinion (volumes takes precedence)allowedFlexVolumesValidatingNo opinion (volumes takes precedence)allowedCSIDriversValidatingNo opinion (volumes takes precedence)allowedUnsafeSysctlsValidatingBaseline & Restricted: undefined / nil / emptyforbiddenSysctlsValidatingNo opinionallowedProcMountTypes(alpha feature)ValidatingBaseline & Restricted: ["Default"] OR undefined / nil / emptyruntimeClass .defaultRuntimeClassNameMutatingNo opinionrunt