Question: What is Pod OS?

Answer: Y o u   s h o u l d   s e t   t h e   . s p e c . o s . n a m e   f i e l d   t o   e i t h e r   w i n d o w s   o r   l i n u x   t o   i n d i c a t e   t h e   O S   o n   w h i c h   y o u   w a n t   t h e   p o d   t o   r u n .   T h e s e   t w o   a r e   t h e   o n l y   o p e r a t i n g   s y s t e m s   s u p p o r t e d   f o r   n o w   b y   K u b e r n e t e s .   I n   t h e   f u t u r e ,   t h i s   l i s t   m a y   b e   e x p a n d e d .   I n   K u b e r n e t e s   v 1 . 3 4 ,   t h e   v a l u e   o f   . s p e c . o s . n a m e   d o e s   n o t   a f f e c t   h o w   t h e   k u b e - s c h e d u l e r   p i c k s   a   n o d e   f o r   t h e   P o d   t o   r u n   o n .   I n   a n y   c l u s t e r   w h e r e   t h e r e   i s   m o r e   t h a n   o n e   o p e r a t i n g   s y s t e m   f o r   r u n n i n g   n o d e s ,   y o u   s h o u l d   s e t   t h e   k u b e r n e t e s . i o / o s   l a b e l   c o r r e c t l y   o n   e a c h   n o d e ,   a n d   d e f i n e   p o d s   w i t h   a   n o d e S e l e c t o r   b a s e d   o n   t h e   o p e r a t i n g   s y s t e m   l a b e l .   T h e   k u b e - s c h e d u l e r   a s s i g n s   y o u r   p o d   t o   a   n o d e   b a s e d   o n   o t h e r   c r i t e r i a   a n d   m a y   o r   m a y   n o t   s u c c e e d   i n   p i c k i n g   a   s u i t a b l e   n o d e   p l a c e m e n t   w h e r e   t h e   n o d e   O S   i s   r i g h t   f o r   t h e   c o n t a i n e r s   i n   t h a t   P o d .   T h e   P o d   s e c u r i t y   s t a n d a r d s   a l s o   u s e   t h i s   f i e l d   t o   a v o i d   e n f o r c i n g   p o l i c i e s   t h a t   a r e n ' t   r e l e v a n t   t o   t h e   o p e r a t i n g   s y s t e m .


Question: What is Pods and controllers?

Answer: Y o u   c a n   u s e   w o r k l o a d   r e s o u r c e s   t o   c r e a t e   a n d   m a n a g e   m u l t i p l e   P o d s   f o r   y o u .   A   c o n t r o l l e r   f o r   t h e   r e s o u r c e   h a n d l e s   r e p l i c a t i o n   a n d   r o l l o u t   a n d   a u t o m a t i c   h e a l i n g   i n   c a s e   o f   P o d   f a i l u r e .   F o r   e x a m p l e ,   i f   a   N o d e   f a i l s ,   a   c o n t r o l l e r   n o t i c e s   t h a t   P o d s   o n   t h a t   N o d e   h a v e   s t o p p e d   w o r k i n g   a n d   c r e a t e s   a   r e p l a c e m e n t   P o d .   T h e   s c h e d u l e r   p l a c e s   t h e   r e p l a c e m e n t   P o d   o n t o   a   h e a l t h y   N o d e .   H e r e   a r e   s o m e   e x a m p l e s   o f   w o r k l o a d   r e s o u r c e s   t h a t   m a n a g e   o n e   o r   m o r e   P o d s :   D e p l o y m e n t S t a t e f u l S e t D a e m o n S e t


Question: What is Pod templates?

Answer: C o n t r o l l e r s   f o r   w o r k l o a d   r e s o u r c e s   c r e a t e   P o d s   f r o m   a   p o d   t e m p l a t e   a n d   m a n a g e   t h o s e   P o d s   o n   y o u r   b e h a l f .   P o d T e m p l a t e s   a r e   s p e c i f i c a t i o n s   f o r   c r e a t i n g   P o d s ,   a n d   a r e   i n c l u d e d   i n   w o r k l o a d   r e s o u r c e s   s u c h   a s   D e p l o y m e n t s ,   J o b s ,   a n d   D a e m o n S e t s .   E a c h   c o n t r o l l e r   f o r   a   w o r k l o a d   r e s o u r c e   u s e s   t h e   P o d T e m p l a t e   i n s i d e   t h e   w o r k l o a d   o b j e c t   t o   m a k e   a c t u a l   P o d s .   T h e   P o d T e m p l a t e   i s   p a r t   o f   t h e   d e s i r e d   s t a t e   o f   w h a t e v e r   w o r k l o a d   r e s o u r c e   y o u   u s e d   t o   r u n   y o u r   a p p .   W h e n   y o u   c r e a t e   a   P o d ,   y o u   c a n   i n c l u d e   e n v i r o n m e n t   v a r i a b l e s   i n   t h e   P o d   t e m p l a t e   f o r   t h e   c o n t a i n e r s   t h a t   r u n   i n   t h e   P o d .   T h e   s a m p l e   b e l o w   i s   a   m a n i f e s t   f o r   a   s i m p l e   J o b   w i t h   a   t e m p l a t e   t h a t   s t a r t s   o n e   c o n t a i n e r .   T h e   c o n t a i n e r   i n   t h a t   P o d   p r i n t s   a   m e s s a g e   t h e n   p a u s e s .   a p i V e r s i o n :   b a t c h / v 1   k i n d :   J o b   m e t a d a t a :   n a m e :   h e l l o   s p e c :   t e m p l a t e :   #   T h i s   i s   t h e   p o d   t e m p l a t e   s p e c :   c o n t a i n e r s :   -   n a m e :   h e l l o   i m a g e :   b u s y b o x : 1 . 2 8   c o m m a n d :   [ ' s h ' ,   ' - c ' ,   ' e c h o   " H e l l o ,   K u b e r n e t e s ! "   & &   s l e e p   3 6 0 0 ' ]   r e s t a r t P o l i c y :   O n F a i l u r e   #   T h e   p o d   t e m p l a t e   e n d s   h e r e   M o d i f y i n g   t h e   p o d


Question: What is Pod update and replacement?

