Question: What is Break the Readiness probe?

Answer: T h e   r e a d i n e s s   p r o b e   f o r   t h e   m y s q l   c o n t a i n e r   r u n s   t h e   c o m m a n d   m y s q l   - h   1 2 7 . 0 . 0 . 1   - e   ' S E L E C T   1 '   t o   m a k e   s u r e   t h e   s e r v e r   i s   u p   a n d   a b l e   t o   e x e c u t e   q u e r i e s .   O n e   w a y   t o   f o r c e   t h i s   r e a d i n e s s   p r o b e   t o   f a i l   i s   t o   b r e a k   t h a t   c o m m a n d :   k u b e c t l   e x e c   m y s q l - 2   - c   m y s q l   - -   m v   / u s r / b i n / m y s q l   / u s r / b i n / m y s q l . o f f   T h i s   r e a c h e s   i n t o   t h e   a c t u a l   c o n t a i n e r ' s   f i l e s y s t e m   f o r   P o d   m y s q l - 2   a n d   r e n a m e s   t h e   m y s q l   c o m m a n d   s o   t h e   r e a d i n e s s   p r o b e   c a n ' t   f i n d   i t .   A f t e r   a   f e w   s e c o n d s ,   t h e   P o d   s h o u l d   r e p o r t   o n e   o f   i t s   c o n t a i n e r s   a s   n o t   R e a d y ,   w h i c h   y o u   c a n   c h e c k   b y   r u n n i n g :   k u b e c t l   g e t   p o d   m y s q l - 2   L o o k   f o r   1 / 2   i n   t h e   R E A D Y   c o l u m n :   N A M E   R E A D Y   S T A T U S   R E S T A R T S   A G E   m y s q l - 2   1 / 2   R u n n i n g   0   3 m   A t   t h i s   p o i n t ,   y o u   s h o u l d   s e e   y o u r   S E L E C T   @ @ s e r v e r _ i d   l o o p   c o n t i n u e   t o   r u n ,   a l t h o u g h   i t   n e v e r   r e p o r t s   1 0 2   a n y m o r e .   R e c a l l   t h a t   t h e   i n i t - m y s q l   s c r i p t   d e f i n e d   s e r v e r - i d   a s   1 0 0   +   $ o r d i n a l ,   s o   s e r v e r   I D   1 0 2   c o r r e s p o n d s   t o   P o d   m y s q l - 2 .   N o w   r e p a i r   t h e   P o d   a n d   i t   s h o u l d   r e a p p e a r   i n   t h e   l o o p   o u t p u t   a f t e r   a   f e w   s e c o n d s :   k u b e c t l   e x e c   m y s q l - 2   - c   m y s q l   -


Question: What is Delete Pods?

Answer: T h e   S t a t e f u l S e t   a l s o   r e c r e a t e s   P o d s   i f   t h e y ' r e   d e l e t e d ,   s i m i l a r   t o   w h a t   a   R e p l i c a S e t   d o e s   f o r   s t a t e l e s s   P o d s .   k u b e c t l   d e l e t e   p o d   m y s q l - 2   T h e   S t a t e f u l S e t   c o n t r o l l e r   n o t i c e s   t h a t   n o   m y s q l - 2   P o d   e x i s t s   a n y m o r e ,   a n d   c r e a t e s   a   n e w   o n e   w i t h   t h e   s a m e   n a m e   a n d   l i n k e d   t o   t h e   s a m e   P e r s i s t e n t V o l u m e C l a i m .   Y o u   s h o u l d   s e e   s e r v e r   I D   1 0 2   d i s a p p e a r   f r o m   t h e   l o o p   o u t p u t   f o r   a   w h i l e   a n d   t h e n   r e t u r n   o n   i t s   o w n .


Question: What is Drain a Node?

Answer: I f   y o u r   K u b e r n e t e s   c l u s t e r   h a s   m u l t i p l e   N o d e s ,   y o u   c a n   s i m u l a t e   N o d e   d o w n t i m e   ( s u c h   a s   w h e n   N o d e s   a r e   u p g r a d e d )   b y   i s s u i n g   a   d r a i n .   F i r s t   d e t e r m i n e   w h i c h   N o d e   o n e   o f   t h e   M y S Q L   P o d s   i s   o n :   k u b e c t l   g e t   p o d   m y s q l - 2   - o   w i d e   T h e   N o d e   n a m e   s h o u l d   s h o w   u p   i n   t h e   l a s t   c o l u m n :   N A M E   R E A D Y   S T A T U S   R E S T A R T S   A G E   I P   N O D E   m y s q l - 2   2 / 2   R u n n i n g   0   1 5 m   1 0 . 2 4 4 . 5 . 2 7   k u b e r n e t e s - n o d e - 9 l 2 t   T h e n ,   d r a i n   t h e   N o d e   b y   r u n n i n g   t h e   f o l l o w i n g   c o m m a n d ,   w h i c h   c o r d o n s   i t   s o   n o   n e w   P o d s   m a y   s c h e d u l e   t h e r e ,   a n d   t h e n   e v i c t s   a n y   e x i s t i n g   P o d s .   R e p l a c e   < n o d e - n a m e >   w i t h   t h e   n a m e   o f   t h e   N o d e   y o u   f o u n d   i n   t h e   l a s t   s t e p .


Question: What is Caution:?

Answer: #   S e e   a b o v e   a d v i c e   a b o u t   i m p a c t   o n   o t h e r   w o r k l o a d s   k u b e c t l   d r a i n   < n o d e - n a m e >   - - f o r c e   - - d e l e t e - e m p t y d i r - d a t a   - - i g n o r e - d a e m o n s e t s   N o w   y o u   c a n   w a t c h   a s   t h e   P o d   r e s c h e d u l e s   o n   a   d i f f e r e n t   N o d e :   k u b e c t l   g e t   p o d   m y s q l - 2   - o   w i d e   - - w a t c h   I t   s h o u l d   l o o k   s o m e t h i n g   l i k e   t h i s :   N A M E   R E A D Y   S T A T U S   R E S T A R T S   A G E   I P   N O D E   m y s q l - 2   2 / 2   T e r m i n a t i n g   0   1 5 m   1 0 . 2 4 4 . 1 . 5 6   k u b e r n e t e s - n o d e - 9 l 2 t   [ . . . ]   m y s q l - 2   0 / 2   P e n d i n g   0   0 s   < n o n e >   k u b e r n e t e s - n o d e - f j l m   m y s q l - 2   0 / 2   I n i t : 0 / 2   0   0 s   < n o n e >   k u b e r n e t e s - n o d e - f j l m   m y s q l - 2   0 / 2   I n i t : 1 / 2   0   2 0 s   1 0 . 2 4 4 . 5 . 3 2   k u b e r n e t e s - n o d e - f j l m   m y s q l - 2   0 / 2   P o d I n i t i a l i z i n g   0   2 1 s   1 0 . 2 4 4 . 5 . 3 2   k u b e r n e t e s - n o d e - f j l m   m y s q l - 2   1 / 2   R u n n i n g   0   2 2 s   1 0 . 2 4 4 . 5 . 3 2   k u b e r n e t e s - n o d e - f j l m   m y s q l - 2   2 / 2   R u n n i n g   0   3 0 s   1 0 . 2 4 4 . 5 . 3 2   k u b e r n e t e s - n o d e - f j l m   A n d   a g a i n ,   y o u   s h o u l d   s e e   s e r v e r   I D   1 0 2   d i s a p p e a r   f r o m   t h e   S E L E C T   @ @ s e r v e r _ i d   l o o p   o u t p u t   f o r   a   w h i l e   a n d   t h e n   r e t u r n .   N o w   u n c o r d o n   t h e   N o d e   t o   r e t u r n   i t   t o   a   n o r m a l   s t a t e :   k u b e c t l   u n c o r d o n   < n o d e - n a m e >


