Question: What is The reason field?

Answer: Y o u   c a n   a d d   a   m a c h i n e - r e a d a b l e   v a l i d a t i o n   f a i l u r e   r e a s o n   w i t h i n   a   v a l i d a t i o n ,   t o   b e   r e t u r n e d   w h e n e v e r   a   r e q u e s t   f a i l s   t h i s   v a l i d a t i o n   r u l e .   F o r   e x a m p l e :   x - k u b e r n e t e s - v a l i d a t i o n s :   -   r u l e :   " s e l f . x   < =   s e l f . m a x L i m i t "   r e a s o n :   " F i e l d V a l u e I n v a l i d "   T h e   H T T P   s t a t u s   c o d e   r e t u r n e d   t o   t h e   c a l l e r   w i l l   m a t c h   t h e   r e a s o n   o f   t h e   f i r s t   f a i l e d   v a l i d a t i o n   r u l e .   T h e   c u r r e n t l y   s u p p o r t e d   r e a s o n s   a r e :   " F i e l d V a l u e I n v a l i d " ,   " F i e l d V a l u e F o r b i d d e n " ,   " F i e l d V a l u e R e q u i r e d " ,   " F i e l d V a l u e D u p l i c a t e " .   I f   n o t   s e t   o r   u n k n o w n   r e a s o n s ,   d e f a u l t   t o   u s e   " F i e l d V a l u e I n v a l i d " .   S e t t i n g   r e a s o n   i s   o p t i o n a l .


Question: What is The fieldPath field?

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


Question: What is The optionalOldSelf field?

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


Question: What is Validation functions?

Answer: F u n c t i o n s   a v a i l a b l e   i n c l u d e :   C E L   s t a n d a r d   f u n c t i o n s ,   d e f i n e d   i n   t h e   l i s t   o f   s t a n d a r d   d e f i n i t i o n s C E L   s t a n d a r d   m a c r o s C E L   e x t e n d e d   s t r i n g   f u n c t i o n   l i b r a r y K u b e r n e t e s   C E L   e x t e n s i o n   l i b r a r y


Question: What is Transition rules?

Answer: A   r u l e   t h a t   c o n t a i n s   a n   e x p r e s s i o n   r e f e r e n c i n g   t h e   i d e n t i f i e r   o l d S e l f   i s   i m p l i c i t l y   c o n s i d e r e d   a   t r a n s i t i o n   r u l e .   T r a n s i t i o n   r u l e s   a l l o w   s c h e m a   a u t h o r s   t o   p r e v e n t   c e r t a i n   t r a n s i t i o n s   b e t w e e n   t w o   o t h e r w i s e   v a l i d   s t a t e s .   F o r   e x a m p l e :   t y p e :   s t r i n g   e n u m :   [ " l o w " ,   " m e d i u m " ,   " h i g h " ]   x - k u b e r n e t e s - v a l i d a t i o n s :   -   r u l e :   " ! ( s e l f   = =   ' h i g h '   & &   o l d S e l f   = =   ' l o w ' )   & &   ! ( s e l f   = =   ' l o w '   & &   o l d S e l f   = =   ' h i g h ' ) "   m e s s a g e :   c a n n o t   t r a n s i t i o n   d i r e c t l y   b e t w e e n   ' l o w '   a n d   ' h i g h '   U n l i k e   o t h e r   r u l e s ,   t r a n s i t i o n   r u l e s   a p p l y   o n l y   t o   o p e r a t i o n s   m e e t i n g   t h e   f o l l o w i n g   c r i t e r i a :   T h e   o p e r a t i o n   u p d a t e s   a n   e x i s t i n g   o b j e c t .   T r a n s i t i o n   r u l e s   n e v e r   a p p l y   t o   c r e a t e   o p e r a t i o n s . B o t h   a n   o l d   a n d   a   n e w   v a l u e   e x i s t .   I t   r e m a i n s   p o s s i b l e   t o   c h e c k   i f   a   v a l u e   h a s   b e e n   a d d e d   o r   r e m o v e d   b y   p l a c i n g   a   t r a n s i t i o n   r u l e   o n   t h e   p a r e n t   n o d e .   T r a n s i t i o n   r u l e s   a r e   n e v e r   a p p l i e d   t o   c u s t o m   r e s o u r c e   c r e a t i o n .   W h e n   p l a c e d   o n   a n   o p t i o n a l   f i e l d ,   a   t r a n s i t i o n   r u l e   w i l l   n o t   a p p l y   t o   u p d a t e   o p e r a t i o n s   t h a t   s e t   o r   u n s e t   t h e   f i e l d . T h e   p a t h   t o   t h e   s c h e m a   n o d e   b e i


Question: What is Resource use by validation functions?

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


Question: What is Note:?

Answer: D e f a u l t i n g   a l l o w s   t o   s p e c i f y   d e f a u l t   v a l u e s   i n   t h e   O p e n A P I   v 3   v a l i d a t i o n   s c h e m a :   a p i V e r s i o n :   a p i e x t e n s i o n s . k 8 s . i o / v 1   k i n d :   C u s t o m R e s o u r c e D e f i n i t i o n   m e t a d a t a :   n a m e :   c r o n t a b s . s t a b l e . e x a m p l e . c o m   s p e c :   g r o u p :   s t a b l e . e x a m p l e . c o m   v e r s i o n s :   -   n a m e :   v 1   s e r v e d :   t r u e   s t o r a g e :   t r u e   s c h e m a :   #   o p e n A P I V 3 S c h e m a   i s   t h e   s c h e m a   f o r   v a l i d a t i n g   c u s t o m   o b j e c t s .   o p e n A P I V 3 S c h e m a :   t y p e :   o b j e c t   p r o p e r t i e s :   s p e c :   t y p e :   o b j e c t   p r o p e r t i e s :   c r o n S p e c :   t y p e :   s t r i n g   p a t t e r n :   ' ^ ( \ d + | \ * ) ( / \ d + ) ? ( \ s + ( \ d + | \ * ) ( / \ d + ) ? ) { 4 } $ '   d e f a u l t :   " 5   0   *   *   * "   i m a g e :   t y p e :   s t r i n g   r e p l i c a s :   t y p e :   i n t e g e r   m i n i m u m :   1   m a x i m u m :   1 0   d e f a u l t :   1   s c o p e :   N a m e s p a c e d   n a m e s :   p l u r a l :   c r o n t a b s   s i n g u l a r :   c r o n t a b   k i n d :   C r o n T a b   s h o r t N a m e s :   -   c t   W i t h   t h i s   b o t h   c r o n S p e c   a n d   r e p l i c a s   a r e   d e f a u l t e d :   a p i V e r s i o n :   " s t a b l e . e x a m p l e . c o m / v 1 "   k i n d :   C r o n T a b   m e t a d a t a :   n a m e :   m y - n e w - c r o n - o b j e c t   s p e c :   i m a g e :   m y - a w e s o m e - c r o n - i m a g e   l e a d s   t o   a p i V e r s i o n :   " s t a b l e . e x a m p l e . c o m / v 1 "   k i n d :   C r o n T a b   m e t a d a t a :   n a m e :   m y - n e w - c r o n - o b j e c t   s p e c :   c r o n S p e c :   " 5   0   *   *   * "   i m a g e :   m y - a w e s o m e - c r o n - i m


Question: What is Defaulting and Nullable?

Answer: N u l l   v a l u e s   f o r   f i e l d s   t h a t   e i t h e r   d o n ' t   s p e c i f y   t h e   n u l l a b l e   f l a g ,   o r   g i v e   i t   a   f a l s e   v a l u e ,   w i l l   b e   p r u n e d   b e f o r e   d e f a u l t i n g   h a p p e n s .   I f   a   d e f a u l t   i s   p r e s e n t ,   i t   w i l l   b e   a p p l i e d .   W h e n   n u l l a b l e   i s   t r u e ,   n u l l   v a l u e s   w i l l   b e   c o n s e r v e d   a n d   w o n ' t   b e   d e f a u l t e d .   F o r   e x a m p l e ,   g i v e n   t h e   O p e n A P I   s c h e m a   b e l o w :   t y p e :   o b j e c t   p r o p e r t i e s :   s p e c :   t y p e :   o b j e c t   p r o p e r t i e s :   f o o :   t y p e :   s t r i n g   n u l l a b l e :   f a l s e   d e f a u l t :   " d e f a u l t "   b a r :   t y p e :   s t r i n g   n u l l a b l e :   t r u e   b a z :   t y p e :   s t r i n g   c r e a t i n g   a n   o b j e c t   w i t h   n u l l   v a l u e s   f o r   f o o   a n d   b a r   a n d   b a z   s p e c :   f o o :   n u l l   b a r :   n u l l   b a z :   n u l l   l e a d s   t o   s p e c :   f o o :   " d e f a u l t "   b a r :   n u l l   w i t h   f o o   p r u n e d   a n d   d e f a u l t e d   b e c a u s e   t h e   f i e l d   i s   n o n - n u l l a b l e ,   b a r   m a i n t a i n i n g   t h e   n u l l   v a l u e   d u e   t o   n u l l a b l e :   t r u e ,   a n d   b a z   p r u n e d   b e c a u s e   t h e   f i e l d   i s   n o n - n u l l a b l e   a n d   h a s   n o   d e f a u l t .


