Question: What is Migrating to cgroup v2?

Answer: T o   m i g r a t e   t o   c g r o u p   v 2 ,   e n s u r e   t h a t   y o u   m e e t   t h e   r e q u i r e m e n t s ,   t h e n   u p g r a d e   t o   a   k e r n e l   v e r s i o n   t h a t   e n a b l e s   c g r o u p   v 2   b y   d e f a u l t .   T h e   k u b e l e t   a u t o m a t i c a l l y   d e t e c t s   t h a t   t h e   O S   i s   r u n n i n g   o n   c g r o u p   v 2   a n d   p e r f o r m s   a c c o r d i n g l y   w i t h   n o   a d d i t i o n a l   c o n f i g u r a t i o n   r e q u i r e d .   T h e r e   s h o u l d   n o t   b e   a n y   n o t i c e a b l e   d i f f e r e n c e   i n   t h e   u s e r   e x p e r i e n c e   w h e n   s w i t c h i n g   t o   c g r o u p   v 2 ,   u n l e s s   u s e r s   a r e   a c c e s s i n g   t h e   c g r o u p   f i l e   s y s t e m   d i r e c t l y ,   e i t h e r   o n   t h e   n o d e   o r   f r o m   w i t h i n   t h e   c o n t a i n e r s .   c g r o u p   v 2   u s e s   a   d i f f e r e n t   A P I   t h a n   c g r o u p   v 1 ,   s o   i f   t h e r e   a r e   a n y   a p p l i c a t i o n s   t h a t   d i r e c t l y   a c c e s s   t h e   c g r o u p   f i l e   s y s t e m ,   t h e y   n e e d   t o   b e   u p d a t e d   t o   n e w e r   v e r s i o n s   t h a t   s u p p o r t   c g r o u p   v 2 .   F o r   e x a m p l e :   S o m e   t h i r d - p a r t y   m o n i t o r i n g   a n d   s e c u r i t y   a g e n t s   m a y   d e p e n d   o n   t h e   c g r o u p   f i l e s y s t e m .   U p d a t e   t h e s e   a g e n t s   t o   v e r s i o n s   t h a t   s u p p o r t   c g r o u p   v 2 . I f   y o u   r u n   c A d v i s o r   a s   a   s t a n d - a l o n e   D a e m o n S e t   f o r   m o n i t o r i n g   p o d s   a n d   c o n t a i n e r s ,   u p d a t e   i t   t o   v 0 . 4 3 . 0   o r   l a t e r . I f   y o u   d e p l o y   J a v a   a p p l i c a t i o n s ,   p r e f e r   t o   u s e   v e r s i o n s   w h i c h   f u l


Question: What is Identify the cgroup version on Linux Nodes?

Answer: T h e   c g r o u p   v e r s i o n   d e p e n d s   o n   t h e   L i n u x   d i s t r i b u t i o n   b e i n g   u s e d   a n d   t h e   d e f a u l t   c g r o u p   v e r s i o n   c o n f i g u r e d   o n   t h e   O S .   T o   c h e c k   w h i c h   c g r o u p   v e r s i o n   y o u r   d i s t r i b u t i o n   u s e s ,   r u n   t h e   s t a t   - f c   % T   / s y s / f s / c g r o u p /   c o m m a n d   o n   t h e   n o d e :   s t a t   - f c   % T   / s y s / f s / c g r o u p /   F o r   c g r o u p   v 2 ,   t h e   o u t p u t   i s   c g r o u p 2 f s .   F o r   c g r o u p   v 1 ,   t h e   o u t p u t   i s   t m p f s .


Question: What is What's next?

Answer: L e a r n   m o r e   a b o u t   c g r o u p s L e a r n   m o r e   a b o u t   c o n t a i n e r   r u n t i m e L e a r n   m o r e   a b o u t   c g r o u p   d r i v e r s


Question: What is 7 - Kubernetes Self-Healing?

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


Question: What is Self-Healing capabilities?

Answer: C o n t a i n e r - l e v e l   r e s t a r t s :   I f   a   c o n t a i n e r   i n s i d e   a   P o d   f a i l s ,   K u b e r n e t e s   r e s t a r t s   i t   b a s e d   o n   t h e   r e s t a r t P o l i c y . R e p l i c a   r e p l a c e m e n t :   I f   a   P o d   i n   a   D e p l o y m e n t   o r   S t a t e f u l S e t   f a i l s ,   K u b e r n e t e s   c r e a t e s   a   r e p l a c e m e n t   P o d   t o   m a i n t a i n   t h e   s p e c i f i e d   n u m b e r   o f   r e p l i c a s .   I f   a   P o d   f a i l s   t h a t   i s   p a r t   o f   a   D a e m o n S e t   f a i l s ,   t h e   c o n t r o l   p l a n e   c r e a t e s   a   r e p l a c e m e n t   P o d   t o   r u n   o n   t h e   s a m e   n o d e . P e r s i s t e n t   s t o r a g e   r e c o v e r y :   I f   a   n o d e   i s   r u n n i n g   a   P o d   w i t h   a   P e r s i s t e n t V o l u m e   ( P V )   a t t a c h e d ,   a n d   t h e   n o d e   f a i l s ,   K u b e r n e t e s   c a n   r e a t t a c h   t h e   v o l u m e   t o   a   n e w   P o d   o n   a   d i f f e r e n t   n o d e . L o a d   b a l a n c i n g   f o r   S e r v i c e s :   I f   a   P o d   b e h i n d   a   S e r v i c e   f a i l s ,   K u b e r n e t e s   a u t o m a t i c a l l y   r e m o v e s   i t   f r o m   t h e   S e r v i c e ' s   e n d p o i n t s   t o   r o u t e   t r a f f i c   o n l y   t o   h e a l t h y   P o d s .   C o n t a i n e r - l e v e l   r e s t a r t s :   I f   a   c o n t a i n e r   i n s i d e   a   P o d   f a i l s ,   K u b e r n e t e s   r e s t a r t s   i t   b a s e d   o n   t h e   r e s t a r t P o l i c y .   R e p l i c a   r e p l a c e m e n t :   I f   a   P o d   i n   a   D e p l o y m e n t   o r   S t a t e f u l S e t   f a i l s ,   K u b e r n e t e s   c r e a t e s   a   r e p l a c e m e n t   P o d   t o   m a i n t a i n   t h e   s p e c i f i e d   n u m b e r   o f   r e p l i c a s .   I f   a   P o d


Question: What is Considerations?

Answer: S t o r a g e   F a i l u r e s :   I f   a   p e r s i s t e n t   v o l u m e   b e c o m e s   u n a v a i l a b l e ,   r e c o v e r y   s t e p s   m a y   b e   r e q u i r e d . A p p l i c a t i o n   E r r o r s :   K u b e r n e t e s   c a n   r e s t a r t   c o n t a i n e r s ,   b u t   u n d e r l y i n g   a p p l i c a t i o n   i s s u e s   m u s t   b e   a d d r e s s e d   s e p a r a t e l y .   S t o r a g e   F a i l u r e s :   I f   a   p e r s i s t e n t   v o l u m e   b e c o m e s   u n a v a i l a b l e ,   r e c o v e r y   s t e p s   m a y   b e   r e q u i r e d .   A p p l i c a t i o n   E r r o r s :   K u b e r n e t e s   c a n   r e s t a r t   c o n t a i n e r s ,   b u t   u n d e r l y i n g   a p p l i c a t i o n   i s s u e s   m u s t   b e   a d d r e s s e d   s e p a r a t e l y .


Question: What is What's next?

Answer: R e a d   m o r e   a b o u t   P o d s L e a r n   a b o u t   K u b e r n e t e s   C o n t r o l l e r s E x p l o r e   P e r s i s t e n t V o l u m e s R e a d   a b o u t   n o d e   a u t o s c a l i n g .   N o d e   a u t o s c a l i n g   a l s o   p r o v i d e s   a u t o m a t i c   h e a l i n g   i f   o r   w h e n   n o d e s   f a i l   i n   y o u r   c l u s t e r .


Question: What is 8 - Container Runtime Interface (CRI)?

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


Question: What is The API?

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


Question: What is Upgrading?

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


Question: What is What's next?

Answer: L e a r n   m o r e   a b o u t   t h e   C R I   p r o t o c o l   d e f i n i t i o n