Question: What is Scaling the number of replicas?

Answer: W h e n   y o u   u s e   M y S Q L   r e p l i c a t i o n ,   y o u   c a n   s c a l e   y o u r   r e a d   q u e r y   c a p a c i t y   b y   a d d i n g   r e p l i c a s .   F o r   a   S t a t e f u l S e t ,   y o u   c a n   a c h i e v e   t h i s   w i t h   a   s i n g l e   c o m m a n d :   k u b e c t l   s c a l e   s t a t e f u l s e t   m y s q l   - - r e p l i c a s = 5   W a t c h   t h e   n e w   P o d s   c o m e   u p   b y   r u n n i n g :   k u b e c t l   g e t   p o d s   - l   a p p = m y s q l   - - w a t c h   O n c e   t h e y ' r e   u p ,   y o u   s h o u l d   s e e   s e r v e r   I D s   1 0 3   a n d   1 0 4   s t a r t   a p p e a r i n g   i n   t h e   S E L E C T   @ @ s e r v e r _ i d   l o o p   o u t p u t .   Y o u   c a n   a l s o   v e r i f y   t h a t   t h e s e   n e w   s e r v e r s   h a v e   t h e   d a t a   y o u   a d d e d   b e f o r e   t h e y   e x i s t e d :   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 - 3 . m y s q l   - e   " S E L E C T   *   F R O M   t e s t . m e s s a g e 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   S c a l i n g   b a c k   d o w n   i s   a l s o   s e a m l e s s :   k u b e c t l   s c a l e   s t a t e f u l s e t   m y s q l   - - r e p l i c a s = 3


Question: What is Note:?

Answer: A l t h o u g h   s c a l i n g   u p   c r e a t e s   n e w   P e r s i s t e n t V o l u m e C l a i m s   a u t o m a t i c a l l y ,   s c a l i n g   d o w n   d o e s   n o t   a u t o m a t i c a l l y   d e l e t e   t h e s e   P V C s .   T h i s   g i v e s   y o u   t h e   c h o i c e   t o   k e e p   t h o s e   i n i t i a l i z e d   P V C s   a r o u n d   t o   m a k e   s c a l i n g   b a c k   u p   q u i c k e r ,   o r   t o   e x t r a c t   d a t a   b e f o r e   d e l e t i n g   t h e m .   Y o u   c a n   s e e   t h i s   b y   r u n n i n g :   k u b e c t l   g e t   p v c   - l   a p p = m y s q l   W h i c h   s h o w s   t h a t   a l l   5   P V C s   s t i l l   e x i s t ,   d e s p i t e   h a v i n g   s c a l e d   t h e   S t a t e f u l S e t   d o w n   t o   3 :   N A M E   S T A T U S   V O L U M E   C A P A C I T Y   A C C E S S M O D E S   A G E   d a t a - m y s q l - 0   B o u n d   p v c - 8 a c b f 5 d c - b 1 0 3 - 1 1 e 6 - 9 3 f a - 4 2 0 1 0 a 8 0 0 0 0 2   1 0 G i   R W O   2 0 m   d a t a - m y s q l - 1   B o u n d   p v c - 8 a d 3 9 8 2 0 - b 1 0 3 - 1 1 e 6 - 9 3 f a - 4 2 0 1 0 a 8 0 0 0 0 2   1 0 G i   R W O   2 0 m   d a t a - m y s q l - 2   B o u n d   p v c - 8 a d 6 9 a 6 d - b 1 0 3 - 1 1 e 6 - 9 3 f a - 4 2 0 1 0 a 8 0 0 0 0 2   1 0 G i   R W O   2 0 m   d a t a - m y s q l - 3   B o u n d   p v c - 5 0 0 4 3 c 4 5 - b 1 c 5 - 1 1 e 6 - 9 3 f a - 4 2 0 1 0 a 8 0 0 0 0 2   1 0 G i   R W O   2 m   d a t a - m y s q l - 4   B o u n d   p v c - 5 0 0 a 9 9 5 7 - b 1 c 5 - 1 1 e 6 - 9 3 f a - 4 2 0 1 0 a 8 0 0 0 0 2   1 0 G i   R W O   2 m   I f   y o u   d o n ' t   i n t e n d   t o   r e u s e   t h e   e x t r a   P V C s ,   y o u   c a n   d e l e t e   t h e m :   k u b e c t l   d e l e t e   p v c   d a t a - m y s q l - 3   k u b e c t l   d e l e t e   p v c   d a t a - m y s q l - 4


Question: What is Cleaning up?

Answer: C a n c e l   t h e   S E L E C T   @ @ s e r v e r _ i d   l o o p   b y   p r e s s i n g   C t r l + C   i n   i t s   t e r m i n a l ,   o r   r u n n i n g   t h e   f o l l o w i n g   f r o m   a n o t h e r   t e r m i n a l : k u b e c t l   d e l e t e   p o d   m y s q l - c l i e n t - l o o p   - - n o w   D e l e t e   t h e   S t a t e f u l S e t .   T h i s   a l s o   b e g i n s   t e r m i n a t i n g   t h e   P o d s . k u b e c t l   d e l e t e   s t a t e f u l s e t   m y s q l   V e r i f y   t h a t   t h e   P o d s   d i s a p p e a r .   T h e y   m i g h t   t a k e   s o m e   t i m e   t o   f i n i s h   t e r m i n a t i n g . k u b e c t l   g e t   p o d s   - l   a p p = m y s q l   Y o u ' l l   k n o w   t h e   P o d s   h a v e   t e r m i n a t e d   w h e n   t h e   a b o v e   r e t u r n s : N o   r e s o u r c e s   f o u n d .   D e l e t e   t h e   C o n f i g M a p ,   S e r v i c e s ,   a n d   P e r s i s t e n t V o l u m e C l a i m s . k u b e c t l   d e l e t e   c o n f i g m a p , s e r v i c e , p v c   - l   a p p = m y s q l   I f   y o u   m a n u a l l y   p r o v i s i o n e d   P e r s i s t e n t V o l u m e s ,   y o u   a l s o   n e e d   t o   m a n u a l l y   d e l e t e   t h e m ,   a s   w e l l   a s   r e l e a s e   t h e   u n d e r l y i n g   r e s o u r c e s .   I f   y o u   u s e d   a   d y n a m i c   p r o v i s i o n e r ,   i t   a u t o m a t i c a l l y   d e l e t e s   t h e   P e r s i s t e n t V o l u m e s   w h e n   i t   s e e s   t h a t   y o u   d e l e t e d   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 .   S o m e   d y n a m i c   p r o v i s i o n e r s   ( s u c h   a s   t h o s e   f o r   E B S   a n d   P D )   a l s o   r e l e a s e   t h e   u n d e r l y i n g   r e s o u r c e s   u p o n   d e l e t i n g   t h e   P e r s i s t e n t V o l u m e s .   C a n c e l   t h e   S E L E C T   @ @ s e r v e r _ i d   l o o p   b y   p r e s


Question: What is What's next?

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


Question: What is Kubectl user preferences (kuberc)?