Question: What is Publish Validation Schema in OpenAPI?

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


Question: What is Compatibility with OpenAPI V2?

Answer: F o r   c o m p a t i b i l i t y   w i t h   O p e n A P I   V 2 ,   t h e   O p e n A P I   v 3   v a l i d a t i o n   s c h e m a   p e r f o r m s   a   l o s s y   c o n v e r s i o n   t o   t h e   O p e n A P I   v 2   s c h e m a .   T h e   s c h e m a   s h o w   u p   i n   d e f i n i t i o n s   a n d   p a t h s   f i e l d s   i n   t h e   O p e n A P I   v 2   s p e c .   T h e   f o l l o w i n g   m o d i f i c a t i o n s   a r e   a p p l i e d   d u r i n g   t h e   c o n v e r s i o n   t o   k e e p   b a c k w a r d s   c o m p a t i b i l i t y   w i t h   k u b e c t l   i n   p r e v i o u s   1 . 1 3   v e r s i o n .   T h e s e   m o d i f i c a t i o n s   p r e v e n t   k u b e c t l   f r o m   b e i n g   o v e r - s t r i c t   a n d   r e j e c t i n g   v a l i d   O p e n A P I   s c h e m a s   t h a t   i t   d o e s n ' t   u n d e r s t a n d .   T h e   c o n v e r s i o n   w o n ' t   m o d i f y   t h e   v a l i d a t i o n   s c h e m a   d e f i n e d   i n   C R D ,   a n d   t h e r e f o r e   w o n ' t   a f f e c t   v a l i d a t i o n   i n   t h e   A P I   s e r v e r .   T h e   f o l l o w i n g   f i e l d s   a r e   r e m o v e d   a s   t h e y   a r e n ' t   s u p p o r t e d   b y   O p e n A P I   v 2 . T h e   f i e l d s   a l l O f ,   a n y O f ,   o n e O f   a n d   n o t   a r e   r e m o v e d I f   n u l l a b l e :   t r u e   i s   s e t ,   w e   d r o p   t y p e ,   n u l l a b l e ,   i t e m s   a n d   p r o p e r t i e s   b e c a u s e   O p e n A P I   v 2   i s   n o t   a b l e   t o   e x p r e s s   n u l l a b l e .   T o   a v o i d   k u b e c t l   t o   r e j e c t   g o o d   o b j e c t s ,   t h i s   i s   n e c e s s a r y .   T h e   f o l l o w i n g   f i e l d s   a r e   r e m o v e d   a s   t h e y   a r e n ' t   s u p p o r t e d   b y   O p e n A P I   v 2 .   T h e   f i e l d s   a l l O f ,   a n y O f ,   o n e O f   a n d   n o t   a r e   r e m


Question: What is Additional printer columns?

Answer: T h e   k u b e c t l   t o o l   r e l i e s   o n   s e r v e r - s i d e   o u t p u t   f o r m a t t i n g .   Y o u r   c l u s t e r ' s   A P I   s e r v e r   d e c i d e s   w h i c h   c o l u m n s   a r e   s h o w n   b y   t h e   k u b e c t l   g e t   c o m m a n d .   Y o u   c a n   c u s t o m i z e   t h e s e   c o l u m n s   f o r   a   C u s t o m R e s o u r c e D e f i n i t i o n .   T h e   f o l l o w i n g   e x a m p l e   a d d s   t h e   S p e c ,   R e p l i c a s ,   a n d   A g e   c o l u m n s .   S a v e   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   t o   r e s o u r c e d e f i n i t i o n . y a m l :   a p i V e r s i o n :   a p i e x t e n s i o n s . k 8 s . i o / v 1   k i n d :   C u s t o m R e s o u r c e D e f i n i t i o n   m e t a d a t a :   n a m e :   c r o n t a b s . s t a b l e . e x a m p l e . c o m   s p e c :   g r o u p :   s t a b l e . e x a m p l e . c o m   s c o p e :   N a m e s p a c e d   n a m e s :   p l u r a l :   c r o n t a b s   s i n g u l a r :   c r o n t a b   k i n d :   C r o n T a b   s h o r t N a m e s :   -   c t   v e r s i o n s :   -   n a m e :   v 1   s e r v e d :   t r u e   s t o r a g e :   t r u e   s c h e m a :   o p e n A P I V 3 S c h e m a :   t y p e :   o b j e c t   p r o p e r t i e s :   s p e c :   t y p e :   o b j e c t   p r o p e r t i e s :   c r o n S p e c :   t y p e :   s t r i n g   i m a g e :   t y p e :   s t r i n g   r e p l i c a s :   t y p e :   i n t e g e r   a d d i t i o n a l P r i n t e r C o l u m n s :   -   n a m e :   S p e c   t y p e :   s t r i n g   d e s c r i p t i o n :   T h e   c r o n   s p e c   d e f i n i n g   t h e   i n t e r v a l   a   C r o n J o b   i s   r u n   j s o n P a t h :   . s p e c . c r o n S p e c   -   n a m e :   R e p l i c a s   t y p e :   i n t e g e r   d e s c r i p t i o n :   T h e   n u m b e r   o f   j o b s   l a u n c h e d   b y   t h e   C r o n J o b   j s o n P a


Question: What is Priority?

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


Question: What is Type?

Answer: A   c o l u m n ' s   t y p e   f i e l d   c a n   b e   a n y   o f   t h e   f o l l o w i n g   ( c o m p a r e   O p e n A P I   v 3   d a t a   t y p e s ) :   i n t e g e r   –   n o n - f l o a t i n g - p o i n t   n u m b e r s n u m b e r   –   f l o a t i n g   p o i n t   n u m b e r s s t r i n g   –   s t r i n g s b o o l e a n   –   t r u e   o r   f a l s e d a t e   –   r e n d e r e d   d i f f e r e n t i a l l y   a s   t i m e   s i n c e   t h i s   t i m e s t a m p .   I f   t h e   v a l u e   i n s i d e   a   C u s t o m R e s o u r c e   d o e s   n o t   m a t c h   t h e   t y p e   s p e c i f i e d   f o r   t h e   c o l u m n ,   t h e   v a l u e   i s   o m i t t e d .   U s e   C u s t o m R e s o u r c e   v a l i d a t i o n   t o   e n s u r e   t h a t   t h e   v a l u e   t y p e s   a r e   c o r r e c t .


Question: What is Format?

Answer: A   c o l u m n ' s   f o r m a t   f i e l d   c a n   b e   a n y   o f   t h e   f o l l o w i n g :   i n t 3 2 i n t 6 4 f l o a t d o u b l e b y t e d a t e d a t e - t i m e p a s s w o r d   T h e   c o l u m n ' s   f o r m a t   c o n t r o l s   t h e   s t y l e   u s e d   w h e n   k u b e c t l   p r i n t s   t h e   v a l u e .


Question: What is Field selectors?

Answer: F i e l d   S e l e c t o r s   l e t   c l i e n t s   s e l e c t   c u s t o m   r e s o u r c e s   b a s e d   o n   t h e   v a l u e   o f   o n e   o r   m o r e   r e s o u r c e   f i e l d s .   A l l   c u s t o m   r e s o u r c e s   s u p p o r t   t h e   m e t a d a t a . n a m e   a n d   m e t a d a t a . n a m e s p a c e   f i e l d   s e l e c t o r s .   F i e l d s   d e c l a r e d   i n   a   C u s t o m R e s o u r c e D e f i n i t i o n   m a y   a l s o   b e   u s e d   w i t h   f i e l d   s e l e c t o r s   w h e n   i n c l u d e d   i n   t h e   s p e c . v e r s i o n s [ * ] . s e l e c t a b l e F i e l d s   f i e l d   o 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 .


