Question: What is Direct Server Return (DSR)?

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


Question: What is Load balancing and Services?

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


Question: What is Limitations?

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


Question: What is 11 - Service ClusterIP allocation?

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


Question: What is How Service ClusterIPs are allocated??

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


Question: What is Why do you need to reserve Service Cluster IPs??

Answer: S o m e t i m e s   y o u   m a y   w a n t   t o   h a v e   S e r v i c e s   r u n n i n g   i n   w e l l - k n o w n   I P   a d d r e s s e s ,   s o   o t h e r   c o m p o n e n t s   a n d   u s e r s   i n   t h e   c l u s t e r   c a n   u s e   t h e m .   T h e   b e s t   e x a m p l e   i s   t h e   D N S   S e r v i c e   f o r   t h e   c l u s t e r .   A s   a   s o f t   c o n v e n t i o n ,   s o m e   K u b e r n e t e s   i n s t a l l e r s   a s s i g n   t h e   1 0 t h   I P   a d d r e s s   f r o m   t h e   S e r v i c e   I P   r a n g e   t o   t h e   D N S   s e r v i c e .   A s s u m i n g   y o u   c o n f i g u r e d   y o u r   c l u s t e r   w i t h   S e r v i c e   I P   r a n g e   1 0 . 9 6 . 0 . 0 / 1 6   a n d   y o u   w a n t   y o u r   D N S   S e r v i c e   I P   t o   b e   1 0 . 9 6 . 0 . 1 0 ,   y o u ' d   h a v e   t o   c r e a t e   a   S e r v i c e   l i k e   t h i s :   a p i V e r s i o n :   v 1   k i n d :   S e r v i c e   m e t a d a t a :   l a b e l s :   k 8 s - a p p :   k u b e - d n s   k u b e r n e t e s . i o / c l u s t e r - s e r v i c e :   " t r u e "   k u b e r n e t e s . i o / n a m e :   C o r e D N S   n a m e :   k u b e - d n s   n a m e s p a c e :   k u b e - s y s t e m   s p e c :   c l u s t e r I P :   1 0 . 9 6 . 0 . 1 0   p o r t s :   -   n a m e :   d n s   p o r t :   5 3   p r o t o c o l :   U D P   t a r g e t P o r t :   5 3   -   n a m e :   d n s - t c p   p o r t :   5 3   p r o t o c o l :   T C P   t a r g e t P o r t :   5 3   s e l e c t o r :   k 8 s - a p p :   k u b e - d n s   t y p e :   C l u s t e r I P   B u t ,   a s   i t   w a s   e x p l a i n e d   b e f o r e ,   t h e   I P   a d d r e s s   1 0 . 9 6 . 0 . 1 0   h a s   n o t   b e e n   r e s e r v e d .   I f   o t h e r   S e r v i c e s   a r e   c r e a t e d   b e f o r e   o r   i n   p a r a l l e l   w i t h   d y n a m i c   a l l o c a t i o n ,   t h e r e   i s   a   c h a


Question: What is How can you avoid Service ClusterIP conflicts??

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


Question: What is Example 1?

Answer: T h i s   e x a m p l e   u s e s   t h e   I P   a d d r e s s   r a n g e :   1 0 . 9 6 . 0 . 0 / 2 4   ( C I D R   n o t a t i o n )   f o r   t h e   I P   a d d r e s s e s   o f   S e r v i c e s .   R a n g e   S i z e :   2 8   -   2   =   2 5 4 B a n d   O f f s e t :   m i n ( m a x ( 1 6 ,   2 5 6 / 1 6 ) ,   2 5 6 )   =   m i n ( 1 6 ,   2 5 6 )   =   1 6 S t a t i c   b a n d   s t a r t :   1 0 . 9 6 . 0 . 1 S t a t i c   b a n d   e n d :   1 0 . 9 6 . 0 . 1 6 R a n g e   e n d :   1 0 . 9 6 . 0 . 2 5 4


Question: What is Example 2?

Answer: T h i s   e x a m p l e   u s e s   t h e   I P   a d d r e s s   r a n g e :   1 0 . 9 6 . 0 . 0 / 2 0   ( C I D R   n o t a t i o n )   f o r   t h e   I P   a d d r e s s e s   o f   S e r v i c e s .   R a n g e   S i z e :   2 1 2   -   2   =   4 0 9 4 B a n d   O f f s e t :   m i n ( m a x ( 1 6 ,   4 0 9 6 / 1 6 ) ,   2 5 6 )   =   m i n ( 2 5 6 ,   2 5 6 )   =   2 5 6 S t a t i c   b a n d   s t a r t :   1 0 . 9 6 . 0 . 1 S t a t i c   b a n d   e n d :   1 0 . 9 6 . 1 . 0 R a n g e   e n d :   1 0 . 9 6 . 1 5 . 2 5 4


Question: What is Example 3?

Answer: T h i s   e x a m p l e   u s e s   t h e   I P   a d d r e s s   r a n g e :   1 0 . 9 6 . 0 . 0 / 1 6   ( C I D R   n o t a t i o n )   f o r   t h e   I P   a d d r e s s e s   o f   S e r v i c e s .   R a n g e   S i z e :   2 1 6   -   2   =   6 5 5 3 4 B a n d   O f f s e t :   m i n ( m a x ( 1 6 ,   6 5 5 3 6 / 1 6 ) ,   2 5 6 )   =   m i n ( 4 0 9 6 ,   2 5 6 )   =   2 5 6 S t a t i c   b a n d   s t a r t :   1 0 . 9 6 . 0 . 1 S t a t i c   b a n d   e n d s :   1 0 . 9 6 . 1 . 0 R a n g e   e n d :   1 0 . 9 6 . 2 5 5 . 2 5 4


Question: What is What's next?

Answer: R e a d   a b o u t   S e r v i c e   E x t e r n a l   T r a f f i c   P o l i c y R e a d   a b o u t   C o n n e c t i n g   A p p l i c a t i o n s   w i t h   S e r v i c e s R e a d   a b o u t   S e r v i c e s


Question: What is 12 - Service Internal Traffic Policy?

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


Question: What is Using Service Internal Traffic Policy?

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


Question: What is Note:?

Answer: T h e   f o l l o w i n g   e x a m p l e   s h o w s   w h a t   a   S e r v i c e   l o o k s   l i k e   w h e n   y o u   s e t   . s p e c . i n t e r n a l T r a f f i c P o l i c y   t o   L o c a l :   a p i V e r s i o n :   v 1   k i n d :   S e r v i c e   m e t a d a t a :   n a m e :   m y - s e r v i c e   s p e c :   s e l e c t o r :   a p p . k u b e r n e t e s . i o / n a m e :   M y A p p   p o r t s :   -   p r o t o c o l :   T C P   p o r t :   8 0   t a r g e t P o r t :   9 3 7 6   i n t e r n a l T r a f f i c P o l i c y :   L o c a l


Question: What is How it works?

Answer: T h e   k u b e - p r o x y   f i l t e r s   t h e   e n d p o i n t s   i t   r o u t e s   t o   b a s e d   o n   t h e   s p e c . i n t e r n a l T r a f f i c P o l i c y   s e t t i n g .   W h e n   i t ' s   s e t   t o   L o c a l ,   o n l y   n o d e   l o c a l   e n d p o i n t s   a r e   c o n s i d e r e d .   W h e n   i t ' s   C l u s t e r   ( t h e   d e f a u l t ) ,   o r   i s   n o t   s e t ,   K u b e r n e t e s   c o n s i d e r s   a l l   e n d p o i n t s .


Question: What is What's next?

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


Question: What is Roles and responsibilities?

Answer: Roles and responsibilitiesAnyone can contribute to Kubernetes. As your contributions to SIG Docs grow, you can apply for different levels of membership in the community. These roles allow you to take on more responsibility within the community. Each role requires more time and commitment. The roles are:Anyone: regular contributors to the Kubernetes documentationMembers: can assign and triage issues and provide non-binding review on pull requestsReviewers: can lead reviews on documentation pull requests and can vouch for a change's qualityApprovers: can lead reviews on documentation and merge changesAnyoneAnyone with a GitHub account can contribute to Kubernetes. SIG Docs welcomes all new contributors!Anyone can:Open an issue in any Kubernetes repository, including kubernetes/websiteGive non-binding


Question: How does Roles and responsibilities work?

Answer: Roles and responsibilitiesAnyone can contribute to Kubernetes. As your contributions to SIG Docs grow, you can apply for different levels of membership in the community. These roles allow you to take on more responsibility within the community. Each role requires more time and commitment. The roles are:Anyone: regular contributors to the Kubernetes documentationMembers: can assign and triage issues and provide non-binding review on pull requestsReviewers: can lead reviews on documentation pull requests and can vouch for a change's qualityApprovers: can lead reviews on documentation and merge changesAnyoneAnyone with a GitHub account can contribute to Kubernetes. SIG Docs welcomes all new contributors!Anyone can:Open an issue in any Kubernetes repository, including kubernetes/websiteGive non-binding