Question: What is 9 - Garbage Collection?

Answer: G a r b a g e   c o l l e c t i o n   i s   a   c o l l e c t i v e   t e r m   f o r   t h e   v a r i o u s   m e c h a n i s m s   K u b e r n e t e s   u s e s   t o   c l e a n   u p   c l u s t e r   r e s o u r c e s .   T h i s   a l l o w s   t h e   c l e a n   u p   o f   r e s o u r c e s   l i k e   t h e   f o l l o w i n g :   T e r m i n a t e d   p o d s C o m p l e t e d   J o b s O b j e c t s   w i t h o u t   o w n e r   r e f e r e n c e s U n u s e d   c o n t a i n e r s   a n d   c o n t a i n e r   i m a g e s D y n a m i c a l l y   p r o v i s i o n e d   P e r s i s t e n t V o l u m e s   w i t h   a   S t o r a g e C l a s s   r e c l a i m   p o l i c y   o f   D e l e t e S t a l e   o r   e x p i r e d   C e r t i f i c a t e S i g n i n g R e q u e s t s   ( C S R s ) N o d e s   d e l e t e d   i n   t h e   f o l l o w i n g   s c e n a r i o s : O n   a   c l o u d   w h e n   t h e   c l u s t e r   u s e s   a   c l o u d   c o n t r o l l e r   m a n a g e r O n - p r e m i s e s   w h e n   t h e   c l u s t e r   u s e s   a n   a d d o n   s i m i l a r   t o   a   c l o u d   c o n t r o l l e r   m a n a g e r N o d e   L e a s e   o b j e c t s   O n   a   c l o u d   w h e n   t h e   c l u s t e r   u s e s   a   c l o u d   c o n t r o l l e r   m a n a g e r O n - p r e m i s e s   w h e n   t h e   c l u s t e r   u s e s   a n   a d d o n   s i m i l a r   t o   a   c l o u d   c o n t r o l l e r   m a n a g e r


Question: What is Owners and dependents?

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


Question: What is Note:?

Answer: C r o s s - n a m e s p a c e   o w n e r   r e f e r e n c e s   a r e   d i s a l l o w e d   b y   d e s i g n .   N a m e s p a c e d   d e p e n d e n t s   c a n   s p e c i f y   c l u s t e r - s c o p e d   o r   n a m e s p a c e d   o w n e r s .   A   n a m e s p a c e d   o w n e r   m u s t   e x i s t   i n   t h e   s a m e   n a m e s p a c e   a s   t h e   d e p e n d e n t .   I f   i t   d o e s   n o t ,   t h e   o w n e r   r e f e r e n c e   i s   t r e a t e d   a s   a b s e n t ,   a n d   t h e   d e p e n d e n t   i s   s u b j e c t   t o   d e l e t i o n   o n c e   a l l   o w n e r s   a r e   v e r i f i e d   a b s e n t .   C l u s t e r - s c o p e d   d e p e n d e n t s   c a n   o n l y   s p e c i f y   c l u s t e r - s c o p e d   o w n e r s .   I n   v 1 . 2 0 + ,   i f   a   c l u s t e r - s c o p e d   d e p e n d e n t   s p e c i f i e s   a   n a m e s p a c e d   k i n d   a s   a n   o w n e r ,   i t   i s   t r e a t e d   a s   h a v i n g   a n   u n r e s o l v a b l e   o w n e r   r e f e r e n c e ,   a n d   i s   n o t   a b l e   t o   b e   g a r b a g e   c o l l e c t e d .   I n   v 1 . 2 0 + ,   i f   t h e   g a r b a g e   c o l l e c t o r   d e t e c t s   a n   i n v a l i d   c r o s s - n a m e s p a c e   o w n e r R e f e r e n c e ,   o r   a   c l u s t e r - s c o p e d   d e p e n d e n t   w i t h   a n   o w n e r R e f e r e n c e   r e f e r e n c i n g   a   n a m e s p a c e d   k i n d ,   a   w a r n i n g   E v e n t   w i t h   a   r e a s o n   o f   O w n e r R e f I n v a l i d N a m e s p a c e   a n d   a n   i n v o l v e d O b j e c t   o f   t h e   i n v a l i d   d e p e n d e n t   i s   r e p o r t e d .   Y o u   c a n   c h e c k   f o r   t h a t   k i n d   o f   E v e n t   b y   r u n n i n g   k u b e c t l   g e t   e v e n t s   - A   - - f i e l d - s e l e c t o r = r e a s o n = O w n e r R e f I n v a l i d N a m e s p a c e .


Question: What is Cascading deletion?

Answer: K u b e r n e t e s   c h e c k s   f o r   a n d   d e l e t e s   o b j e c t s   t h a t   n o   l o n g e r   h a v e   o w n e r   r e f e r e n c e s ,   l i k e   t h e   p o d s   l e f t   b e h i n d   w h e n   y o u   d e l e t e   a   R e p l i c a S e t .   W h e n   y o u   d e l e t e   a n   o b j e c t ,   y o u   c a n   c o n t r o l   w h e t h e r   K u b e r n e t e s   d e l e t e s   t h e   o b j e c t ' s   d e p e n d e n t s   a u t o m a t i c a l l y ,   i n   a   p r o c e s s   c a l l e d   c a s c a d i n g   d e l e t i o n .   T h e r e   a r e   t w o   t y p e s   o f   c a s c a d i n g   d e l e t i o n ,   a s   f o l l o w s :   F o r e g r o u n d   c a s c a d i n g   d e l e t i o n B a c k g r o u n d   c a s c a d i n g   d e l e t i o n   Y o u   c a n   a l s o   c o n t r o l   h o w   a n d   w h e n   g a r b a g e   c o l l e c t i o n   d e l e t e s   r e s o u r c e s   t h a t   h a v e   o w n e r   r e f e r e n c e s   u s i n g   K u b e r n e t e s   f i n a l i z e r s .


Question: What is Foreground cascading deletion?

Answer: I n   f o r e g r o u n d   c a s c a d i n g   d e l e t i o n ,   t h e   o w n e r   o b j e c t   y o u ' r e   d e l e t i n g   f i r s t   e n t e r s   a   d e l e t i o n   i n   p r o g r e s s   s t a t e .   I n   t h i s   s t a t e ,   t h e   f o l l o w i n g   h a p p e n s   t o   t h e   o w n e r   o b j e c t :   T h e   K u b e r n e t e s   A P I   s e r v e r   s e t s   t h e   o b j e c t ' s   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   f i e l d   t o   t h e   t i m e   t h e   o b j e c t   w a s   m a r k e d   f o r   d e l e t i o n . T h e   K u b e r n e t e s   A P I   s e r v e r   a l s o   s e t s   t h e   m e t a d a t a . f i n a l i z e r s   f i e l d   t o   f o r e g r o u n d D e l e t i o n . T h e   o b j e c t   r e m a i n s   v i s i b l e   t h r o u g h   t h e   K u b e r n e t e s   A P I   u n t i l   t h e   d e l e t i o n   p r o c e s s   i s   c o m p l e t e .   A f t e r   t h e   o w n e r   o b j e c t   e n t e r s   t h e   d e l e t i o n   i n   p r o g r e s s   s t a t e ,   t h e   c o n t r o l l e r   d e l e t e s   d e p e n d e n t s   i t   k n o w s   a b o u t .   A f t e r   d e l e t i n g   a l l   t h e   d e p e n d e n t   o b j e c t s   i t   k n o w s   a b o u t ,   t h e   c o n t r o l l e r   d e l e t e s   t h e   o w n e r   o b j e c t .   A t   t h i s   p o i n t ,   t h e   o b j e c t   i s   n o   l o n g e r   v i s i b l e   i n   t h e   K u b e r n e t e s   A P I .   D u r i n g   f o r e g r o u n d   c a s c a d i n g   d e l e t i o n ,   t h e   o n l y   d e p e n d e n t s   t h a t   b l o c k   o w n e r   d e l e t i o n   a r e   t h o s e   t h a t   h a v e   t h e   o w n e r R e f e r e n c e . b l o c k O w n e r D e l e t i o n = t r u e   f i e l d   a n d   a r e   i n   t h e   g a r b a g e   c o l l e c t i o n   c o n t r o l l e r   c a c h e .   T h e   g a r b a g e   c o l l e c t i o n   c o n t r o l l e r   c a c h e   m