Question: What is Selectable fields for custom resources?

Answer: T h e   s p e c . v e r s i o n s [ * ] . s e l e c t a b l e F i e l d s   f i e l d   o f   a   C u s t o m R e s o u r c e D e f i n i t i o n   m a y   b e   u s e d   t o   d e c l a r e   w h i c h   o t h e r   f i e l d s   i n   a   c u s t o m   r e s o u r c e   m a y   b e   u s e d   i n   f i e l d   s e l e c t o r s   w i t h   t h e   f e a t u r e   o f   C u s t o m R e s o u r c e F i e l d S e l e c t o r s   f e a t u r e   g a t e   ( T h i s   f e a t u r e   g a t e   i s   e n a b l e d   b y   d e f a u l t   s i n c e   K u b e r n e t e s   v 1 . 3 1 ) .   T h e   f o l l o w i n g   e x a m p l e   a d d s   t h e   . s p e c . c o l o r   a n d   . s p e c . s i z e   f i e l d s   a s   s e l e c t a b l e   f i e l d s .   S a v e   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   t o   s h i r t - r e s o u r c e - d e f i n i t i o n . y a m l :   a p i V e r s i o n :   a p i e x t e n s i o n s . k 8 s . i o / v 1   k i n d :   C u s t o m R e s o u r c e D e f i n i t i o n   m e t a d a t a :   n a m e :   s h i r t s . s t a b l e . e x a m p l e . c o m   s p e c :   g r o u p :   s t a b l e . e x a m p l e . c o m   s c o p e :   N a m e s p a c e d   n a m e s :   p l u r a l :   s h i r t s   s i n g u l a r :   s h i r t   k i n d :   S h i r t   v e r s i o n s :   -   n a m e :   v 1   s e r v e d :   t r u e   s t o r a g e :   t r u e   s c h e m a :   o p e n A P I V 3 S c h e m a :   t y p e :   o b j e c t   p r o p e r t i e s :   s p e c :   t y p e :   o b j e c t   p r o p e r t i e s :   c o l o r :   t y p e :   s t r i n g   s i z e :   t y p e :   s t r i n g   s e l e c t a b l e F i e l d s :   -   j s o n P a t h :   . s p e c . c o l o r   -   j s o n P a t h :   . s p e c . s i z e   a d d i t i o n a l P r i n t e r C o l u m n s :   -   j s o n P a t h :   . s p e c . c o l o r   n a m e :   C o l o r   t y p e :   s t r i n g   -   j s o n P a t h :   . s p e c . s i z e   n a m e :   S i


Question: What is Subresources?

Answer: C u s t o m   r e s o u r c e s   s u p p o r t   / s t a t u s   a n d   / s c a l e   s u b r e s o u r c e s .   T h e   s t a t u s   a n d   s c a l e   s u b r e s o u r c e s   c a n   b e   o p t i o n a l l y   e n a b l e d   b y   d e f i n i n g   t h e m   i n   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 .


Question: What is Status subresource?

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


Question: What is Scale subresource?

Answer: W h e n   t h e   s c a l e   s u b r e s o u r c e   i s   e n a b l e d ,   t h e   / s c a l e   s u b r e s o u r c e   f o r   t h e   c u s t o m   r e s o u r c e   i s   e x p o s e d .   T h e   a u t o s c a l i n g / v 1 . S c a l e   o b j e c t   i s   s e n t   a s   t h e   p a y l o a d   f o r   / s c a l e .   T o   e n a b l e   t h e   s c a l e   s u b r e s o u r c e ,   t h e   f o l l o w i n g   f i e l d s   a r e   d e f i n e d   i n   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 .   s p e c R e p l i c a s P a t h   d e f i n e s   t h e   J S O N P a t h   i n s i d e   o f   a   c u s t o m   r e s o u r c e   t h a t   c o r r e s p o n d s   t o   s c a l e . s p e c . r e p l i c a s . I t   i s   a   r e q u i r e d   v a l u e . O n l y   J S O N P a t h s   u n d e r   . s p e c   a n d   w i t h   t h e   d o t   n o t a t i o n   a r e   a l l o w e d . I f   t h e r e   i s   n o   v a l u e   u n d e r   t h e   s p e c R e p l i c a s P a t h   i n   t h e   c u s t o m   r e s o u r c e ,   t h e   / s c a l e   s u b r e s o u r c e   w i l l   r e t u r n   a n   e r r o r   o n   G E T . s t a t u s R e p l i c a s P a t h   d e f i n e s   t h e   J S O N P a t h   i n s i d e   o f   a   c u s t o m   r e s o u r c e   t h a t   c o r r e s p o n d s   t o   s c a l e . s t a t u s . r e p l i c a s . I t   i s   a   r e q u i r e d   v a l u e . O n l y   J S O N P a t h s   u n d e r   . s t a t u s   a n d   w i t h   t h e   d o t   n o t a t i o n   a r e   a l l o w e d . I f   t h e r e   i s   n o   v a l u e   u n d e r   t h e   s t a t u s R e p l i c a s P a t h   i n   t h e   c u s t o m   r e s o u r c e ,   t h e   s t a t u s   r e p l i c a   v a l u e   i n   t h e   / s c a l e   s u b r e s o u r c e   w i l l   d e f a u l t   t o   0 . l a b e l S e l e c t o r P a t h   d e f i n e s   t h e   J S O N P a t h   i n s i d e   o f   a   c u s t o m   r e s o u r c e   t h a t   c o r r


Question: What is Categories?

Answer: C a t e g o r i e s   i s   a   l i s t   o f   g r o u p e d   r e s o u r c e s   t h e   c u s t o m   r e s o u r c e   b e l o n g s   t o   ( e g .   a l l ) .   Y o u   c a n   u s e   k u b e c t l   g e t   < c a t e g o r y - n a m e >   t o   l i s t   t h e   r e s o u r c e s   b e l o n g i n g   t o   t h e   c a t e g o r y .   T h e   f o l l o w i n g   e x a m p l e   a d d s   a l l   i n   t h e   l i s t   o f   c a t e g o r i e s   i n   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   a n d   i l l u s t r a t e s   h o w   t o   o u t p u t   t h e   c u s t o m   r e s o u r c e   u s i n g   k u b e c t l   g e t   a l l .   S a v e   t h e   f o l l o w i n g   C u s t o m R e s o u r c e D e f i n i t i o n   t o   r e s o u r c e d e f i n i t i o n . y a m l :   a p i V e r s i o n :   a p i e x t e n s i o n s . k 8 s . i o / v 1   k i n d :   C u s t o m R e s o u r c e D e f i n i t i o n   m e t a d a t a :   n a m e :   c r o n t a b s . s t a b l e . e x a m p l e . c o m   s p e c :   g r o u p :   s t a b l e . e x a m p l e . c o m   v e r s i o n s :   -   n a m e :   v 1   s e r v e d :   t r u e   s t o r a g e :   t r u e   s c h e m a :   o p e n A P I V 3 S c h e m a :   t y p e :   o b j e c t   p r o p e r t i e s :   s p e c :   t y p e :   o b j e c t   p r o p e r t i e s :   c r o n S p e c :   t y p e :   s t r i n g   i m a g e :   t y p e :   s t r i n g   r e p l i c a s :   t y p e :   i n t e g e r   s c o p e :   N a m e s p a c e d   n a m e s :   p l u r a l :   c r o n t a b s   s i n g u l a r :   c r o n t a b   k i n d :   C r o n T a b   s h o r t N a m e s :   -   c t   #   c a t e g o r i e s   i s   a   l i s t   o f   g r o u p e d   r e s o u r c e s   t h e   c u s t o m   r e s o u r c e   b e l o n g s   t o .   c a t e g o r i e s :   -   a l l   a n d   c r e a t e   i t :   k u b e c t l   a p p l y   - f   r e s o u r c e d e f i n i t i o n . y a m l   A f t e r   t h e   C u s


Question: What is What's next?