Question: When would you use Roles and responsibilities?

Answer: Roles and responsibilitiesAnyone can contribute to Kubernetes. As your contributions to SIG Docs grow, you can apply for different levels of membership in the community. These roles allow you to take on more responsibility within the community. Each role requires more time and commitment. The roles are:Anyone: regular contributors to the Kubernetes documentationMembers: can assign and triage issues and provide non-binding review on pull requestsReviewers: can lead reviews on documentation pull requests and can vouch for a change's qualityApprovers: can lead reviews on documentation and merge changesAnyoneAnyone with a GitHub account can contribute to Kubernetes. SIG Docs welcomes all new contributors!Anyone can:Open an issue in any Kubernetes repository, including kubernetes/websiteGive non-binding


Question: What are the benefits of Roles and responsibilities?

Answer: Roles and responsibilitiesAnyone can contribute to Kubernetes. As your contributions to SIG Docs grow, you can apply for different levels of membership in the community. These roles allow you to take on more responsibility within the community. Each role requires more time and commitment. The roles are:Anyone: regular contributors to the Kubernetes documentationMembers: can assign and triage issues and provide non-binding review on pull requestsReviewers: can lead reviews on documentation pull requests and can vouch for a change's qualityApprovers: can lead reviews on documentation and merge changesAnyoneAnyone with a GitHub account can contribute to Kubernetes. SIG Docs welcomes all new contributors!Anyone can:Open an issue in any Kubernetes repository, including kubernetes/websiteGive non-binding


Question: What is Roles and responsibilities?

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


Question: What is Anyone?

Answer: A n y o n e   w i t h   a   G i t H u b   a c c o u n t   c a n   c o n t r i b u t e   t o   K u b e r n e t e s .   S I G   D o c s   w e l c o m e s   a l l   n e w   c o n t r i b u t o r s !   A n y o n e   c a n :   O p e n   a n   i s s u e   i n   a n y   K u b e r n e t e s   r e p o s i t o r y ,   i n c l u d i n g   k u b e r n e t e s / w e b s i t e G i v e   n o n - b i n d i n g


Question: What is Members?

Answer: A   m e m b e r   i s   s o m e o n e   w h o   h a s   s u b m i t t e d   m u l t i p l e   p u l l   r e q u e s t s   t o   k u b e r n e t e s / w e b s i t e .   M e m b e r s   a r e   a   p a r t   o f   t h e   K u b e r n e t e s   G i t H u b   o r g a n i z a t i o n .   M e m b e r s   c a n :   D o   e v e r y t h i n g   l i s t e d   u n d e r   A n y o n e U s e   t h e   / l g t m   c o m m e n t   t o   a d d   t h e   L G T M   ( l o o k s   g o o d   t o   m e )   l a b e l   t o   a   p u l l   r e q u e s t N o t e : U s i n g   / l g t m   t r i g g e r s   a u t o m a t i o n .   I f   y o u   w a n t   t o   p r o v i d e   n o n - b i n d i n g   a p p r o v a l ,   c o m m e n t i n g   " L G T M "   w o r k s   t o o ! U s e   t h e   / h o l d   c o m m e n t   t o   b l o c k   m e r g i n g   f o r   a   p u l l   r e q u e s t U s e   t h e   / a s s i g n   c o m m e n t   t o   a s s i g n   a   r e v i e w e r   t o   a   p u l l   r e q u e s t P r o v i d e   n o n - b i n d i n g   r e v i e w   o n   p u l l   r e q u e s t s U s e   a u t o m a t i o n   t o   t r i a g e   a n d   c a t e g o r i z e   i s s u e s D o c u m e n t   n e w   f e a t u r e s   D o   e v e r y t h i n g   l i s t e d   u n d e r   A n y o n e   U s e   t h e   / l g t m   c o m m e n t   t o   a d d   t h e   L G T M   ( l o o k s   g o o d   t o   m e )   l a b e l   t o   a   p u l l   r e q u e s t


Question: What is Note:?

Answer: U s e   t h e   / h o l d   c o m m e n t   t o   b l o c k   m e r g i n g   f o r   a   p u l l   r e q u e s t   U s e   t h e   / a s s i g n   c o m m e n t   t o   a s s i g n   a   r e v i e w e r   t o   a   p u l l   r e q u e s t   P r o v i d e   n o n - b i n d i n g   r e v i e w   o n   p u l l   r e q u e s t s   U s e   a u t o m a t i o n   t o   t r i a g e   a n d   c a t e g o r i z e   i s s u e s   D o c u m e n t   n e w   f e a t u r e s


Question: What is Becoming a member?

Answer: A f t e r   s u b m i t t i n g   a t   l e a s t   5   s u b s t a n t i a l   p u l l   r e q u e s t s   a n d   m e e t i n g   t h e   o t h e r   r e q u i r e m e n t s :   F i n d   t w o   r e v i e w e r s   o r   a p p r o v e r s   t o   s p o n s o r   y o u r   m e m b e r s h i p . A s k   f o r   s p o n s o r s h i p   i n   t h e   # s i g - d o c s   c h a n n e l   o n   S l a c k   o r   o n   t h e   S I G   D o c s   m a i l i n g   l i s t . N o t e : D o n ' t   s e n d   a   d i r e c t   e m a i l   o r   S l a c k   d i r e c t   m e s s a g e   t o   a n   i n d i v i d u a l   S I G   D o c s   m e m b e r .   Y o u   m u s t   r e q u e s t   s p o n s o r s h i p   b e f o r e   s u b m i t t i n g   y o u r   a p p l i c a t i o n . O p e n   a   G i t H u b   i s s u e   i n   t h e   k u b e r n e t e s / o r g   r e p o s i t o r y .   U s e   t h e   O r g a n i z a t i o n   M e m b e r s h i p   R e q u e s t   i s s u e   t e m p l a t e . L e t   y o u r   s p o n s o r s   k n o w   a b o u t   t h e   G i t H u b   i s s u e .   Y o u   c a n   e i t h e r : M e n t i o n   t h e i r   G i t H u b   u s e r n a m e   i n   a n   i s s u e   ( @ < G i t H u b - u s e r n a m e > ) S e n d   t h e m   t h e   i s s u e   l i n k   u s i n g   S l a c k   o r   e m a i l . S p o n s o r s   w i l l   a p p r o v e   y o u r   r e q u e s t   w i t h   a   + 1   v o t e .   O n c e   y o u r   s p o n s o r s   a p p r o v e   t h e   r e q u e s t ,   a   K u b e r n e t e s   G i t H u b   a d m i n   a d d s   y o u   a s   a   m e m b e r .   C o n g r a t u l a t i o n s ! I f   y o u r   m e m b e r s h i p   r e q u e s t   i s   n o t   a c c e p t e d   y o u   w i l l   r e c e i v e


Question: What is Note:?

Answer: O p e n   a   G i t H u b   i s s u e   i n   t h e   k u b e r n e t e s / o r g   r e p o s i t o r y .   U s e   t h e   O r g a n i z a t i o n   M e m b e r s h i p   R e q u e s t   i s s u e   t e m p l a t e .   L e t   y o u r   s p o n s o r s   k n o w   a b o u t   t h e   G i t H u b   i s s u e .   Y o u   c a n   e i t h e r :   M e n t i o n   t h e i r   G i t H u b   u s e r n a m e   i n   a n   i s s u e   ( @ < G i t H u b - u s e r n a m e > ) S e n d   t h e m   t h e   i s s u e   l i n k   u s i n g   S l a c k   o r   e m a i l . S p o n s o r s   w i l l   a p p r o v e   y o u r   r e q u e s t   w i t h   a   + 1   v o t e .   O n c e   y o u r   s p o n s o r s   a p p r o v e   t h e   r e q u e s t ,   a   K u b e r n e t e s   G i t H u b   a d m i n   a d d s   y o u   a s   a   m e m b e r .   C o n g r a t u l a t i o n s ! I f   y o u r   m e m b e r s h i p   r e q u e s t   i s   n o t   a c c e p t e d   y o u   w i l l   r e c e i v e


Question: What is Reviewers?

Answer: R e v i e w e r s   a r e   r e s p o n s i b l e   f o r   r e v i e w i n g   o p e n   p u l l   r e q u e s t s .   U n l i k e   m e m b e r


Question: What is Note:?

Answer: E d i t   u s e r - f a c i n g   s t r i n g s   i n   c o d e   I m p r o v e   c o d e   c o m m e n t s   Y o u   c a n   b e   a   S I G   D o c s   r e v i e w e r ,   o r   a   r e v i e w e r   f o r   d o c s   i n   a   s p e c i f i c   s u b j e c t   a r e a .


Question: What is Assigning reviewers to pull requests?