Question: What is Background cascading deletion?

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


Question: What is Orphaned dependents?

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


Question: What is Garbage collection of unused containers and images?

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


Question: What is Container image lifecycle?

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


Question: What is Garbage collection for unused container images?

Answer: A s   a   b e t a   f e a t u r e ,   y o u   c a n   s p e c i f y   t h e   m a x i m u m   t i m e   a   l o c a l   i m a g e   c a n   b e   u n u s e d   f o r ,   r e g a r d l e s s   o f   d i s k   u s a g e .   T h i s   i s   a   k u b e l e t   s e t t i n g   t h a t   y o u   c o n f i g u r e   f o r   e a c h   n o d e .   T o   c o n f i g u r e   t h e   s e t t i n g ,   y o u   n e e d   t o   s e t   a   v a l u e   f o r   t h e   i m a g e M a x i m u m G C A g e   f i e l d   i n   t h e   k u b e l e t   c o n f i g u r a t i o n   f i l e .   T h e   v a l u e   i s   s p e c i f i e d   a s   a   K u b e r n e t e s   d u r a t i o n .   S e e   d u r a t i o n   i n   t h e   g l o s s a r y   f o r   m o r e   d e t a i l s .   F o r   e x a m p l e ,   y o u   c a n   s e t   t h e   c o n f i g u r a t i o n   f i e l d   t o   1 2 h 4 5 m ,   w h i c h   m e a n s   1 2   h o u r s   a n d   4 5   m i n u t e s .


Question: What is Container garbage collection?

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


Question: What is Configuring garbage collection?

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


Question: What is What's next?

Answer: L e a r n   m o r e   a b o u t   o w n e r s h i p   o f   K u b e r n e t e s   o b j e c t s . L e a r n   m o r e   a b o u t   K u b e r n e t e s   f i n a l i z e r s . L e a r n   a b o u t   t h e   T T L   c o n t r o l l e r   t h a t   c l e a n s   u p   f i n i s h e d   J o b s .


Question: What is 10 - Mixed Version Proxy?

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


Question: What is Enabling the Mixed Version Proxy?

Answer: E n s u r e   t h a t   U n k n o w n V e r s i o n I n t e r o p e r a b i l i t y P r o x y   f e a t u r e   g a t e   i s   e n a b l e d   w h e n   y o u   s t a r t   t h e   A P I   S e r v e r :   k u b e - a p i s e r v e r   \   - - f e a t u r e - g a t e s = U n k n o w n V e r s i o n I n t e r o p e r a b i l i t y P r o x y = t r u e   \   #   r e q u i r e d   c o m m a n d   l i n e   a r g u m e n t s   f o r   t h i s   f e a t u r e   - - p e e r - c a - f i l e = < p a t h   t o   k u b e - a p i s e r v e r   C A   c e r t >   - - p r o x y - c l i e n t - c e r t - f i l e = < p a t h   t o   a g g r e g a t o r   p r o x y   c e r t > ,   - - p r o x y - c l i e n t - k e y - f i l e = < p a t h   t o   a g g r e g a t o r   p r o x y   k e y > ,   - - r e q u e s t h e a d e r - c l i e n t - c a - f i l e = < p a t h   t o   a g g r e g a t o r   C A   c e r t > ,   #   r e q u e s t h e a d e r - a l l o w e d - n a m e s   c a n   b e   s e t   t o   b l a n k   t o   a l l o w   a n y   C o m m o n   N a m e   - - r e q u e s t h e a d e r - a l l o w e d - n a m e s = < v a l i d   C o m m o n   N a m e s   t o   v e r i f y   p r o x y   c l i e n t   c e r t   a g a i n s t > ,   #   o p t i o n a l   f l a g s   f o r   t h i s   f e a t u r e   - - p e e r - a d v e r t i s e - i p = ` I P   o f   t h i s   k u b e - a p i s e r v e r   t h a t   s h o u l d   b e   u s e d   b y   p e e r s   t o   p r o x y   r e q u e s t s `   - - p e e r - a d v e r t i s e - p o r t = ` p o r t   o f   t h i s   k u b e - a p i s e r v e r   t h a t   s h o u l d   b e   u s e d   b y   p e e r s   t o   p r o x y   r e q u e s t s `   #   … a n d   o t h e r   f l a g s   a s   u s u a l


Question: What is Proxy transport and authentication between API servers?

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


Question: What is Configuration for peer API server connectivity?

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


Question: What is Mixed version proxying?

Answer: W h e n   y o u   e n a b l e   m i x e d   v e r s i o n   p r o x y i n g ,   t h e   a g g r e g a t i o n   l a y e r   l o a d s   a   s p e c i a l   f i l t e r   t h a t   d o e s   t h e   f o l l o w i n g :   W h e n   a   r e s o u r c e   r e q u e s t   r e a c h e s   a n   A P I   s e r v e r   t h a t   c a n n o t   s e r v e   t h a t   A P I   ( e i t h e r   b e c a u s e   i t   i s   a t   a   v e r s i o n   p r e - d a t i n g   t h e   i n t r o d u c t i o n   o f   t h e   A P I   o r   t h e   A P I   i s   t u r n e d   o f f   o n   t h e   A P I   s e r v e r )   t h e   A P I   s e r v e r   a t t e m p t s   t o   s e n d   t h e   r e q u e s t   t o   a   p e e r   A P I   s e r v e r   t h a t   c a n   s e r v e   t h e   r e q u e s t e d   A P I .   I t   d o e s   s o   b y   i d e n t i f y i n g   A P I   g r o u p s   /   v e r s i o n s   /   r e s o u r c e s   t h a t   t h e   l o c a l   s e r v e r   d o e s n ' t   r e c o g n i s e ,   a n d   t r i e s   t o   p r o x y   t h o s e   r e q u e s t s   t o   a   p e e r   A P I   s e r v e r   t h a t   i s   c a p a b l e   o f   h a n d l i n g   t h e   r e q u e s t . I f   t h e   p e e r   A P I   s e r v e r   f a i l s   t o   r e s p o n d ,   t h e   s o u r c e   A P I   s e r v e r   r e s p o n d s   w i t h   5 0 3   ( " S e r v i c e   U n a v a i l a b l e " )   e r r o r .


Question: What is How it works under the hood?

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


Question: What is List All Container Images Running in a Cluster?

Answer: List All Container Images Running in a ClusterThis page shows how to use kubectl to list all of the Container images for Pods running in a cluster.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check the version, enter kubectl version.In this exercise you will use kubectl to fetch all of the Pods running in a cluster, and format the output to pull out the list of Containers for each.List all Container images in all namespacesFetch all Pods in all namespaces using kubectl get pods --all-namespacesFormat the output to include only the list of Container image names using -o jsonpath={.items[*].spec['initContainers', 'containers'][*].image}. This will recursively parse out the image field from the returned json.See the jsonpath reference for further information on how to use jsonpath.Format the output using standard tools: tr, sort, uniqUse tr to replace spaces with newlinesUse sort to sort the resultsUse uniq to aggregate image countskubectl get pods --all-namespaces -o jsonpath="{.items[*].spec['initContainers', 'containers'][*].image}" |\ tr -s '[[:space:]]' '\n' |\ sort |\ uniq -c The jsonpath is interpreted as follows:.items[*]: for each returned value.spec: get the spec['initContainers', 'containers'][*]: for each container.image: get the imageNote:When fetching a single Pod by name, for example kubectl get pod nginx, the .items[*] portion of the path should be omitted because a single Pod is returned instead of a list of items.List Container images by PodThe formatting can be controlled further by using the range operation to iterate over elements individually.kubectl get pods --all-namespaces -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}' |\ sort List Container images filtering by Pod labelTo target only Pods matching a specific label, use the -l flag. The following matches only Pods with labels matching app=nginx.kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" -l app=nginx List Container images filtering by Pod namespaceTo target only pods in a specific namespace, use the namespace flag. The following matches only Pods in the kube-system namespace.kubectl get pods --namespace kube-system -o jsonpath="{.items[*].spec.containers[*].image}" List Container images using a go-template instead of jsonpathAs an alternative to jsonpath, Kubectl supports using go-templates for formatting the output:kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}" What's nextReferenceJsonpath reference