Answer: A s   m e n t i o n e d   i n   t h e   p r e v i o u s   s e c t i o n ,   w h e n   t h e   P o d   t e m p l a t e   f o r   a   w o r k l o a d   r e s o u r c e   i s   c h a n g e d ,   t h e   c o n t r o l l e r   c r e a t e s   n e w   P o d s   b a s e d   o n   t h e   u p d a t e d   t e m p l a t e   i n s t e a d   o f   u p d a t i n g   o r   p a t c h i n g   t h e   e x i s t i n g   P o d s .   K u b e r n e t e s   d o e s n ' t   p r e v e n t   y o u   f r o m   m a n a g i n g   P o d s   d i r e c t l y .   I t   i s   p o s s i b l e   t o   u p d a t e   s o m e   f i e l d s   o f   a   r u n n i n g   P o d ,   i n   p l a c e .   H o w e v e r ,   P o d   u p d a t e   o p e r a t i o n s   l i k e   p a t c h ,   a n d   r e p l a c e   h a v e   s o m e   l i m i t a t i o n s :   M o s t   o f   t h e   m e t a d a t a   a b o u t   a   P o d   i s   i m m u t a b l e .   F o r   e x a m p l e ,   y o u   c a n n o t   c h a n g e   t h e   n a m e s p a c e ,   n a m e ,   u i d ,   o r   c r e a t i o n T i m e s t a m p   f i e l d s . I f   t h e   m e t a d a t a . d e l e t i o n T i m e s t a m p   i s   s e t ,   n o   n e w   e n t r y   c a n   b e   a d d e d   t o   t h e   m e t a d a t a . f i n a l i z e r s   l i s t . P o d   u p d a t e s   m a y   n o t   c h a n g e   f i e l d s   o t h e r   t h a n   s p e c . c o n t a i n e r s [ * ] . i m a g e ,   s p e c . i n i t C o n t a i n e r s [ * ] . i m a g e ,   s p e c . a c t i v e D e a d l i n e S e c o n d s ,   s p e c . t e r m i n a t i o n G r a c e P e r i o d S e c o n d s ,   s p e c . t o l e r a t i o n s   o r   s p e c . s c h e d u l i n g G a t e s .   F o r   s p e c . t o l e r a t i o n s ,   y o u   c a n   o n l y   a d d   n e w   e n t r i e s . W h e n   u p d a t i n g   t h e   s p e c . a c t i v e D e a d l i n e S e c o n d s   f i e l d ,   t w o   t y p e s   o f   u p d a t e s   a r e   a l l o w e d : s e t t i n g   t h e   u


Question: What is Pod subresources?

Answer: T h e   a b o v e   u p d a t e   r u l e s   a p p l y   t o   r e g u l a r   p o d   u p d a t e s ,   b u t   o t h e r   p o d   f i e l d s   c a n   b e   u p d a t e d   t h r o u g h   s u b r e s o u r c e s .   R e s i z e :   T h e   r e s i z e   s u b r e s o u r c e   a l l o w s   c o n t a i n e r   r e s o u r c e s   ( s p e c . c o n t a i n e r s [ * ] . r e s o u r c e s )   t o   b e   u p d a t e d .   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   f o r   m o r e   d e t a i l s . E p h e m e r a l   C o n t a i n e r s :   T h e   e p h e m e r a l C o n t a i n e r s   s u b r e s o u r c e   a l l o w s   e p h e m e r a l   c o n t a i n e r s   t o   b e   a d d e d   t o   a   P o d .   S e e   E p h e m e r a l   C o n t a i n e r s   f o r   m o r e   d e t a i l s . S t a t u s :   T h e   s t a t u s   s u b r e s o u r c e   a l l o w s   t h e   p o d   s t a t u s   t o   b e   u p d a t e d .   T h i s   i s   t y p i c a l l y   o n l y   u s e d   b y   t h e   K u b e l e t   a n d   o t h e r   s y s t e m   c o n t r o l l e r s . B i n d i n g :   T h e   b i n d i n g   s u b r e s o u r c e   a l l o w s   s e t t i n g   t h e   p o d ' s   s p e c . n o d e N a m e   v i a   a   B i n d i n g   r e q u e s t .   T h i s   i s   t y p i c a l l y   o n l y   u s e d   b y   t h e   s c h e d u l e r .


Question: What is Pod generation?

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


Question: What is Note:?

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


Question: What is Direct Status Updates?

Answer: F o r   s t a t u s   f i e l d s   w h e r e   t h e   a l l o c a t e d   s p e c   i s   d i r e c t l y   r e f l e c t e d ,   t h e   o b s e r v e d G e n e r a t i o n   w i l l   b e   a s s o c i a t e d   w i t h   t h e   c u r r e n t   m e t a d a t a . g e n e r a t i o n   ( G e n e r a t i o n   N ) .   T h i s   b e h a v i o r   a p p l i e s   t o :   R e s i z e   S t a t u s :   T h e   s t a t u s   o f   a   r e s o u r c e   r e s i z e   o p e r a t i o n . A l l o c a t e d   R e s o u r c e s :   T h e   r e s o u r c e s   a l l o c a t e d   t o   t h e   P o d   a f t e r   a   r e s i z e . E p h e m e r a l   C o n t a i n e r s :   W h e n   a   n e w   e p h e m e r a l   c o n t a i n e r   i s   a d d e d ,   a n d   i t   i s   i n   W a i t i n g   s t a t e .


Question: What is Indirect Status Updates?

Answer: F o r   s t a t u s   f i e l d s   t h a t   a r e   a n   i n d i r e c t   r e s u l t   o f   r u n n i n g   t h e   s p e c ,   t h e   o b s e r v e d G e n e r a t i o n   w i l l   b e   a s s o c i a t e d   w i t h   t h e   m e t a d a t a . g e n e r a t i o n   o f   t h e   p r e v i o u s   s y n c   l o o p   ( G e n e r a t i o n   N - 1 ) .   T h i s   b e h a v i o r   a p p l i e s   t o :   C o n t a i n e r   I m a g e :   T h e   C o n t a i n e r S t a t u s . I m a g e I D   r e f l e c t s   t h e   i m a g e   f r o m   t h e   p r e v i o u s   g e n e r a t i o n   u n t i l   t h e   n e w   i m a g e   i s   p u l l e d   a n d   t h e   c o n t a i n e r   i s   u p d a t e d . A c t u a l   R e s o u r c e s :   D u r i n g   a n   i n - p r o g r e s s   r e s i z e ,   t h e   a c t u a l   r e s o u r c e s   i n   u s e   s t i l l   b e l o n g   t o   t h e   p r e v i o u s   g e n e r a t i o n ' s   r e q u e s t . C o n t a i n e r   s t a t e :   D u r i n g   a n   i n - p r o g r e s s   r e s i z e ,   w i t h   r e q u i r e   r e s t a r t   p o l i c y   r e f l e c t s   t h e   p r e v i o u s   g e n e r a t i o n ' s   r e q u e s t . a c t i v e D e a d l i n e S e c o n d s   &   t e r m i n a t i o n G r a c e P e r i o d S e c o n d s   &   d e l e t i o n T i m e s t a m p :   T h e   e f f e c t s   o f   t h e s e   f i e l d s   o n   t h e   P o d ' s   s t a t u s   a r e   a   r e s u l t   o f   t h e   p r e v i o u s l y   o b s e r v e d   s p e c i f i c a t i o n .