Answer: A u t o m a t i o n   a s s i g n s   r e v i e w e r s   t o   a l l   p u l l   r e q u e s t s .   Y o u   c a n   r e q u e s t   a   r e v i e w   f r o m   a   s p e c i f i c   p e r s o n   b y   c o m m e n t i n g :   / a s s i g n   [ @ _ g i t h u b _ h a n d l e ] .   I f   t h e   a s s i g n e d   r e v i e w e r   h a s   n o t   c o m m e n t e d   o n   t h e   P R ,   a n o t h e r   r e v i e w e r   c a n   s t e p   i n .   Y o u   c a n   a l s o   a s s i g n   t e c h n i c a l   r e v i e w e r s   a s   n e e d e d .


Question: What is Using /lgtm?

Answer: L G T M   s t a n d s   f o r   " L o o k s   g o o d   t o   m e "   a n d   i n d i c a t e s   t h a t   a   p u l l   r e q u e s t   i s   t e c h n i c a l l y   a c c u r a t e   a n d   r e a d y   t o   m e r g e .   A l l   P R s   n e e d   a   / l g t m   c o m m e n t   f r o m   a   r e v i e w e r   a n d   a   / a p p r o v e   c o m m e n t   f r o m   a n   a p p r o v e r   t o   m e r g e .   A   / l g t m   c o m m e n t   f r o m   r e v i e w e r   i s   b i n d i n g   a n d   t r i g g e r s   a u t o m a t i o n   t h a t   a d d s   t h e   l g t m   l a b e l .


Question: What is Becoming a reviewer?

Answer: W h e n   y o u   m e e t   t h e   r e q u i r e m e n t s ,   y o u   c a n   b e c o m e   a   S I G   D o c s   r e v i e w e r .   R e v i e w e r s   i n   o t h e r   S I G s   m u s t   a p p l y   s e p a r a t e l y   f o r   r e v i e w e r   s t a t u s   i n   S I G   D o c s .   T o   a p p l y :   O p e n   a   p u l l   r e q u e s t   t h a t   a d d s   y o u r   G i t H u b   u s e r n a m e   t o   a   s e c t i o n   o f   t h e   O W N E R S _ A L I A S E S   f i l e   i n   t h e   k u b e r n e t e s / w e b s i t e   r e p o s i t o r y . N o t e : I f   y o u   a r e n ' t   s u r e   w h e r e   t o   a d d   y o u r s e l f ,   a d d   y o u r s e l f   t o   s i g - d o c s - e n - r e v i e w s . A s s i g n   t h e   P R   t o   o n e   o r   m o r e   S I G - D o c s   a p p r o v e r s   ( u s e r n a m e s   l i s t e d   u n d e r   s i g - d o c s - { l a n g u a g e } - o w n e r s ) .   O p e n   a   p u l l   r e q u e s t   t h a t   a d d s   y o u r   G i t H u b   u s e r n a m e   t o   a   s e c t i o n   o f   t h e   O W N E R S _ A L I A S E S   f i l e   i n   t h e   k u b e r n e t e s / w e b s i t e   r e p o s i t o r y .


Question: What is Note:?

Answer: A s s i g n   t h e   P R   t o   o n e   o r   m o r e   S I G - D o c s   a p p r o v e r s   ( u s e r n a m e s   l i s t e d   u n d e r   s i g - d o c s - { l a n g u a g e } - o w n e r s ) .   I f   a p p r o v e d ,   a   S I G   D o c s   l e a d   a d d s   y o u   t o   t h e   a p p r o p r i a t e   G i t H u b   t e a m .   O n c e   a d d e d ,   K 8 s - c i - r o b o t   a s s i g n s   a n d   s u g g e s t s   y o u   a s   a   r e v i e w e r   o n   n e w   p u l l   r e q u e s t s .


Question: What is Approvers?

Answer: A p p r o v e r s   r e v i e w   a n d   a p p r o v e   p u l l   r e q u e s t s   f o r   m e r g i n g .   A p p r o v e r s   a r e   m e m b e r s   o f   t h e   @ k u b e r n e t e s / s i g - d o c s - { l a n g u a g e } - o w n e r s   G i t H u b   t e a m s .   A p p r o v e r s   c a n   d o   t h e   f o l l o w i n g :   E v e r y t h i n g   l i s t e d   u n d e r   A n y o n e ,   M e m b e r s   a n d   R e v i e w e r s P u b l i s h   c o n t r i b u t o r   c o n t e n t   b y   a p p r o v i n g   a n d   m e r g i n g   p u l l   r e q u e s t s   u s i n g   t h e   / a p p r o v e   c o m m e n t P r o p o s e   i m p r o v e m e n t s   t o   t h e   s t y l e   g u i d e P r o p o s e   i m p r o v e m e n t s   t o   d o c s   t e s t s P r o p o s e   i m p r o v e m e n t s   t o   t h e   K u b e r n e t e s   w e b s i t e   o r   o t h e r   t o o l i n g   I f   t h e   P R   a l r e a d y   h a s   a   / l g t m ,   o r   i f   t h e   a p p r o v e r   a l s o   c o m m e n t s   w i t h   / l g t m ,   t h e   P R   m e r g e s   a u t o m a t i c a l l y .   A   S I G   D o c s   a p p r o v e r   s h o u l d   o n l y   l e a v e   a   / l g t m   o n   a   c h a n g e   t h a t   d o e s n ' t   n e e d   a d d i t i o n a l   t e c h n i c a l   r e v i e w .


Question: What is Approving pull requests?

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


Question: What is Warning:?

Answer: M a k e   s u r e   t h a t   p r o p o s e d   c h a n g e s   m e e t   t h e   d o c u m e n t a t i o n   c o n t e n t   g u i d e .   I f   y o u   e v e r   h a v e   a   q u e s t i o n ,   o r   y o u ' r e   n o t   s u r e   a b o u t   s o m e t h i n g ,   f e e l   f r e e   t o   c a l l   f o r   a d d i t i o n a l   r e v i e w .   V e r i f y   t h a t   N e t l i f y   t e s t s   p a s s   b e f o r e   y o u   / a p p r o v e   a   P R .   V i s i t   t h e   N e t l i f y   p a g e   p r e v i e w   f o r   a   P R   t o   m a k e   s u r e   t h i n g s   l o o k   g o o d   b e f o r e   a p p r o v i n g .   P a r t i c i p a t e   i n   t h e   P R   W r a n g l e r   r o t a t i o n   s c h e d u l e   f o r   w e e k l y   r o t a t i o n s .   S I G   D o c s   e x p e c t s   a l l   a p p r o v e r s   t o   p a r t i c i p a t e   i n   t h i s   r o t a t i o n .   S e e   P R   w r a n g l e r s .   f o r   m o r e   d e t a i l s .


Question: What is Becoming an approver?

Answer: W h e n   y o u   m e e t   t h e   r e q u i r e m e n t s ,   y o u   c a n   b e c o m e   a   S I G   D o c s   a p p r o v e r .   A p p r o v e r s   i n   o t h e r   S I G s   m u s t   a p p l y   s e p a r a t e l y   f o r   a p p r o v e r   s t a t u s   i n   S I G   D o c s .   T o   a p p l y :   O p e n   a   p u l l   r e q u e s t   a d d i n g   y o u r s e l f   t o   a   s e c t i o n   o f   t h e   O W N E R S _ A L I A S E S   f i l e   i n   t h e   k u b e r n e t e s / w e b s i t e   r e p o s i t o r y . N o t e : I f   y o u   a r e n ' t   s u r e   w h e r e   t o   a d d   y o u r s e l f ,   a d d   y o u r s e l f   t o   ` s i g - d o c s - e n - o w n e r s ` .   A s s i g n   t h e   P R   t o   o n e   o r   m o r e   c u r r e n t   S I G   D o c s   a p p r o v e r s .   O p e n   a   p u l l   r e q u e s t   a d d i n g   y o u r s e l f   t o   a   s e c t i o n   o f   t h e   O W N E R S _ A L I A S E S   f i l e   i n   t h e   k u b e r n e t e s / w e b s i t e   r e p o s i t o r y .


Question: What is Note:?

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


Question: What is What's next?

Answer: R e a d   a b o u t   P R   w r a n g l i n g ,   a   r o l e   a l l   a p p r o v e r s   t a k e   o n   r o t a t i o n .


Question: What is Define Dependent Environment Variables?