Question: How does List All Container Images Running in a Cluster work?

Answer: List All Container Images Running in a ClusterThis page shows how to use kubectl to list all of the Container images for Pods running in a cluster.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check the version, enter kubectl version.In this exercise you will use kubectl to fetch all of the Pods running in a cluster, and format the output to pull out the list of Containers for each.List all Container images in all namespacesFetch all Pods in all namespaces using kubectl get pods --all-namespacesFormat the output to include only the list of Container image names using -o jsonpath={.items[*].spec['initContainers', 'containers'][*].image}. This will recursively parse out the image field from the returned json.See the jsonpath reference for further information on how to use jsonpath.Format the output using standard tools: tr, sort, uniqUse tr to replace spaces with newlinesUse sort to sort the resultsUse uniq to aggregate image countskubectl get pods --all-namespaces -o jsonpath="{.items[*].spec['initContainers', 'containers'][*].image}" |\ tr -s '[[:space:]]' '\n' |\ sort |\ uniq -c The jsonpath is interpreted as follows:.items[*]: for each returned value.spec: get the spec['initContainers', 'containers'][*]: for each container.image: get the imageNote:When fetching a single Pod by name, for example kubectl get pod nginx, the .items[*] portion of the path should be omitted because a single Pod is returned instead of a list of items.List Container images by PodThe formatting can be controlled further by using the range operation to iterate over elements individually.kubectl get pods --all-namespaces -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}' |\ sort List Container images filtering by Pod labelTo target only Pods matching a specific label, use the -l flag. The following matches only Pods with labels matching app=nginx.kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" -l app=nginx List Container images filtering by Pod namespaceTo target only pods in a specific namespace, use the namespace flag. The following matches only Pods in the kube-system namespace.kubectl get pods --namespace kube-system -o jsonpath="{.items[*].spec.containers[*].image}" List Container images using a go-template instead of jsonpathAs an alternative to jsonpath, Kubectl supports using go-templates for formatting the output:kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}" What's nextReferenceJsonpath reference


Question: When would you use List All Container Images Running in a Cluster?

Answer: List All Container Images Running in a ClusterThis page shows how to use kubectl to list all of the Container images for Pods running in a cluster.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check the version, enter kubectl version.In this exercise you will use kubectl to fetch all of the Pods running in a cluster, and format the output to pull out the list of Containers for each.List all Container images in all namespacesFetch all Pods in all namespaces using kubectl get pods --all-namespacesFormat the output to include only the list of Container image names using -o jsonpath={.items[*].spec['initContainers', 'containers'][*].image}. This will recursively parse out the image field from the returned json.See the jsonpath reference for further information on how to use jsonpath.Format the output using standard tools: tr, sort, uniqUse tr to replace spaces with newlinesUse sort to sort the resultsUse uniq to aggregate image countskubectl get pods --all-namespaces -o jsonpath="{.items[*].spec['initContainers', 'containers'][*].image}" |\ tr -s '[[:space:]]' '\n' |\ sort |\ uniq -c The jsonpath is interpreted as follows:.items[*]: for each returned value.spec: get the spec['initContainers', 'containers'][*]: for each container.image: get the imageNote:When fetching a single Pod by name, for example kubectl get pod nginx, the .items[*] portion of the path should be omitted because a single Pod is returned instead of a list of items.List Container images by PodThe formatting can be controlled further by using the range operation to iterate over elements individually.kubectl get pods --all-namespaces -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}' |\ sort List Container images filtering by Pod labelTo target only Pods matching a specific label, use the -l flag. The following matches only Pods with labels matching app=nginx.kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" -l app=nginx List Container images filtering by Pod namespaceTo target only pods in a specific namespace, use the namespace flag. The following matches only Pods in the kube-system namespace.kubectl get pods --namespace kube-system -o jsonpath="{.items[*].spec.containers[*].image}" List Container images using a go-template instead of jsonpathAs an alternative to jsonpath, Kubectl supports using go-templates for formatting the output:kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}" What's nextReferenceJsonpath reference


Question: What are the benefits of List All Container Images Running in a Cluster?

Answer: List All Container Images Running in a ClusterThis page shows how to use kubectl to list all of the Container images for Pods running in a cluster.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check the version, enter kubectl version.In this exercise you will use kubectl to fetch all of the Pods running in a cluster, and format the output to pull out the list of Containers for each.List all Container images in all namespacesFetch all Pods in all namespaces using kubectl get pods --all-namespacesFormat the output to include only the list of Container image names using -o jsonpath={.items[*].spec['initContainers', 'containers'][*].image}. This will recursively parse out the image field from the returned json.See the jsonpath reference for further information on how to use jsonpath.Format the output using standard tools: tr, sort, uniqUse tr to replace spaces with newlinesUse sort to sort the resultsUse uniq to aggregate image countskubectl get pods --all-namespaces -o jsonpath="{.items[*].spec['initContainers', 'containers'][*].image}" |\ tr -s '[[:space:]]' '\n' |\ sort |\ uniq -c The jsonpath is interpreted as follows:.items[*]: for each returned value.spec: get the spec['initContainers', 'containers'][*]: for each container.image: get the imageNote:When fetching a single Pod by name, for example kubectl get pod nginx, the .items[*] portion of the path should be omitted because a single Pod is returned instead of a list of items.List Container images by PodThe formatting can be controlled further by using the range operation to iterate over elements individually.kubectl get pods --all-namespaces -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}' |\ sort List Container images filtering by Pod labelTo target only Pods matching a specific label, use the -l flag. The following matches only Pods with labels matching app=nginx.kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" -l app=nginx List Container images filtering by Pod namespaceTo target only pods in a specific namespace, use the namespace flag. The following matches only Pods in the kube-system namespace.kubectl get pods --namespace kube-system -o jsonpath="{.items[*].spec.containers[*].image}" List Container images using a go-template instead of jsonpathAs an alternative to jsonpath, Kubectl supports using go-templates for formatting the output:kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}" What's nextReferenceJsonpath reference


Question: What is List All Container Images Running in a Cluster?

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


Question: What is Before you begin?

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


Question: What is List all Container images in all namespaces?

Answer: F e t c h   a l l   P o d s   i n   a l l   n a m e s p a c e s   u s i n g   k u b e c t l   g e t   p o d s   - - a l l - n a m e s p a c e s F o r m a t   t h e   o u t p u t   t o   i n c l u d e   o n l y   t h e   l i s t   o f   C o n t a i n e r   i m a g e   n a m e s   u s i n g   - o   j s o n p a t h = { . i t e m s [ * ] . s p e c [ ' i n i t C o n t a i n e r s ' ,   ' c o n t a i n e r s ' ] [ * ] . i m a g e } .   T h i s   w i l l   r e c u r s i v e l y   p a r s e   o u t   t h e   i m a g e   f i e l d   f r o m   t h e   r e t u r n e d   j s o n . S e e   t h e   j s o n p a t h   r e f e r e n c e   f o r   f u r t h e r   i n f o r m a t i o n   o n   h o w   t o   u s e   j s o n p a t h . F o r m a t   t h e   o u t p u t   u s i n g   s t a n d a r d   t o o l s :   t r ,   s o r t ,   u n i q U s e   t r   t o   r e p l a c e   s p a c e s   w i t h   n e w l i n e s U s e   s o r t   t o   s o r t   t h e   r e s u l t s U s e   u n i q   t o   a g g r e g a t e   i m a g e   c o u n t s   S e e   t h e   j s o n p a t h   r e f e r e n c e   f o r   f u r t h e r   i n f o r m a t i o n   o n   h o w   t o   u s e   j s o n p a t h .   U s e   t r   t o   r e p l a c e   s p a c e s   w i t h   n e w l i n e s U s e   s o r t   t o   s o r t   t h e   r e s u l t s U s e   u n i q   t o   a g g r e g a t e   i m a g e   c o u n t s   k u b e c t l   g e t   p o d s   - - a l l - n a m e s p a c e s   - o   j s o n p a t h = " { . i t e m s [ * ] . s p e c [ ' i n i t C o n t a i n e r s ' ,   ' c o n t a i n e r s ' ] [ * ] . i m a g e } "   | \   t r   - s   ' [ [ : s p a c e : ] ] '   ' \ n '   | \   s o r t   | \   u n i q   - c   T h e   j s o n p a t h   i s   i n t e r p r e t e d   a s   f o l l o w s :   . i t e m s [ * ] :   f o r   e a c h   r e t u r n e d   v a l u e . s p e c :   g e t   t h e   s p e c [ ' i n i t C o n t a i n e r s ' ,   ' c o n t a i n e r s ' ] [ * ] :   f o r   e a c h   c o n t a i n e r . i m a g e