Answer: Kubectl user preferences (kuberc)FEATURE STATE: Kubernetes 1.34 [beta]A Kubernetes kuberc configuration file allows you to define preferences for kubectl, such as default options and command aliases. Unlike the kubeconfig file, a kuberc configuration file does not contain cluster details, usernames or passwords.The default location of this configuration file is $HOME/.kube/kuberc. To provide kubectl with a path to a custom kuberc file, use the --kuberc command line option, or set the KUBERC environment variable.A kuberc using the kubectl.config.k8s.io/v1beta1 format allows you to define two types of user preferences:Aliases - allow you to create shorter versions of your favorite commands, optionally setting options and arguments.Defaults - allow you to configure default option values for your favorite commands.aliasesWithin a kuberc configuration, the aliases section allows you to define custom shortcuts for kubectl commands, optionally with preset command line arguments and flags.This


Question: How does Kubectl user preferences (kuberc) work?

Answer: Kubectl user preferences (kuberc)FEATURE STATE: Kubernetes 1.34 [beta]A Kubernetes kuberc configuration file allows you to define preferences for kubectl, such as default options and command aliases. Unlike the kubeconfig file, a kuberc configuration file does not contain cluster details, usernames or passwords.The default location of this configuration file is $HOME/.kube/kuberc. To provide kubectl with a path to a custom kuberc file, use the --kuberc command line option, or set the KUBERC environment variable.A kuberc using the kubectl.config.k8s.io/v1beta1 format allows you to define two types of user preferences:Aliases - allow you to create shorter versions of your favorite commands, optionally setting options and arguments.Defaults - allow you to configure default option values for your favorite commands.aliasesWithin a kuberc configuration, the aliases section allows you to define custom shortcuts for kubectl commands, optionally with preset command line arguments and flags.This


Question: When would you use Kubectl user preferences (kuberc)?

Answer: Kubectl user preferences (kuberc)FEATURE STATE: Kubernetes 1.34 [beta]A Kubernetes kuberc configuration file allows you to define preferences for kubectl, such as default options and command aliases. Unlike the kubeconfig file, a kuberc configuration file does not contain cluster details, usernames or passwords.The default location of this configuration file is $HOME/.kube/kuberc. To provide kubectl with a path to a custom kuberc file, use the --kuberc command line option, or set the KUBERC environment variable.A kuberc using the kubectl.config.k8s.io/v1beta1 format allows you to define two types of user preferences:Aliases - allow you to create shorter versions of your favorite commands, optionally setting options and arguments.Defaults - allow you to configure default option values for your favorite commands.aliasesWithin a kuberc configuration, the aliases section allows you to define custom shortcuts for kubectl commands, optionally with preset command line arguments and flags.This


Question: What are the benefits of Kubectl user preferences (kuberc)?

Answer: Kubectl user preferences (kuberc)FEATURE STATE: Kubernetes 1.34 [beta]A Kubernetes kuberc configuration file allows you to define preferences for kubectl, such as default options and command aliases. Unlike the kubeconfig file, a kuberc configuration file does not contain cluster details, usernames or passwords.The default location of this configuration file is $HOME/.kube/kuberc. To provide kubectl with a path to a custom kuberc file, use the --kuberc command line option, or set the KUBERC environment variable.A kuberc using the kubectl.config.k8s.io/v1beta1 format allows you to define two types of user preferences:Aliases - allow you to create shorter versions of your favorite commands, optionally setting options and arguments.Defaults - allow you to configure default option values for your favorite commands.aliasesWithin a kuberc configuration, the aliases section allows you to define custom shortcuts for kubectl commands, optionally with preset command line arguments and flags.This


Question: What is Kubectl user preferences (kuberc)?

Answer: A   K u b e r n e t e s   k u b e r c   c o n f i g u r a t i o n   f i l e   a l l o w s   y o u   t o   d e f i n e   p r e f e r e n c e s   f o r   k u b e c t l ,   s u c h   a s   d e f a u l t   o p t i o n s   a n d   c o m m a n d   a l i a s e s .   U n l i k e   t h e   k u b e c o n f i g   f i l e ,   a   k u b e r c   c o n f i g u r a t i o n   f i l e   d o e s   n o t   c o n t a i n   c l u s t e r   d e t a i l s ,   u s e r n a m e s   o r   p a s s w o r d s .   T h e   d e f a u l t   l o c a t i o n   o f   t h i s   c o n f i g u r a t i o n   f i l e   i s   $ H O M E / . k u b e / k u b e r c .   T o   p r o v i d e   k u b e c t l   w i t h   a   p a t h   t o   a   c u s t o m   k u b e r c   f i l e ,   u s e   t h e   - - k u b e r c   c o m m a n d   l i n e   o p t i o n ,   o r   s e t   t h e   K U B E R C   e n v i r o n m e n t   v a r i a b l e .   A   k u b e r c   u s i n g   t h e   k u b e c t l . c o n f i g . k 8 s . i o / v 1 b e t a 1   f o r m a t   a l l o w s   y o u   t o   d e f i n e   t w o   t y p e s   o f   u s e r   p r e f e r e n c e s :   A l i a s e s   -   a l l o w   y o u   t o   c r e a t e   s h o r t e r   v e r s i o n s   o f   y o u r   f a v o r i t e   c o m m a n d s ,   o p t i o n a l l y   s e t t i n g   o p t i o n s   a n d   a r g u m e n t s . D e f a u l t s   -   a l l o w   y o u   t o   c o n f i g u r e   d e f a u l t   o p t i o n   v a l u e s   f o r   y o u r   f a v o r i t e   c o m m a n d s .


Question: What is aliases?

Answer: W i t h i n   a   k u b e r c   c o n f i g u r a t i o n ,   t h e   a l i a s e s   s e c t i o n   a l l o w s   y o u   t o   d e f i n e   c u s t o m   s h o r t c u t s   f o r   k u b e c t l   c o m m a n d s ,   o p t i o n a l l y   w i t h   p r e s e t   c o m m a n d   l i n e   a r g u m e n t s   a n d   f l a g s .   T h i s   n e x t   e x a m p l e   d e f i n e s   a   k u b e c t l   g e t n   a l i a s   f o r   t h e   k u b e c t l   g e t   s u b c o m m a n d ,   a d d i t i o n a l l y   s p e c i f y i n g   J S O N   o u t p u t   f o r m a t :   - - o u t p u t = j s o n .   a p i V e r s i o n :   k u b e c t l . c o n f i g . k 8 s . i o / v 1 b e t a 1   k i n d :   P r e f e r e n c e   a l i a s e s :   -   n a m e :   g e t n   c o m m a n d :   g e t   o p t i o n s :   -   n a m e :   o u t p u t   d e f a u l t :   j s o n   I n   t h i s   e x a m p l e ,   t h e   f o l l o w i n g   s e t t i n g s   w e r e   u s e d :   n a m e   -   A l i a s   n a m e   m u s t   n o t   c o l l i d e   w i t h   t h e   b u i l t - i n   c o m m a n d s . c o m m a n d   -   S p e c i f y   t h e   u n d e r l y i n g   b u i l t - i n   c o m m a n d   t h a t   y o u r   a l i a s   w i l l   e x e c u t e .   T h i s   i n c l u d e s   s u p p o r t   f o r   s u b c o m m a n d s   l i k e   c r e a t e   r o l e . o p t i o n s   -   S p e c i f y   d e f a u l t   v a l u e s   f o r   o p t i o n s .   I f   y o u   e x p l i c i t l y   s p e c i f y   a n   o p t i o n   w h e n   y o u   r u n   k u b e c t l ,   t h e   v a l u e   y o u   p r o v i d e   t a k e s   p r e c e d e n c e   o v e r   t h e   d e f a u l t   o n e   d e f i n e d   i n   k u b e r c .   W i t h   t h i s   a l i a s ,   r u n n i n g   k u b e c t l   g e t n   p o d s   w i l l   d e f a u l t   J S O N   o u t p u t .   H o w e v e r ,   i f   y o u   e x e c u t e   k u b e c t l   g e t n   p o d s   - o y a m l ,   t h e   o u t p u t   w