Answer: Define Dependent Environment VariablesThis page shows how to define dependent environment variables for a container in a Kubernetes Pod.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 KubernetesDefine an environment dependent variable for a containerWhen you create a Pod, you can set dependent environment variables for the containers that run in the Pod. To set dependent environment variables, you can use $(VAR_NAME) in the value of env in the configuration file.In this exercise, you create a Pod that runs one container. The configuration file for the Pod defines a dependent environment variable with common usage defined. Here is the configuration manifest for the Pod:pods/inject/dependent-envars.yaml apiVersion: v1 kind: Pod metadata: name: dependent-envars-demo spec: containers: - name: dependent-envars-demo args: - while true; do echo -en '\n'; printf UNCHANGED_REFERENCE=$UNCHANGED_REFERENCE'\n'; printf SERVICE_ADDRESS=$SERVICE_ADDRESS'\n';printf ESCAPED_REFERENCE=$ESCAPED_REFERENCE'\n'; sleep 30; done; command: - sh - -c image: busybox:1.28 env: - name: SERVICE_PORT value: "80" - name: SERVICE_IP value: "172.17.0.1" - name: UNCHANGED_REFERENCE value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: PROTOCOL value: "https" - name: SERVICE_ADDRESS value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: ESCAPED_REFERENCE value: "$$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" Create a Pod based on that manifest:kubectl apply -f https://k8s.io/examples/pods/inject/dependent-envars.yaml pod/dependent-envars-demo created List the running Pods:kubectl get pods dependent-envars-demo NAME READY STATUS RESTARTS AGE dependent-envars-demo 1/1 Running 0 9s Check the logs for the container running in your Pod:kubectl logs pod/dependent-envars-demo UNCHANGED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 SERVICE_ADDRESS=https://172.17.0.1:80 ESCAPED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 As shown above, you have defined the correct dependency reference of SERVICE_ADDRESS, bad dependency reference of UNCHANGED_REFERENCE and skip dependent references of ESCAPED_REFERENCE.When an environment variable is already defined when being referenced, the reference can be correctly resolved, such as in the SERVICE_ADDRESS case.Note that order matters in the env list. An environment variable is not considered "defined" if it is specified further down the list. That is why UNCHANGED_REFERENCE fails to resolve $(PROTOCOL) in the example above.When the environment variable is undefined or only includes some variables, the undefined environment variable is treated as a normal string, such as UNCHANGED_R


Question: How does Define Dependent Environment Variables work?

Answer: Define Dependent Environment VariablesThis page shows how to define dependent environment variables for a container in a Kubernetes Pod.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 KubernetesDefine an environment dependent variable for a containerWhen you create a Pod, you can set dependent environment variables for the containers that run in the Pod. To set dependent environment variables, you can use $(VAR_NAME) in the value of env in the configuration file.In this exercise, you create a Pod that runs one container. The configuration file for the Pod defines a dependent environment variable with common usage defined. Here is the configuration manifest for the Pod:pods/inject/dependent-envars.yaml apiVersion: v1 kind: Pod metadata: name: dependent-envars-demo spec: containers: - name: dependent-envars-demo args: - while true; do echo -en '\n'; printf UNCHANGED_REFERENCE=$UNCHANGED_REFERENCE'\n'; printf SERVICE_ADDRESS=$SERVICE_ADDRESS'\n';printf ESCAPED_REFERENCE=$ESCAPED_REFERENCE'\n'; sleep 30; done; command: - sh - -c image: busybox:1.28 env: - name: SERVICE_PORT value: "80" - name: SERVICE_IP value: "172.17.0.1" - name: UNCHANGED_REFERENCE value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: PROTOCOL value: "https" - name: SERVICE_ADDRESS value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: ESCAPED_REFERENCE value: "$$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" Create a Pod based on that manifest:kubectl apply -f https://k8s.io/examples/pods/inject/dependent-envars.yaml pod/dependent-envars-demo created List the running Pods:kubectl get pods dependent-envars-demo NAME READY STATUS RESTARTS AGE dependent-envars-demo 1/1 Running 0 9s Check the logs for the container running in your Pod:kubectl logs pod/dependent-envars-demo UNCHANGED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 SERVICE_ADDRESS=https://172.17.0.1:80 ESCAPED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 As shown above, you have defined the correct dependency reference of SERVICE_ADDRESS, bad dependency reference of UNCHANGED_REFERENCE and skip dependent references of ESCAPED_REFERENCE.When an environment variable is already defined when being referenced, the reference can be correctly resolved, such as in the SERVICE_ADDRESS case.Note that order matters in the env list. An environment variable is not considered "defined" if it is specified further down the list. That is why UNCHANGED_REFERENCE fails to resolve $(PROTOCOL) in the example above.When the environment variable is undefined or only includes some variables, the undefined environment variable is treated as a normal string, such as UNCHANGED_R


Question: When would you use Define Dependent Environment Variables?

Answer: Define Dependent Environment VariablesThis page shows how to define dependent environment variables for a container in a Kubernetes Pod.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 KubernetesDefine an environment dependent variable for a containerWhen you create a Pod, you can set dependent environment variables for the containers that run in the Pod. To set dependent environment variables, you can use $(VAR_NAME) in the value of env in the configuration file.In this exercise, you create a Pod that runs one container. The configuration file for the Pod defines a dependent environment variable with common usage defined. Here is the configuration manifest for the Pod:pods/inject/dependent-envars.yaml apiVersion: v1 kind: Pod metadata: name: dependent-envars-demo spec: containers: - name: dependent-envars-demo args: - while true; do echo -en '\n'; printf UNCHANGED_REFERENCE=$UNCHANGED_REFERENCE'\n'; printf SERVICE_ADDRESS=$SERVICE_ADDRESS'\n';printf ESCAPED_REFERENCE=$ESCAPED_REFERENCE'\n'; sleep 30; done; command: - sh - -c image: busybox:1.28 env: - name: SERVICE_PORT value: "80" - name: SERVICE_IP value: "172.17.0.1" - name: UNCHANGED_REFERENCE value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: PROTOCOL value: "https" - name: SERVICE_ADDRESS value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: ESCAPED_REFERENCE value: "$$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" Create a Pod based on that manifest:kubectl apply -f https://k8s.io/examples/pods/inject/dependent-envars.yaml pod/dependent-envars-demo created List the running Pods:kubectl get pods dependent-envars-demo NAME READY STATUS RESTARTS AGE dependent-envars-demo 1/1 Running 0 9s Check the logs for the container running in your Pod:kubectl logs pod/dependent-envars-demo UNCHANGED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 SERVICE_ADDRESS=https://172.17.0.1:80 ESCAPED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 As shown above, you have defined the correct dependency reference of SERVICE_ADDRESS, bad dependency reference of UNCHANGED_REFERENCE and skip dependent references of ESCAPED_REFERENCE.When an environment variable is already defined when being referenced, the reference can be correctly resolved, such as in the SERVICE_ADDRESS case.Note that order matters in the env list. An environment variable is not considered "defined" if it is specified further down the list. That is why UNCHANGED_REFERENCE fails to resolve $(PROTOCOL) in the example above.When the environment variable is undefined or only includes some variables, the undefined environment variable is treated as a normal string, such as UNCHANGED_R


Question: What are the benefits of Define Dependent Environment Variables?

Answer: Define Dependent Environment VariablesThis page shows how to define dependent environment variables for a container in a Kubernetes Pod.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 KubernetesDefine an environment dependent variable for a containerWhen you create a Pod, you can set dependent environment variables for the containers that run in the Pod. To set dependent environment variables, you can use $(VAR_NAME) in the value of env in the configuration file.In this exercise, you create a Pod that runs one container. The configuration file for the Pod defines a dependent environment variable with common usage defined. Here is the configuration manifest for the Pod:pods/inject/dependent-envars.yaml apiVersion: v1 kind: Pod metadata: name: dependent-envars-demo spec: containers: - name: dependent-envars-demo args: - while true; do echo -en '\n'; printf UNCHANGED_REFERENCE=$UNCHANGED_REFERENCE'\n'; printf SERVICE_ADDRESS=$SERVICE_ADDRESS'\n';printf ESCAPED_REFERENCE=$ESCAPED_REFERENCE'\n'; sleep 30; done; command: - sh - -c image: busybox:1.28 env: - name: SERVICE_PORT value: "80" - name: SERVICE_IP value: "172.17.0.1" - name: UNCHANGED_REFERENCE value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: PROTOCOL value: "https" - name: SERVICE_ADDRESS value: "$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" - name: ESCAPED_REFERENCE value: "$$(PROTOCOL)://$(SERVICE_IP):$(SERVICE_PORT)" Create a Pod based on that manifest:kubectl apply -f https://k8s.io/examples/pods/inject/dependent-envars.yaml pod/dependent-envars-demo created List the running Pods:kubectl get pods dependent-envars-demo NAME READY STATUS RESTARTS AGE dependent-envars-demo 1/1 Running 0 9s Check the logs for the container running in your Pod:kubectl logs pod/dependent-envars-demo UNCHANGED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 SERVICE_ADDRESS=https://172.17.0.1:80 ESCAPED_REFERENCE=$(PROTOCOL)://172.17.0.1:80 As shown above, you have defined the correct dependency reference of SERVICE_ADDRESS, bad dependency reference of UNCHANGED_REFERENCE and skip dependent references of ESCAPED_REFERENCE.When an environment variable is already defined when being referenced, the reference can be correctly resolved, such as in the SERVICE_ADDRESS case.Note that order matters in the env list. An environment variable is not considered "defined" if it is specified further down the list. That is why UNCHANGED_REFERENCE fails to resolve $(PROTOCOL) in the example above.When the environment variable is undefined or only includes some variables, the undefined environment variable is treated as a normal string, such as UNCHANGED_R