Question: What is List Container images by Pod?

Answer: T h e   f o r m a t t i n g   c a n   b e   c o n t r o l l e d   f u r t h e r   b y   u s i n g   t h e   r a n g e   o p e r a t i o n   t o   i t e r a t e   o v e r   e l e m e n t s   i n d i v i d u a l l y .   k u b e c t l   g e t   p o d s   - - a l l - n a m e s p a c e s   - o   j s o n p a t h = ' { r a n g e   . i t e m s [ * ] } { " \ n " } { . m e t a d a t a . n a m e } { " : \ t " } { r a n g e   . s p e c . c o n t a i n e r s [ * ] } { . i m a g e } { " ,   " } { e n d } { e n d } '   | \   s o r t


Question: What is List Container images filtering by Pod label?

Answer: T o   t a r g e t   o n l y   P o d s   m a t c h i n g   a   s p e c i f i c   l a b e l ,   u s e   t h e   - l   f l a g .   T h e   f o l l o w i n g   m a t c h e s   o n l y   P o d s   w i t h   l a b e l s   m a t c h i n g   a p p = n g i n x .   k u b e c t l   g e t   p o d s   - - a l l - n a m e s p a c e s   - o   j s o n p a t h = " { . i t e m s [ * ] . s p e c . c o n t a i n e r s [ * ] . i m a g e } "   - l   a p p = n g i n x


Question: What is List Container images filtering by Pod namespace?

Answer: T o   t a r g e t   o n l y   p o d s   i n   a   s p e c i f i c   n a m e s p a c e ,   u s e   t h e   n a m e s p a c e   f l a g .   T h e   f o l l o w i n g   m a t c h e s   o n l y   P o d s   i n   t h e   k u b e - s y s t e m   n a m e s p a c e .   k u b e c t l   g e t   p o d s   - - n a m e s p a c e   k u b e - s y s t e m   - o   j s o n p a t h = " { . i t e m s [ * ] . s p e c . c o n t a i n e r s [ * ] . i m a g e } "


Question: What is List Container images using a go-template instead of jsonpath?

Answer: A s   a n   a l t e r n a t i v e   t o   j s o n p a t h ,   K u b e c t l   s u p p o r t s   u s i n g   g o - t e m p l a t e s   f o r   f o r m a t t i n g   t h e   o u t p u t :   k u b e c t l   g e t   p o d s   - - a l l - n a m e s p a c e s   - o   g o - t e m p l a t e   - - t e m p l a t e = " { { r a n g e   . i t e m s } } { { r a n g e   . s p e c . c o n t a i n e r s } } { { . i m a g e } }   { { e n d } } { { e n d } } "


Question: What is Reference?

Answer: J s o n p a t h   r e f e r e n c e   g u i d e G o   t e m p l a t e   r e f e r e n c e   g u i d e


Question: What is kube-apiserver Audit Configuration (v1)?

Answer: kube-apiserver Audit Configuration (v1)Resource TypesEventEventListPolicyPolicyListEventAppears in:EventListEvent captures all the information that can be included in an API audit log.FieldDescriptionapiVersionstringaudit.k8s.io/v1kindstringEventlevel [Required]LevelAuditLevel at which event was generatedauditID [Required]k8s.io/apimachinery/pkg/types.UIDUnique audit ID, generated for each request.stage [Required]StageStage of the request handling when this event instance was generated.requestURI [Required]stringRequestURI is the request URI as sent by the client to a server.verb [Required]stringVerb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.user [Required]authentication/v1.UserInfoAuthenticated user information.impersonatedUserauthentication/v1.UserInfoImpersonated user information.sourceIPs[]stringSource IPs, from where the request originated and intermediate proxies. The source IPs are listed from (in order):X-Forwarded-For request header IPsX-Real-Ip header, if not present in the X-Forwarded-For listThe remote address for the connection, if it doesn't match the last IP in the list up to here (X-Forwarded-For or X-Real-Ip). Note: All but the last IP can be arbitrarily set by the client.userAgentstringUserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.objectRefObjectReferenceObject reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.responseStatusmeta/v1.StatusThe response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.requestObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.responseObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.requestReceivedTimestampmeta/v1.MicroTimeTime the request reached the apiserver.stageTimestampmeta/v1.MicroTimeTime the request reached current audit stage.annotationsmap[string]stringAnnotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the subm


Question: How does kube-apiserver Audit Configuration (v1) work?

Answer: kube-apiserver Audit Configuration (v1)Resource TypesEventEventListPolicyPolicyListEventAppears in:EventListEvent captures all the information that can be included in an API audit log.FieldDescriptionapiVersionstringaudit.k8s.io/v1kindstringEventlevel [Required]LevelAuditLevel at which event was generatedauditID [Required]k8s.io/apimachinery/pkg/types.UIDUnique audit ID, generated for each request.stage [Required]StageStage of the request handling when this event instance was generated.requestURI [Required]stringRequestURI is the request URI as sent by the client to a server.verb [Required]stringVerb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.user [Required]authentication/v1.UserInfoAuthenticated user information.impersonatedUserauthentication/v1.UserInfoImpersonated user information.sourceIPs[]stringSource IPs, from where the request originated and intermediate proxies. The source IPs are listed from (in order):X-Forwarded-For request header IPsX-Real-Ip header, if not present in the X-Forwarded-For listThe remote address for the connection, if it doesn't match the last IP in the list up to here (X-Forwarded-For or X-Real-Ip). Note: All but the last IP can be arbitrarily set by the client.userAgentstringUserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.objectRefObjectReferenceObject reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.responseStatusmeta/v1.StatusThe response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.requestObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.responseObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.requestReceivedTimestampmeta/v1.MicroTimeTime the request reached the apiserver.stageTimestampmeta/v1.MicroTimeTime the request reached current audit stage.annotationsmap[string]stringAnnotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the subm


Question: When would you use kube-apiserver Audit Configuration (v1)?

Answer: kube-apiserver Audit Configuration (v1)Resource TypesEventEventListPolicyPolicyListEventAppears in:EventListEvent captures all the information that can be included in an API audit log.FieldDescriptionapiVersionstringaudit.k8s.io/v1kindstringEventlevel [Required]LevelAuditLevel at which event was generatedauditID [Required]k8s.io/apimachinery/pkg/types.UIDUnique audit ID, generated for each request.stage [Required]StageStage of the request handling when this event instance was generated.requestURI [Required]stringRequestURI is the request URI as sent by the client to a server.verb [Required]stringVerb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.user [Required]authentication/v1.UserInfoAuthenticated user information.impersonatedUserauthentication/v1.UserInfoImpersonated user information.sourceIPs[]stringSource IPs, from where the request originated and intermediate proxies. The source IPs are listed from (in order):X-Forwarded-For request header IPsX-Real-Ip header, if not present in the X-Forwarded-For listThe remote address for the connection, if it doesn't match the last IP in the list up to here (X-Forwarded-For or X-Real-Ip). Note: All but the last IP can be arbitrarily set by the client.userAgentstringUserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.objectRefObjectReferenceObject reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.responseStatusmeta/v1.StatusThe response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.requestObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.responseObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.requestReceivedTimestampmeta/v1.MicroTimeTime the request reached the apiserver.stageTimestampmeta/v1.MicroTimeTime the request reached current audit stage.annotationsmap[string]stringAnnotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the subm


Question: What are the benefits of kube-apiserver Audit Configuration (v1)?