Answer: R e a d   a b o u t   c u s t o m   r e s o u r c e s . S e e   C u s t o m R e s o u r c e D e f i n i t i o n . S e r v e   m u l t i p l e   v e r s i o n s   o f   a   C u s t o m R e s o u r c e D e f i n i t i o n .   R e a d   a b o u t   c u s t o m   r e s o u r c e s .   S e e   C u s t o m R e s o u r c e D e f i n i t i o n .   S e r v e   m u l t i p l e   v e r s i o n s   o f   a   C u s t o m R e s o u r c e D e f i n i t i o n .


Question: What is ResourceSlice?

Answer: ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver.apiVersion: resource.k8s.io/v1import "k8s.io/api/resource/v1"ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.apiVersion: resource.k8s.io/v1kind: ResourceSlicemetadata (ObjectMeta)Standard object metadataspec (ResourceSliceSpec), requiredContains the information published by the driver.Changing the spec automatically increments the metadata.generation number.ResourceSliceSpecResourceSliceSpec contains the information published by the driver in one ResourceSlice.driver (string), requiredDriver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.pool (ResourcePool), requiredPool describes the pool that this ResourceSlice belongs to.ResourcePool describes the pool that ResourceSlices belong to.pool.generation (int64), requiredGeneration tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.Combined with ResourceSliceCount, this


Question: How does ResourceSlice work?

Answer: ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver.apiVersion: resource.k8s.io/v1import "k8s.io/api/resource/v1"ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.apiVersion: resource.k8s.io/v1kind: ResourceSlicemetadata (ObjectMeta)Standard object metadataspec (ResourceSliceSpec), requiredContains the information published by the driver.Changing the spec automatically increments the metadata.generation number.ResourceSliceSpecResourceSliceSpec contains the information published by the driver in one ResourceSlice.driver (string), requiredDriver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.pool (ResourcePool), requiredPool describes the pool that this ResourceSlice belongs to.ResourcePool describes the pool that ResourceSlices belong to.pool.generation (int64), requiredGeneration tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.Combined with ResourceSliceCount, this


Question: When would you use ResourceSlice?

Answer: ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver.apiVersion: resource.k8s.io/v1import "k8s.io/api/resource/v1"ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.apiVersion: resource.k8s.io/v1kind: ResourceSlicemetadata (ObjectMeta)Standard object metadataspec (ResourceSliceSpec), requiredContains the information published by the driver.Changing the spec automatically increments the metadata.generation number.ResourceSliceSpecResourceSliceSpec contains the information published by the driver in one ResourceSlice.driver (string), requiredDriver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.pool (ResourcePool), requiredPool describes the pool that this ResourceSlice belongs to.ResourcePool describes the pool that ResourceSlices belong to.pool.generation (int64), requiredGeneration tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.Combined with ResourceSliceCount, this


Question: What are the benefits of ResourceSlice?

Answer: ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver.apiVersion: resource.k8s.io/v1import "k8s.io/api/resource/v1"ResourceSliceResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.apiVersion: resource.k8s.io/v1kind: ResourceSlicemetadata (ObjectMeta)Standard object metadataspec (ResourceSliceSpec), requiredContains the information published by the driver.Changing the spec automatically increments the metadata.generation number.ResourceSliceSpecResourceSliceSpec contains the information published by the driver in one ResourceSlice.driver (string), requiredDriver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.pool (ResourcePool), requiredPool describes the pool that this ResourceSlice belongs to.ResourcePool describes the pool that ResourceSlices belong to.pool.generation (int64), requiredGeneration tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.Combined with ResourceSliceCount, this


Question: What is ResourceSlice?

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


Question: What is ResourceSlice?

Answer: R e s o u r c e S l i c e   r e p r e s e n t s   o n e   o r   m o r e   r e s o u r c e s   i n   a   p o o l   o f   s i m i l a r   r e s o u r c e s ,   m a n a g e d   b y   a   c o m m o n   d r i v e r .   A   p o o l   m a y   s p a n   m o r e   t h a n   o n e   R e s o u r c e S l i c e ,   a n d   e x a c t l y   h o w   m a n y   R e s o u r c e S l i c e s   c o m p r i s e   a   p o o l   i s   d e t e r m i n e d   b y   t h e   d r i v e r .   A t   t h e   m o m e n t ,   t h e   o n l y   s u p p o r t e d   r e s o u r c e s   a r e   d e v i c e s   w i t h   a t t r i b u t e s   a n d   c a p a c i t i e s .   E a c h   d e v i c e   i n   a   g i v e n   p o o l ,   r e g a r d l e s s   o f   h o w   m a n y   R e s o u r c e S l i c e s ,   m u s t   h a v e   a   u n i q u e   n a m e .   T h e   R e s o u r c e S l i c e   i n   w h i c h   a   d e v i c e   g e t s   p u b l i s h e d   m a y   c h a n g e   o v e r   t i m e .   T h e   u n i q u e   i d e n t i f i e r   f o r   a   d e v i c e   i s   t h e   t u p l e   < d r i v e r   n a m e > ,   < p o o l   n a m e > ,   < d e v i c e   n a m e > .   W h e n e v e r   a   d r i v e r   n e e d s   t o   u p d a t e   a   p o o l ,   i t   i n c r e m e n t s   t h e   p o o l . S p e c . P o o l . G e n e r a t i o n   n u m b e r   a n d   u p d a t e s   a l l   R e s o u r c e S l i c e s   w i t h   t h a t   n e w   n u m b e r   a n d   n e w   r e s o u r c e   d e f i n i t i o n s .   A   c o n s u m e r   m u s t   o n l y   u s e   R e s o u r c e S l i c e s   w i t h   t h e   h i g h e s t   g e n e r a t i o n   n u m b e r   a n d   i g n o r e   a l l   o t h e r s .   W h e n   a l l o c a t i n g   a l l   r e s o u r c e s   i n   a   p o o l   m a t c h i n g   c e r t a i n   c r i t e r i a   o r   w h e n   l o o k i n g   f o r   t h e   b e s t   s o l u t i o n   a m o n g   s e v e r a l   d i f f e r e n t   a l t e r n a t i v e s ,   a   c o n s u


Question: What is ResourceSliceSpec?

Answer: R e s o u r c e S l i c e S p e c   c o n t a i n s   t h e   i n f o r m a t i o n   p u b l i s h e d   b y   t h e   d r i v e r   i n   o n e   R e s o u r c e S l i c e .   d r i v e r   ( s t r i n g ) ,   r e q u i r e d D r i v e r   i d e n t i f i e s   t h e   D R A   d r i v e r   p r o v i d i n g   t h e   c a p a c i t y   i n f o r m a t i o n .   A   f i e l d   s e l e c t o r   c a n   b e   u s e d   t o   l i s t   o n l y   R e s o u r c e S l i c e   o b j e c t s   w i t h   a   c e r t a i n   d r i v e r   n a m e . M u s t   b e   a   D N S   s u b d o m a i n   a n d   s h o u l d   e n d   w i t h   a   D N S   d o m a i n   o w n e d   b y   t h e   v e n d o r   o f   t h e   d r i v e r .   T h i s   f i e l d   i s   i m m u t a b l e . p o o l   ( R e s o u r c e P o o l ) ,   r e q u i r e d P o o l   d e s c r i b e s   t h e   p o o l   t h a t   t h i s   R e s o u r c e S l i c e   b e l o n g s   t o . R e s o u r c e P o o l   d e s c r i b e s   t h e   p o o l   t h a t   R e s o u r c e S l i c e s   b e l o n g   t o . p o o l . g e n e r a t i o n   ( i n t 6 4 ) ,   r e q u i r e d G e n e r a t i o n   t r a c k s   t h e   c h a n g e   i n   a   p o o l   o v e r   t i m e .   W h e n e v e r   a   d r i v e r   c h a n g e s   s o m e t h i n g   a b o u t   o n e   o r   m o r e   o f   t h e   r e s o u r c e s   i n   a   p o o l ,   i t   m u s t   c h a n g e   t h e   g e n e r a t i o n   i n   a l l   R e s o u r c e S l i c e s   w h i c h   a r e   p a r t   o f   t h a t   p o o l .   C o n s u m e r s   o f   R e s o u r c e S l i c e s   s h o u l d   o n l y   c o n s i d e r   r e s o u r c e s   f r o m   t h e   p o o l   w i t h   t h e   h i g h e s t   g e n e r a t i o n   n u m b e r .   T h e   g e n e r a t i o n   m a y   b e   r e s e t   b y   d r i v e r s ,   w h i c h   s h o u l d   b e   f i n e   f o r   c o n s u m e r s ,   a s s u m i n g   t h a t   a l l   R e s o u r c e S l i