Question: What is Define Dependent Environment Variables?

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


Question: What is Before you begin?

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


Question: What is Define an environment dependent variable for a container?

Answer: W h e n   y o u   c r e a t e   a   P o d ,   y o u   c a n   s e t   d e p e n d e n t   e n v i r o n m e n t   v a r i a b l e s   f o r   t h e   c o n t a i n e r s   t h a t   r u n   i n   t h e   P o d .   T o   s e t   d e p e n d e n t   e n v i r o n m e n t   v a r i a b l e s ,   y o u   c a n   u s e   $ ( V A R _ N A M E )   i n   t h e   v a l u e   o f   e n v   i n   t h e   c o n f i g u r a t i o n   f i l e .   I n   t h i s   e x e r c i s e ,   y o u   c r e a t e   a   P o d   t h a t   r u n s   o n e   c o n t a i n e r .   T h e   c o n f i g u r a t i o n   f i l e   f o r   t h e   P o d   d e f i n e s   a   d e p e n d e n t   e n v i r o n m e n t   v a r i a b l e   w i t h   c o m m o n   u s a g e   d e f i n e d .   H e r e   i s   t h e   c o n f i g u r a t i o n   m a n i f e s t   f o r   t h e   P o d :   a p i V e r s i o n :   v 1   k i n d :   P o d   m e t a d a t a :   n a m e :   d e p e n d e n t - e n v a r s - d e m o   s p e c :   c o n t a i n e r s :   -   n a m e :   d e p e n d e n t - e n v a r s - d e m o   a r g s :   -   w h i l e   t r u e ;   d o   e c h o   - e n   ' \ n ' ;   p r i n t f   U N C H A N G E D _ R E F E R E N C E = $ U N C H A N G E D _ R E F E R E N C E ' \ n ' ;   p r i n t f   S E R V I C E _ A D D R E S S = $ S E R V I C E _ A D D R E S S ' \ n ' ; p r i n t f   E S C A P E D _ R E F E R E N C E = $ E S C A P E D _ R E F E R E N C E ' \ n ' ;   s l e e p   3 0 ;   d o n e ;   c o m m a n d :   -   s h   -   - c   i m a g e :   b u s y b o x : 1 . 2 8   e n v :   -   n a m e :   S E R V I C E _ P O R T   v a l u e :   " 8 0 "   -   n a m e :   S E R V I C E _ I P   v a l u e :   " 1 7 2 . 1 7 . 0 . 1 "   -   n a m e :   U N C H A N G E D _ R E F E R E N C E   v a l u e :   " $ ( P R O T O C O L ) : / / $ ( S E R V I C E _ I P ) : $ ( S E R V I C E _ P O R T ) "   -   n a m e :   P R O T O C O L   v a l u e :   " h t t p s "   -   n a m e :   S E R V I C E _ A D D R E S S   v a l u e :


Question: What is What's next?

Answer: L e a r n   m o r e   a b o u t   e n v i r o n m e n t   v a r i a b l e s . S e e   E n v V a r S o u r c e .


Question: What is Dynamic Volume Provisioning?

Answer: Dynamic Volume ProvisioningDynamic volume provisioning allows storage volumes to be created on-demand. Without dynamic provisioning, cluster administrators have to manually make calls to their cloud or storage provider to create new storage volumes, and then create PersistentVolume objects to represent them in Kubernetes. The dynamic provisioning feature eliminates the need for cluster administrators to pre-provision storage. Instead, it automatically provisions storage when users create PersistentVolumeClaim objects.BackgroundThe implementation of dynamic volume provisioning is based on the API object StorageClass from the API group storage.k8s.io. A cluster administrator can define as many StorageClass objects as needed, each specifying a volume plugin (aka provisioner) that provisions a volume and the set of parameters to pass to that provisioner when provisioning. A cluster administrator can define and expose multiple flavors of storage (from the same or different storage systems) within a cluster, each with a custom set of parameters. This design also ensures that end users don't have to worry about the complexity and nuances of how storage is provisioned, but still have the ability to select from multiple storage options.More information on storage classes can be found here.Enabling Dynamic ProvisioningTo enable dynamic provisioning, a cluster administrator needs to pre-create one or more StorageClass objects for users. StorageClass objects define which provisioner should be used and what parameters should be passed to that provisioner when dynamic provisioning is invoked. The name of a StorageClass object must be a valid DNS subdomain name.The following manifest creates a storage class "slow" which provisions standard disk-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: slow provisioner: kubernetes.io/gce-pd parameters: type: pd-standard The following manifest creates a storage class "fast" which provisions SSD-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: fast provisioner: kubernetes.io/gce-pd parameters: type: pd-ssd Using Dynamic ProvisioningUsers request dynamically provisioned storage by including a storage class in their PersistentVolumeClaim. Before Kubernetes v1.6, this was done via the volume.beta.kubernetes.io/storage-class annotation. However, this annotation is deprecated since v1.9. Users now can and should instead use the storageClassName field of the PersistentVolumeClaim object. The value of this field must match the name of a StorageClass configured by the administrator (see below).To select the "fast" storage class, for example, a user would create the following PersistentVolumeClaim:apiVersion: v1 kind: PersistentVolumeClaim metadata: name: claim1 spec: accessModes: - ReadWriteOnce storageClassName: fast resources: requests: storage: 30Gi This claim results in an SSD-like Persistent Disk being automatically provisioned. When the claim is dele


Question: How does Dynamic Volume Provisioning work?

Answer: Dynamic Volume ProvisioningDynamic volume provisioning allows storage volumes to be created on-demand. Without dynamic provisioning, cluster administrators have to manually make calls to their cloud or storage provider to create new storage volumes, and then create PersistentVolume objects to represent them in Kubernetes. The dynamic provisioning feature eliminates the need for cluster administrators to pre-provision storage. Instead, it automatically provisions storage when users create PersistentVolumeClaim objects.BackgroundThe implementation of dynamic volume provisioning is based on the API object StorageClass from the API group storage.k8s.io. A cluster administrator can define as many StorageClass objects as needed, each specifying a volume plugin (aka provisioner) that provisions a volume and the set of parameters to pass to that provisioner when provisioning. A cluster administrator can define and expose multiple flavors of storage (from the same or different storage systems) within a cluster, each with a custom set of parameters. This design also ensures that end users don't have to worry about the complexity and nuances of how storage is provisioned, but still have the ability to select from multiple storage options.More information on storage classes can be found here.Enabling Dynamic ProvisioningTo enable dynamic provisioning, a cluster administrator needs to pre-create one or more StorageClass objects for users. StorageClass objects define which provisioner should be used and what parameters should be passed to that provisioner when dynamic provisioning is invoked. The name of a StorageClass object must be a valid DNS subdomain name.The following manifest creates a storage class "slow" which provisions standard disk-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: slow provisioner: kubernetes.io/gce-pd parameters: type: pd-standard The following manifest creates a storage class "fast" which provisions SSD-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: fast provisioner: kubernetes.io/gce-pd parameters: type: pd-ssd Using Dynamic ProvisioningUsers request dynamically provisioned storage by including a storage class in their PersistentVolumeClaim. Before Kubernetes v1.6, this was done via the volume.beta.kubernetes.io/storage-class annotation. However, this annotation is deprecated since v1.9. Users now can and should instead use the storageClassName field of the PersistentVolumeClaim object. The value of this field must match the name of a StorageClass configured by the administrator (see below).To select the "fast" storage class, for example, a user would create the following PersistentVolumeClaim:apiVersion: v1 kind: PersistentVolumeClaim metadata: name: claim1 spec: accessModes: - ReadWriteOnce storageClassName: fast resources: requests: storage: 30Gi This claim results in an SSD-like Persistent Disk being automatically provisioned. When the claim is dele


Question: When would you use Dynamic Volume Provisioning?