Answer: kube-apiserver Audit Configuration (v1)Resource TypesEventEventListPolicyPolicyListEventAppears in:EventListEvent captures all the information that can be included in an API audit log.FieldDescriptionapiVersionstringaudit.k8s.io/v1kindstringEventlevel [Required]LevelAuditLevel at which event was generatedauditID [Required]k8s.io/apimachinery/pkg/types.UIDUnique audit ID, generated for each request.stage [Required]StageStage of the request handling when this event instance was generated.requestURI [Required]stringRequestURI is the request URI as sent by the client to a server.verb [Required]stringVerb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method.user [Required]authentication/v1.UserInfoAuthenticated user information.impersonatedUserauthentication/v1.UserInfoImpersonated user information.sourceIPs[]stringSource IPs, from where the request originated and intermediate proxies. The source IPs are listed from (in order):X-Forwarded-For request header IPsX-Real-Ip header, if not present in the X-Forwarded-For listThe remote address for the connection, if it doesn't match the last IP in the list up to here (X-Forwarded-For or X-Real-Ip). Note: All but the last IP can be arbitrarily set by the client.userAgentstringUserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted.objectRefObjectReferenceObject reference this request is targeted at. Does not apply for List-type requests, or non-resource requests.responseStatusmeta/v1.StatusThe response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. For non-status type error responses, this will be auto-populated with the error Message.requestObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. Omitted for non-resource requests. Only logged at Request Level and higher.responseObjectk8s.io/apimachinery/pkg/runtime.UnknownAPI object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged at Response Level.requestReceivedTimestampmeta/v1.MicroTimeTime the request reached the apiserver.stageTimestampmeta/v1.MicroTimeTime the request reached current audit stage.annotationsmap[string]stringAnnotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the subm


Question: What is Resource Types?

Answer: E v e n t E v e n t L i s t P o l i c y P o l i c y L i s t


Question: What is Event?

Answer: A p p e a r s   i n :   E v e n t L i s t   E v e n t   c a p t u r e s   a l l   t h e   i n f o r m a t i o n   t h a t   c a n   b e   i n c l u d e d   i n   a n   A P I   a u d i t   l o g .   A u d i t L e v e l   a t   w h i c h   e v e n t   w a s   g e n e r a t e d   U n i q u e   a u d i t   I D ,   g e n e r a t e d   f o r   e a c h   r e q u e s t .   S t a g e   o f   t h e   r e q u e s t   h a n d l i n g   w h e n   t h i s   e v e n t   i n s t a n c e   w a s   g e n e r a t e d .   R e q u e s t U R I   i s   t h e   r e q u e s t   U R I   a s   s e n t   b y   t h e   c l i e n t   t o   a   s e r v e r .   V e r b   i s   t h e   k u b e r n e t e s   v e r b   a s s o c i a t e d   w i t h   t h e   r e q u e s t .   F o r   n o n - r e s o u r c e   r e q u e s t s ,   t h i s   i s   t h e   l o w e r - c a s e d   H T T P   m e t h o d .   A u t h e n t i c a t e d   u s e r   i n f o r m a t i o n .   I m p e r s o n a t e d   u s e r   i n f o r m a t i o n .   S o u r c e   I P s ,   f r o m   w h e r e   t h e   r e q u e s t   o r i g i n a t e d   a n d   i n t e r m e d i a t e   p r o x i e s .   T h e   s o u r c e   I P s   a r e   l i s t e d   f r o m   ( i n   o r d e r ) :   X - F o r w a r d e d - F o r   r e q u e s t   h e a d e r   I P s X - R e a l - I p   h e a d e r ,   i f   n o t   p r e s e n t   i n   t h e   X - F o r w a r d e d - F o r   l i s t T h e   r e m o t e   a d d r e s s   f o r   t h e   c o n n e c t i o n ,   i f   i t   d o e s n ' t   m a t c h   t h e   l a s t   I P   i n   t h e   l i s t   u p   t o   h e r e   ( X - F o r w a r d e d - F o r   o r   X - R e a l - I p ) .   N o t e :   A l l   b u t   t h e   l a s t   I P   c a n   b e   a r b i t r a r i l y   s e t   b y   t h e   c l i e n t .   U s e r A g e n t   r e c o r d s   t h e   u s e r   a g e n t   s t r i n g   r e p o r t e d   b y   t h e   c l i e n t .   N o t e   t h a t   t h e   U s e r A g e n t   i s   p r o v i d e


Question: What is EventList?

Answer: E v e n t L i s t   i s   a   l i s t   o f   a u d i t   E v e n t s .


Question: What is Policy?

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


Question: What is PolicyList?

Answer: P o l i c y L i s t   i s   a   l i s t   o f   a u d i t   P o l i c i e s .


Question: What is GroupResources?

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


Question: What is Level?

Answer: ( A l i a s   o f   s t r i n g )   A p p e a r s   i n :   E v e n t P o l i c y R u l e   E v e n t   P o l i c y R u l e   L e v e l   d e f i n e s   t h e   a m o u n t   o f   i n f o r m a t i o n   l o g g e d   d u r i n g   a u d i t i n g


Question: What is ObjectReference?

Answer: A p p e a r s   i n :   E v e n t   O b j e c t R e f e r e n c e   c o n t a i n s   e n o u g h   i n f o r m a t i o n   t o   l e t   y o u   i n s p e c t   o r   m o d i f y   t h e   r e f e r r e d   o b j e c t .   A P I G r o u p   i s   t h e   n a m e   o f   t h e   A P I   g r o u p   t h a t   c o n t a i n s   t h e   r e f e r r e d   o b j e c t .   T h e   e m p t y   s t r i n g   r e p r e s e n t s   t h e   c o r e   A P I   g r o u p .   A P I V e r s i o n   i s   t h e   v e r s i o n   o f   t h e   A P I   g r o u p   t h a t   c o n t a i n s   t h e   r e f e r r e d   o b j e c t .


Question: What is PolicyRule?

Answer: A p p e a r s   i n :   P o l i c y   P o l i c y R u l e   m a p s   r e q u e s t s   b a s e d   o f f   m e t a d a t a   t o   a n   a u d i t   L e v e l .   R e q u e s t s   m u s t   m a t c h   t h e   r u l e s   o f   e v e r y   f i e l d   ( a n   i n t e r s e c t i o n   o f   r u l e s ) .   T h e   L e v e l   t h a t   r e q u e s t s   m a t c h i n g   t h i s   r u l e   a r e   r e c o r d e d   a t .   T h e   u s e r s   ( b y   a u t h e n t i c a t e d   u s e r   n a m e )   t h i s   r u l e   a p p l i e s   t o .   A n   e m p t y   l i s t   i m p l i e s   e v e r y   u s e r .   T h e   u s e r   g r o u p s   t h i s   r u l e   a p p l i e s   t o .   A   u s e r   i s   c o n s i d e r e d   m a t c h i n g   i f   i t   i s   a   m e m b e r   o f   a n y   o f   t h e   U s e r G r o u p s .   A n   e m p t y   l i s t   i m p l i e s   e v e r y   u s e r   g r o u p .   T h e   v e r b s   t h a t   m a t c h   t h i s   r u l e .   A n   e m p t y   l i s t   i m p l i e s   e v e r y   v e r b .   R e s o u r c e s   t h a t   t h i s   r u l e   m a t c h e s .   A n   e m p t y   l i s t   i m p l i e s   a l l   k i n d s   i n   a l l   A P I   g r o u p s .   N a m e s p a c e s   t h a t   t h i s   r u l e   m a t c h e s .   T h e   e m p t y   s t r i n g   " "   m a t c h e s   n o n - n a m e s p a c e d   r e s o u r c e s .   A n   e m p t y   l i s t   i m p l i e s   e v e r y   n a m e s p a c e .   N o n R e s o u r c e U R L s   i s   a   s e t   o f   U R L   p a t h s   t h a t   s h o u l d   b e   a u d i t e d .   * s   a r e   a l l o w e d ,   b u t   o n l y   a s   t h e   f u l l ,   f i n a l   s t e p   i n   t h e   p a t h .   E x a m p l e s :   / m e t r i c s   -   L o g   r e q u e s t s   f o r   a p i s e r v e r   m e t r i c s / h e a l t h z *   -   L o g   a l l   h e a l t h   c h e c k s   O m i t S t a g e s   i s   a   l i s t   o f   s t a g e s   f o r   w h i c h   n o   e v


Question: What is Stage?