Question: What is prependArgs?

Answer: T h i s


Question: What is appendArgs?

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


Question: What is defaults?

Answer: W i t h i n   a   k u b e r c   c o n f i g u r a t i o n ,   d e f a u l t s   s e c t i o n   l e t s   y o u   s p e c i f y   d e f a u l t   v a l u e s   f o r   c o m m a n d   l i n e   a r g u m e n t s .   T h i s   n e x t   e x a m p l e   m a k e s   t h e   i n t e r a c t i v e   r e m o v a l   t h e   d e f a u l t   m o d e   f o r   i n v o k i n g   k u b e c t l   d e l e t e :   a p i V e r s i o n :   k u b e c t l . c o n f i g . k 8 s . i o / v 1 b e t a 1   k i n d :   P r e f e r e n c e   d e f a u l t s :   -   c o m m a n d :   d e l e t e   o p t i o n s :   -   n a m e :   i n t e r a c t i v e   d e f a u l t :   " t r u e "   I n   t h i s   e x a m p l e ,   t h e   f o l l o w i n g   s e t t i n g s   w e r e   u s e d :   c o m m a n d   -   B u i l t - i n   c o m m a n d ,   t h i s   i n c l u d e s   s u p p o r t   f o r   s u b c o m m a n d s   l i k e   c r e a t e   r o l e . o p t i o n s   -   S p e c i f y   d e f a u l t   v a l u e s   f o r   o p t i o n s .   I f   y o u   e x p l i c i t l y   s p e c i f y   a n   o p t i o n   w h e n   y o u   r u n   k u b e c t l ,   t h e   v a l u e   y o u   p r o v i d e   t a k e s   p r e c e d e n c e   o v e r   t h e   d e f a u l t   o n e   d e f i n e d   i n   k u b e r c .   W i t h   t h i s   s e t t i n g ,   r u n n i n g   k u b e c t l   d e l e t e   p o d / t e s t - p o d   w i l l   d e f a u l t   t o   p r o m p t i n g   f o r   c o n f i r m a t i o n .   H o w e v e r ,   k u b e c t l   d e l e t e   p o d / t e s t - p o d   - - i n t e r a c t i v e = f a l s e   w i l l   b y p a s s   t h e   c o n f i r m a t i o n .


Question: What is Suggested defaults?

Answer: T h e   k u b e c t l   m a i n t a i n e r s   e n c o u r a g e   y o u   t o   a d o p t   k u b e r c   w i t h   t h e   f o l l o w i n g   d e f a u l t s :   a p i V e r s i o n :   k u b e c t l . c o n f i g . k 8 s . i o / v 1 b e t a 1   k i n d :   P r e f e r e n c e   d e f a u l t s :   #   ( 1 )   d e f a u l t   s e r v e r - s i d e   a p p l y   -   c o m m a n d :   a p p l y   o p t i o n s :   -   n a m e :   s e r v e r - s i d e   d e f a u l t :   " t r u e "   #   ( 2 )   d e f a u l t   i n t e r a c t i v e   d e l e t i o n   -   c o m m a n d :   d e l e t e   o p t i o n s :   -   n a m e :   i n t e r a c t i v e   d e f a u l t :   " t r u e "   I n   t h i s   e x a m p l e ,   t h e   f o l l o w i n g   s e t t i n g s   a r e   e n f o r c e d :   D e f a u l t s   t o   u s i n g   S e r v e r - S i d e   A p p l y . D e f a u l t s   t o   i n t e r a c t i v e   r e m o v a l   w h e n e v e r   i n v o k i n g   k u b e c t l   d e l e t e   t o   p r e v e n t   a c c i d e n t a l   r e m o v a l   o f   r e s o u r c e s   f r o m   t h e   c l u s t e r .


Question: What is Disable kuberc?

Answer: T o   t e m p o r a r i l y   d i s a b l e   t h e   k u b e r c   f u n c t i o n a l i t y ,   s e t   ( a n d   e x p o r t )   t h e   e n v i r o n m e n t   v a r i a b l e   K U B E R C   w i t h   t h e   v a l u e   o f f :   e x p o r t   K U B E R C = o f f   o r   d i s a b l e   t h e   f e a t u r e   g a t e :   e x p o r t   K U B E C T L _ K U B E R C = f a l s e


Question: What is CRI Pod & Container Metrics?

Answer: CRI Pod & Container MetricsCollection of Pod & Container metrics via the CRI.FEATURE STATE: Kubernetes v1.23 [alpha]The kubelet collects pod and container metrics via cAdvisor. As an alpha feature, Kubernetes lets you configure the collection of pod and container metrics via the Container Runtime Interface (CRI). You must enable the PodAndContainerStatsFromCRI feature gate and use a compatible CRI implementation (containerd >= 1.6.0, CRI-O >= 1.23.0) to use the CRI based collection mechanism.CRI Pod & Container MetricsWith PodAndContainerStatsFromCRI enabled, the kubelet polls the underlying container runtime for pod and container stats instead of inspecting the host system directly using cAdvisor. The benefits of relying on the container runtime for this information as opposed to direct collection with cAdvisor include:Potential improved performance if the container runtime already collects this information during normal operations. In this case, the data can be re-used instead of being aggregated again by the kubelet.It further decouples the kubelet and the container runtime allowing collection of metrics for container runtimes that don't run processes directly on the host with kubelet where they are observable by cAdvisor (for example: container runtimes that use virtualization).


Question: How does CRI Pod & Container Metrics work?

Answer: CRI Pod & Container MetricsCollection of Pod & Container metrics via the CRI.FEATURE STATE: Kubernetes v1.23 [alpha]The kubelet collects pod and container metrics via cAdvisor. As an alpha feature, Kubernetes lets you configure the collection of pod and container metrics via the Container Runtime Interface (CRI). You must enable the PodAndContainerStatsFromCRI feature gate and use a compatible CRI implementation (containerd >= 1.6.0, CRI-O >= 1.23.0) to use the CRI based collection mechanism.CRI Pod & Container MetricsWith PodAndContainerStatsFromCRI enabled, the kubelet polls the underlying container runtime for pod and container stats instead of inspecting the host system directly using cAdvisor. The benefits of relying on the container runtime for this information as opposed to direct collection with cAdvisor include:Potential improved performance if the container runtime already collects this information during normal operations. In this case, the data can be re-used instead of being aggregated again by the kubelet.It further decouples the kubelet and the container runtime allowing collection of metrics for container runtimes that don't run processes directly on the host with kubelet where they are observable by cAdvisor (for example: container runtimes that use virtualization).


Question: When would you use CRI Pod & Container Metrics?

Answer: CRI Pod & Container MetricsCollection of Pod & Container metrics via the CRI.FEATURE STATE: Kubernetes v1.23 [alpha]The kubelet collects pod and container metrics via cAdvisor. As an alpha feature, Kubernetes lets you configure the collection of pod and container metrics via the Container Runtime Interface (CRI). You must enable the PodAndContainerStatsFromCRI feature gate and use a compatible CRI implementation (containerd >= 1.6.0, CRI-O >= 1.23.0) to use the CRI based collection mechanism.CRI Pod & Container MetricsWith PodAndContainerStatsFromCRI enabled, the kubelet polls the underlying container runtime for pod and container stats instead of inspecting the host system directly using cAdvisor. The benefits of relying on the container runtime for this information as opposed to direct collection with cAdvisor include:Potential improved performance if the container runtime already collects this information during normal operations. In this case, the data can be re-used instead of being aggregated again by the kubelet.It further decouples the kubelet and the container runtime allowing collection of metrics for container runtimes that don't run processes directly on the host with kubelet where they are observable by cAdvisor (for example: container runtimes that use virtualization).