Answer: Dynamic Volume ProvisioningDynamic volume provisioning allows storage volumes to be created on-demand. Without dynamic provisioning, cluster administrators have to manually make calls to their cloud or storage provider to create new storage volumes, and then create PersistentVolume objects to represent them in Kubernetes. The dynamic provisioning feature eliminates the need for cluster administrators to pre-provision storage. Instead, it automatically provisions storage when users create PersistentVolumeClaim objects.BackgroundThe implementation of dynamic volume provisioning is based on the API object StorageClass from the API group storage.k8s.io. A cluster administrator can define as many StorageClass objects as needed, each specifying a volume plugin (aka provisioner) that provisions a volume and the set of parameters to pass to that provisioner when provisioning. A cluster administrator can define and expose multiple flavors of storage (from the same or different storage systems) within a cluster, each with a custom set of parameters. This design also ensures that end users don't have to worry about the complexity and nuances of how storage is provisioned, but still have the ability to select from multiple storage options.More information on storage classes can be found here.Enabling Dynamic ProvisioningTo enable dynamic provisioning, a cluster administrator needs to pre-create one or more StorageClass objects for users. StorageClass objects define which provisioner should be used and what parameters should be passed to that provisioner when dynamic provisioning is invoked. The name of a StorageClass object must be a valid DNS subdomain name.The following manifest creates a storage class "slow" which provisions standard disk-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: slow provisioner: kubernetes.io/gce-pd parameters: type: pd-standard The following manifest creates a storage class "fast" which provisions SSD-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: fast provisioner: kubernetes.io/gce-pd parameters: type: pd-ssd Using Dynamic ProvisioningUsers request dynamically provisioned storage by including a storage class in their PersistentVolumeClaim. Before Kubernetes v1.6, this was done via the volume.beta.kubernetes.io/storage-class annotation. However, this annotation is deprecated since v1.9. Users now can and should instead use the storageClassName field of the PersistentVolumeClaim object. The value of this field must match the name of a StorageClass configured by the administrator (see below).To select the "fast" storage class, for example, a user would create the following PersistentVolumeClaim:apiVersion: v1 kind: PersistentVolumeClaim metadata: name: claim1 spec: accessModes: - ReadWriteOnce storageClassName: fast resources: requests: storage: 30Gi This claim results in an SSD-like Persistent Disk being automatically provisioned. When the claim is dele


Question: What are the benefits of Dynamic Volume Provisioning?

Answer: Dynamic Volume ProvisioningDynamic volume provisioning allows storage volumes to be created on-demand. Without dynamic provisioning, cluster administrators have to manually make calls to their cloud or storage provider to create new storage volumes, and then create PersistentVolume objects to represent them in Kubernetes. The dynamic provisioning feature eliminates the need for cluster administrators to pre-provision storage. Instead, it automatically provisions storage when users create PersistentVolumeClaim objects.BackgroundThe implementation of dynamic volume provisioning is based on the API object StorageClass from the API group storage.k8s.io. A cluster administrator can define as many StorageClass objects as needed, each specifying a volume plugin (aka provisioner) that provisions a volume and the set of parameters to pass to that provisioner when provisioning. A cluster administrator can define and expose multiple flavors of storage (from the same or different storage systems) within a cluster, each with a custom set of parameters. This design also ensures that end users don't have to worry about the complexity and nuances of how storage is provisioned, but still have the ability to select from multiple storage options.More information on storage classes can be found here.Enabling Dynamic ProvisioningTo enable dynamic provisioning, a cluster administrator needs to pre-create one or more StorageClass objects for users. StorageClass objects define which provisioner should be used and what parameters should be passed to that provisioner when dynamic provisioning is invoked. The name of a StorageClass object must be a valid DNS subdomain name.The following manifest creates a storage class "slow" which provisions standard disk-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: slow provisioner: kubernetes.io/gce-pd parameters: type: pd-standard The following manifest creates a storage class "fast" which provisions SSD-like persistent disks.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: fast provisioner: kubernetes.io/gce-pd parameters: type: pd-ssd Using Dynamic ProvisioningUsers request dynamically provisioned storage by including a storage class in their PersistentVolumeClaim. Before Kubernetes v1.6, this was done via the volume.beta.kubernetes.io/storage-class annotation. However, this annotation is deprecated since v1.9. Users now can and should instead use the storageClassName field of the PersistentVolumeClaim object. The value of this field must match the name of a StorageClass configured by the administrator (see below).To select the "fast" storage class, for example, a user would create the following PersistentVolumeClaim:apiVersion: v1 kind: PersistentVolumeClaim metadata: name: claim1 spec: accessModes: - ReadWriteOnce storageClassName: fast resources: requests: storage: 30Gi This claim results in an SSD-like Persistent Disk being automatically provisioned. When the claim is dele


Question: What is Dynamic Volume Provisioning?

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


Question: What is Background?

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


Question: What is Enabling Dynamic Provisioning?

Answer: T o   e n a b l e   d y n a m i c   p r o v i s i o n i n g ,   a   c l u s t e r   a d m i n i s t r a t o r   n e e d s   t o   p r e - c r e a t e   o n e   o r   m o r e   S t o r a g e C l a s s   o b j e c t s   f o r   u s e r s .   S t o r a g e C l a s s   o b j e c t s   d e f i n e   w h i c h   p r o v i s i o n e r   s h o u l d   b e   u s e d   a n d   w h a t   p a r a m e t e r s   s h o u l d   b e   p a s s e d   t o   t h a t   p r o v i s i o n e r   w h e n   d y n a m i c   p r o v i s i o n i n g   i s   i n v o k e d .   T h e   n a m e   o f   a   S t o r a g e C l a s s   o b j e c t   m u s t   b e   a   v a l i d   D N S   s u b d o m a i n   n a m e .   T h e   f o l l o w i n g   m a n i f e s t   c r e a t e s   a   s t o r a g e   c l a s s   " s l o w "   w h i c h   p r o v i s i o n s   s t a n d a r d   d i s k - l i k e   p e r s i s t e n t   d i s k s .   a p i V e r s i o n :   s t o r a g e . k 8 s . i o / v 1   k i n d :   S t o r a g e C l a s s   m e t a d a t a :   n a m e :   s l o w   p r o v i s i o n e r :   k u b e r n e t e s . i o / g c e - p d   p a r a m e t e r s :   t y p e :   p d - s t a n d a r d   T h e   f o l l o w i n g   m a n i f e s t   c r e a t e s   a   s t o r a g e   c l a s s   " f a s t "   w h i c h   p r o v i s i o n s   S S D - l i k e   p e r s i s t e n t   d i s k s .   a p i V e r s i o n :   s t o r a g e . k 8 s . i o / v 1   k i n d :   S t o r a g e C l a s s   m e t a d a t a :   n a m e :   f a s t   p r o v i s i o n e r :   k u b e r n e t e s . i o / g c e - p d   p a r a m e t e r s :   t y p e :   p d - s s d


Question: What is Using Dynamic Provisioning?

Answer: U s e r s   r e q u e s t   d y n a m i c a l l y   p r o v i s i o n e d   s t o r a g e   b y   i n c l u d i n g   a   s t o r a g e   c l a s s   i n   t h e i r   P e r s i s t e n t V o l u m e C l a i m .   B e f o r e   K u b e r n e t e s   v 1 . 6 ,   t h i s   w a s   d o n e   v i a   t h e   v o l u m e . b e t a . k u b e r n e t e s . i o / s t o r a g e - c l a s s   a n n o t a t i o n .   H o w e v e r ,   t h i s   a n n o t a t i o n   i s   d e p r e c a t e d   s i n c e   v 1 . 9 .   U s e r s   n o w   c a n   a n d   s h o u l d   i n s t e a d   u s e   t h e   s t o r a g e C l a s s N a m e   f i e l d   o f   t h e   P e r s i s t e n t V o l u m e C l a i m   o b j e c t .   T h e   v a l u e   o f   t h i s   f i e l d   m u s t   m a t c h   t h e   n a m e   o f   a   S t o r a g e C l a s s   c o n f i g u r e d   b y   t h e   a d m i n i s t r a t o r   ( s e e   b e l o w ) .   T o   s e l e c t   t h e   " f a s t "   s t o r a g e   c l a s s ,   f o r   e x a m p l e ,   a   u s e r   w o u l d   c r e a t e   t h e   f o l l o w i n g   P e r s i s t e n t V o l u m e C l a i m :   a p i V e r s i o n :   v 1   k i n d :   P e r s i s t e n t V o l u m e C l a i m   m e t a d a t a :   n a m e :   c l a i m 1   s p e c :   a c c e s s M o d e s :   -   R e a d W r i t e O n c e   s t o r a g e C l a s s N a m e :   f a s t   r e s o u r c e s :   r e q u e s t s :   s t o r a g e :   3 0 G i   T h i s   c l a i m   r e s u l t s   i n   a n   S S D - l i k e   P e r s i s t e n t   D i s k   b e i n g   a u t o m a t i c a l l y   p r o v i s i o n e d .   W h e n   t h e   c l a i m   i s   d e l e t e d ,   t h e   v o l u m e   i s   d e s t r o y e d .


Question: What is Defaulting Behavior?

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


Question: What is Topology Awareness?

Answer: I n   M u l t i - Z o n e   c l u s t e r s ,   P o d s   c a n   b e   s p r e a d   a c r o s s   Z o n e s   i n   a   R e g i o n .   S i n g l e - Z o n e   s t o r a g e   b a c k e n d s   s h o u l d   b e   p r o v i s i o n e d   i n   t h e   Z o n e s   w h e r e   P o d s   a r e   s c h e d u l e d .   T h i s   c a n   b e   a c c o m p l i s h e d   b y   s e t t i n g   t h e   V o l u m e   B i n d i n g   M o d e .