Question: What is ResourceSliceList?

Answer: R e s o u r c e S l i c e L i s t   i s   a   c o l l e c t i o n   o f   R e s o u r c e S l i c e s .   a p i V e r s i o n :   r e s o u r c e . k 8 s . i o / v 1 k i n d :   R e s o u r c e S l i c e L i s t m e t a d a t a   ( L i s t M e t a ) S t a n d a r d   l i s t   m e t a d a t a i t e m s   ( [ ] R e s o u r c e S l i c e ) ,   r e q u i r e d I t e m s   i s   t h e   l i s t   o f   r e s o u r c e   R e s o u r c e S l i c e s .   a p i V e r s i o n :   r e s o u r c e . k 8 s . i o / v 1   k i n d :   R e s o u r c e S l i c e L i s t   m e t a d a t a   ( L i s t M e t a )   S t a n d a r d   l i s t   m e t a d a t a   i t e m s   ( [ ] R e s o u r c e S l i c e ) ,   r e q u i r e d   I t e m s   i s   t h e   l i s t   o f   r e s o u r c e   R e s o u r c e S l i c e s .


Question: What is HTTP Request?

Answer: G E T   / a p i s / r e s o u r c e . k 8 s . i o / v 1 / r e s o u r c e s l i c e s / { n a m e }


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is HTTP Request?

Answer: G E T   / a p i s / r e s o u r c e . k 8 s . i o / v 1 / r e s o u r c e s l i c e s


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e S l i c e L i s t ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: P O S T   / a p i s / r e s o u r c e . k 8 s . i o / v 1 / r e s o u r c e s l i c e s


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is HTTP Request?

Answer: P U T   / a p i s / r e s o u r c e . k 8 s . i o / v 1 / r e s o u r c e s l i c e s / { n a m e }


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is HTTP Request?

Answer: P A T C H   / a p i s / r e s o u r c e . k 8 s . i o / v 1 / r e s o u r c e s l i c e s / { n a m e }


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is HTTP Request?

Answer: D E L E T E   / a p i s / r e s o u r c e . k 8 s . i o / v 1 / r e s o u r c e s l i c e s / { n a m e }


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   R e s o u r c e S l i c e b o d y :   D e l e t e O p t i o n s d r y R u n   ( i n   q u e r y ) :   s t r i n g d r y R u n g r a c e P e r i o d S e c o n d s   ( i n   q u e r y ) :   i n t e g e r g r a c e P e r i o d S e c o n d s i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l   ( i n   q u e r y ) :   b o o l e a n i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l p r e t t y   ( i n   q u e r y ) :   s t r i n g p r e t t y p r o p a g a t i o n P o l i c y   ( i n   q u e r y ) :   s t r i n g p r o p a g a t i o n P o l i c y   n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d   n a m e   o f   t h e   R e s o u r c e S l i c e   b o d y :   D e l e t e O p t i o n s   d r y R u n   ( i n   q u e r y ) :   s t r i n g   d r y R u n   g r a c e P e r i o d S e c o n d s   ( i n   q u e r y ) :   i n t e g e r   g r a c e P e r i o d S e c o n d s   i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l   ( i n   q u e r y ) :   b o o l e a n   i g n o r e S t o r e R e a d E r r o r W i t h C l u s t e r B r e a k i n g P o t e n t i a l   p r e t t y   ( i n   q u e r y ) :   s t r i n g   p r e t t y   p r o p a g a t i o n P o l i c y   ( i n   q u e r y ) :   s t r i n g   p r o p a g a t i o n P o l i c y


Question: What is Response?

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


Question: What is HTTP Request?

Answer: D E L E T E   / a p i s / r e s o u r c e . k 8 s . i o / v 1 / r e s o u r c e s l i c e s


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is Compute, Storage, and Networking Extensions?

Answer: Compute, Storage, and Networking ExtensionsThis section covers extensions to your cluster that do not come as part as Kubernetes itself. You can use these extensions to enhance the nodes in your cluster, or to provide the network fabric that links Pods together.CSI and FlexVolume storage pluginsContainer Storage Interface (CSI) plugins provide a way to extend Kubernetes with supports for new kinds of volumes. The volumes can be backed by durable external storage, or provide ephemeral storage, or they might offer a read-only interface to information using a filesystem paradigm.Kubernetes also includes support for FlexVolume plugins, which are deprecated since Kubernetes v1.23 (in favour of CSI).FlexVolume plugins allow users to mount volume types that aren't natively supported by Kubernetes. When you run a Pod that relies on FlexVolume storage, the kubelet calls a binary plugin to mount the volume. The archived FlexVolume design proposal has more detail on this approach.The Kubernetes Volume Plugin FAQ for Storage Vendors includes general information on storage plugins.Device pluginsDevice plugins allow a node to discover new Node facilities (in addition to the built-in node resources such as cpu and memory), and provide these custom node-local facilities to Pods that request them.Network pluginsNetwork plugins allow Kubernetes to work with different networking topologies and technologies. Your Kubernetes cluster needs a network plugin in order to have a working Pod network and to support other aspects of the Kubernetes network model.Kubernetes 1.34 is compatible with CNI network plugins.


Question: How does Compute, Storage, and Networking Extensions work?

Answer: Compute, Storage, and Networking ExtensionsThis section covers extensions to your cluster that do not come as part as Kubernetes itself. You can use these extensions to enhance the nodes in your cluster, or to provide the network fabric that links Pods together.CSI and FlexVolume storage pluginsContainer Storage Interface (CSI) plugins provide a way to extend Kubernetes with supports for new kinds of volumes. The volumes can be backed by durable external storage, or provide ephemeral storage, or they might offer a read-only interface to information using a filesystem paradigm.Kubernetes also includes support for FlexVolume plugins, which are deprecated since Kubernetes v1.23 (in favour of CSI).FlexVolume plugins allow users to mount volume types that aren't natively supported by Kubernetes. When you run a Pod that relies on FlexVolume storage, the kubelet calls a binary plugin to mount the volume. The archived FlexVolume design proposal has more detail on this approach.The Kubernetes Volume Plugin FAQ for Storage Vendors includes general information on storage plugins.Device pluginsDevice plugins allow a node to discover new Node facilities (in addition to the built-in node resources such as cpu and memory), and provide these custom node-local facilities to Pods that request them.Network pluginsNetwork plugins allow Kubernetes to work with different networking topologies and technologies. Your Kubernetes cluster needs a network plugin in order to have a working Pod network and to support other aspects of the Kubernetes network model.Kubernetes 1.34 is compatible with CNI network plugins.


Question: When would you use Compute, Storage, and Networking Extensions?

Answer: Compute, Storage, and Networking ExtensionsThis section covers extensions to your cluster that do not come as part as Kubernetes itself. You can use these extensions to enhance the nodes in your cluster, or to provide the network fabric that links Pods together.CSI and FlexVolume storage pluginsContainer Storage Interface (CSI) plugins provide a way to extend Kubernetes with supports for new kinds of volumes. The volumes can be backed by durable external storage, or provide ephemeral storage, or they might offer a read-only interface to information using a filesystem paradigm.Kubernetes also includes support for FlexVolume plugins, which are deprecated since Kubernetes v1.23 (in favour of CSI).FlexVolume plugins allow users to mount volume types that aren't natively supported by Kubernetes. When you run a Pod that relies on FlexVolume storage, the kubelet calls a binary plugin to mount the volume. The archived FlexVolume design proposal has more detail on this approach.The Kubernetes Volume Plugin FAQ for Storage Vendors includes general information on storage plugins.Device pluginsDevice plugins allow a node to discover new Node facilities (in addition to the built-in node resources such as cpu and memory), and provide these custom node-local facilities to Pods that request them.Network pluginsNetwork plugins allow Kubernetes to work with different networking topologies and technologies. Your Kubernetes cluster needs a network plugin in order to have a working Pod network and to support other aspects of the Kubernetes network model.Kubernetes 1.34 is compatible with CNI network plugins.


Question: What are the benefits of Compute, Storage, and Networking Extensions?