Question: What are the benefits of CRI Pod & Container Metrics?

Answer: CRI Pod & Container MetricsCollection of Pod & Container metrics via the CRI.FEATURE STATE: Kubernetes v1.23 [alpha]The kubelet collects pod and container metrics via cAdvisor. As an alpha feature, Kubernetes lets you configure the collection of pod and container metrics via the Container Runtime Interface (CRI). You must enable the PodAndContainerStatsFromCRI feature gate and use a compatible CRI implementation (containerd >= 1.6.0, CRI-O >= 1.23.0) to use the CRI based collection mechanism.CRI Pod & Container MetricsWith PodAndContainerStatsFromCRI enabled, the kubelet polls the underlying container runtime for pod and container stats instead of inspecting the host system directly using cAdvisor. The benefits of relying on the container runtime for this information as opposed to direct collection with cAdvisor include:Potential improved performance if the container runtime already collects this information during normal operations. In this case, the data can be re-used instead of being aggregated again by the kubelet.It further decouples the kubelet and the container runtime allowing collection of metrics for container runtimes that don't run processes directly on the host with kubelet where they are observable by cAdvisor (for example: container runtimes that use virtualization).


Question: What is CRI Pod & Container Metrics?

Answer: T h e   k u b e l e t   c o l l e c t s   p o d   a n d   c o n t a i n e r   m e t r i c s   v i a   c A d v i s o r .   A s   a n   a l p h a   f e a t u r e ,   K u b e r n e t e s   l e t s   y o u   c o n f i g u r e   t h e   c o l l e c t i o n   o f   p o d   a n d   c o n t a i n e r   m e t r i c s   v i a   t h e   C o n t a i n e r   R u n t i m e   I n t e r f a c e   ( C R I ) .   Y o u   m u s t   e n a b l e   t h e   P o d A n d C o n t a i n e r S t a t s F r o m C R I   f e a t u r e   g a t e   a n d   u s e   a   c o m p a t i b l e   C R I   i m p l e m e n t a t i o n   ( c o n t a i n e r d   > =   1 . 6 . 0 ,   C R I - O   > =   1 . 2 3 . 0 )   t o   u s e   t h e   C R I   b a s e d   c o l l e c t i o n   m e c h a n i s m .


Question: What is CRI Pod & Container Metrics?

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


Question: What is kubectl config unset?

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


Question: How does kubectl config unset work?

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


Question: When would you use kubectl config unset?

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


Question: What are the benefits of kubectl config unset?

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


Question: What is Synopsis?

Answer: U n s e t   a n   i n d i v i d u a l   v a l u e   i n   a   k u b e c o n f i g   f i l e .   P R O P E R T Y _ N A M E   i s   a   d o t   d e l i m i t e d   n a m e   w h e r e   e a c h   t o k e n   r e p r e s e n t s   e i t h e r   a n   a t t r i b u t e   n a m e   o r   a   m a p   k e y .   M a p   k e y s   m a y   n o t   c o n t a i n   d o t s .   k u b e c t l   c o n f i g   u n s e t   P R O P E R T Y _ N A M E


Question: What is Examples?

Answer: #   U n s e t   t h e   c u r r e n t - c o n t e x t   k u b e c t l   c o n f i g   u n s e t   c u r r e n t - c o n t e x t   #   U n s e t   n a m e s p a c e   i n   f o o   c o n t e x t   k u b e c t l   c o n f i g   u n s e t   c o n t e x t s . f o o . n a m e s p a c e


Question: What is Options?

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


Question: What is Parent Options Inherited?

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


Question: What is See Also?

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


Question: What is Object Names and IDs?

Answer: Object Names and IDsEach object in your cluster has a Name that is unique for that type of resource. Every Kubernetes object also has a UID that is unique across your whole cluster.For example, you can only have one Pod named myapp-1234 within the same namespace, but you can have one Pod and one Deployment that are each named myapp-1234.For non-unique user-provided attributes, Kubernetes provides labels and annotations.NamesA client-provided string that refers to an object in a resource URL, such as /api/v1/pods/some-name.Only one object of a given kind can have a given name at a time. However, if you delete the object, you can make a new object with the same name.Names must be unique across all API versions of the same resource. API resources are distinguished by their API group, resource type, namespace (for namespaced resources), and name. In other words, API version is irrelevant in this context.Note:In cases when objects represent a physical entity, like a Node representing a physical host, when the host is re-created under the same name without deleting and re-creating the Node, Kubernetes treats the new host as the old one, which may lead to inconsistencies.The server may generate a name when generateName is provided instead of name in a resource create request. When generateName is used, the provided value is used as a name prefix, which server appends a generated suffix to. Even though the name is generated, it may conflict with existing names resulting in a HTTP 409 response. This became far less likely to happen in Kubernetes v1.31 and later, since the server will make up to 8 attempt to generate a unique name before returning a HTTP 409 response.Below are four types of commonly used name constraints for resources.DNS Subdomain NamesMost resource types require a name that can be used as a DNS subdomain name as defined in RFC 1123. This means the name must:contain no more than 253 characterscontain only lowercase alphanumeric characters, '-' or '.'start with an alphanumeric characterend with an alphanumeric characterRFC 1123 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1123. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphanumeric characterend with an alphanumeric characterRFC 1035 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1035. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphabetic characterend with an alphanumeric characterNote:The only difference between the RFC 1035 and RFC 1123 label standards is that RFC 1123 labels are allowed to start with a digit, whereas RFC 1035 labels can start with a lowercase alphabetic character only.Path Segment NamesSome resource types require their names to be able to be safely encoded as a path segment. In other words, the name may not


Question: How does Object Names and IDs work?

Answer: Object Names and IDsEach object in your cluster has a Name that is unique for that type of resource. Every Kubernetes object also has a UID that is unique across your whole cluster.For example, you can only have one Pod named myapp-1234 within the same namespace, but you can have one Pod and one Deployment that are each named myapp-1234.For non-unique user-provided attributes, Kubernetes provides labels and annotations.NamesA client-provided string that refers to an object in a resource URL, such as /api/v1/pods/some-name.Only one object of a given kind can have a given name at a time. However, if you delete the object, you can make a new object with the same name.Names must be unique across all API versions of the same resource. API resources are distinguished by their API group, resource type, namespace (for namespaced resources), and name. In other words, API version is irrelevant in this context.Note:In cases when objects represent a physical entity, like a Node representing a physical host, when the host is re-created under the same name without deleting and re-creating the Node, Kubernetes treats the new host as the old one, which may lead to inconsistencies.The server may generate a name when generateName is provided instead of name in a resource create request. When generateName is used, the provided value is used as a name prefix, which server appends a generated suffix to. Even though the name is generated, it may conflict with existing names resulting in a HTTP 409 response. This became far less likely to happen in Kubernetes v1.31 and later, since the server will make up to 8 attempt to generate a unique name before returning a HTTP 409 response.Below are four types of commonly used name constraints for resources.DNS Subdomain NamesMost resource types require a name that can be used as a DNS subdomain name as defined in RFC 1123. This means the name must:contain no more than 253 characterscontain only lowercase alphanumeric characters, '-' or '.'start with an alphanumeric characterend with an alphanumeric characterRFC 1123 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1123. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphanumeric characterend with an alphanumeric characterRFC 1035 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1035. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphabetic characterend with an alphanumeric characterNote:The only difference between the RFC 1035 and RFC 1123 label standards is that RFC 1123 labels are allowed to start with a digit, whereas RFC 1035 labels can start with a lowercase alphabetic character only.Path Segment NamesSome resource types require their names to be able to be safely encoded as a path segment. In other words, the name may not