Question: What is Resource sharing and communication?

Answer: P o d s   e n a b l e   d a t a   s h a r i n g   a n d   c o m m u n i c a t i o n   a m o n g   t h e i r   c o n s t i t u e n t   c o n t a i n e r s .


Question: What is Storage in Pods?

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


Question: What is Pod networking?

Answer: E a c h   P o d   i s   a s s i g n e d   a   u n i q u e   I P   a d d r e s s   f o r   e a c h   a d d r e s s   f a m i l y .   E v e r y   c o n t a i n e r   i n   a   P o d   s h a r e s   t h e   n e t w o r k   n a m e s p a c e ,   i n c l u d i n g   t h e   I P   a d d r e s s   a n d   n e t w o r k   p o r t s .   I n s i d e   a   P o d   ( a n d   o n l y   t h e n ) ,   t h e   c o n t a i n e r s   t h a t   b e l o n g   t o   t h e   P o d   c a n   c o m m u n i c a t e   w i t h   o n e   a n o t h e r   u s i n g   l o c a l h o s t .   W h e n   c o n t a i n e r s   i n   a   P o d   c o m m u n i c a t e   w i t h   e n t i t i e s   o u t s i d e   t h e   P o d ,   t h e y   m u s t   c o o r d i n a t e   h o w   t h e y   u s e   t h e   s h a r e d   n e t w o r k   r e s o u r c e s   ( s u c h   a s   p o r t s ) .   W i t h i n   a   P o d ,   c o n t a i n e r s   s h a r e   a n   I P   a d d r e s s   a n d   p o r t   s p a c e ,   a n d   c a n   f i n d   e a c h   o t h e r   v i a   l o c a l h o s t .   T h e   c o n t a i n e r s   i n   a   P o d   c a n   a l s o   c o m m u n i c a t e   w i t h   e a c h   o t h e r   u s i n g   s t a n d a r d   i n t e r - p r o c e s s   c o m m u n i c a t i o n s   l i k e   S y s t e m V   s e m a p h o r e s   o r   P O S I X   s h a r e d   m e m o r y .   C o n t a i n e r s   i n   d i f f e r e n t   P o d s   h a v e   d i s t i n c t   I P   a d d r e s s e s   a n d   c a n   n o t   c o m m u n i c a t e   b y   O S - l e v e l   I P C   w i t h o u t   s p e c i a l   c o n f i g u r a t i o n .   C o n t a i n e r s   t h a t   w a n t   t o   i n t e r a c t   w i t h   a   c o n t a i n e r   r u n n i n g   i n   a   d i f f e r e n t   P o d   c a n   u s e   I P   n e t w o r k i n g   t o   c o m m u n i c a t e .   C o n t a i n e r s   w i t h i n   t h e   P o d   s e e   t h e   s y s t e m   h o s t n a m e   a s   b e i n g   t h e   s a m e   a s   t h e


Question: What is Pod security settings?

Answer: T o   s e t   s e c u r i t y   c o n s t r a i n t s   o n   P o d s   a n d   c o n t a i n e r s ,   y o u   u s e   t h e   s e c u r i t y C o n t e x t   f i e l d   i n   t h e   P o d   s p e c i f i c a t i o n .   T h i s   f i e l d   g i v e s   y o u   g r a n u l a r   c o n t r o l   o v e r   w h a t   a   P o d   o r   i n d i v i d u a l   c o n t a i n e r s   c a n   d o .   F o r   e x a m p l e :   D r o p   s p e c i f i c   L i n u x   c a p a b i l i t i e s   t o   a v o i d   t h e   i m p a c t   o f   a   C V E . F o r c e   a l l   p r o c e s s e s   i n   t h e   P o d   t o   r u n   a s   a   n o n - r o o t   u s e r   o r   a s   a   s p e c i f i c   u s e r   o r   g r o u p   I D . S e t   a   s p e c i f i c   s e c c o m p   p r o f i l e . S e t   W i n d o w s   s e c u r i t y   o p t i o n s ,   s u c h   a s   w h e t h e r   c o n t a i n e r s   r u n   a s   H o s t P r o c e s s .


Question: What is Caution:?

Answer: T o   l e a r n   a b o u t   k e r n e l - l e v e l   s e c u r i t y   c o n s t r a i n t s   t h a t   y o u   c a n   u s e ,   s e e   L i n u x   k e r n e l   s e c u r i t y   c o n s t r a i n t s   f o r   P o d s   a n d   c o n t a i n e r s . T o   l e a r n   m o r e   a b o u t   t h e   P o d   s e c u r i t y   c o n t e x t ,   s e e   C o n f i g u r e   a   S e c u r i t y   C o n t e x t   f o r   a   P o d   o r   C o n t a i n e r .


Question: What is Static Pods?

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


Question: What is Pods with multiple containers?

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


Question: What is Container probes?

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


Question: What is What's next?

Answer: L e a r n   a b o u t   t h e   l i f e c y c l e   o f   a   P o d . L e a r n   a b o u t   R u n t i m e C l a s s   a n d   h o w   y o u   c a n   u s e   i t   t o   c o n f i g u r e   d i f f e r e n t   P o d s   w i t h   d i f f e r e n t   c o n t a i n e r   r u n t i m e   c o n f i g u r a t i o n s . R e a d   a b o u t   P o d D i s r u p t i o n B u d g e t   a n d   h o w   y o u   c a n   u s e   i t   t o   m a n a g e   a p p l i c a t i o n   a v a i l a b i l i t y   d u r i n g   d i s r u p t i o n s . P o d   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 .   T h e   P o d   o b j e c t   d e f i n i t i o n   d e s c r i b e s   t h e   o b j e c t   i n   d e t a i l . T h e   D i s t r i b u t e d   S y s t e m   T o o l k i t :   P a t t e r n s   f o r   C o m p o s i t e   C o n t a i n e r s   e x p l a i n s   c o m m o n   l a y o u t s   f o r   P o d s   w i t h   m o r e   t h a n   o n e   c o n t a i n e r . R e a d   a b o u t   P o d   t o p o l o g y   s p r e a d   c o n s t r a i n t s   T o   u n d e r s t a n d   t h e   c o n t e x t   f o r   w h y   K u b e r n e t e s   w r a p s   a   c o m m o n   P o d   A P I   i n   o t h e r   r e s o u r c e s   ( s u c h   a s   S t a t e f u l S e t s   o r   D e p l o y m e n t s ) ,   y o u   c a n   r e a d   a b o u t   t h e   p r i o r   a r t ,   i n c l u d i n g :   A u r o r a B o r g M a r a t h o n O m e g a T u p p e r w a r e .