Answer: Compute, Storage, and Networking ExtensionsThis section covers extensions to your cluster that do not come as part as Kubernetes itself. You can use these extensions to enhance the nodes in your cluster, or to provide the network fabric that links Pods together.CSI and FlexVolume storage pluginsContainer Storage Interface (CSI) plugins provide a way to extend Kubernetes with supports for new kinds of volumes. The volumes can be backed by durable external storage, or provide ephemeral storage, or they might offer a read-only interface to information using a filesystem paradigm.Kubernetes also includes support for FlexVolume plugins, which are deprecated since Kubernetes v1.23 (in favour of CSI).FlexVolume plugins allow users to mount volume types that aren't natively supported by Kubernetes. When you run a Pod that relies on FlexVolume storage, the kubelet calls a binary plugin to mount the volume. The archived FlexVolume design proposal has more detail on this approach.The Kubernetes Volume Plugin FAQ for Storage Vendors includes general information on storage plugins.Device pluginsDevice plugins allow a node to discover new Node facilities (in addition to the built-in node resources such as cpu and memory), and provide these custom node-local facilities to Pods that request them.Network pluginsNetwork plugins allow Kubernetes to work with different networking topologies and technologies. Your Kubernetes cluster needs a network plugin in order to have a working Pod network and to support other aspects of the Kubernetes network model.Kubernetes 1.34 is compatible with CNI network plugins.


Question: What is Compute, Storage, and Networking Extensions?

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


Question: What is Run a Replicated Stateful Application?

Answer: Run a Replicated Stateful ApplicationThis page shows how to run a replicated stateful application using a StatefulSet. This application is a replicated MySQL database. The example topology has a single primary server and multiple replicas, using asynchronous row-based replication.Note:This is not a production configuration. MySQL settings remain on insecure defaults to keep the focus on general patterns for running stateful applications in Kubernetes.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 KubernetesYou need to either have a dynamic PersistentVolume provisioner with a default StorageClass, or statically provision PersistentVolumes yourself to satisfy the PersistentVolumeClaims used here.This tutorial assumes you are familiar with PersistentVolumes and StatefulSets, as well as other core concepts like Pods, Services, and ConfigMaps.Some familiarity with MySQL helps, but this tutorial aims to present general patterns that should be useful for other systems.You are using the default namespace or another namespace that does not contain any conflicting objects.You need to have a AMD64-compatible CPU.ObjectivesDeploy a replicated MySQL topology with a StatefulSet.Send MySQL client traffic.Observe resistance to downtime.Scale the StatefulSet up and down.Deploy MySQLThe example MySQL deployment consists of a ConfigMap, two Services, and a StatefulSet.Create a ConfigMapCreate the ConfigMap from the following YAML configuration file:application/mysql/mysql-configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: mysql labels: app: mysql app.kubernetes.io/name: mysql data: primary.cnf: | # Apply this config only on the primary. [mysqld] log-bin replica.cnf: | # Apply this config only on replicas. [mysqld] super-read-only kubectl apply -f https://k8s.io/examples/application/mysql/mysql-configmap.yaml This ConfigMap provides my.cnf overrides that let you independently control configuration on the primary MySQL server and its replicas. In this case, you want the primary server to be able to serve replication logs to replicas and you want replicas to reject any writes that don't come via replication.There's nothing special about the ConfigMap itself that causes different portions to apply to different Pods. Each Pod decides which portion to look at as it's initializing, based on information provided by the StatefulSet controller.Create ServicesCreate the Services from the following YAML configuration file:application/mysql/mysql-services.yaml # Headless service for stable DNS entries of StatefulSet members. apiVersion: v1 kind: Service metadata: name: mysql labels: app: mysq


Question: How does Run a Replicated Stateful Application work?

Answer: Run a Replicated Stateful ApplicationThis page shows how to run a replicated stateful application using a StatefulSet. This application is a replicated MySQL database. The example topology has a single primary server and multiple replicas, using asynchronous row-based replication.Note:This is not a production configuration. MySQL settings remain on insecure defaults to keep the focus on general patterns for running stateful applications in Kubernetes.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 KubernetesYou need to either have a dynamic PersistentVolume provisioner with a default StorageClass, or statically provision PersistentVolumes yourself to satisfy the PersistentVolumeClaims used here.This tutorial assumes you are familiar with PersistentVolumes and StatefulSets, as well as other core concepts like Pods, Services, and ConfigMaps.Some familiarity with MySQL helps, but this tutorial aims to present general patterns that should be useful for other systems.You are using the default namespace or another namespace that does not contain any conflicting objects.You need to have a AMD64-compatible CPU.ObjectivesDeploy a replicated MySQL topology with a StatefulSet.Send MySQL client traffic.Observe resistance to downtime.Scale the StatefulSet up and down.Deploy MySQLThe example MySQL deployment consists of a ConfigMap, two Services, and a StatefulSet.Create a ConfigMapCreate the ConfigMap from the following YAML configuration file:application/mysql/mysql-configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: mysql labels: app: mysql app.kubernetes.io/name: mysql data: primary.cnf: | # Apply this config only on the primary. [mysqld] log-bin replica.cnf: | # Apply this config only on replicas. [mysqld] super-read-only kubectl apply -f https://k8s.io/examples/application/mysql/mysql-configmap.yaml This ConfigMap provides my.cnf overrides that let you independently control configuration on the primary MySQL server and its replicas. In this case, you want the primary server to be able to serve replication logs to replicas and you want replicas to reject any writes that don't come via replication.There's nothing special about the ConfigMap itself that causes different portions to apply to different Pods. Each Pod decides which portion to look at as it's initializing, based on information provided by the StatefulSet controller.Create ServicesCreate the Services from the following YAML configuration file:application/mysql/mysql-services.yaml # Headless service for stable DNS entries of StatefulSet members. apiVersion: v1 kind: Service metadata: name: mysql labels: app: mysq


Question: When would you use Run a Replicated Stateful Application?

Answer: Run a Replicated Stateful ApplicationThis page shows how to run a replicated stateful application using a StatefulSet. This application is a replicated MySQL database. The example topology has a single primary server and multiple replicas, using asynchronous row-based replication.Note:This is not a production configuration. MySQL settings remain on insecure defaults to keep the focus on general patterns for running stateful applications in Kubernetes.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 KubernetesYou need to either have a dynamic PersistentVolume provisioner with a default StorageClass, or statically provision PersistentVolumes yourself to satisfy the PersistentVolumeClaims used here.This tutorial assumes you are familiar with PersistentVolumes and StatefulSets, as well as other core concepts like Pods, Services, and ConfigMaps.Some familiarity with MySQL helps, but this tutorial aims to present general patterns that should be useful for other systems.You are using the default namespace or another namespace that does not contain any conflicting objects.You need to have a AMD64-compatible CPU.ObjectivesDeploy a replicated MySQL topology with a StatefulSet.Send MySQL client traffic.Observe resistance to downtime.Scale the StatefulSet up and down.Deploy MySQLThe example MySQL deployment consists of a ConfigMap, two Services, and a StatefulSet.Create a ConfigMapCreate the ConfigMap from the following YAML configuration file:application/mysql/mysql-configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: mysql labels: app: mysql app.kubernetes.io/name: mysql data: primary.cnf: | # Apply this config only on the primary. [mysqld] log-bin replica.cnf: | # Apply this config only on replicas. [mysqld] super-read-only kubectl apply -f https://k8s.io/examples/application/mysql/mysql-configmap.yaml This ConfigMap provides my.cnf overrides that let you independently control configuration on the primary MySQL server and its replicas. In this case, you want the primary server to be able to serve replication logs to replicas and you want replicas to reject any writes that don't come via replication.There's nothing special about the ConfigMap itself that causes different portions to apply to different Pods. Each Pod decides which portion to look at as it's initializing, based on information provided by the StatefulSet controller.Create ServicesCreate the Services from the following YAML configuration file:application/mysql/mysql-services.yaml # Headless service for stable DNS entries of StatefulSet members. apiVersion: v1 kind: Service metadata: name: mysql labels: app: mysq


Question: What are the benefits of Run a Replicated Stateful Application?