Answer: ( A l i a s   o f   s t r i n g )   A p p e a r s   i n :   E v e n t P o l i c y P o l i c y R u l e   E v e n t   P o l i c y   P o l i c y R u l e   S t a g e   d e f i n e s   t h e   s t a g e s   i n   r e q u e s t   h a n d l i n g   t h a t   a u d i t   e v e n t s   m a y   b e   g e n e r a t 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 Node Reference Information?

Answer: Node Reference InformationThis section contains the following reference topics about nodes:the kubelet's checkpoint APIa list of Articles on dockershim Removal and on Using CRI-compatible RuntimesKubelet Device Manager API VersionsNode Labels Populated By The KubeletLocal Files And Paths Used By The KubeletNode .status informationLinux Node Swap BehaviorsSeccomp informationYou can also read node reference details from elsewhere in the Kubernetes documentation, including:Node Metrics Data.CRI Pod & Container Metrics.Understand Pressure Stall Information (PSI) Metrics.


Question: How does Node Reference Information work?

Answer: Node Reference InformationThis section contains the following reference topics about nodes:the kubelet's checkpoint APIa list of Articles on dockershim Removal and on Using CRI-compatible RuntimesKubelet Device Manager API VersionsNode Labels Populated By The KubeletLocal Files And Paths Used By The KubeletNode .status informationLinux Node Swap BehaviorsSeccomp informationYou can also read node reference details from elsewhere in the Kubernetes documentation, including:Node Metrics Data.CRI Pod & Container Metrics.Understand Pressure Stall Information (PSI) Metrics.


Question: When would you use Node Reference Information?

Answer: Node Reference InformationThis section contains the following reference topics about nodes:the kubelet's checkpoint APIa list of Articles on dockershim Removal and on Using CRI-compatible RuntimesKubelet Device Manager API VersionsNode Labels Populated By The KubeletLocal Files And Paths Used By The KubeletNode .status informationLinux Node Swap BehaviorsSeccomp informationYou can also read node reference details from elsewhere in the Kubernetes documentation, including:Node Metrics Data.CRI Pod & Container Metrics.Understand Pressure Stall Information (PSI) Metrics.


Question: What are the benefits of Node Reference Information?

Answer: Node Reference InformationThis section contains the following reference topics about nodes:the kubelet's checkpoint APIa list of Articles on dockershim Removal and on Using CRI-compatible RuntimesKubelet Device Manager API VersionsNode Labels Populated By The KubeletLocal Files And Paths Used By The KubeletNode .status informationLinux Node Swap BehaviorsSeccomp informationYou can also read node reference details from elsewhere in the Kubernetes documentation, including:Node Metrics Data.CRI Pod & Container Metrics.Understand Pressure Stall Information (PSI) Metrics.


Question: What is Node Reference Information?

Answer: T h i s   s e c t i o n   c o n t a i n s   t h e   f o l l o w i n g   r e f e r e n c e   t o p i c s   a b o u t   n o d e s :   t h e   k u b e l e t ' s   c h e c k p o i n t   A P I a   l i s t   o f   A r t i c l e s   o n   d o c k e r s h i m   R e m o v a l   a n d   o n   U s i n g   C R I - c o m p a t i b l e   R u n t i m e s K u b e l e t   D e v i c e   M a n a g e r   A P I   V e r s i o n s N o d e   L a b e l s   P o p u l a t e d   B y   T h e   K u b e l e t L o c a l   F i l e s   A n d   P a t h s   U s e d   B y   T h e   K u b e l e t N o d e   . s t a t u s   i n f o r m a t i o n L i n u x   N o d e   S w a p   B e h a v i o r s S e c c o m p   i n f o r m a t i o n   t h e   k u b e l e t ' s   c h e c k p o i n t   A P I   a   l i s t   o f   A r t i c l e s   o n   d o c k e r s h i m   R e m o v a l   a n d   o n   U s i n g   C R I - c o m p a t i b l e   R u n t i m e s   K u b e l e t   D e v i c e   M a n a g e r   A P I   V e r s i o n s   N o d e   L a b e l s   P o p u l a t e d   B y   T h e   K u b e l e t   L o c a l   F i l e s   A n d   P a t h s   U s e d   B y   T h e   K u b e l e t   N o d e   . s t a t u s   i n f o r m a t i o n   L i n u x   N o d e   S w a p   B e h a v i o r s   S e c c o m p   i n f o r m a t i o n   Y o u   c a n   a l s o   r e a d   n o d e   r e f e r e n c e   d e t a i l s   f r o m   e l s e w h e r e   i n   t h e   K u b e r n e t e s   d o c u m e n t a t i o n ,   i n c l u d i n g :   N o d e   M e t r i c s   D a t a . C R I   P o d   &   C o n t a i n e r   M e t r i c s . U n d e r s t a n d   P r e s s u r e   S t a l l   I n f o r m a t i o n   ( P S I )   M e t r i c s .   N o d e   M e t r i c s   D a t a .   C R I   P o d   &   C o n t a i n e r   M e t r i c s .   U n d e r s t a n d   P r e s s u r e   S t a l l   I n f o r m a t i o n   ( P S I )   M e t r i c s .


Question: What is Images?

Answer: ImagesA container image represents binary data that encapsulates an application and all its software dependencies. Container images are executable software bundles that can run standalone and that make very well-defined assumptions about their runtime environment.You typically create a container image of your application and push it to a registry before referring to it in a Pod.This page provides an outline of the container image concept.Note:If you are looking for the container images for a Kubernetes release (such as v1.34, the latest minor release), visit Download Kubernetes.Image namesContainer images are usually given a name such as pause, example/mycontainer, or kube-apiserver. Images can also include a registry hostname; for example: fictional.registry.example/imagename, and possibly a port number as well; for example: fictional.registry.example:10443/imagename.If you don't specify a registry hostname, Kubernetes assumes that you mean the Docker public registry. You can change this behavior by setting a default image registry in the container runtime configuration.After the image name part you can add a tag or digest (in the same way you would when using with commands like docker or podman). Tags let you identify different versions of the same series of images. Digests are a unique identifier for a specific version of an image. Digests are hashes of the image's content, and are immutable. Tags can be moved to point to different images, but digests are fixed.Image tags consist of lowercase and uppercase letters, digits, underscores (_), periods (.), and dashes (-). A tag can be up to 128 characters long, and must conform to the following regex pattern: [a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}. You can read more about it and find the validation regex in the OCI Distribution Specification. If you don't specify a tag, Kubernetes assumes you mean the tag latest.Image digests consists of a hash algorithm (such as sha256) and a hash value. For example: sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07. You can find more information about the digest format in the OCI Image Specification.Some image name examples that Kubernetes can use are:busybox — Image name only, no tag or digest. Kubernetes will use the Docker public registry and latest tag. Equivalent to docker.io/library/busybox:latest.busybox:1.32.0 — Image name with tag. Kubernetes will use the Docker public registry. Equivalent to docker.io/library/busybox:1.32.0.registry.k8s.io/pause:latest — Image name with a custom registry and latest tag.registry.k8s.io/pause:3.5 — Image name with a custom registry and non-latest tag.registry.k8s.io/pause@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with digest.registry.k8s.io/pause:3.5@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with tag and digest. Only the digest will be used for pulling.Updating imagesWhen you first create a Deployment, StatefulSet, Pod,


Question: How does Images work?