Question: What is ReplicationController?

Answer: ReplicationControllerLegacy API for managing workloads that can scale horizontally. Superseded by the Deployment and ReplicaSet APIs.Note:A Deployment that configures a ReplicaSet is now the recommended way to set up replication.A ReplicationController ensures that a specified number of pod replicas are running at any one time. In other words, a ReplicationController makes sure that a pod or a homogeneous set of pods is always up and available.How a ReplicationController worksIf there are too many pods, the ReplicationController terminates the extra pods. If there are too few, the ReplicationController starts more pods. Unlike manually created pods, the pods maintained by a ReplicationController are automatically replaced if they fail, are deleted, or are terminated. For example, your pods are re-created on a node after disruptive maintenance such as a kernel upgrade. For this reason, you should use a ReplicationController even if your application requires only a single pod. A ReplicationController is similar to a process supervisor, but instead of supervising individual processes on a single node, the ReplicationController supervises multiple pods across multiple nodes.ReplicationController is often abbreviated to "rc" in discussion, and as a shortcut in kubectl commands.A simple case is to create one ReplicationController object to reliably run one instance of a Pod indefinitely. A more complex use case is to run several identical replicas of a replicated service, such as web servers.Running an example ReplicationControllerThis example ReplicationController config runs three copies of the nginx web server.controllers/replication.yaml apiVersion: v1 kind: ReplicationController metadata: name: nginx spec: replicas: 3 selector: app: nginx template: metadata: name: nginx labels: app: nginx spec: containers: - name: nginx image: nginx ports: - containerPort: 80 Run the example job by downloading the example file and then running this command:kubectl apply -f https://k8s.io/examples/controllers/replication.yaml The output is similar to this:replicationcontroller/nginx created Check on the status of the ReplicationController using this command:kubectl describe replicationcontrollers/nginx The output is similar to this:Name: nginx Namespace: default Selector: app=nginx Labels: app=nginx Annotations: <none> Replicas: 3 current / 3 desired Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: app=nginx Containers: nginx: Image: nginx Port: 80/TCP Environment: <none> Mounts: <none> Volumes: <none> Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- ---- ------ ------- 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-qrm3m 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-3ntk0 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-4ok8v Here, three pods are created, but none is runni


Question: How does ReplicationController work?

Answer: ReplicationControllerLegacy API for managing workloads that can scale horizontally. Superseded by the Deployment and ReplicaSet APIs.Note:A Deployment that configures a ReplicaSet is now the recommended way to set up replication.A ReplicationController ensures that a specified number of pod replicas are running at any one time. In other words, a ReplicationController makes sure that a pod or a homogeneous set of pods is always up and available.How a ReplicationController worksIf there are too many pods, the ReplicationController terminates the extra pods. If there are too few, the ReplicationController starts more pods. Unlike manually created pods, the pods maintained by a ReplicationController are automatically replaced if they fail, are deleted, or are terminated. For example, your pods are re-created on a node after disruptive maintenance such as a kernel upgrade. For this reason, you should use a ReplicationController even if your application requires only a single pod. A ReplicationController is similar to a process supervisor, but instead of supervising individual processes on a single node, the ReplicationController supervises multiple pods across multiple nodes.ReplicationController is often abbreviated to "rc" in discussion, and as a shortcut in kubectl commands.A simple case is to create one ReplicationController object to reliably run one instance of a Pod indefinitely. A more complex use case is to run several identical replicas of a replicated service, such as web servers.Running an example ReplicationControllerThis example ReplicationController config runs three copies of the nginx web server.controllers/replication.yaml apiVersion: v1 kind: ReplicationController metadata: name: nginx spec: replicas: 3 selector: app: nginx template: metadata: name: nginx labels: app: nginx spec: containers: - name: nginx image: nginx ports: - containerPort: 80 Run the example job by downloading the example file and then running this command:kubectl apply -f https://k8s.io/examples/controllers/replication.yaml The output is similar to this:replicationcontroller/nginx created Check on the status of the ReplicationController using this command:kubectl describe replicationcontrollers/nginx The output is similar to this:Name: nginx Namespace: default Selector: app=nginx Labels: app=nginx Annotations: <none> Replicas: 3 current / 3 desired Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: app=nginx Containers: nginx: Image: nginx Port: 80/TCP Environment: <none> Mounts: <none> Volumes: <none> Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- ---- ------ ------- 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-qrm3m 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-3ntk0 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-4ok8v Here, three pods are created, but none is runni


Question: When would you use ReplicationController?

Answer: ReplicationControllerLegacy API for managing workloads that can scale horizontally. Superseded by the Deployment and ReplicaSet APIs.Note:A Deployment that configures a ReplicaSet is now the recommended way to set up replication.A ReplicationController ensures that a specified number of pod replicas are running at any one time. In other words, a ReplicationController makes sure that a pod or a homogeneous set of pods is always up and available.How a ReplicationController worksIf there are too many pods, the ReplicationController terminates the extra pods. If there are too few, the ReplicationController starts more pods. Unlike manually created pods, the pods maintained by a ReplicationController are automatically replaced if they fail, are deleted, or are terminated. For example, your pods are re-created on a node after disruptive maintenance such as a kernel upgrade. For this reason, you should use a ReplicationController even if your application requires only a single pod. A ReplicationController is similar to a process supervisor, but instead of supervising individual processes on a single node, the ReplicationController supervises multiple pods across multiple nodes.ReplicationController is often abbreviated to "rc" in discussion, and as a shortcut in kubectl commands.A simple case is to create one ReplicationController object to reliably run one instance of a Pod indefinitely. A more complex use case is to run several identical replicas of a replicated service, such as web servers.Running an example ReplicationControllerThis example ReplicationController config runs three copies of the nginx web server.controllers/replication.yaml apiVersion: v1 kind: ReplicationController metadata: name: nginx spec: replicas: 3 selector: app: nginx template: metadata: name: nginx labels: app: nginx spec: containers: - name: nginx image: nginx ports: - containerPort: 80 Run the example job by downloading the example file and then running this command:kubectl apply -f https://k8s.io/examples/controllers/replication.yaml The output is similar to this:replicationcontroller/nginx created Check on the status of the ReplicationController using this command:kubectl describe replicationcontrollers/nginx The output is similar to this:Name: nginx Namespace: default Selector: app=nginx Labels: app=nginx Annotations: <none> Replicas: 3 current / 3 desired Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: app=nginx Containers: nginx: Image: nginx Port: 80/TCP Environment: <none> Mounts: <none> Volumes: <none> Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- ---- ------ ------- 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-qrm3m 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-3ntk0 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-4ok8v Here, three pods are created, but none is runni