Question: What is Server-Side Apply?

Answer: Server-Side ApplyFEATURE STATE: Kubernetes v1.22 [stable] (enabled by default: true)Kubernetes supports multiple appliers collaborating to manage the fields of a single object.Server-Side Apply provides an optional mechanism for your cluster's control plane to track changes to an object's fields. At the level of a specific resource, Server-Side Apply records and tracks information about control over the fields of that object.Server-Side Apply helps users and controllers manage their resources through declarative configuration. Clients can create and modify objects declaratively by submitting their fully specified intent.A fully specified intent is a partial object that only includes the fields and values for which the user has an opinion. That intent either creates a new object (using default values for unspecified fields), or is combined, by the API server, with the existing object.Comparison with Client-Side Apply explains how Server-Side Apply differs from the original, client-side kubectl apply implementation.Field managementThe Kubernetes API server tracks managed fields for all newly created objects.When trying to apply an object, fields that have a different value and are owned by another manager will result in a conflict. This is done in order to signal that the operation might undo another collaborator's changes. Writes to objects with managed fields can be forced, in which case the value of any conflicted field will be overridden, and the ownership will be transferred.Whenever a field's value does change, ownership moves from its current manager to the manager making the change.Apply checks if there are any other field managers that also own the field. If the field is not owned by any other field managers, that field is set to its default value (if there is one), or otherwise is deleted from the object. The same rule applies to fields that are lists, associative lists, or maps.For a user to manage a field, in the Server-Side Apply sense, means that the user relies on and expects the value of the field not to change. The user who last made an assertion about the value of a field will be recorded as the current field manager. This can be done by changing the field manager details explicitly using HTTP POST (create), PUT (update), or non-apply PATCH (patch). You can also declare and record a field manager by including a value for that field in a Server-Side Apply operation.A Server-Side Apply patch request requires the client to provide its identity as a field manager. When using Server-Side Apply, trying to change a field that is controlled by a different manager results in a rejected request unless the client forces an override. For details of overrides, see Conflicts.When two or more appliers set a field to the same value, they share ownership of that field. Any subsequent attempt to change the value of the shared field, by any of the appliers, results in a conflict. Shared field owners may give up ownership of a field by making a Serve


Question: How does Server-Side Apply work?

Answer: Server-Side ApplyFEATURE STATE: Kubernetes v1.22 [stable] (enabled by default: true)Kubernetes supports multiple appliers collaborating to manage the fields of a single object.Server-Side Apply provides an optional mechanism for your cluster's control plane to track changes to an object's fields. At the level of a specific resource, Server-Side Apply records and tracks information about control over the fields of that object.Server-Side Apply helps users and controllers manage their resources through declarative configuration. Clients can create and modify objects declaratively by submitting their fully specified intent.A fully specified intent is a partial object that only includes the fields and values for which the user has an opinion. That intent either creates a new object (using default values for unspecified fields), or is combined, by the API server, with the existing object.Comparison with Client-Side Apply explains how Server-Side Apply differs from the original, client-side kubectl apply implementation.Field managementThe Kubernetes API server tracks managed fields for all newly created objects.When trying to apply an object, fields that have a different value and are owned by another manager will result in a conflict. This is done in order to signal that the operation might undo another collaborator's changes. Writes to objects with managed fields can be forced, in which case the value of any conflicted field will be overridden, and the ownership will be transferred.Whenever a field's value does change, ownership moves from its current manager to the manager making the change.Apply checks if there are any other field managers that also own the field. If the field is not owned by any other field managers, that field is set to its default value (if there is one), or otherwise is deleted from the object. The same rule applies to fields that are lists, associative lists, or maps.For a user to manage a field, in the Server-Side Apply sense, means that the user relies on and expects the value of the field not to change. The user who last made an assertion about the value of a field will be recorded as the current field manager. This can be done by changing the field manager details explicitly using HTTP POST (create), PUT (update), or non-apply PATCH (patch). You can also declare and record a field manager by including a value for that field in a Server-Side Apply operation.A Server-Side Apply patch request requires the client to provide its identity as a field manager. When using Server-Side Apply, trying to change a field that is controlled by a different manager results in a rejected request unless the client forces an override. For details of overrides, see Conflicts.When two or more appliers set a field to the same value, they share ownership of that field. Any subsequent attempt to change the value of the shared field, by any of the appliers, results in a conflict. Shared field owners may give up ownership of a field by making a Serve


Question: When would you use Server-Side Apply?

Answer: Server-Side ApplyFEATURE STATE: Kubernetes v1.22 [stable] (enabled by default: true)Kubernetes supports multiple appliers collaborating to manage the fields of a single object.Server-Side Apply provides an optional mechanism for your cluster's control plane to track changes to an object's fields. At the level of a specific resource, Server-Side Apply records and tracks information about control over the fields of that object.Server-Side Apply helps users and controllers manage their resources through declarative configuration. Clients can create and modify objects declaratively by submitting their fully specified intent.A fully specified intent is a partial object that only includes the fields and values for which the user has an opinion. That intent either creates a new object (using default values for unspecified fields), or is combined, by the API server, with the existing object.Comparison with Client-Side Apply explains how Server-Side Apply differs from the original, client-side kubectl apply implementation.Field managementThe Kubernetes API server tracks managed fields for all newly created objects.When trying to apply an object, fields that have a different value and are owned by another manager will result in a conflict. This is done in order to signal that the operation might undo another collaborator's changes. Writes to objects with managed fields can be forced, in which case the value of any conflicted field will be overridden, and the ownership will be transferred.Whenever a field's value does change, ownership moves from its current manager to the manager making the change.Apply checks if there are any other field managers that also own the field. If the field is not owned by any other field managers, that field is set to its default value (if there is one), or otherwise is deleted from the object. The same rule applies to fields that are lists, associative lists, or maps.For a user to manage a field, in the Server-Side Apply sense, means that the user relies on and expects the value of the field not to change. The user who last made an assertion about the value of a field will be recorded as the current field manager. This can be done by changing the field manager details explicitly using HTTP POST (create), PUT (update), or non-apply PATCH (patch). You can also declare and record a field manager by including a value for that field in a Server-Side Apply operation.A Server-Side Apply patch request requires the client to provide its identity as a field manager. When using Server-Side Apply, trying to change a field that is controlled by a different manager results in a rejected request unless the client forces an override. For details of overrides, see Conflicts.When two or more appliers set a field to the same value, they share ownership of that field. Any subsequent attempt to change the value of the shared field, by any of the appliers, results in a conflict. Shared field owners may give up ownership of a field by making a Serve


Question: What are the benefits of Server-Side Apply?

Answer: Server-Side ApplyFEATURE STATE: Kubernetes v1.22 [stable] (enabled by default: true)Kubernetes supports multiple appliers collaborating to manage the fields of a single object.Server-Side Apply provides an optional mechanism for your cluster's control plane to track changes to an object's fields. At the level of a specific resource, Server-Side Apply records and tracks information about control over the fields of that object.Server-Side Apply helps users and controllers manage their resources through declarative configuration. Clients can create and modify objects declaratively by submitting their fully specified intent.A fully specified intent is a partial object that only includes the fields and values for which the user has an opinion. That intent either creates a new object (using default values for unspecified fields), or is combined, by the API server, with the existing object.Comparison with Client-Side Apply explains how Server-Side Apply differs from the original, client-side kubectl apply implementation.Field managementThe Kubernetes API server tracks managed fields for all newly created objects.When trying to apply an object, fields that have a different value and are owned by another manager will result in a conflict. This is done in order to signal that the operation might undo another collaborator's changes. Writes to objects with managed fields can be forced, in which case the value of any conflicted field will be overridden, and the ownership will be transferred.Whenever a field's value does change, ownership moves from its current manager to the manager making the change.Apply checks if there are any other field managers that also own the field. If the field is not owned by any other field managers, that field is set to its default value (if there is one), or otherwise is deleted from the object. The same rule applies to fields that are lists, associative lists, or maps.For a user to manage a field, in the Server-Side Apply sense, means that the user relies on and expects the value of the field not to change. The user who last made an assertion about the value of a field will be recorded as the current field manager. This can be done by changing the field manager details explicitly using HTTP POST (create), PUT (update), or non-apply PATCH (patch). You can also declare and record a field manager by including a value for that field in a Server-Side Apply operation.A Server-Side Apply patch request requires the client to provide its identity as a field manager. When using Server-Side Apply, trying to change a field that is controlled by a different manager results in a rejected request unless the client forces an override. For details of overrides, see Conflicts.When two or more appliers set a field to the same value, they share ownership of that field. Any subsequent attempt to change the value of the shared field, by any of the appliers, results in a conflict. Shared field owners may give up ownership of a field by making a Serve


Question: What is Server-Side Apply?

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


Question: What is Field management?

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


Question: What is Example?

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


Question: What is Note:?