Answer: Run a Replicated Stateful ApplicationThis page shows how to run a replicated stateful application using a StatefulSet. This application is a replicated MySQL database. The example topology has a single primary server and multiple replicas, using asynchronous row-based replication.Note:This is not a production configuration. MySQL settings remain on insecure defaults to keep the focus on general patterns for running stateful applications in Kubernetes.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 KubernetesYou need to either have a dynamic PersistentVolume provisioner with a default StorageClass, or statically provision PersistentVolumes yourself to satisfy the PersistentVolumeClaims used here.This tutorial assumes you are familiar with PersistentVolumes and StatefulSets, as well as other core concepts like Pods, Services, and ConfigMaps.Some familiarity with MySQL helps, but this tutorial aims to present general patterns that should be useful for other systems.You are using the default namespace or another namespace that does not contain any conflicting objects.You need to have a AMD64-compatible CPU.ObjectivesDeploy a replicated MySQL topology with a StatefulSet.Send MySQL client traffic.Observe resistance to downtime.Scale the StatefulSet up and down.Deploy MySQLThe example MySQL deployment consists of a ConfigMap, two Services, and a StatefulSet.Create a ConfigMapCreate the ConfigMap from the following YAML configuration file:application/mysql/mysql-configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: mysql labels: app: mysql app.kubernetes.io/name: mysql data: primary.cnf: | # Apply this config only on the primary. [mysqld] log-bin replica.cnf: | # Apply this config only on replicas. [mysqld] super-read-only kubectl apply -f https://k8s.io/examples/application/mysql/mysql-configmap.yaml This ConfigMap provides my.cnf overrides that let you independently control configuration on the primary MySQL server and its replicas. In this case, you want the primary server to be able to serve replication logs to replicas and you want replicas to reject any writes that don't come via replication.There's nothing special about the ConfigMap itself that causes different portions to apply to different Pods. Each Pod decides which portion to look at as it's initializing, based on information provided by the StatefulSet controller.Create ServicesCreate the Services from the following YAML configuration file:application/mysql/mysql-services.yaml # Headless service for stable DNS entries of StatefulSet members. apiVersion: v1 kind: Service metadata: name: mysql labels: app: mysq


Question: What is Run a Replicated Stateful Application?

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


Question: What is Before you begin?

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


Question: What is Objectives?

Answer: D e p l o y   a   r e p l i c a t e d   M y S Q L   t o p o l o g y   w i t h   a   S t a t e f u l S e t . S e n d   M y S Q L   c l i e n t   t r a f f i c . O b s e r v e   r e s i s t a n c e   t o   d o w n t i m e . S c a l e   t h e   S t a t e f u l S e t   u p   a n d   d o w n .


Question: What is Deploy MySQL?

Answer: T h e   e x a m p l e   M y S Q L   d e p l o y m e n t   c o n s i s t s   o f   a   C o n f i g M a p ,   t w o   S e r v i c e s ,   a n d   a   S t a t e f u l S e t .


Question: What is Create a ConfigMap?

Answer: C r e a t e   t h e   C o n f i g M a p   f r o m   t h e   f o l l o w i n g   Y A M L   c o n f i g u r a t i o n   f i l e :   a p i V e r s i o n :   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 :   m y s q l   l a b e l s :   a p p :   m y s q l   a p p . k u b e r n e t e s . i o / n a m e :   m y s q l   d a t a :   p r i m a r y . c n f :   |   #   A p p l y   t h i s   c o n f i g   o n l y   o n   t h e   p r i m a r y .   [ m y s q l d ]   l o g - b i n   r e p l i c a . c n f :   |   #   A p p l y   t h i s   c o n f i g   o n l y   o n   r e p l i c a s .   [ m y s q l d ]   s u p e r - r e a d - o n l y   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / a p p l i c a t i o n / m y s q l / m y s q l - c o n f i g m a p . y a m l   T h i s   C o n f i g M a p   p r o v i d e s   m y . c n f   o v e r r i d e s   t h a t   l e t   y o u   i n d e p e n d e n t l y   c o n t r o l   c o n f i g u r a t i o n   o n   t h e   p r i m a r y   M y S Q L   s e r v e r   a n d   i t s   r e p l i c a s .   I n   t h i s   c a s e ,   y o u   w a n t   t h e   p r i m a r y   s e r v e r   t o   b e   a b l e   t o   s e r v e   r e p l i c a t i o n   l o g s   t o   r e p l i c a s   a n d   y o u   w a n t   r e p l i c a s   t o   r e j e c t   a n y   w r i t e s   t h a t   d o n ' t   c o m e   v i a   r e p l i c a t i o n .   T h e r e ' s   n o t h i n g   s p e c i a l   a b o u t   t h e   C o n f i g M a p   i t s e l f   t h a t   c a u s e s   d i f f e r e n t   p o r t i o n s   t o   a p p l y   t o   d i f f e r e n t   P o d s .   E a c h   P o d   d e c i d e s   w h i c h   p o r t i o n   t o   l o o k   a t   a s   i t ' s   i n i t i a l i z i n g ,   b a s e d   o n   i n f o r m a t i o n   p r o v i d e d   b y   t h e   S t a t e f u l S e t   c o n t r o l l e r .


Question: What is Create Services?

Answer: C r e a t e   t h e   S e r v i c e s   f r o m   t h e   f o l l o w i n g   Y A M L   c o n f i g u r a t i o n   f i l e :   #   H e a d l e s s   s e r v i c e   f o r   s t a b l e   D N S   e n t r i e s   o f   S t a t e f u l S e t   m e m b e r 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 :   n a m e :   m y s q l   l a b e l s :   a p p :   m y s q l   a p p . k u b e r n e t e s . i o / n a m e :   m y s q l   s p e c :   p o r t s :   -   n a m e :   m y s q l   p o r t :   3 3 0 6   c l u s t e r I P :   N o n e   s e l e c t o r :   a p p :   m y s q l   - - -   #   C l i e n t   s e r v i c e   f o r   c o n n e c t i n g   t o   a n y   M y S Q L   i n s t a n c e   f o r   r e a d s .   #   F o r   w r i t e s ,   y o u   m u s t   i n s t e a d   c o n n e c t   t o   t h e   p r i m a r y :   m y s q l - 0 . m y s q 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 q l - r e a d   l a b e l s :   a p p :   m y s q l   a p p . k u b e r n e t e s . i o / n a m e :   m y s q l   r e a d o n l y :   " t r u e "   s p e c :   p o r t s :   -   n a m e :   m y s q l   p o r t :   3 3 0 6   s e l e c t o r :   a p p :   m y s q l   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / a p p l i c a t i o n / m y s q l / m y s q l - s e r v i c e s . y a m l   T h e   h e a d l e s s   S e r v i c e   p r o v i d e s   a   h o m e   f o r   t h e   D N S   e n t r i e s   t h a t   t h e   S t a t e f u l S e t   c o n t r o l l e r s   c r e a t e s   f o r   e a c h   P o d   t h a t ' s   p a r t   o f   t h e   s e t .   B e c a u s e   t h e   h e a d l e s s   S e r v i c e   i s   n a m e d   m y s q l ,   t h e   P o d s   a r e   a c c e s s i b l e   b y   r e s o l v i n g   < p o d - n a m e > . m y s q l   f r o m   w i t h i n   a n y   o t h e r   P o d   i n   t h e   s a m e   K u b e r n e t e s   c l u s t e r   a n d   n


Question: What is Create the StatefulSet?

Answer: F i n a l l y ,   c r e a t e   t h e   S t a t e f u l S e t   f r o m   t h e   f o l l o w i n g   Y A M L   c o n f i g u r a t i o n   f i l e :   a p i V e r s i o n :   a p p s / v 1   k i n d :   S t a t e f u l S e t   m e t a d a t a :   n a m e :   m y s q l   s p e c :   s e l e c t o r :   m a t c h L a b e l s :   a p p :   m y s q l   a p p . k u b e r n e t e s . i o / n a m e :   m y s q l   s e r v i c e N a m e :   m y s q l   r e p l i c a s :   3   t e m p l a t e :   m e t a d a t a :   l a b e l s :   a p p :   m y s q l   a p p . k u b e r n e t e s . i o / n a m e :   m y s q l   s p e c :   i n i t C o n t a i n e r s :   -   n a m e :   i n i t - m y s q l   i m a g e :   m y s q l : 5 . 7   c o m m a n d :   -   b a s h   -   " - c "   -   |   s e t   - e x   #   G e n e r a t e   m y s q l   s e r v e r - i d   f r o m   p o d   o r d i n a l   i n d e x .   [ [   $ H O S T N A M E   = ~   - ( [ 0 - 9 ] + ) $   ] ]   | |   e x i t   1   o r d i n a l = $ { B A S H _ R E M A T C H [ 1 ] }   e c h o   [ m y s q l d ]   >   / m n t / c o n f . d / s e r v e r - i d . c n f   #   A d d   a n   o f f s e t   t o   a v o i d   r e s e r v e d   s e r v e r - i d = 0   v a l u e .   e c h o   s e r v e r - i d = $ ( ( 1 0 0   +   $ o r d i n a l ) )   > >   / m n t / c o n f . d / s e r v e r - i d . c n f   #   C o p y   a p p r o p r i a t e   c o n f . d   f i l e s   f r o m   c o n f i g - m a p   t o   e m p t y D i r .   i f   [ [   $ o r d i n a l   - e q   0   ] ] ;   t h e n   c p   / m n t / c o n f i g - m a p / p r i m a r y . c n f   / m n t / c o n f . d /   e l s e   c p   / m n t / c o n f i g - m a p / r e p l i c a . c n f   / m n t / c o n f . d /   f i   v o l u m e M o u n t s :   -   n a m e :   c o n f   m o u n t P a t h :   / m n t / c o n f . d   -   n a m e :   c o n f i g - m a p   m o u n t P a t h :   / m n t / c o n f i g - m a p   -   n a m e :   c l o n e - m y s q l   i m a g e :   g c r . i o / g o o g l e -