Question: What are the benefits of ReplicationController?

Answer: ReplicationControllerLegacy API for managing workloads that can scale horizontally. Superseded by the Deployment and ReplicaSet APIs.Note:A Deployment that configures a ReplicaSet is now the recommended way to set up replication.A ReplicationController ensures that a specified number of pod replicas are running at any one time. In other words, a ReplicationController makes sure that a pod or a homogeneous set of pods is always up and available.How a ReplicationController worksIf there are too many pods, the ReplicationController terminates the extra pods. If there are too few, the ReplicationController starts more pods. Unlike manually created pods, the pods maintained by a ReplicationController are automatically replaced if they fail, are deleted, or are terminated. For example, your pods are re-created on a node after disruptive maintenance such as a kernel upgrade. For this reason, you should use a ReplicationController even if your application requires only a single pod. A ReplicationController is similar to a process supervisor, but instead of supervising individual processes on a single node, the ReplicationController supervises multiple pods across multiple nodes.ReplicationController is often abbreviated to "rc" in discussion, and as a shortcut in kubectl commands.A simple case is to create one ReplicationController object to reliably run one instance of a Pod indefinitely. A more complex use case is to run several identical replicas of a replicated service, such as web servers.Running an example ReplicationControllerThis example ReplicationController config runs three copies of the nginx web server.controllers/replication.yaml apiVersion: v1 kind: ReplicationController metadata: name: nginx spec: replicas: 3 selector: app: nginx template: metadata: name: nginx labels: app: nginx spec: containers: - name: nginx image: nginx ports: - containerPort: 80 Run the example job by downloading the example file and then running this command:kubectl apply -f https://k8s.io/examples/controllers/replication.yaml The output is similar to this:replicationcontroller/nginx created Check on the status of the ReplicationController using this command:kubectl describe replicationcontrollers/nginx The output is similar to this:Name: nginx Namespace: default Selector: app=nginx Labels: app=nginx Annotations: <none> Replicas: 3 current / 3 desired Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: app=nginx Containers: nginx: Image: nginx Port: 80/TCP Environment: <none> Mounts: <none> Volumes: <none> Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- ---- ------ ------- 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-qrm3m 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-3ntk0 20s 20s 1 {replication-controller } Normal SuccessfulCreate Created pod: nginx-4ok8v Here, three pods are created, but none is runni


Question: What is Note:?

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


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

Answer: ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info.apiVersion: v1import "k8s.io/api/core/v1"ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataconditions ([]ComponentCondition)Patch strategy: merge on key typeMap: unique values on key type will be kept during a mergeList of component conditions observedInformation about the condition of a component.conditions.status (string), requiredStatus of the condition for a component. Valid values for "Healthy": "True", "False", or "Unknown".conditions.type (string), requiredType of condition for a component. Valid value: "Healthy"conditions.error (string)Condition error code for a component. For example, a health check error code.conditions.message (string)Message about the condition for a component. For example, information about a health check.ComponentStatusListStatus of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]ComponentStatus), requiredList of ComponentStatus objects.Operationsget read the specified ComponentStatusHTTP RequestGET /api/v1/componentstatuses/{name}Parametersname (in path): string, requiredname of the ComponentStatuspretty (in query): stringprettyResponse200 (ComponentStatus): OK401: Unauthorizedlist list objects of kind ComponentStatusHTTP RequestGET /api/v1/componentstatusesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (ComponentStatusList): OK401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: How does ComponentStatus work?

Answer: ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info.apiVersion: v1import "k8s.io/api/core/v1"ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataconditions ([]ComponentCondition)Patch strategy: merge on key typeMap: unique values on key type will be kept during a mergeList of component conditions observedInformation about the condition of a component.conditions.status (string), requiredStatus of the condition for a component. Valid values for "Healthy": "True", "False", or "Unknown".conditions.type (string), requiredType of condition for a component. Valid value: "Healthy"conditions.error (string)Condition error code for a component. For example, a health check error code.conditions.message (string)Message about the condition for a component. For example, information about a health check.ComponentStatusListStatus of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]ComponentStatus), requiredList of ComponentStatus objects.Operationsget read the specified ComponentStatusHTTP RequestGET /api/v1/componentstatuses/{name}Parametersname (in path): string, requiredname of the ComponentStatuspretty (in query): stringprettyResponse200 (ComponentStatus): OK401: Unauthorizedlist list objects of kind ComponentStatusHTTP RequestGET /api/v1/componentstatusesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (ComponentStatusList): OK401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: When would you use ComponentStatus?

Answer: ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info.apiVersion: v1import "k8s.io/api/core/v1"ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataconditions ([]ComponentCondition)Patch strategy: merge on key typeMap: unique values on key type will be kept during a mergeList of component conditions observedInformation about the condition of a component.conditions.status (string), requiredStatus of the condition for a component. Valid values for "Healthy": "True", "False", or "Unknown".conditions.type (string), requiredType of condition for a component. Valid value: "Healthy"conditions.error (string)Condition error code for a component. For example, a health check error code.conditions.message (string)Message about the condition for a component. For example, information about a health check.ComponentStatusListStatus of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]ComponentStatus), requiredList of ComponentStatus objects.Operationsget read the specified ComponentStatusHTTP RequestGET /api/v1/componentstatuses/{name}Parametersname (in path): string, requiredname of the ComponentStatuspretty (in query): stringprettyResponse200 (ComponentStatus): OK401: Unauthorizedlist list objects of kind ComponentStatusHTTP RequestGET /api/v1/componentstatusesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (ComponentStatusList): OK401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: What are the benefits of ComponentStatus?