Answer: ImagesA container image represents binary data that encapsulates an application and all its software dependencies. Container images are executable software bundles that can run standalone and that make very well-defined assumptions about their runtime environment.You typically create a container image of your application and push it to a registry before referring to it in a Pod.This page provides an outline of the container image concept.Note:If you are looking for the container images for a Kubernetes release (such as v1.34, the latest minor release), visit Download Kubernetes.Image namesContainer images are usually given a name such as pause, example/mycontainer, or kube-apiserver. Images can also include a registry hostname; for example: fictional.registry.example/imagename, and possibly a port number as well; for example: fictional.registry.example:10443/imagename.If you don't specify a registry hostname, Kubernetes assumes that you mean the Docker public registry. You can change this behavior by setting a default image registry in the container runtime configuration.After the image name part you can add a tag or digest (in the same way you would when using with commands like docker or podman). Tags let you identify different versions of the same series of images. Digests are a unique identifier for a specific version of an image. Digests are hashes of the image's content, and are immutable. Tags can be moved to point to different images, but digests are fixed.Image tags consist of lowercase and uppercase letters, digits, underscores (_), periods (.), and dashes (-). A tag can be up to 128 characters long, and must conform to the following regex pattern: [a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}. You can read more about it and find the validation regex in the OCI Distribution Specification. If you don't specify a tag, Kubernetes assumes you mean the tag latest.Image digests consists of a hash algorithm (such as sha256) and a hash value. For example: sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07. You can find more information about the digest format in the OCI Image Specification.Some image name examples that Kubernetes can use are:busybox — Image name only, no tag or digest. Kubernetes will use the Docker public registry and latest tag. Equivalent to docker.io/library/busybox:latest.busybox:1.32.0 — Image name with tag. Kubernetes will use the Docker public registry. Equivalent to docker.io/library/busybox:1.32.0.registry.k8s.io/pause:latest — Image name with a custom registry and latest tag.registry.k8s.io/pause:3.5 — Image name with a custom registry and non-latest tag.registry.k8s.io/pause@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with digest.registry.k8s.io/pause:3.5@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with tag and digest. Only the digest will be used for pulling.Updating imagesWhen you first create a Deployment, StatefulSet, Pod,


Question: When would you use Images?

Answer: ImagesA container image represents binary data that encapsulates an application and all its software dependencies. Container images are executable software bundles that can run standalone and that make very well-defined assumptions about their runtime environment.You typically create a container image of your application and push it to a registry before referring to it in a Pod.This page provides an outline of the container image concept.Note:If you are looking for the container images for a Kubernetes release (such as v1.34, the latest minor release), visit Download Kubernetes.Image namesContainer images are usually given a name such as pause, example/mycontainer, or kube-apiserver. Images can also include a registry hostname; for example: fictional.registry.example/imagename, and possibly a port number as well; for example: fictional.registry.example:10443/imagename.If you don't specify a registry hostname, Kubernetes assumes that you mean the Docker public registry. You can change this behavior by setting a default image registry in the container runtime configuration.After the image name part you can add a tag or digest (in the same way you would when using with commands like docker or podman). Tags let you identify different versions of the same series of images. Digests are a unique identifier for a specific version of an image. Digests are hashes of the image's content, and are immutable. Tags can be moved to point to different images, but digests are fixed.Image tags consist of lowercase and uppercase letters, digits, underscores (_), periods (.), and dashes (-). A tag can be up to 128 characters long, and must conform to the following regex pattern: [a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}. You can read more about it and find the validation regex in the OCI Distribution Specification. If you don't specify a tag, Kubernetes assumes you mean the tag latest.Image digests consists of a hash algorithm (such as sha256) and a hash value. For example: sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07. You can find more information about the digest format in the OCI Image Specification.Some image name examples that Kubernetes can use are:busybox — Image name only, no tag or digest. Kubernetes will use the Docker public registry and latest tag. Equivalent to docker.io/library/busybox:latest.busybox:1.32.0 — Image name with tag. Kubernetes will use the Docker public registry. Equivalent to docker.io/library/busybox:1.32.0.registry.k8s.io/pause:latest — Image name with a custom registry and latest tag.registry.k8s.io/pause:3.5 — Image name with a custom registry and non-latest tag.registry.k8s.io/pause@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with digest.registry.k8s.io/pause:3.5@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with tag and digest. Only the digest will be used for pulling.Updating imagesWhen you first create a Deployment, StatefulSet, Pod,


Question: What are the benefits of Images?

Answer: ImagesA container image represents binary data that encapsulates an application and all its software dependencies. Container images are executable software bundles that can run standalone and that make very well-defined assumptions about their runtime environment.You typically create a container image of your application and push it to a registry before referring to it in a Pod.This page provides an outline of the container image concept.Note:If you are looking for the container images for a Kubernetes release (such as v1.34, the latest minor release), visit Download Kubernetes.Image namesContainer images are usually given a name such as pause, example/mycontainer, or kube-apiserver. Images can also include a registry hostname; for example: fictional.registry.example/imagename, and possibly a port number as well; for example: fictional.registry.example:10443/imagename.If you don't specify a registry hostname, Kubernetes assumes that you mean the Docker public registry. You can change this behavior by setting a default image registry in the container runtime configuration.After the image name part you can add a tag or digest (in the same way you would when using with commands like docker or podman). Tags let you identify different versions of the same series of images. Digests are a unique identifier for a specific version of an image. Digests are hashes of the image's content, and are immutable. Tags can be moved to point to different images, but digests are fixed.Image tags consist of lowercase and uppercase letters, digits, underscores (_), periods (.), and dashes (-). A tag can be up to 128 characters long, and must conform to the following regex pattern: [a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}. You can read more about it and find the validation regex in the OCI Distribution Specification. If you don't specify a tag, Kubernetes assumes you mean the tag latest.Image digests consists of a hash algorithm (such as sha256) and a hash value. For example: sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07. You can find more information about the digest format in the OCI Image Specification.Some image name examples that Kubernetes can use are:busybox — Image name only, no tag or digest. Kubernetes will use the Docker public registry and latest tag. Equivalent to docker.io/library/busybox:latest.busybox:1.32.0 — Image name with tag. Kubernetes will use the Docker public registry. Equivalent to docker.io/library/busybox:1.32.0.registry.k8s.io/pause:latest — Image name with a custom registry and latest tag.registry.k8s.io/pause:3.5 — Image name with a custom registry and non-latest tag.registry.k8s.io/pause@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with digest.registry.k8s.io/pause:3.5@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07 — Image name with tag and digest. Only the digest will be used for pulling.Updating imagesWhen you first create a Deployment, StatefulSet, Pod,


Question: What is Images?

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


Question: What is Image names?

Answer: C o n t a i n e r   i m a g e s   a r e   u s u a l l y   g i v e n   a   n a m e   s u c h   a s   p a u s e ,   e x a m p l e / m y c o n t a i n e r ,   o r   k u b e - a p i s e r v e r .   I m a g e s   c a n   a l s o   i n c l u d e   a   r e g i s t r y   h o s t n a m e ;   f o r   e x a m p l e :   f i c t i o n a l . r e g i s t r y . e x a m p l e / i m a g e n a m e ,   a n d   p o s s i b l y   a   p o r t   n u m b e r   a s   w e l l ;   f o r   e x a m p l e :   f i c t i o n a l . r e g i s t r y . e x a m p l e : 1 0 4 4 3 / i m a g e n a m e .   I f   y o u   d o n ' t   s p e c i f y   a   r e g i s t r y   h o s t n a m e ,   K u b e r n e t e s   a s s u m e s   t h a t   y o u   m e a n   t h e   D o c k e r   p u b l i c   r e g i s t r y .   Y o u   c a n   c h a n g e   t h i s   b e h a v i o r   b y   s e t t i n g   a   d e f a u l t   i m a g e   r e g i s t r y   i n   t h e   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 .   A f t e r   t h e   i m a g e   n a m e   p a r t   y o u   c a n   a d d   a   t a g   o r   d i g e s t   ( i n   t h e   s a m e   w a y   y o u   w o u l d   w h e n   u s i n g   w i t h   c o m m a n d s   l i k e   d o c k e r   o r   p o d m a n ) .   T a g s   l e t   y o u   i d e n t i f y   d i f f e r e n t   v e r s i o n s   o f   t h e   s a m e   s e r i e s   o f   i m a g e s .   D i g e s t s   a r e   a   u n i q u e   i d e n t i f i e r   f o r   a   s p e c i f i c   v e r s i o n   o f   a n   i m a g e .   D i g e s t s   a r e   h a s h e s   o f   t h e   i m a g e ' s   c o n t e n t ,   a n d   a r e   i m m u t a b l e .   T a g s   c a n   b e   m o v e d   t o   p o i n t   t o   d i f f e r e n t   i m a g e s ,   b u t   d i g e s t s   a r e   f i x e d .   I m a g e   t a g s   c o n s i s t   o f   l o w e r c a s e   a n d   u p p e r c a s e   l e t t e r s ,   d i g i t s ,   u n d e r s c o r e s   ( _ ) ,   p e r i o d s   ( . ) ,   a n d   d a s h e s


Question: What is Updating images?

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


Question: What is Image pull policy?

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