Answer: - - -   a p i V e r s i o n :   v 1   k i n d :   C o n f i g M a p   m e t a d a t a :   n a m e :   t e s t - c m   n a m e s p a c e :   d e f a u l t   l a b e l s :   t e s t - l a b e l :   t e s t   m a n a g e d F i e l d s :   -   m a n a g e r :   k u b e c t l   o p e r a t i o n :   A p p l y   #   n o t e   c a p i t a l i z a t i o n :   " A p p l y "   ( o r   " U p d a t e " )   a p i V e r s i o n :   v 1   t i m e :   " 2 0 1 0 - 1 0 - 1 0 T 0 : 0 0 : 0 0 Z "   f i e l d s T y p e :   F i e l d s V 1   f i e l d s V 1 :   f : m e t a d a t a :   f : l a b e l s :   f : t e s t - l a b e l :   { }   f : d a t a :   f : k e y :   { }   d a t a :   k e y :   s o m e   v a l u e   T h a t   e x a m p l e   C o n f i g M a p   o b j e c t   c o n t a i n s   a   s i n g l e   f i e l d   m a n a g e m e n t   r e c o r d   i n   . m e t a d a t a . m a n a g e d F i e l d s .   T h e   f i e l d   m a n a g e m e n t   r e c o r d   c o n s i s t s   o f   b a s i c   i n f o r m a t i o n   a b o u t   t h e   m a n a g i n g   e n t i t y   i t s e l f ,   p l u s   d e t a i l s   a b o u t   t h e   f i e l d s   b e i n g   m a n a g e d   a n d   t h e   r e l e v a n t   o p e r a t i o n   ( A p p l y   o r   U p d a t e ) .   I f   t h e   r e q u e s t   t h a t   l a s t   c h a n g e d   t h a t   f i e l d   w a s   a   S e r v e r - S i d e   A p p l y   p a t c h   t h e n   t h e   v a l u e   o f   o p e r a t i o n   i s   A p p l y ;   o t h e r w i s e ,   i t   i s   U p d a t e .   T h e r e   i s   a n o t h e r   p o s s i b l e   o u t c o m e .   A   c l i e n t   c o u l d   s u b m i t   a n   i n v a l i d   r e q u e s t   b o d y .   I f   t h e   f u l l y   s p e c i f i e d   i n t e n t   d o e s   n o t   p r o d u c e   a   v a l i d   o b j e c t ,   t h e   r e q u e s t   f a i l s .   I t   i s   h o w e v e r   p o s s i b l e   t o   c h a n g e   . m e t a d a t a . m a n a g e d F i e l d s   t h r o u g h


Question: What is Conflicts?

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


Question: What is Field managers?

Answer: M a n a g e r s   i d e n t i f y   d i s t i n c t   w o r k f l o w s   t h a t   a r e   m o d i f y i n g   t h e   o b j e c t   ( e s p e c i a l l y   u s e f u l   o n   c o n f l i c t s ! ) ,   a n d   c a n   b e   s p e c i f i e d   t h r o u g h   t h e   f i e l d M a n a g e r   q u e r y   p a r a m e t e r   a s   p a r t   o f   a   m o d i f y i n g   r e q u e s t .   W h e n   y o u   A p p l y   t o   a   r e s o u r c e ,   t h e   f i e l d M a n a g e r   p a r a m e t e r   i s   r e q u i r e d .   F o r   o t h e r   u p d a t e s ,   t h e   A P I   s e r v e r   i n f e r s   a   f i e l d   m a n a g e r   i d e n t i t y   f r o m   t h e   " U s e r - A g e n t : "   H T T P   h e a d e r   ( i f   p r e s e n t ) .   W h e n   y o u   u s e   t h e   k u b e c t l   t o o l   t o   p e r f o r m   a   S e r v e r - S i d e   A p p l y   o p e r a t i o n ,   k u b e c t l   s e t s   t h e   m a n a g e r   i d e n t i t y   t o   " k u b e c t l "   b y   d e f a u l t .


Question: What is Serialization?

Answer: A t   t h e   p r o t o c o l   l e v e l ,   K u b e r n e t e s   r e p r e s e n t s   S e r v e r - S i d e   A p p l y   m e s s a g e   b o d i e s   a s   Y A M L ,   w i t h   t h e   m e d i a   t y p e   a p p l i c a t i o n / a p p l y - p a t c h + y a m l .


Question: What is Note:?

Answer: W h e t h e r   y o u   a r e   s u b m i t t i n g   J S O N   d a t a   o r   Y A M L   d a t a ,   u s e   a p p l i c a t i o n / a p p l y - p a t c h + y a m l   a s   t h e   C o n t e n t - T y p e   h e a d e r   v a l u e .   A l l   J S O N   d o c u m e n t s   a r e   v a l i d   Y A M L .   H o w e v e r ,   K u b e r n e t e s   h a s   a   b u g   w h e r e   i t   u s e s   a   Y A M L   p a r s e r   t h a t   d o e s   n o t   f u l l y   i m p l e m e n t   t h e   Y A M L   s p e c i f i c a t i o n .   S o m e   J S O N   e s c a p e s   m a y   n o t   b e   r e c o g n i z e d .   T h e   s e r i a l i z a t i o n   i s   t h e   s a m e   a s   f o r   K u b e r n e t e s   o b j e c t s ,   w i t h   t h e   e x c e p t i o n   t h a t   c l i e n t s   a r e   n o t   r e q u i r e d   t o   s e n d   a   c o m p l e t e   o b j e c t .   H e r e ' s   a n   e x a m p l e   o f   a   S e r v e r - S i d e   A p p l y   m e s s a g e   b o d y   ( f u l l y   s p e c i f i e d   i n t e n t ) :   {   " a p i V e r s i o n " :   " v 1 " ,   " k i n d " :   " C o n f i g M a p "   }   ( t h i s   w o u l d   m a k e   a   n o - c h a n g e   u p d a t e ,   p r o v i d e d   t h a t   i t   w a s   s e n t   a s   t h e   b o d y   o f   a   p a t c h   r e q u e s t   t o   a   v a l i d   v 1 / c o n f i g m a p s   r e s o u r c e ,   a n d   w i t h   t h e   a p p r o p r i a t e   r e q u e s t   C o n t e n t - T y p e ) .


Question: What is Operations in scope for field management?

Answer: T h e   K u b e r n e t e s   A P I   o p e r a t i o n s   w h e r e   f i e l d   m a n a g e m e n t   i s   c o n s i d e r e d   a r e :   S e r v e r - S i d e   A p p l y   ( H T T P   P A T C H ,   w i t h   c o n t e n t   t y p e   a p p l i c a t i o n / a p p l y - p a t c h + y a m l ) R e p l a c i n g   a n   e x i s t i n g   o b j e c t   ( u p d a t e   t o   K u b e r n e t e s ;   P U T   a t   t h e   H T T P   l e v e l )   B o t h   o p e r a t i o n s   u p d a t e   . m e t a d a t a . m a n a g e d F i e l d s ,   b u t   b e h a v e   a   l i t t l e   d i f f e r e n t l y .   U n l e s s   y o u   s p e c i f y   a   f o r c e d   o v e r r i d e ,   a n   a p p l y   o p e r a t i o n   t h a t   e n c o u n t e r s   f i e l d - l e v e l   c o n f l i c t s   a l w a y s   f a i l s ;   b y   c o n t r a s t ,   i f   y o u   m a k e   a   c h a n g e   u s i n g   u p d a t e   t h a t   w o u l d   a f f e c t   a   m a n a g e d   f i e l d ,   a   c o n f l i c t   n e v e r   p r o v o k e s   f a i l u r e   o f   t h e   o p e r a t i o n .   A l l   S e r v e r - S i d e   A p p l y   p a t c h   r e q u e s t s   a r e   r e q u i r e d   t o   i d e n t i f y   t h e m s e l v e s   b y   p r o v i d i n g   a   f i e l d M a n a g e r   q u e r y   p a r a m e t e r ,   w h i l e   t h e   q u e r y   p a r a m e t e r   i s   o p t i o n a l   f o r   u p d a t e   o p e r a t i o n s .   F i n a l l y ,   w h e n   u s i n g   t h e   A p p l y   o p e r a t i o n   y o u   c a n n o t   d e f i n e   m a n a g e d F i e l d s   i n   t h e   b o d y   o f   t h e   r e q u e s t   t h a t   y o u   s u b m i t .   A n   e x a m p l e   o b j e c t   w i t h   m u l t i p l e   m a n a g e r s   c o u l d   l o o k   l i k e   t h i s :   - - -   a p i V e r s i o n :   v 1   k i n d :   C o n f i g M a p   m e t a d a t a :   n a m e :   t e s t - c m   n a m e s p a c e :   d e f a u l t   l a b e l s :   t e s t - l a


Question: What is Merge strategy?

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


Question: What is Custom resources and Server-Side Apply?

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