Answer: ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info.apiVersion: v1import "k8s.io/api/core/v1"ComponentStatusComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataconditions ([]ComponentCondition)Patch strategy: merge on key typeMap: unique values on key type will be kept during a mergeList of component conditions observedInformation about the condition of a component.conditions.status (string), requiredStatus of the condition for a component. Valid values for "Healthy": "True", "False", or "Unknown".conditions.type (string), requiredType of condition for a component. Valid value: "Healthy"conditions.error (string)Condition error code for a component. For example, a health check error code.conditions.message (string)Message about the condition for a component. For example, information about a health check.ComponentStatusListStatus of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+apiVersion: v1kind: ComponentStatusListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]ComponentStatus), requiredList of ComponentStatus objects.Operationsget read the specified ComponentStatusHTTP RequestGET /api/v1/componentstatuses/{name}Parametersname (in path): string, requiredname of the ComponentStatuspretty (in query): stringprettyResponse200 (ComponentStatus): OK401: Unauthorizedlist list objects of kind ComponentStatusHTTP RequestGET /api/v1/componentstatusesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (ComponentStatusList): OK401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.


Question: What is ComponentStatus?

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


Question: What is ComponentStatus?

Answer: C o m p o n e n t S t a t u s   ( a n d   C o m p o n e n t S t a t u s L i s t )   h o l d s   t h e   c l u s t e r   v a l i d a t i o n   i n f o .   D e p r e c a t e d :   T h i s   A P I   i s   d e p r e c a t e d   i n   v 1 . 1 9 +   a p i V e r s i o n :   v 1 k i n d :   C o m p o n e n t S t a t u s m e t a d a t a   ( O b j e c t M e t a ) S t a n d a r d   o b j e c t ' s   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # m e t a d a t a c o n d i t i o n s   ( [ ] C o m p o n e n t C o n d i t i o n ) P a t c h   s t r a t e g y :   m e r g e   o n   k e y   t y p e M a p :   u n i q u e   v a l u e s   o n   k e y   t y p e   w i l l   b e   k e p t   d u r i n g   a   m e r g e L i s t   o f   c o m p o n e n t   c o n d i t i o n s   o b s e r v e d I n f o r m a t i o n   a b o u t   t h e   c o n d i t i o n   o f   a   c o m p o n e n t . c o n d i t i o n s . s t a t u s   ( s t r i n g ) ,   r e q u i r e d S t a t u s   o f   t h e   c o n d i t i o n   f o r   a   c o m p o n e n t .   V a l i d   v a l u e s   f o r   " H e a l t h y " :   " T r u e " ,   " F a l s e " ,   o r   " U n k n o w n " . c o n d i t i o n s . t y p e   ( s t r i n g ) ,   r e q u i r e d T y p e   o f   c o n d i t i o n   f o r   a   c o m p o n e n t .   V a l i d   v a l u e :   " H e a l t h y " c o n d i t i o n s . e r r o r   ( s t r i n g ) C o n d i t i o n   e r r o r   c o d e   f o r   a   c o m p o n e n t .   F o r   e x a m p l e ,   a   h e a l t h   c h e c k   e r r o r   c o d e . c o n d i t i o n s . m e s s a g e   ( s t r i n g ) M e s s a g e   a b o u t   t h e   c o n d i t i o n   f o r   a   c o m p o n e n t .   F o r   e x a m p l e ,   i n f o r m a t i o n   a b o u t   a   h e a l t h   c h e c k .   a p i V e r s i o n :   v 1   k i n d :   C o m p o n e n t S t a t u s


Question: What is ComponentStatusList?

Answer: S t a t u s   o f   a l l   t h e   c o n d i t i o n s   f o r   t h e   c o m p o n e n t   a s   a   l i s t   o f   C o m p o n e n t S t a t u s   o b j e c t s .   D e p r e c a t e d :   T h i s   A P I   i s   d e p r e c a t e d   i n   v 1 . 1 9 +   a p i V e r s i o n :   v 1 k i n d :   C o m p o n e n t S t a t u s L i s t m e t a d a t a   ( L i s t M e t a ) S t a n d a r d   l i s t   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # t y p e s - k i n d s i t e m s   ( [ ] C o m p o n e n t S t a t u s ) ,   r e q u i r e d L i s t   o f   C o m p o n e n t S t a t u s   o b j e c t s .   a p i V e r s i o n :   v 1   k i n d :   C o m p o n e n t S t a t u s L i s t   m e t a d a t a   ( L i s t M e t a )   S t a n d a r d   l i s t   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # t y p e s - k i n d s   i t e m s   ( [ ] C o m p o n e n t S t a t u s ) ,   r e q u i r e d   L i s t   o f   C o m p o n e n t S t a t u s   o b j e c t s .


Question: What is HTTP Request?

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


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   C o m p o n e n t S t a t u s p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y   n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e   o f   t h e   C o m p o n e n t S t a t u s   p r e t t y   ( i n   q u e r y ) :   s t r i n g   p r e t t y


Question: What is Response?

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


Question: What is HTTP Request?

Answer: G E T   / a p i / v 1 / c o m p o n e n t s t a t u s e s


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is Configure Quality of Service for Pods?

Answer: Configure Quality of Service for PodsThis page shows how to configure Pods so that they will be assigned particular Quality of Service (QoS) classes. Kubernetes uses QoS classes to make decisions about evicting Pods when Node resources are exceeded.When Kubernetes creates a Pod it assigns one of these QoS classes to the Pod:GuaranteedBurstableBestEffortBefore you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYou also need to be able to create and delete namespaces.Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace qos-example Create a Pod that gets assigned a QoS class of GuaranteedFor a Pod to be given a QoS class of Guaranteed:Every Container in the Pod must have a memory limit and a memory request.For every Container in the Pod, the memory limit must equal the memory request.Every Container in the Pod must have a CPU limit and a CPU request.For every Container in the Pod, the CPU limit must equal the CPU request.These restrictions apply to init containers and app containers equally. Ephemeral containers cannot define resources so these restrictions do not apply.Here is a manifest for a Pod that has one Container. The Container has a memory limit and a memory request, both equal to 200 MiB. The Container has a CPU limit and a CPU request, both equal to 700 milliCPU:pods/qos/qos-pod.yaml apiVersion: v1 kind: Pod metadata: name: qos-demo namespace: qos-example spec: containers: - name: qos-demo-ctr image: nginx resources: limits: memory: "200Mi" cpu: "700m" requests: memory: "200Mi" cpu: "700m" Create the Pod:kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod.yaml --namespace=qos-example View detailed information about the Pod:kubectl get pod qos-demo --namespace=qos-example --output=yaml The output shows that Kubernetes gave the Pod a QoS class of Guaranteed. The output also verifies that the Pod Container has a memory request that matches its memory limit, and it has a CPU request that matches its CPU limit.spec: containers: ... resources: limits: cpu: 700m memory: 200Mi requests: cpu: 700m memory: 200Mi ... status: qosClass: Guaranteed Note:If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit.Clean upDelete your Pod:kubectl delete pod qos-demo --namespace=qos-example Create a Pod that gets assigne