Question: When would you use Object Names and IDs?

Answer: Object Names and IDsEach object in your cluster has a Name that is unique for that type of resource. Every Kubernetes object also has a UID that is unique across your whole cluster.For example, you can only have one Pod named myapp-1234 within the same namespace, but you can have one Pod and one Deployment that are each named myapp-1234.For non-unique user-provided attributes, Kubernetes provides labels and annotations.NamesA client-provided string that refers to an object in a resource URL, such as /api/v1/pods/some-name.Only one object of a given kind can have a given name at a time. However, if you delete the object, you can make a new object with the same name.Names must be unique across all API versions of the same resource. API resources are distinguished by their API group, resource type, namespace (for namespaced resources), and name. In other words, API version is irrelevant in this context.Note:In cases when objects represent a physical entity, like a Node representing a physical host, when the host is re-created under the same name without deleting and re-creating the Node, Kubernetes treats the new host as the old one, which may lead to inconsistencies.The server may generate a name when generateName is provided instead of name in a resource create request. When generateName is used, the provided value is used as a name prefix, which server appends a generated suffix to. Even though the name is generated, it may conflict with existing names resulting in a HTTP 409 response. This became far less likely to happen in Kubernetes v1.31 and later, since the server will make up to 8 attempt to generate a unique name before returning a HTTP 409 response.Below are four types of commonly used name constraints for resources.DNS Subdomain NamesMost resource types require a name that can be used as a DNS subdomain name as defined in RFC 1123. This means the name must:contain no more than 253 characterscontain only lowercase alphanumeric characters, '-' or '.'start with an alphanumeric characterend with an alphanumeric characterRFC 1123 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1123. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphanumeric characterend with an alphanumeric characterRFC 1035 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1035. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphabetic characterend with an alphanumeric characterNote:The only difference between the RFC 1035 and RFC 1123 label standards is that RFC 1123 labels are allowed to start with a digit, whereas RFC 1035 labels can start with a lowercase alphabetic character only.Path Segment NamesSome resource types require their names to be able to be safely encoded as a path segment. In other words, the name may not


Question: What are the benefits of Object Names and IDs?

Answer: Object Names and IDsEach object in your cluster has a Name that is unique for that type of resource. Every Kubernetes object also has a UID that is unique across your whole cluster.For example, you can only have one Pod named myapp-1234 within the same namespace, but you can have one Pod and one Deployment that are each named myapp-1234.For non-unique user-provided attributes, Kubernetes provides labels and annotations.NamesA client-provided string that refers to an object in a resource URL, such as /api/v1/pods/some-name.Only one object of a given kind can have a given name at a time. However, if you delete the object, you can make a new object with the same name.Names must be unique across all API versions of the same resource. API resources are distinguished by their API group, resource type, namespace (for namespaced resources), and name. In other words, API version is irrelevant in this context.Note:In cases when objects represent a physical entity, like a Node representing a physical host, when the host is re-created under the same name without deleting and re-creating the Node, Kubernetes treats the new host as the old one, which may lead to inconsistencies.The server may generate a name when generateName is provided instead of name in a resource create request. When generateName is used, the provided value is used as a name prefix, which server appends a generated suffix to. Even though the name is generated, it may conflict with existing names resulting in a HTTP 409 response. This became far less likely to happen in Kubernetes v1.31 and later, since the server will make up to 8 attempt to generate a unique name before returning a HTTP 409 response.Below are four types of commonly used name constraints for resources.DNS Subdomain NamesMost resource types require a name that can be used as a DNS subdomain name as defined in RFC 1123. This means the name must:contain no more than 253 characterscontain only lowercase alphanumeric characters, '-' or '.'start with an alphanumeric characterend with an alphanumeric characterRFC 1123 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1123. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphanumeric characterend with an alphanumeric characterRFC 1035 Label NamesSome resource types require their names to follow the DNS label standard as defined in RFC 1035. This means the name must:contain at most 63 characterscontain only lowercase alphanumeric characters or '-'start with an alphabetic characterend with an alphanumeric characterNote:The only difference between the RFC 1035 and RFC 1123 label standards is that RFC 1123 labels are allowed to start with a digit, whereas RFC 1035 labels can start with a lowercase alphabetic character only.Path Segment NamesSome resource types require their names to be able to be safely encoded as a path segment. In other words, the name may not


Question: What is Object Names and IDs?

Answer: E a c h   o b j e c t   i n   y o u r   c l u s t e r   h a s   a   N a m e   t h a t   i s   u n i q u e   f o r   t h a t   t y p e   o f   r e s o u r c e .   E v e r y   K u b e r n e t e s   o b j e c t   a l s o   h a s   a   U I D   t h a t   i s   u n i q u e   a c r o s s   y o u r   w h o l e   c l u s t e r .   F o r   e x a m p l e ,   y o u   c a n   o n l y   h a v e   o n e   P o d   n a m e d   m y a p p - 1 2 3 4   w i t h i n   t h e   s a m e   n a m e s p a c e ,   b u t   y o u   c a n   h a v e   o n e   P o d   a n d   o n e   D e p l o y m e n t   t h a t   a r e   e a c h   n a m e d   m y a p p - 1 2 3 4 .   F o r   n o n - u n i q u e   u s e r - p r o v i d e d   a t t r i b u t e s ,   K u b e r n e t e s   p r o v i d e s   l a b e l s   a n d   a n n o t a t i o n s .


Question: What is Names?

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


Question: What is Note:?

Answer: T h e   s e r v e r   m a y   g e n e r a t e   a   n a m e   w h e n   g e n e r a t e N a m e   i s   p r o v i d e d   i n s t e a d   o f   n a m e   i n   a   r e s o u r c e   c r e a t e   r e q u e s t .   W h e n   g e n e r a t e N a m e   i s   u s e d ,   t h e   p r o v i d e d   v a l u e   i s   u s e d   a s   a   n a m e   p r e f i x ,   w h i c h   s e r v e r   a p p e n d s   a   g e n e r a t e d   s u f f i x   t o .   E v e n   t h o u g h   t h e   n a m e   i s   g e n e r a t e d ,   i t   m a y   c o n f l i c t   w i t h   e x i s t i n g   n a m e s   r e s u l t i n g   i n   a   H T T P   4 0 9   r e s p o n s e .   T h i s   b e c a m e   f a r   l e s s   l i k e l y   t o   h a p p e n   i n   K u b e r n e t e s   v 1 . 3 1   a n d   l a t e r ,   s i n c e   t h e   s e r v e r   w i l l   m a k e   u p   t o   8   a t t e m p t   t o   g e n e r a t e   a   u n i q u e   n a m e   b e f o r e   r e t u r n i n g   a   H T T P   4 0 9   r e s p o n s e .   B e l o w   a r e   f o u r   t y p e s   o f   c o m m o n l y   u s e d   n a m e   c o n s t r a i n t s   f o r   r e s o u r c e s .


Question: What is DNS Subdomain Names?