Question: What is Note:?

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


Question: What is Understanding stateful Pod initialization?

Answer: T h e   S t a t e f u l S e t   c o n t r o l l e r   s t a r t s   P o d s   o n e   a t   a   t i m e ,   i n   o r d e r   b y   t h e i r   o r d i n a l   i n d e x .   I t   w a i t s   u n t i l   e a c h   P o d   r e p o r t s   b e i n g   R e a d y   b e f o r e   s t a r t i n g   t h e   n e x t   o n e .   I n   a d d i t i o n ,   t h e   c o n t r o l l e r   a s s i g n s   e a c h   P o d   a   u n i q u e ,   s t a b l e   n a m e   o f   t h e   f o r m   < s t a t e f u l s e t - n a m e > - < o r d i n a l - i n d e x > ,   w h i c h   r e s u l t s   i n   P o d s   n a m e d   m y s q l - 0 ,   m y s q l - 1 ,   a n d   m y s q l - 2 .   T h e   P o d   t e m p l a t e   i n   t h e   a b o v e   S t a t e f u l S e t   m a n i f e s t   t a k e s   a d v a n t a g e   o f   t h e s e   p r o p e r t i e s   t o   p e r f o r m   o r d e r l y   s t a r t u p   o f   M y S Q L   r e p l i c a t i o n .


Question: What is Generating configuration?

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


Question: What is Cloning existing data?

Answer: I n   g e n e r a l ,   w h e n   a   n e w   P o d   j o i n s   t h e   s e t   a s   a   r e p l i c a ,   i t   m u s t   a s s u m e   t h e   p r i m a r y   M y S Q L   s e r v e r   m i g h t   a l r e a d y   h a v e   d a t a   o n   i t .   I t   a l s o   m u s t   a s s u m e   t h a t   t h e   r e p l i c a t i o n   l o g s   m i g h t   n o t   g o   a l l   t h e   w a y   b a c k   t o   t h e   b e g i n n i n g   o f   t i m e .   T h e s e   c o n s e r v a t i v e   a s s u m p t i o n s   a r e   t h e   k e y   t o   a l l o w   a   r u n n i n g   S t a t e f u l S e t   t o   s c a l e   u p   a n d   d o w n   o v e r   t i m e ,   r a t h e r   t h a n   b e i n g   f i x e d   a t   i t s   i n i t i a l   s i z e .   T h e   s e c o n d   i n i t   c o n t a i n e r ,   n a m e d   c l o n e - m y s q l ,   p e r f o r m s   a   c l o n e   o p e r a t i o n   o n   a   r e p l i c a   P o d   t h e   f i r s t   t i m e   i t   s t a r t s   u p   o n   a n   e m p t y   P e r s i s t e n t V o l u m e .   T h a t   m e a n s   i t   c o p i e s   a l l   e x i s t i n g   d a t a   f r o m   a n o t h e r   r u n n i n g   P o d ,   s o   i t s   l o c a l   s t a t e   i s   c o n s i s t e n t   e n o u g h   t o   b e g i n   r e p l i c a t i n g   f r o m   t h e   p r i m a r y   s e r v e r .   M y S Q L   i t s e l f   d o e s   n o t   p r o v i d e   a   m e c h a n i s m   t o   d o   t h i s ,   s o   t h e   e x a m p l e   u s e s   a   p o p u l a r   o p e n - s o u r c e   t o o l   c a l l e d   P e r c o n a   X t r a B a c k u p .   D u r i n g   t h e   c l o n e ,   t h e   s o u r c e   M y S Q L   s e r v e r   m i g h t   s u f f e r   r e d u c e d   p e r f o r m a n c e .   T o   m i n i m i z e   i m p a c t   o n   t h e   p r i m a r y   M y S Q L   s e r v e r ,   t h e   s c r i p t   i n s t r u c t s   e a c h   P o d   t o   c l o n e   f r o m   t h e   P o d   w h o s e   o r d i n a l   i n d e


Question: What is Starting replication?

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


Question: What is Sending client traffic?

Answer: Y o u   c a n   s e n d   t e s t   q u e r i e s   t o   t h e   p r i m a r y   M y S Q L   s e r v e r   ( h o s t n a m e   m y s q l - 0 . m y s q l )   b y   r u n n i n g   a   t e m p o r a r y   c o n t a i n e r   w i t h   t h e   m y s q l : 5 . 7   i m a g e   a n d   r u n n i n g   t h e   m y s q l   c l i e n t   b i n a r y .   k u b e c t l   r u n   m y s q l - c l i e n t   - - i m a g e = m y s q l : 5 . 7   - i   - - r m   - - r e s t a r t = N e v e r   - - \   m y s q l   - h   m y s q l - 0 . m y s q l   < < E O F   C R E A T E   D A T A B A S E   t e s t ;   C R E A T E   T A B L E   t e s t . m e s s a g e s   ( m e s s a g e   V A R C H A R ( 2 5 0 ) ) ;   I N S E R T   I N T O   t e s t . m e s s a g e s   V A L U E S   ( ' h e l l o ' ) ;   E O F   U s e   t h e   h o s t n a m e   m y s q l - r e a d   t o   s e n d   t e s t   q u e r i e s   t o   a n y   s e r v e r   t h a t   r e p o r t s   b e i n g   R e a d y :   k u b e c t l   r u n   m y s q l - c l i e n t   - - i m a g e = m y s q l : 5 . 7   - i   - t   - - r m   - - r e s t a r t = N e v e r   - - \   m y s q l   - h   m y s q l - r e a d   - e   " S E L E C T   *   F R O M   t e s t . m e s s a g e s "   Y o u   s h o u l d   g e t   o u t p u t   l i k e   t h i s :   W a i t i n g   f o r   p o d   d e f a u l t / m y s q l - c l i e n t   t o   b e   r u n n i n g ,   s t a t u s   i s   P e n d i n g ,   p o d   r e a d y :   f a l s e   + - - - - - - - - - +   |   m e s s a g e   |   + - - - - - - - - - +   |   h e l l o   |   + - - - - - - - - - +   p o d   " m y s q l - c l i e n t "   d e l e t e d   T o   d e m o n s t r a t e   t h a t   t h e   m y s q l - r e a d   S e r v i c e   d i s t r i b u t e s   c o n n e c t i o n s   a c r o s s   s e r v e r s ,   y o u   c a n   r u n   S E L E C T   @ @ s e r v e r _ i d   i n   a   l o o p :   k u b e c t l   r u n   m y s q l - c l i e n t - l o o p   - - i m a g e = m y s q l : 5 . 7   - i   - t   - - r m


Question: What is Simulate Pod and Node failure?

Answer: T o   d e m o n s t r a t e   t h e   i n c r e a s e d   a v a i l a b i l i t y   o f   r e a d i n g   f r o m   t h e   p o o l   o f   r e p l i c a s   i n s t e a d   o f   a   s i n g l e   s e r v e r ,   k e e p   t h e   S E L E C T   @ @ s e r v e r _ i d   l o o p   f r o m   a b o v e   r u n n i n g   w h i l e   y o u   f o r c e   a   P o d   o u t   o f   t h e   R e a d y   s t a t e .