Question: How does Configure Quality of Service for Pods work?

Answer: Configure Quality of Service for PodsThis page shows how to configure Pods so that they will be assigned particular Quality of Service (QoS) classes. Kubernetes uses QoS classes to make decisions about evicting Pods when Node resources are exceeded.When Kubernetes creates a Pod it assigns one of these QoS classes to the Pod:GuaranteedBurstableBestEffortBefore you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYou also need to be able to create and delete namespaces.Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace qos-example Create a Pod that gets assigned a QoS class of GuaranteedFor a Pod to be given a QoS class of Guaranteed:Every Container in the Pod must have a memory limit and a memory request.For every Container in the Pod, the memory limit must equal the memory request.Every Container in the Pod must have a CPU limit and a CPU request.For every Container in the Pod, the CPU limit must equal the CPU request.These restrictions apply to init containers and app containers equally. Ephemeral containers cannot define resources so these restrictions do not apply.Here is a manifest for a Pod that has one Container. The Container has a memory limit and a memory request, both equal to 200 MiB. The Container has a CPU limit and a CPU request, both equal to 700 milliCPU:pods/qos/qos-pod.yaml apiVersion: v1 kind: Pod metadata: name: qos-demo namespace: qos-example spec: containers: - name: qos-demo-ctr image: nginx resources: limits: memory: "200Mi" cpu: "700m" requests: memory: "200Mi" cpu: "700m" Create the Pod:kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod.yaml --namespace=qos-example View detailed information about the Pod:kubectl get pod qos-demo --namespace=qos-example --output=yaml The output shows that Kubernetes gave the Pod a QoS class of Guaranteed. The output also verifies that the Pod Container has a memory request that matches its memory limit, and it has a CPU request that matches its CPU limit.spec: containers: ... resources: limits: cpu: 700m memory: 200Mi requests: cpu: 700m memory: 200Mi ... status: qosClass: Guaranteed Note:If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit.Clean upDelete your Pod:kubectl delete pod qos-demo --namespace=qos-example Create a Pod that gets assigne


Question: When would you use Configure Quality of Service for Pods?

Answer: Configure Quality of Service for PodsThis page shows how to configure Pods so that they will be assigned particular Quality of Service (QoS) classes. Kubernetes uses QoS classes to make decisions about evicting Pods when Node resources are exceeded.When Kubernetes creates a Pod it assigns one of these QoS classes to the Pod:GuaranteedBurstableBestEffortBefore you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYou also need to be able to create and delete namespaces.Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace qos-example Create a Pod that gets assigned a QoS class of GuaranteedFor a Pod to be given a QoS class of Guaranteed:Every Container in the Pod must have a memory limit and a memory request.For every Container in the Pod, the memory limit must equal the memory request.Every Container in the Pod must have a CPU limit and a CPU request.For every Container in the Pod, the CPU limit must equal the CPU request.These restrictions apply to init containers and app containers equally. Ephemeral containers cannot define resources so these restrictions do not apply.Here is a manifest for a Pod that has one Container. The Container has a memory limit and a memory request, both equal to 200 MiB. The Container has a CPU limit and a CPU request, both equal to 700 milliCPU:pods/qos/qos-pod.yaml apiVersion: v1 kind: Pod metadata: name: qos-demo namespace: qos-example spec: containers: - name: qos-demo-ctr image: nginx resources: limits: memory: "200Mi" cpu: "700m" requests: memory: "200Mi" cpu: "700m" Create the Pod:kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod.yaml --namespace=qos-example View detailed information about the Pod:kubectl get pod qos-demo --namespace=qos-example --output=yaml The output shows that Kubernetes gave the Pod a QoS class of Guaranteed. The output also verifies that the Pod Container has a memory request that matches its memory limit, and it has a CPU request that matches its CPU limit.spec: containers: ... resources: limits: cpu: 700m memory: 200Mi requests: cpu: 700m memory: 200Mi ... status: qosClass: Guaranteed Note:If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit.Clean upDelete your Pod:kubectl delete pod qos-demo --namespace=qos-example Create a Pod that gets assigne


Question: What are the benefits of Configure Quality of Service for Pods?

Answer: Configure Quality of Service for PodsThis page shows how to configure Pods so that they will be assigned particular Quality of Service (QoS) classes. Kubernetes uses QoS classes to make decisions about evicting Pods when Node resources are exceeded.When Kubernetes creates a Pod it assigns one of these QoS classes to the Pod:GuaranteedBurstableBestEffortBefore you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYou also need to be able to create and delete namespaces.Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace qos-example Create a Pod that gets assigned a QoS class of GuaranteedFor a Pod to be given a QoS class of Guaranteed:Every Container in the Pod must have a memory limit and a memory request.For every Container in the Pod, the memory limit must equal the memory request.Every Container in the Pod must have a CPU limit and a CPU request.For every Container in the Pod, the CPU limit must equal the CPU request.These restrictions apply to init containers and app containers equally. Ephemeral containers cannot define resources so these restrictions do not apply.Here is a manifest for a Pod that has one Container. The Container has a memory limit and a memory request, both equal to 200 MiB. The Container has a CPU limit and a CPU request, both equal to 700 milliCPU:pods/qos/qos-pod.yaml apiVersion: v1 kind: Pod metadata: name: qos-demo namespace: qos-example spec: containers: - name: qos-demo-ctr image: nginx resources: limits: memory: "200Mi" cpu: "700m" requests: memory: "200Mi" cpu: "700m" Create the Pod:kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod.yaml --namespace=qos-example View detailed information about the Pod:kubectl get pod qos-demo --namespace=qos-example --output=yaml The output shows that Kubernetes gave the Pod a QoS class of Guaranteed. The output also verifies that the Pod Container has a memory request that matches its memory limit, and it has a CPU request that matches its CPU limit.spec: containers: ... resources: limits: cpu: 700m memory: 200Mi requests: cpu: 700m memory: 200Mi ... status: qosClass: Guaranteed Note:If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit.Clean upDelete your Pod:kubectl delete pod qos-demo --namespace=qos-example Create a Pod that gets assigne