Answer: M o s t   r e s o u r c e   t y p e s   r e q u i r e   a   n a m e   t h a t   c a n   b e   u s e d   a s   a   D N S   s u b d o m a i n   n a m e   a s   d e f i n e d   i n   R F C   1 1 2 3 .   T h i s   m e a n s   t h e   n a m e   m u s t :   c o n t a i n   n o   m o r e   t h a n   2 5 3   c h a r a c t e r s c o n t a i n   o n l y   l o w e r c a s e   a l p h a n u m e r i c   c h a r a c t e r s ,   ' - '   o r   ' . ' s t a r t   w i t h   a n   a l p h a n u m e r i c   c h a r a c t e r e n d   w i t h   a n   a l p h a n u m e r i c   c h a r a c t e r


Question: What is RFC 1123 Label Names?

Answer: S o m e   r e s o u r c e   t y p e s   r e q u i r e   t h e i r   n a m e s   t o   f o l l o w   t h e   D N S   l a b e l   s t a n d a r d   a s   d e f i n e d   i n   R F C   1 1 2 3 .   T h i s   m e a n s   t h e   n a m e   m u s t :   c o n t a i n   a t   m o s t   6 3   c h a r a c t e r s c o n t a i n   o n l y   l o w e r c a s e   a l p h a n u m e r i c   c h a r a c t e r s   o r   ' - ' s t a r t   w i t h   a n   a l p h a n u m e r i c   c h a r a c t e r e n d   w i t h   a n   a l p h a n u m e r i c   c h a r a c t e r


Question: What is RFC 1035 Label Names?

Answer: S o m e   r e s o u r c e   t y p e s   r e q u i r e   t h e i r   n a m e s   t o   f o l l o w   t h e   D N S   l a b e l   s t a n d a r d   a s   d e f i n e d   i n   R F C   1 0 3 5 .   T h i s   m e a n s   t h e   n a m e   m u s t :   c o n t a i n   a t   m o s t   6 3   c h a r a c t e r s c o n t a i n   o n l y   l o w e r c a s e   a l p h a n u m e r i c   c h a r a c t e r s   o r   ' - ' s t a r t   w i t h   a n   a l p h a b e t i c   c h a r a c t e r e n d   w i t h   a n   a l p h a n u m e r i c   c h a r a c t e r


Question: What is Path Segment Names?

Answer: S o m e   r e s o u r c e   t y p e s   r e q u i r e   t h e i r   n a m e s   t o   b e   a b l e   t o   b e   s a f e l y   e n c o d e d   a s   a   p a t h   s e g m e n t .   I n   o t h e r   w o r d s ,   t h e   n a m e   m a y   n o t   b e   " . "   o r   " . . "   a n d   t h e   n a m e   m a y   n o t   c o n t a i n   " / "   o r   " % " .   H e r e ' s   a n   e x a m p l e   m a n i f e s t   f o r   a   P o d   n a m e d   n g i n x - d e m o .   a p i V e r s i o n :   v 1   k i n d :   P o d   m e t a d a t a :   n a m e :   n g i n x - d e m o   s p e c :   c o n t a i n e r s :   -   n a m e :   n g i n x   i m a g e :   n g i n x : 1 . 1 4 . 2   p o r t s :   -   c o n t a i n e r P o r t :   8 0


Question: What is UIDs?

Answer: A   K u b e r n e t e s   s y s t e m s - g e n e r a t e d   s t r i n g   t o   u n i q u e l y   i d e n t i f y   o b j e c t s .   E v e r y   o b j e c t   c r e a t e d   o v e r   t h e   w h o l e   l i f e t i m e   o f   a   K u b e r n e t e s   c l u s t e r   h a s   a   d i s t i n c t   U I D .   I t   i s   i n t e n d e d   t o   d i s t i n g u i s h   b e t w e e n   h i s t o r i c a l   o c c u r r e n c e s   o f   s i m i l a r   e n t i t i e s .   K u b e r n e t e s   U I D s   a r e   u n i v e r s a l l y   u n i q u e   i d e n t i f i e r s   ( a l s o   k n o w n   a s   U U I D s ) .   U U I D s   a r e   s t a n d a r d i z e d   a s   I S O / I E C   9 8 3 4 - 8   a n d   a s   I T U - T   X . 6 6 7 .


Question: What is What's next?

Answer: R e a d   a b o u t   l a b e l s   a n d   a n n o t a t i o n s   i n   K u b e r n e t e s . S e e   t h e   I d e n t i f i e r s   a n d   N a m e s   i n   K u b e r n e t e s   d e s i g n   d o c u m e n t .


Question: What is kubectl config use-context?

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


Question: How does kubectl config use-context work?

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


Question: When would you use kubectl config use-context?

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


Question: What are the benefits of kubectl config use-context?

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


Question: What is Synopsis?

Answer: S e t   t h e   c u r r e n t - c o n t e x t   i n   a   k u b e c o n f i g   f i l e .   k u b e c t l   c o n f i g   u s e - c o n t e x t   C O N T E X T _ N A M E


Question: What is Examples?

Answer: #   U s e   t h e   c o n t e x t   f o r   t h e   m i n i k u b e   c l u s t e r   k u b e c t l   c o n f i g   u s e - c o n t e x t   m i n i k u b e


Question: What is Options?

Answer: h e l p   f o r   u s e - c o n t e x t


Question: What is Parent Options Inherited?

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


Question: What is See Also?

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


Question: What is Enable Or Disable A Kubernetes API?

Answer: Enable Or Disable A Kubernetes APIThis page shows how to enable or disable an API version from your cluster's control plane.Specific API versions can be turned on or off by passing --runtime-config=api/<version> as a command line argument to the API server. The values for this argument are a comma-separated list of API versions. Later values override earlier values.The runtime-config command line argument also supports 2 special keys:api/all, representing all known APIsapi/legacy, representing only legacy APIs. Legacy APIs are any APIs that have been explicitly deprecated.For example, to turn off all API versions except v1, pass --runtime-config=api/all=false,api/v1=true to the kube-apiserver.What's nextRead the full documentation for the kube-apiserver component.


Question: How does Enable Or Disable A Kubernetes API work?

Answer: Enable Or Disable A Kubernetes APIThis page shows how to enable or disable an API version from your cluster's control plane.Specific API versions can be turned on or off by passing --runtime-config=api/<version> as a command line argument to the API server. The values for this argument are a comma-separated list of API versions. Later values override earlier values.The runtime-config command line argument also supports 2 special keys:api/all, representing all known APIsapi/legacy, representing only legacy APIs. Legacy APIs are any APIs that have been explicitly deprecated.For example, to turn off all API versions except v1, pass --runtime-config=api/all=false,api/v1=true to the kube-apiserver.What's nextRead the full documentation for the kube-apiserver component.


Question: When would you use Enable Or Disable A Kubernetes API?

Answer: Enable Or Disable A Kubernetes APIThis page shows how to enable or disable an API version from your cluster's control plane.Specific API versions can be turned on or off by passing --runtime-config=api/<version> as a command line argument to the API server. The values for this argument are a comma-separated list of API versions. Later values override earlier values.The runtime-config command line argument also supports 2 special keys:api/all, representing all known APIsapi/legacy, representing only legacy APIs. Legacy APIs are any APIs that have been explicitly deprecated.For example, to turn off all API versions except v1, pass --runtime-config=api/all=false,api/v1=true to the kube-apiserver.What's nextRead the full documentation for the kube-apiserver component.


Question: What are the benefits of Enable Or Disable A Kubernetes API?

Answer: Enable Or Disable A Kubernetes APIThis page shows how to enable or disable an API version from your cluster's control plane.Specific API versions can be turned on or off by passing --runtime-config=api/<version> as a command line argument to the API server. The values for this argument are a comma-separated list of API versions. Later values override earlier values.The runtime-config command line argument also supports 2 special keys:api/all, representing all known APIsapi/legacy, representing only legacy APIs. Legacy APIs are any APIs that have been explicitly deprecated.For example, to turn off all API versions except v1, pass --runtime-config=api/all=false,api/v1=true to the kube-apiserver.What's nextRead the full documentation for the kube-apiserver component.


Question: What is Enable Or Disable A Kubernetes API?

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


Question: What is What's next?

Answer: R e a d   t h e   f u l l   d o c u m e n t a t i o n   f o r   t h e   k u b e - a p i s e r v e r   c o m p o n e n t .


Question: What is Authenticating?

Answer: AuthenticatingThis page provides an overview of authentication in Kubernetes, with a focus on authentication to the Kubernetes API.Users in KubernetesAll Kubernetes clusters have two categories of users: service accounts managed by Kubernetes, and normal users.It is assumed that a cluster-independent service manages normal users in the following ways:an administrator distributing private keysa user store like Keystone or Google Accountsa file with a list of usernames and passwordsIn this regard, Kubernetes does not have objects which represent normal user accounts. Normal users cannot be added to a cluster through an API call.Even though a normal user cannot be added via an API call, any user that presents a valid certificate signed by the cluster's certificate authority (CA) is considered authenticated. In this configuration, Kubernetes determines the username from the common name field in the 'subject' of the cert (e.g., "/CN=bob"). From there, the role based access control (RBAC) sub-system would determine whether the user is authorized to perform a specific operation on a resource.In contrast, service accounts are users managed by the Kubernetes API. They are bound to specific namespaces, and created automatically by the API server or manually through API calls. Service accounts are tied to a set of credentials stored as Secrets, which are mounted into pods allowing in-cluster processes to talk to the Kubernetes API.API requests are tied to either a normal user or a service account, or are treated as anonymous requests. This means every process inside or outside the cluster, from a human user typing kubectl on a workstation, to kubelets on nodes, to members of the control plane, must authenticate when making requests to the API server, or be treated as an anonymous user.Authentication strategiesKubernetes uses client certificates, bearer tokens, or an authenticating proxy to authenticate API requests through authentication plugins. As HTTP requests are made to the API server, plugins attempt to associate the following attributes with the request:Username: a string which identifies the end user. Common values might be kube-admin or jane@example.com.UID: a string which identifies the end user and attempts to be more consistent and unique than username.Groups: a set of strings, each of which indicates the user's membership in a named logical collection of users. Common values might be system:masters or devops-team.Extra fields: a map of strings to list of strings which holds additional information authorizers may find useful.Note:All values are opaque to the authentication system and only hold significance when interpreted by an authorizer.Authentication methodsYou can enable multiple authentication methods at once. You should usually use at least two methods:service account tokens for service accountsat least one other method for user authentication.When multiple authenticator modules are enabled, the first module to successfully authenticate t


Question: How does Authenticating work?

Answer: AuthenticatingThis page provides an overview of authentication in Kubernetes, with a focus on authentication to the Kubernetes API.Users in KubernetesAll Kubernetes clusters have two categories of users: service accounts managed by Kubernetes, and normal users.It is assumed that a cluster-independent service manages normal users in the following ways:an administrator distributing private keysa user store like Keystone or Google Accountsa file with a list of usernames and passwordsIn this regard, Kubernetes does not have objects which represent normal user accounts. Normal users cannot be added to a cluster through an API call.Even though a normal user cannot be added via an API call, any user that presents a valid certificate signed by the cluster's certificate authority (CA) is considered authenticated. In this configuration, Kubernetes determines the username from the common name field in the 'subject' of the cert (e.g., "/CN=bob"). From there, the role based access control (RBAC) sub-system would determine whether the user is authorized to perform a specific operation on a resource.In contrast, service accounts are users managed by the Kubernetes API. They are bound to specific namespaces, and created automatically by the API server or manually through API calls. Service accounts are tied to a set of credentials stored as Secrets, which are mounted into pods allowing in-cluster processes to talk to the Kubernetes API.API requests are tied to either a normal user or a service account, or are treated as anonymous requests. This means every process inside or outside the cluster, from a human user typing kubectl on a workstation, to kubelets on nodes, to members of the control plane, must authenticate when making requests to the API server, or be treated as an anonymous user.Authentication strategiesKubernetes uses client certificates, bearer tokens, or an authenticating proxy to authenticate API requests through authentication plugins. As HTTP requests are made to the API server, plugins attempt to associate the following attributes with the request:Username: a string which identifies the end user. Common values might be kube-admin or jane@example.com.UID: a string which identifies the end user and attempts to be more consistent and unique than username.Groups: a set of strings, each of which indicates the user's membership in a named logical collection of users. Common values might be system:masters or devops-team.Extra fields: a map of strings to list of strings which holds additional information authorizers may find useful.Note:All values are opaque to the authentication system and only hold significance when interpreted by an authorizer.Authentication methodsYou can enable multiple authentication methods at once. You should usually use at least two methods:service account tokens for service accountsat least one other method for user authentication.When multiple authenticator modules are enabled, the first module to successfully authenticate t


Question: When would you use Authenticating?

Answer: AuthenticatingThis page provides an overview of authentication in Kubernetes, with a focus on authentication to the Kubernetes API.Users in KubernetesAll Kubernetes clusters have two categories of users: service accounts managed by Kubernetes, and normal users.It is assumed that a cluster-independent service manages normal users in the following ways:an administrator distributing private keysa user store like Keystone or Google Accountsa file with a list of usernames and passwordsIn this regard, Kubernetes does not have objects which represent normal user accounts. Normal users cannot be added to a cluster through an API call.Even though a normal user cannot be added via an API call, any user that presents a valid certificate signed by the cluster's certificate authority (CA) is considered authenticated. In this configuration, Kubernetes determines the username from the common name field in the 'subject' of the cert (e.g., "/CN=bob"). From there, the role based access control (RBAC) sub-system would determine whether the user is authorized to perform a specific operation on a resource.In contrast, service accounts are users managed by the Kubernetes API. They are bound to specific namespaces, and created automatically by the API server or manually through API calls. Service accounts are tied to a set of credentials stored as Secrets, which are mounted into pods allowing in-cluster processes to talk to the Kubernetes API.API requests are tied to either a normal user or a service account, or are treated as anonymous requests. This means every process inside or outside the cluster, from a human user typing kubectl on a workstation, to kubelets on nodes, to members of the control plane, must authenticate when making requests to the API server, or be treated as an anonymous user.Authentication strategiesKubernetes uses client certificates, bearer tokens, or an authenticating proxy to authenticate API requests through authentication plugins. As HTTP requests are made to the API server, plugins attempt to associate the following attributes with the request:Username: a string which identifies the end user. Common values might be kube-admin or jane@example.com.UID: a string which identifies the end user and attempts to be more consistent and unique than username.Groups: a set of strings, each of which indicates the user's membership in a named logical collection of users. Common values might be system:masters or devops-team.Extra fields: a map of strings to list of strings which holds additional information authorizers may find useful.Note:All values are opaque to the authentication system and only hold significance when interpreted by an authorizer.Authentication methodsYou can enable multiple authentication methods at once. You should usually use at least two methods:service account tokens for service accountsat least one other method for user authentication.When multiple authenticator modules are enabled, the first module to successfully authenticate t