Question: What is Configure Quality of Service for Pods?

Answer: T h i s   p a g e   s h o w s   h o w   t o   c o n f i g u r e   P o d s   s o   t h a t   t h e y   w i l l   b e   a s s i g n e d   p a r t i c u l a r   Q u a l i t y   o f   S e r v i c e   ( Q o S )   c l a s s e s .   K u b e r n e t e s   u s e s   Q o S   c l a s s e s   t o   m a k e   d e c i s i o n s   a b o u t   e v i c t i n g   P o d s   w h e n   N o d e   r e s o u r c e s   a r e   e x c e e d e d .   W h e n   K u b e r n e t e s   c r e a t e s   a   P o d   i t   a s s i g n s   o n e   o f   t h e s e   Q o S   c l a s s e s   t o   t h e   P o d :   G u a r a n t e e d B u r s t a b l e B e s t E f f o r t


Question: What is Before you begin?

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


Question: What is Create a namespace?

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


Question: What is Create a Pod that gets assigned a QoS class of Guaranteed?

Answer: F o r   a   P o d   t o   b e   g i v e n   a   Q o S   c l a s s   o f   G u a r a n t e e d :   E v e r y   C o n t a i n e r   i n   t h e   P o d   m u s t   h a v e   a   m e m o r y   l i m i t   a n d   a   m e m o r y   r e q u e s t . F o r   e v e r y   C o n t a i n e r   i n   t h e   P o d ,   t h e   m e m o r y   l i m i t   m u s t   e q u a l   t h e   m e m o r y   r e q u e s t . E v e r y   C o n t a i n e r   i n   t h e   P o d   m u s t   h a v e   a   C P U   l i m i t   a n d   a   C P U   r e q u e s t . F o r   e v e r y   C o n t a i n e r   i n   t h e   P o d ,   t h e   C P U   l i m i t   m u s t   e q u a l   t h e   C P U   r e q u e s t .   T h e s e   r e s t r i c t i o n s   a p p l y   t o   i n i t   c o n t a i n e r s   a n d   a p p   c o n t a i n e r s   e q u a l l y .   E p h e m e r a l   c o n t a i n e r s   c a n n o t   d e f i n e   r e s o u r c e s   s o   t h e s e   r e s t r i c t i o n s   d o   n o t   a p p l y .   H e r e   i s   a   m a n i f e s t   f o r   a   P o d   t h a t   h a s   o n e   C o n t a i n e r .   T h e   C o n t a i n e r   h a s   a   m e m o r y   l i m i t   a n d   a   m e m o r y   r e q u e s t ,   b o t h   e q u a l   t o   2 0 0   M i B .   T h e   C o n t a i n e r   h a s   a   C P U   l i m i t   a n d   a   C P U   r e q u e s t ,   b o t h   e q u a l   t o   7 0 0   m i l l i C P U :   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 :   n a m e :   q o s - d e m o   n a m e s p a c e :   q o s - e x a m p l e   s p e c :   c o n t a i n e r s :   -   n a m e :   q o s - d e m o - c t r   i m a g e :   n g i n x   r e s o u r c e s :   l i m i t s :   m e m o r y :   " 2 0 0 M i "   c p u :   " 7 0 0 m "   r e q u e s t s :   m e m o r y :   " 2 0 0 M i "   c p u :   " 7 0 0 m "   C r e a t e   t h e   P o 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 / p o d s / q o s / q o s - p o d . y a m l   - - n a m e s p


Question: What is Clean up?

Answer: D e l e t e   y o u r   P o d :   k u b e c t l   d e l e t e   p o d   q o s - d e m o   - - n a m e s p a c e = q o s - e x a m p l e


Question: What is Create a Pod that gets assigned a QoS class of Burstable?

Answer: A   P o d   i s   g i v e n   a   Q o S   c l a s s   o f   B u r s t a b l e   i f :   T h e   P o d   d o e s   n o t   m e e t   t h e   c r i t e r i a   f o r   Q o S   c l a s s   G u a r a n t e e d . A t   l e a s t   o n e   C o n t a i n e r   i n   t h e   P o d   h a s   a   m e m o r y   o r   C P U   r e q u e s t   o r   l i m i t .   H e r e   i s   a   m a n i f e s t   f o r   a   P o d   t h a t   h a s   o n e   C o n t a i n e r .   T h e   C o n t a i n e r   h a s   a   m e m o r y   l i m i t   o f   2 0 0   M i B   a n d   a   m e m o r y   r e q u e s t   o f   1 0 0   M i B .   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 :   n a m e :   q o s - d e m o - 2   n a m e s p a c e :   q o s - e x a m p l e   s p e c :   c o n t a i n e r s :   -   n a m e :   q o s - d e m o - 2 - c t r   i m a g e :   n g i n x   r e s o u r c e s :   l i m i t s :   m e m o r y :   " 2 0 0 M i "   r e q u e s t s :   m e m o r y :   " 1 0 0 M i "   C r e a t e   t h e   P o 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 / p o d s / q o s / q o s - p o d - 2 . y a m l   - - n a m e s p a c e = q o s - e x a m p l e   V i e w   d e t a i l e d   i n f o r m a t i o n   a b o u t   t h e   P o d :   k u b e c t l   g e t   p o d   q o s - d e m o - 2   - - n a m e s p a c e = q o s - e x a m p l e   - - o u t p u t = y a m l   T h e   o u t p u t   s h o w s   t h a t   K u b e r n e t e s   g a v e   t h e   P o d   a   Q o S   c l a s s   o f   B u r s t a b l e :   s p e c :   c o n t a i n e r s :   -   i m a g e :   n g i n x   i m a g e P u l l P o l i c y :   A l w a y s   n a m e :   q o s - d e m o - 2 - c t r   r e s o u r c e s :   l i m i t s :   m e m o r y :   2 0 0 M i   r e q u e s t s :   m e m o r y :   1 0 0 M i   . . .   s t a t u s :   q o s C l a s s :   B u r s t a b l e


Question: What is Clean up?

Answer: D e l e t e   y o u r   P o d :   k u b e c t l   d e l e t e   p o d   q o s - d e m o - 2   - - n a m e s p a c e = q o s - e x a m p l e