Question: What are the benefits of Managing Workloads?

Answer: Managing WorkloadsYou've deployed your application and exposed it via a Service. Now what? Kubernetes provides a number of tools to help you manage your application deployment, including scaling and updating.Organizing resource configurationsMany applications require multiple resources to be created, such as a Deployment along with a Service. Management of multiple resources can be simplified by grouping them together in the same file (separated by --- in YAML). For example:application/nginx-app.yaml apiVersion: v1 kind: Service metadata: name: my-nginx-svc labels: app: nginx spec: type: LoadBalancer ports: - port: 80 selector: app: nginx --- apiVersion: apps/v1 kind: Deployment metadata: name: my-nginx labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 Multiple resources can be created the same way as a single resource:kubectl apply -f https://k8s.io/examples/application/nginx-app.yaml service/my-nginx-svc created deployment.apps/my-nginx created The resources will be created in the order they appear in the manifest. Therefore, it's best to specify the Service first, since that will ensure the scheduler can spread the pods associated with the Service as they are created by the controller(s), such as Deployment.kubectl apply also accepts multiple -f arguments:kubectl apply -f https://k8s.io/examples/application/nginx/nginx-svc.yaml \ -f https://k8s.io/examples/application/nginx/nginx-deployment.yaml It is a recommended practice to put resources related to the same microservice or application tier into the same file, and to group all of the files associated with your application in the same directory. If the tiers of your application bind to each other using DNS, you can deploy all of the components of your stack together.A URL can also be specified as a configuration source, which is handy for deploying directly from manifests in your source control system:kubectl apply -f https://k8s.io/examples/application/nginx/nginx-deployment.yaml deployment.apps/my-nginx created If you need to define more manifests, such as adding a ConfigMap, you can do that too.External toolsThis section lists only the most common tools used for managing workloads on Kubernetes. To see a larger list, view Application definition and image build in the CNCF Landscape.Helm🛇 This item links to a third party project or product that is not part of Kubernetes itself. More informationHelm is a tool for managing packages of pre-configured Kubernetes resources. These packages are known as Helm charts.KustomizeKustomize traverses a Kubernetes manifest to add, remove or update configuration options. It is available both as a standalone binary and as a native feature of kubectl.Bulk operations in kubectlResource creation isn't the only operation that kubectl can perform in bulk. It can also extract resource names from configuration files in order to


Question: What is Managing Workloads?

Answer: Y o u ' v e   d e p l o y e d   y o u r   a p p l i c a t i o n   a n d   e x p o s e d   i t   v i a   a   S e r v i c e .   N o w   w h a t ?   K u b e r n e t e s   p r o v i d e s   a   n u m b e r   o f   t o o l s   t o   h e l p   y o u   m a n a g e   y o u r   a p p l i c a t i o n   d e p l o y m e n t ,   i n c l u d i n g   s c a l i n g   a n d   u p d a t i n g .


Question: What is Organizing resource configurations?

Answer: M a n y   a p p l i c a t i o n s   r e q u i r e   m u l t i p l e   r e s o u r c e s   t o   b e   c r e a t e d ,   s u c h   a s   a   D e p l o y m e n t   a l o n g   w i t h   a   S e r v i c e .   M a n a g e m e n t   o f   m u l t i p l e   r e s o u r c e s   c a n   b e   s i m p l i f i e d   b y   g r o u p i n g   t h e m   t o g e t h e r   i n   t h e   s a m e   f i l e   ( s e p a r a t e d   b y   - - -   i n   Y A M L ) .   F o r   e x a m p l e :   a p i V e r s i o n :   v 1   k i n d :   S e r v i c e   m e t a d a t a :   n a m e :   m y - n g i n x - s v c   l a b e l s :   a p p :   n g i n x   s p e c :   t y p e :   L o a d B a l a n c e r   p o r t s :   -   p o r t :   8 0   s e l e c t o r :   a p p :   n g i n x   - - -   a p i V e r s i o n :   a p p s / v 1   k i n d :   D e p l o y m e n t   m e t a d a t a :   n a m e :   m y - n g i n x   l a b e l s :   a p p :   n g i n x   s p e c :   r e p l i c a s :   3   s e l e c t o r :   m a t c h L a b e l s :   a p p :   n g i n x   t e m p l a t e :   m e t a d a t a :   l a b e l s :   a p p :   n g i n x   s p e c :   c o n t a i n e r s :   -   n a m e :   n g i n x   i m a g e :   n g i n x : 1 . 1 4 . 2   p o r t s :   -   c o n t a i n e r P o r t :   8 0   M u l t i p l e   r e s o u r c e s   c a n   b e   c r e a t e d   t h e   s a m e   w a y   a s   a   s i n g l e   r e s o u r c e :   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / a p p l i c a t i o n / n g i n x - a p p . y a m l   s e r v i c e / m y - n g i n x - s v c   c r e a t e d   d e p l o y m e n t . a p p s / m y - n g i n x   c r e a t e d   T h e   r e s o u r c e s   w i l l   b e   c r e a t e d   i n   t h e   o r d e r   t h e y   a p p e a r   i n   t h e   m a n i f e s t .   T h e r e f o r e ,   i t ' s   b e s t   t o   s p e c i f y   t h e   S e r v i c e   f i r s t ,   s i n c e   t h a t   w i l l   e n s u r e   t h e   s c h e d u l e r   c a n   s p r


Question: What is External tools?

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


Question: What is Helm?

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


Question: What is Kustomize?

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


Question: What is Bulk operations in kubectl?

Answer: R e s o u r c e   c r e a t i o n   i s n ' t   t h e   o n l y   o p e r a t i o n   t h a t   k u b e c t l   c a n   p e r f o r m   i n   b u l k .   I t   c a n   a l s o   e x t r a c t   r e s o u r c e   n a m e s   f r o m   c o n f i g u r a t i o n   f i l e s   i n   o r d e r   t o   p e r f o r m   o t h e r   o p e r a t i o n s ,   i n   p a r t i c u l a r   t o   d e l e t e   t h e   s a m e   r e s o u r c e s   y o u   c r e a t e d :   k u b e c t l   d e l e t e   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / a p p l i c a t i o n / n g i n x - a p p . y a m l   d e p l o y m e n t . a p p s   " m y - n g i n x "   d e l e t e d   s e r v i c e   " m y - n g i n x - s v c "   d e l e t e d   I n   t h e   c a s e   o f   t w o   r e s o u r c e s ,   y o u   c a n   s p e c i f y   b o t h   r e s o u r c e s   o n   t h e   c o m m a n d   l i n e   u s i n g   t h e   r e s o u r c e / n a m e   s y n t a x :   k u b e c t l   d e l e t e   d e p l o y m e n t s / m y - n g i n x   s e r v i c e s / m y - n g i n x - s v c   F o r   l a r g e r   n u m b e r s   o f   r e s o u r c e s ,   y o u ' l l   f i n d   i t   e a s i e r   t o   s p e c i f y   t h e   s e l e c t o r   ( l a b e l   q u e r y )   s p e c i f i e d   u s i n g   - l   o r   - - s e l e c t o r ,   t o   f i l t e r   r e s o u r c e s   b y   t h e i r   l a b e l s :   k u b e c t l   d e l e t e   d e p l o y m e n t , s e r v i c e s   - l   a p p = n g i n x   d e p l o y m e n t . a p p s   " m y - n g i n x "   d e l e t e d   s e r v i c e   " m y - n g i n x - s v c "   d e l e t e d


Question: What is Chaining and filtering?

Answer: B e c a u s e   k u b e c t l   o u t p u t s   r e s o u r c e   n a m e s   i n   t h e   s a m e   s y n t a x   i t   a c c e p t s ,   y o u   c a n   c h a i n   o p e r a t i o n s   u s i n g   $ ( )   o r   x a r g s :   k u b e c t l   g e t   $ ( k u b e c t l   c r e a t e   - f   d o c s / c o n c e p t s / c l u s t e r - a d m i n i s t r a t i o n / n g i n x /   - o   n a m e   |   g r e p   s e r v i c e /   )   k u b e c t l   c r e a t e   - f   d o c s / c o n c e p t s / c l u s t e r - a d m i n i s t r a t i o n / n g i n x /   - o   n a m e   |   g r e p   s e r v i c e /   |   x a r g s   - i   k u b e c t l   g e t   ' { } '   T h e   o u t p u t   m i g h t   b e   s i m i l a r   t o :   N A M E   T Y P E   C L U S T E R - I P   E X T E R N A L - I P   P O R T ( S )   A G E   m y - n g i n x - s v c   L o a d B a l a n c e r   1 0 . 0 . 0 . 2 0 8   < p e n d i n g >   8 0 / T C P   0 s   W i t h   t h e   a b o v e   c o m m a n d s ,   f i r s t   y o u   c r e a t e   r e s o u r c e s   u n d e r   e x a m p l e s / a p p l i c a t i o n / n g i n x /   a n d   p r i n t   t h e   r e s o u r c e s   c r e a t e d   w i t h   - o   n a m e   o u t p u t   f o r m a t   ( p r i n t   e a c h   r e s o u r c e   a s   r e s o u r c e / n a m e ) .   T h e n   y o u   g r e p   o n l y   t h e   S e r v i c e ,   a n d   t h e n   p r i n t   i t   w i t h   k u b e c t l   g e t .


Question: What is Recursive operations on local files?

Answer: I f   y o u   h a p p e n   t o   o r g a n i z e   y o u r   r e s o u r c e s   a c r o s s   s e v e r a l   s u b d i r e c t o r i e s   w i t h i n   a   p a r t i c u l a r   d i r e c t o r y ,   y o u   c a n   r e c u r s i v e l y   p e r f o r m   t h e   o p e r a t i o n s   o n   t h e   s u b d i r e c t o r i e s   a l s o ,   b y   s p e c i f y i n g   - - r e c u r s i v e   o r   - R   a l o n g s i d e   t h e   - - f i l e n a m e / - f   a r g u m e n t .   F o r   i n s t a n c e ,   a s s u m e   t h e r e   i s   a   d i r e c t o r y   p r o j e c t / k 8 s / d e v e l o p m e n t   t h a t   h o l d s   a l l   o f   t h e   m a n i f e s t s   n e e d e d   f o r   t h e   d e v e l o p m e n t   e n v i r o n m e n t ,   o r g a n i z e d   b y   r e s o u r c e   t y p e :   p r o j e c t / k 8 s / d e v e l o p m e n t   ├ ─ ─   c o n f i g m a p   │   └ ─ ─   m y - c o n f i g m a p . y a m l   ├ ─ ─   d e p l o y m e n t   │   └ ─ ─   m y - d e p l o y m e n t . y a m l   └ ─ ─   p v c   └ ─ ─   m y - p v c . y a m l   B y   d e f a u l t ,   p e r f o r m i n g   a   b u l k   o p e r a t i o n   o n   p r o j e c t / k 8 s / d e v e l o p m e n t   w i l l   s t o p   a t   t h e   f i r s t   l e v e l   o f   t h e   d i r e c t o r y ,   n o t   p r o c e s s i n g   a n y   s u b d i r e c t o r i e s .   I f   y o u   h a d   t r i e d   t o   c r e a t e   t h e   r e s o u r c e s   i n   t h i s   d i r e c t o r y   u s i n g   t h e   f o l l o w i n g   c o m m a n d ,   w e   w o u l d   h a v e   e n c o u n t e r e d   a n   e r r o r :   k u b e c t l   a p p l y   - f   p r o j e c t / k 8 s / d e v e l o p m e n t   e r r o r :   y o u   m u s t   p r o v i d e   o n e   o r   m o r e   r e s o u r c e s   b y   a r g u m e n t   o r   f i l e n a m e   ( . j s o n | . y a m l | . y m l | s t d i n )   I n s t e a d ,   s p e c i f y   t h e   - - r e c u r s i v e   o r   - R   c o m m a n d   l i n e   a r g u


Question: What is Updating your application without an outage?

Answer: A t   s o m e   p o i n t ,   y o u ' l l   e v e n t u a l l y   n e e d   t o   u p d a t e   y o u r   d e p l o y e d   a p p l i c a t i o n ,   t y p i c a l l y   b y   s p e c i f y i n g   a   n e w   i m a g e   o r   i m a g e   t a g .   k u b e c t l   s u p p o r t s   s e v e r a l   u p d a t e   o p e r a t i o n s ,   e a c h   o f   w h i c h   i s   a p p l i c a b l e   t o   d i f f e r e n t   s c e n a r i o s .   Y o u   c a n   r u n   m u l t i p l e   c o p i e s   o f   y o u r   a p p ,   a n d   u s e   a   r o l l o u t   t o   g r a d u a l l y   s h i f t   t h e   t r a f f i c   t o   n e w   h e a l t h y   P o d s .   E v e n t u a l l y ,   a l l   t h e   r u n n i n g   P o d s   w o u l d   h a v e   t h e   n e w   s o f t w a r e .   T h i s   s e c t i o n   o f   t h e   p a g e   g u i d e s   y o u   t h r o u g h   h o w   t o   c r e a t e   a n d   u p d a t e   a p p l i c a t i o n s   w i t h   D e p l o y m e n t s .   L e t ' s   s a y   y o u   w e r e   r u n n i n g   v e r s i o n   1 . 1 4 . 2   o f   n g i n x :   k u b e c t l   c r e a t e   d e p l o y m e n t   m y - n g i n x   - - i m a g e = n g i n x : 1 . 1 4 . 2   d e p l o y m e n t . a p p s / m y - n g i n x   c r e a t e d   E n s u r e   t h a t   t h e r e   i s   1   r e p l i c a :   k u b e c t l   s c a l e   - - r e p l i c a s   1   d e p l o y m e n t s / m y - n g i n x   - - s u b r e s o u r c e = ' s c a l e '   - - t y p e = ' m e r g e '   - p   ' { " s p e c " : { " r e p l i c a s " :   1 } } '   d e p l o y m e n t . a p p s / m y - n g i n x   s c a l e d   a n d   a l l o w   K u b e r n e t e s   t o   a d d   m o r e   t e m p o r a r y   r e p l i c a s   d u r i n g   a   r o l l o u t ,   b y   s e t t i n g   a   s u r g e   m a x i m u m   o f   1 0 0 % :   k u b e c t l   p a t c h   - - t y p e = ' m e r g e '   - p   ' { " s p e c " : { " s t r a t e g y " : { " r o l l i n g U p d a t e " : { " m a x S u r g e


Question: What is Managing rollouts?

Answer: Y o u   c a n   u s e   k u b e c t l   r o l l o u t   t o   m a n a g e   a   p r o g r e s s i v e   u p d a t e   o f   a n   e x i s t i n g   a p p l i c a t i o n .   F o r   e x a m p l e :   k u b e c t l   a p p l y   - f   m y - d e p l o y m e n t . y a m l   #   w a i t   f o r   r o l l o u t   t o   f i n i s h   k u b e c t l   r o l l o u t   s t a t u s   d e p l o y m e n t / m y - d e p l o y m e n t   - - t i m e o u t   1 0 m   #   1 0   m i n u t e   t i m e o u t   o r   k u b e c t l   a p p l y   - f   b a c k i n g - s t a t e f u l - c o m p o n e n t . y a m l   #   d o n ' t   w a i t   f o r   r o l l o u t   t o   f i n i s h ,   j u s t   c h e c k   t h e   s t a t u s   k u b e c t l   r o l l o u t   s t a t u s   s t a t e f u l s e t s / b a c k i n g - s t a t e f u l - c o m p o n e n t   - - w a t c h = f a l s e   Y o u   c a n   a l s o   p a u s e ,   r e s u m e   o r   c a n c e l   a   r o l l o u t .   V i s i t   k u b e c t l   r o l l o u t   t o   l e a r n   m o r e .


Question: What is Canary deployments?

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


Question: What is Updating annotations?

Answer: S o m e t i m e s   y o u   w o u l d   w a n t   t o   a t t a c h   a n n o t a t i o n s   t o   r e s o u r c e s .   A n n o t a t i o n s   a r e   a r b i t r a r y   n o n - i d e n t i f y i n g   m e t a d a t a   f o r   r e t r i e v a l   b y   A P I   c l i e n t s   s u c h   a s   t o o l s   o r   l i b r a r i e s .   T h i s   c a n   b e   d o n e   w i t h   k u b e c t l   a n n o t a t e .   F o r   e x a m p l e :   k u b e c t l   a n n o t a t e   p o d s   m y - n g i n x - v 4 - 9 g w 1 9   d e s c r i p t i o n = ' m y   f r o n t e n d   r u n n i n g   n g i n x '   k u b e c t l   g e t   p o d s   m y - n g i n x - v 4 - 9 g w 1 9   - o   y a m l   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 :   a n n o t a t i o n s :   d e s c r i p t i o n :   m y   f r o n t e n d   r u n n i n g   n g i n x   . . .   F o r   m o r e   i n f o r m a t i o n ,   s e e   a n n o t a t i o n s   a n d   k u b e c t l   a n n o t a t e .


Question: What is Scaling your application?

Answer: W h e n   l o a d   o n   y o u r   a p p l i c a t i o n   g r o w s   o r   s h r i n k s ,   u s e   k u b e c t l   t o   s c a l e   y o u r   a p p l i c a t i o n .   F o r   i n s t a n c e ,   t o   d e c r e a s e   t h e   n u m b e r   o f   n g i n x   r e p l i c a s   f r o m   3   t o   1 ,   d o :   k u b e c t l   s c a l e   d e p l o y m e n t / m y - n g i n x   - - r e p l i c a s = 1   d e p l o y m e n t . a p p s / m y - n g i n x   s c a l e d   N o w   y o u   o n l y   h a v e   o n e   p o d   m a n a g e d   b y   t h e   d e p l o y m e n t .   k u b e c t l   g e t   p o d s   - l   a p p = n g i n x   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 - n g i n x - 2 0 3 5 3 8 4 2 1 1 - j 5 f h i   1 / 1   R u n n i n g   0   3 0 m   T o   h a v e   t h e   s y s t e m   a u t o m a t i c a l l y   c h o o s e   t h e   n u m b e r   o f   n g i n x   r e p l i c a s   a s   n e e d e d ,   r a n g i n g   f r o m   1   t o   3 ,   d o :   #   T h i s   r e q u i r e s   a n   e x i s t i n g   s o u r c e   o f   c o n t a i n e r   a n d   P o d   m e t r i c s   k u b e c t l   a u t o s c a l e   d e p l o y m e n t / m y - n g i n x   - - m i n = 1   - - m a x = 3   h o r i z o n t a l p o d a u t o s c a l e r . a u t o s c a l i n g / m y - n g i n x   a u t o s c a l e d   N o w   y o u r   n g i n x   r e p l i c a s   w i l l   b e   s c a l e d   u p   a n d   d o w n   a s   n e e d e d ,   a u t o m a t i c a l l y .   F o r   m o r e   i n f o r m a t i o n ,   p l e a s e   s e e   k u b e c t l   s c a l e ,   k u b e c t l   a u t o s c a l e   a n d   h o r i z o n t a l   p o d   a u t o s c a l e r   d o c u m e n t .


Question: What is In-place updates of resources?

Answer: S o m e t i m e s   i t ' s   n e c e s s a r y   t o   m a k e   n a r r o w ,   n o n - d i s r u p t i v e   u p d a t e s   t o   r e s o u r c e s   y o u ' v e   c r e a t e d .


Question: What is kubectl apply?

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


Question: What is kubectl edit?

Answer: A l t e r n a t i v e l y ,   y o u   m a y   a l s o   u p d a t e   r e s o u r c e s   w i t h   k u b e c t l   e d i t :   k u b e c t l   e d i t   d e p l o y m e n t / m y - n g i n x   T h i s   i s   e q u i v a l e n t   t o   f i r s t   g e t   t h e   r e s o u r c e ,   e d i t   i t   i n   t e x t   e d i t o r ,   a n d   t h e n   a p p l y   t h e   r e s o u r c e   w i t h   t h e   u p d a t e d   v e r s i o n :   k u b e c t l   g e t   d e p l o y m e n t   m y - n g i n x   - o   y a m l   >   / t m p / n g i n x . y a m l   v i   / t m p / n g i n x . y a m l   #   d o   s o m e   e d i t ,   a n d   t h e n   s a v e   t h e   f i l e   k u b e c t l   a p p l y   - f   / t m p / n g i n x . y a m l   d e p l o y m e n t . a p p s / m y - n g i n x   c o n f i g u r e d   r m   / t m p / n g i n x . y a m l   T h i s   a l l o w s   y o u   t o   d o   m o r e   s i g n i f i c a n t   c h a n g e s   m o r e   e a s i l y .   N o t e   t h a t   y o u   c a n   s p e c i f y   t h e   e d i t o r   w i t h   y o u r   E D I T O R   o r   K U B E _ E D I T O R   e n v i r o n m e n t   v a r i a b l e s .   F o r   m o r e   i n f o r m a t i o n ,   p l e a s e   s e e   k u b e c t l   e d i t .


Question: What is kubectl patch?

Answer: Y o u   c a n   u s e   k u b e c t l   p a t c h   t o   u p d a t e   A P I   o b j e c t s   i n   p l a c e .   T h i s   s u b c o m m a n d   s u p p o r t s   J S O N   p a t c h ,   J S O N   m e r g e   p a t c h ,   a n d   s t r a t e g i c   m e r g e   p a t c h .   S e e   U p d a t e   A P I   O b j e c t s   i n   P l a c e   U s i n g   k u b e c t l   p a t c h   f o r   m o r e   d e t a i l s .


Question: What is Disruptive updates?

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


Question: What is What's next?

Answer: L e a r n   a b o u t   h o w   t o   u s e   k u b e c t l   f o r   a p p l i c a t i o n   i n t r o s p e c t i o n   a n d   d e b u g g i n g .   I t e m s   o n   t h i s   p a g e   r e f e r   t o   t h i r d   p a r t y   p r o d u c t s   o r   p r o j e c t s   t h a t   p r o v i d e   f u n c t i o n a l i t y   r e q u i r e d   b y   K u b e r n e t e s .   T h e   K u b e r n e t e s   p r o j e c t   a u t h o r s   a r e n ' t   r e s p o n s i b l e   f o r   t h o s e   t h i r d - p a r t y   p r o d u c t s   o r   p r o j e c t s .   S e e   t h e   C N C F   w e b s i t e   g u i d e l i n e s   f o r   m o r e   d e t a i l s .   Y o u   s h o u l d   r e a d   t h e   c o n t e n t   g u i d e   b e f o r e   p r o p o s i n g   a   c h a n g e   t h a t   a d d s   a n   e x t r a   t h i r d - p a r t y   l i n k .


Question: What is kubectl config set?

Answer: kubectl config setSynopsisSet 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.PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.Specifying an attribute name that already exists will merge new fields on top of existing values.kubectl config set PROPERTY_NAME PROPERTY_VALUE Examples # Set the server field on the my-cluster cluster to https://1.2.3.4 kubectl config set clusters.my-cluster.server https://1.2.3.4 # Set the certificate-authority-data field on the my-cluster cluster kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -) # Set the cluster field in the my-context context to my-cluster kubectl config set contexts.my-context.cluster my-cluster # Set the client-key-data field in the cluster-admin user using --set-raw-bytes option kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true Options-h, --helphelp for set--set-raw-bytes tristate[=true]When writing a []byte PROPERTY_VALUE, write the given string directly without base64 decoding.Parent 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


Question: How does kubectl config set work?

Answer: kubectl config setSynopsisSet 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.PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.Specifying an attribute name that already exists will merge new fields on top of existing values.kubectl config set PROPERTY_NAME PROPERTY_VALUE Examples # Set the server field on the my-cluster cluster to https://1.2.3.4 kubectl config set clusters.my-cluster.server https://1.2.3.4 # Set the certificate-authority-data field on the my-cluster cluster kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -) # Set the cluster field in the my-context context to my-cluster kubectl config set contexts.my-context.cluster my-cluster # Set the client-key-data field in the cluster-admin user using --set-raw-bytes option kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true Options-h, --helphelp for set--set-raw-bytes tristate[=true]When writing a []byte PROPERTY_VALUE, write the given string directly without base64 decoding.Parent 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


Question: When would you use kubectl config set?

Answer: kubectl config setSynopsisSet 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.PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.Specifying an attribute name that already exists will merge new fields on top of existing values.kubectl config set PROPERTY_NAME PROPERTY_VALUE Examples # Set the server field on the my-cluster cluster to https://1.2.3.4 kubectl config set clusters.my-cluster.server https://1.2.3.4 # Set the certificate-authority-data field on the my-cluster cluster kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -) # Set the cluster field in the my-context context to my-cluster kubectl config set contexts.my-context.cluster my-cluster # Set the client-key-data field in the cluster-admin user using --set-raw-bytes option kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true Options-h, --helphelp for set--set-raw-bytes tristate[=true]When writing a []byte PROPERTY_VALUE, write the given string directly without base64 decoding.Parent 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


Question: What are the benefits of kubectl config set?

Answer: kubectl config setSynopsisSet 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.PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.Specifying an attribute name that already exists will merge new fields on top of existing values.kubectl config set PROPERTY_NAME PROPERTY_VALUE Examples # Set the server field on the my-cluster cluster to https://1.2.3.4 kubectl config set clusters.my-cluster.server https://1.2.3.4 # Set the certificate-authority-data field on the my-cluster cluster kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -) # Set the cluster field in the my-context context to my-cluster kubectl config set contexts.my-context.cluster my-cluster # Set the client-key-data field in the cluster-admin user using --set-raw-bytes option kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true Options-h, --helphelp for set--set-raw-bytes tristate[=true]When writing a []byte PROPERTY_VALUE, write the given string directly without base64 decoding.Parent 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


Question: What is Synopsis?

Answer: 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 .   P R O P E R T Y _ V A L U E   i s   t h e   n e w   v a l u e   y o u   w a n t   t o   s e t .   B i n a r y   f i e l d s   s u c h   a s   ' c e r t i f i c a t e - a u t h o r i t y - d a t a '   e x p e c t   a   b a s e 6 4   e n c o d e d   s t r i n g   u n l e s s   t h e   - - s e t - r a w - b y t e s   f l a g   i s   u s e d .   S p e c i f y i n g   a n   a t t r i b u t e   n a m e   t h a t   a l r e a d y   e x i s t s   w i l l   m e r g e   n e w   f i e l d s   o n   t o p   o f   e x i s t i n g   v a l u e s .   k u b e c t l   c o n f i g   s e t   P R O P E R T Y _ N A M E   P R O P E R T Y _ V A L U E


Question: What is Examples?

Answer: #   S e t   t h e   s e r v e r   f i e l d   o n   t h e   m y - c l u s t e r   c l u s t e r   t o   h t t p s : / / 1 . 2 . 3 . 4   k u b e c t l   c o n f i g   s e t   c l u s t e r s . m y - c l u s t e r . s e r v e r   h t t p s : / / 1 . 2 . 3 . 4   #   S e t   t h e   c e r t i f i c a t e - a u t h o r i t y - d a t a   f i e l d   o n   t h e   m y - c l u s t e r   c l u s t e r   k u b e c t l   c o n f i g   s e t   c l u s t e r s . m y - c l u s t e r . c e r t i f i c a t e - a u t h o r i t y - d a t a   $ ( e c h o   " c e r t _ d a t a _ h e r e "   |   b a s e 6 4   - i   - )   #   S e t   t h e   c l u s t e r   f i e l d   i n   t h e   m y - c o n t e x t   c o n t e x t   t o   m y - c l u s t e r   k u b e c t l   c o n f i g   s e t   c o n t e x t s . m y - c o n t e x t . c l u s t e r   m y - c l u s t e r   #   S e t   t h e   c l i e n t - k e y - d a t a   f i e l d   i n   t h e   c l u s t e r - a d m i n   u s e r   u s i n g   - - s e t - r a w - b y t e s   o p t i o n   k u b e c t l   c o n f i g   s e t   u s e r s . c l u s t e r - a d m i n . c l i e n t - k e y - d a t a   c e r t _ d a t a _ h e r e   - - s e t - r a w - b y t e s = t r u e


Question: What is Options?

Answer: h e l p   f o r   s e t   W h e n   w r i t i n g   a   [ ] b y t e   P R O P E R T Y _ V A L U E ,   w r i t e   t h e   g i v e n   s t r i n g   d i r e c t l y   w i t h o u t   b a s e 6 4   d e c o d i n g .


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 kubeadm token?

Answer: kubeadm tokenBootstrap tokens are used for establishing bidirectional trust between a node joining the cluster and a control-plane node, as described in authenticating with bootstrap tokens.kubeadm init creates an initial token with a 24-hour TTL. The following commands allow you to manage such a token and also to create and manage new ones.kubeadm token createCreate bootstrap tokens on the serverSynopsisThis command will create a bootstrap token for you. You can specify the usages for this token, the "time to live" and an optional human friendly description.The [token] is the actual token to write. This should be a securely generated random token of the form "[a-z0-9]{6}.[a-z0-9]{16}". If no [token] is given, kubeadm will generate a random token instead.kubeadm token create [token] Options--certificate-key stringWhen used together with '--print-join-command', print the full 'kubeadm join' flag needed to join the cluster as a control-plane. To create a new certificate key you must use 'kubeadm init phase upload-certs --upload-certs'.--config stringPath to a kubeadm configuration file.--description stringA human friendly description of how this token is used.--groups strings Default: "system:bootstrappers:kubeadm:default-node-token"Extra groups that this token will authenticate as when used for authentication. Must match "\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\z"-h, --helphelp for create--print-join-commandInstead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.--ttl duration Default: 24h0m0sThe duration before the token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire--usages strings Default: "signing,authentication"Describes the ways in which this token can be used. You can pass --usages multiple times or provide a comma separated list of options. Valid options: [signing,authentication]Options inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.kubeadm token deleteDelete bootstrap tokens on the serverSynopsisThis command will delete a list of bootstrap tokens for you.The [token-value] is the full Token of the form "[a-z0-9]{6}.[a-z0-9]{16}" or the Token ID of the form "[a-z0-9]{6}" to delete.kubeadm token delete [token-value] ... Options-h, --helphelp for deleteOptions inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host


Question: How does kubeadm token work?

Answer: kubeadm tokenBootstrap tokens are used for establishing bidirectional trust between a node joining the cluster and a control-plane node, as described in authenticating with bootstrap tokens.kubeadm init creates an initial token with a 24-hour TTL. The following commands allow you to manage such a token and also to create and manage new ones.kubeadm token createCreate bootstrap tokens on the serverSynopsisThis command will create a bootstrap token for you. You can specify the usages for this token, the "time to live" and an optional human friendly description.The [token] is the actual token to write. This should be a securely generated random token of the form "[a-z0-9]{6}.[a-z0-9]{16}". If no [token] is given, kubeadm will generate a random token instead.kubeadm token create [token] Options--certificate-key stringWhen used together with '--print-join-command', print the full 'kubeadm join' flag needed to join the cluster as a control-plane. To create a new certificate key you must use 'kubeadm init phase upload-certs --upload-certs'.--config stringPath to a kubeadm configuration file.--description stringA human friendly description of how this token is used.--groups strings Default: "system:bootstrappers:kubeadm:default-node-token"Extra groups that this token will authenticate as when used for authentication. Must match "\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\z"-h, --helphelp for create--print-join-commandInstead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.--ttl duration Default: 24h0m0sThe duration before the token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire--usages strings Default: "signing,authentication"Describes the ways in which this token can be used. You can pass --usages multiple times or provide a comma separated list of options. Valid options: [signing,authentication]Options inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.kubeadm token deleteDelete bootstrap tokens on the serverSynopsisThis command will delete a list of bootstrap tokens for you.The [token-value] is the full Token of the form "[a-z0-9]{6}.[a-z0-9]{16}" or the Token ID of the form "[a-z0-9]{6}" to delete.kubeadm token delete [token-value] ... Options-h, --helphelp for deleteOptions inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host


Question: When would you use kubeadm token?

Answer: kubeadm tokenBootstrap tokens are used for establishing bidirectional trust between a node joining the cluster and a control-plane node, as described in authenticating with bootstrap tokens.kubeadm init creates an initial token with a 24-hour TTL. The following commands allow you to manage such a token and also to create and manage new ones.kubeadm token createCreate bootstrap tokens on the serverSynopsisThis command will create a bootstrap token for you. You can specify the usages for this token, the "time to live" and an optional human friendly description.The [token] is the actual token to write. This should be a securely generated random token of the form "[a-z0-9]{6}.[a-z0-9]{16}". If no [token] is given, kubeadm will generate a random token instead.kubeadm token create [token] Options--certificate-key stringWhen used together with '--print-join-command', print the full 'kubeadm join' flag needed to join the cluster as a control-plane. To create a new certificate key you must use 'kubeadm init phase upload-certs --upload-certs'.--config stringPath to a kubeadm configuration file.--description stringA human friendly description of how this token is used.--groups strings Default: "system:bootstrappers:kubeadm:default-node-token"Extra groups that this token will authenticate as when used for authentication. Must match "\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\z"-h, --helphelp for create--print-join-commandInstead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.--ttl duration Default: 24h0m0sThe duration before the token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire--usages strings Default: "signing,authentication"Describes the ways in which this token can be used. You can pass --usages multiple times or provide a comma separated list of options. Valid options: [signing,authentication]Options inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.kubeadm token deleteDelete bootstrap tokens on the serverSynopsisThis command will delete a list of bootstrap tokens for you.The [token-value] is the full Token of the form "[a-z0-9]{6}.[a-z0-9]{16}" or the Token ID of the form "[a-z0-9]{6}" to delete.kubeadm token delete [token-value] ... Options-h, --helphelp for deleteOptions inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host


Question: What are the benefits of kubeadm token?

Answer: kubeadm tokenBootstrap tokens are used for establishing bidirectional trust between a node joining the cluster and a control-plane node, as described in authenticating with bootstrap tokens.kubeadm init creates an initial token with a 24-hour TTL. The following commands allow you to manage such a token and also to create and manage new ones.kubeadm token createCreate bootstrap tokens on the serverSynopsisThis command will create a bootstrap token for you. You can specify the usages for this token, the "time to live" and an optional human friendly description.The [token] is the actual token to write. This should be a securely generated random token of the form "[a-z0-9]{6}.[a-z0-9]{16}". If no [token] is given, kubeadm will generate a random token instead.kubeadm token create [token] Options--certificate-key stringWhen used together with '--print-join-command', print the full 'kubeadm join' flag needed to join the cluster as a control-plane. To create a new certificate key you must use 'kubeadm init phase upload-certs --upload-certs'.--config stringPath to a kubeadm configuration file.--description stringA human friendly description of how this token is used.--groups strings Default: "system:bootstrappers:kubeadm:default-node-token"Extra groups that this token will authenticate as when used for authentication. Must match "\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\z"-h, --helphelp for create--print-join-commandInstead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.--ttl duration Default: 24h0m0sThe duration before the token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire--usages strings Default: "signing,authentication"Describes the ways in which this token can be used. You can pass --usages multiple times or provide a comma separated list of options. Valid options: [signing,authentication]Options inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.kubeadm token deleteDelete bootstrap tokens on the serverSynopsisThis command will delete a list of bootstrap tokens for you.The [token-value] is the full Token of the form "[a-z0-9]{6}.[a-z0-9]{16}" or the Token ID of the form "[a-z0-9]{6}" to delete.kubeadm token delete [token-value] ... Options-h, --helphelp for deleteOptions inherited from parent commands--dry-runWhether to enable dry-run mode or not--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.--rootfs stringThe path to the 'real' host


Question: What is kubeadm token?

Answer: B o o t s t r a p   t o k e n s   a r e   u s e d   f o r   e s t a b l i s h i n g   b i d i r e c t i o n a l   t r u s t   b e t w e e n   a   n o d e   j o i n i n g   t h e   c l u s t e r   a n d   a   c o n t r o l - p l a n e   n o d e ,   a s   d e s c r i b e d   i n   a u t h e n t i c a t i n g   w i t h   b o o t s t r a p   t o k e n s .   k u b e a d m   i n i t   c r e a t e s   a n   i n i t i a l   t o k e n   w i t h   a   2 4 - h o u r   T T L .   T h e   f o l l o w i n g   c o m m a n d s   a l l o w   y o u   t o   m a n a g e   s u c h   a   t o k e n   a n d   a l s o   t o   c r e a t e   a n d   m a n a g e   n e w   o n e s .


Question: What is kubeadm token create?

Answer: C r e a t e   b o o t s t r a p   t o k e n s   o n   t h e   s e r v e r


Question: What is Synopsis?

Answer: T h i s   c o m m a n d   w i l l   c r e a t e   a   b o o t s t r a p   t o k e n   f o r   y o u .   Y o u   c a n   s p e c i f y   t h e   u s a g e s   f o r   t h i s   t o k e n ,   t h e   " t i m e   t o   l i v e "   a n d   a n   o p t i o n a l   h u m a n   f r i e n d l y   d e s c r i p t i o n .   T h e   [ t o k e n ]   i s   t h e   a c t u a l   t o k e n   t o   w r i t e .   T h i s   s h o u l d   b e   a   s e c u r e l y   g e n e r a t e d   r a n d o m   t o k e n   o f   t h e   f o r m   " [ a - z 0 - 9 ] { 6 } . [ a - z 0 - 9 ] { 1 6 } " .   I f   n o   [ t o k e n ]   i s   g i v e n ,   k u b e a d m   w i l l   g e n e r a t e   a   r a n d o m   t o k e n   i n s t e a d .   k u b e a d m   t o k e n   c r e a t e   [ t o k e n ]


Question: What is Options?

Answer: W h e n   u s e d   t o g e t h e r   w i t h   ' - - p r i n t - j o i n - c o m m a n d ' ,   p r i n t   t h e   f u l l   ' k u b e a d m   j o i n '   f l a g   n e e d e d   t o   j o i n   t h e   c l u s t e r   a s   a   c o n t r o l - p l a n e .   T o   c r e a t e   a   n e w   c e r t i f i c a t e   k e y   y o u   m u s t   u s e   ' k u b e a d m   i n i t   p h a s e   u p l o a d - c e r t s   - - u p l o a d - c e r t s ' .   P a t h   t o   a   k u b e a d m   c o n f i g u r a t i o n   f i l e .   A   h u m a n   f r i e n d l y   d e s c r i p t i o n   o f   h o w   t h i s   t o k e n   i s   u s e d .   E x t r a   g r o u p s   t h a t   t h i s   t o k e n   w i l l   a u t h e n t i c a t e   a s   w h e n   u s e d   f o r   a u t h e n t i c a t i o n .   M u s t   m a t c h   " \ A s y s t e m : b o o t s t r a p p e r s : [ a - z 0 - 9 : - ] { 0 , 2 5 5 } [ a - z 0 - 9 ] \ z "   h e l p   f o r   c r e a t e   I n s t e a d   o f   p r i n t i n g   o n l y   t h e   t o k e n ,   p r i n t   t h e   f u l l   ' k u b e a d m   j o i n '   f l a g   n e e d e d   t o   j o i n   t h e   c l u s t e r   u s i n g   t h e   t o k e n .   T h e   d u r a t i o n   b e f o r e   t h e   t o k e n   i s   a u t o m a t i c a l l y   d e l e t e d   ( e . g .   1 s ,   2 m ,   3 h ) .   I f   s e t   t o   ' 0 ' ,   t h e   t o k e n   w i l l   n e v e r   e x p i r e   D e s c r i b e s   t h e   w a y s   i n   w h i c h   t h i s   t o k e n   c a n   b e   u s e d .   Y o u   c a n   p a s s   - - u s a g e s   m u l t i p l e   t i m e s   o r   p r o v i d e   a   c o m m a   s e p a r a t e d   l i s t   o f   o p t i o n s .   V a l i d   o p t i o n s :   [ s i g n i n g , a u t h e n t i c a t i o n ]


Question: What is Options inherited from parent commands?

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


Question: What is kubeadm token delete?

Answer: D e l e t e   b o o t s t r a p   t o k e n s   o n   t h e   s e r v e r


Question: What is Synopsis?

Answer: T h i s   c o m m a n d   w i l l   d e l e t e   a   l i s t   o f   b o o t s t r a p   t o k e n s   f o r   y o u .   T h e   [ t o k e n - v a l u e ]   i s   t h e   f u l l   T o k e n   o f   t h e   f o r m   " [ a - z 0 - 9 ] { 6 } . [ a - z 0 - 9 ] { 1 6 } "   o r   t h e   T o k e n   I D   o f   t h e   f o r m   " [ a - z 0 - 9 ] { 6 } "   t o   d e l e t e .   k u b e a d m   t o k e n   d e l e t e   [ t o k e n - v a l u e ]   . . .


Question: What is Options?

Answer: h e l p   f o r   d e l e t e


Question: What is Options inherited from parent commands?

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


Question: What is kubeadm token generate?

Answer: G e n e r a t e   a n d   p r i n t   a   b o o t s t r a p   t o k e n ,   b u t   d o   n o t   c r e a t e   i t   o n   t h e   s e r v e r


Question: What is Synopsis?

Answer: T h i s   c o m m a n d   w i l l   p r i n t   o u t   a   r a n d o m l y - g e n e r a t e d   b o o t s t r a p   t o k e n   t h a t   c a n   b e   u s e d   w i t h   t h e   " i n i t "   a n d   " j o i n "   c o m m a n d s .   Y o u   d o n ' t   h a v e   t o   u s e   t h i s   c o m m a n d   i n   o r d e r   t o   g e n e r a t e   a   t o k e n .   Y o u   c a n   d o   s o   y o u r s e l f   a s   l o n g   a s   i t   i s   i n   t h e   f o r m a t   " [ a - z 0 - 9 ] { 6 } . [ a - z 0 - 9 ] { 1 6 } " .   T h i s   c o m m a n d   i s   p r o v i d e d   f o r   c o n v e n i e n c e   t o   g e n e r a t e   t o k e n s   i n   t h e   g i v e n   f o r m a t .   Y o u   c a n   a l s o   u s e   " k u b e a d m   i n i t "   w i t h o u t   s p e c i f y i n g   a   t o k e n   a n d   i t   w i l l   g e n e r a t e   a n d   p r i n t   o n e   f o r   y o u .   k u b e a d m   t o k e n   g e n e r a t e   [ f l a g s ]


Question: What is Options?

Answer: h e l p   f o r   g e n e r a t e


Question: What is Options inherited from parent commands?

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


Question: What is kubeadm token list?

Answer: L i s t   b o o t s t r a p   t o k e n s   o n   t h e   s e r v e r


Question: What is Synopsis?

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


Question: What is Options?

Answer: I f   t r u e ,   i g n o r e   a n y   e r r o r s   i n   t e m p l a t e s   w h e n   a   f i e l d   o r   m a p   k e y   i s   m i s s i n g   i n   t h e   t e m p l a t e .   O n l y   a p p l i e s   t o   g o l a n g   a n d   j s o n p a t h   o u t p u t   f o r m a t s .   h e l p   f o r   l i s t   O u t p u t   f o r m a t .   O n e   o f :   t e x t | j s o n | y a m l | g o - t e m p l a t e | g o - t e m p l a t e - f i l e | t e m p l a t e | t e m p l a t e f i l e | j s o n p a t h | j s o n p a t h - a s - j s o n | j s o n p a t h - f i l e .   I f   t r u e ,   k e e p   t h e   m a n a g e d F i e l d s   w h e n   p r i n t i n g   o b j e c t s   i n   J S O N   o r   Y A M L   f o r m a t .


Question: What is Options inherited from parent commands?

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


Question: What is What's next?

Answer: k u b e a d m   j o i n   t o   b o o t s t r a p   a   K u b e r n e t e s   w o r k e r   n o d e   a n d   j o i n   i t   t o   t h e   c l u s t e r


Question: What is kubeadm upgrade?

Answer: kubeadm upgradekubeadm upgrade is a user-friendly command that wraps complex upgrading logic behind one command, with support for both planning an upgrade and actually performing it.kubeadm upgrade guidanceThe steps for performing an upgrade using kubeadm are outlined in this document. For older versions of kubeadm, please refer to older documentation sets of the Kubernetes website.You can use kubeadm upgrade diff to see the changes that would be applied to static pod manifests.In Kubernetes v1.15.0 and later, kubeadm upgrade apply and kubeadm upgrade node will also automatically renew the kubeadm managed certificates on this node, including those stored in kubeconfig files. To opt-out, it is possible to pass the flag --certificate-renewal=false. For more details about certificate renewal see the certificate management documentation.Note:The commands kubeadm upgrade apply and kubeadm upgrade plan have a legacy --config flag which makes it possible to reconfigure the cluster, while performing planning or upgrade of that particular control-plane node. Please be aware that the upgrade workflow was not designed for this scenario and there are reports of unexpected results.kubeadm upgrade planSynopsisCheck which versions are available to upgrade to and validate whether your current cluster is upgradeable. This command can only run on the control plane nodes where the kubeconfig file "admin.conf" exists. To skip the internet check, pass in the optional [version] parameter.kubeadm upgrade plan [version] [flags] Options--allow-experimental-upgradesShow unstable versions of Kubernetes as an upgrade alternative and allow upgrading to an alpha/beta/release candidate versions of Kubernetes.--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--allow-release-candidate-upgradesShow release candidate versions of Kubernetes as an upgrade alternative and allow upgrading to a release candidate versions of Kubernetes.--config stringPath to a kubeadm configuration file.--etcd-upgrade Default: truePerform the upgrade of etcd.-h, --helphelp for plan--ignore-preflight-errors stringsA list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.-o, --output string Default: "text"Output format. One of: text|json|yaml|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.--print-configSpecifies whether the configuration file that will be used in the upgrade should be printed or not.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.Options inherited from parent commands--rootfs st


Question: How does kubeadm upgrade work?

Answer: kubeadm upgradekubeadm upgrade is a user-friendly command that wraps complex upgrading logic behind one command, with support for both planning an upgrade and actually performing it.kubeadm upgrade guidanceThe steps for performing an upgrade using kubeadm are outlined in this document. For older versions of kubeadm, please refer to older documentation sets of the Kubernetes website.You can use kubeadm upgrade diff to see the changes that would be applied to static pod manifests.In Kubernetes v1.15.0 and later, kubeadm upgrade apply and kubeadm upgrade node will also automatically renew the kubeadm managed certificates on this node, including those stored in kubeconfig files. To opt-out, it is possible to pass the flag --certificate-renewal=false. For more details about certificate renewal see the certificate management documentation.Note:The commands kubeadm upgrade apply and kubeadm upgrade plan have a legacy --config flag which makes it possible to reconfigure the cluster, while performing planning or upgrade of that particular control-plane node. Please be aware that the upgrade workflow was not designed for this scenario and there are reports of unexpected results.kubeadm upgrade planSynopsisCheck which versions are available to upgrade to and validate whether your current cluster is upgradeable. This command can only run on the control plane nodes where the kubeconfig file "admin.conf" exists. To skip the internet check, pass in the optional [version] parameter.kubeadm upgrade plan [version] [flags] Options--allow-experimental-upgradesShow unstable versions of Kubernetes as an upgrade alternative and allow upgrading to an alpha/beta/release candidate versions of Kubernetes.--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--allow-release-candidate-upgradesShow release candidate versions of Kubernetes as an upgrade alternative and allow upgrading to a release candidate versions of Kubernetes.--config stringPath to a kubeadm configuration file.--etcd-upgrade Default: truePerform the upgrade of etcd.-h, --helphelp for plan--ignore-preflight-errors stringsA list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.-o, --output string Default: "text"Output format. One of: text|json|yaml|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.--print-configSpecifies whether the configuration file that will be used in the upgrade should be printed or not.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.Options inherited from parent commands--rootfs st


Question: When would you use kubeadm upgrade?

Answer: kubeadm upgradekubeadm upgrade is a user-friendly command that wraps complex upgrading logic behind one command, with support for both planning an upgrade and actually performing it.kubeadm upgrade guidanceThe steps for performing an upgrade using kubeadm are outlined in this document. For older versions of kubeadm, please refer to older documentation sets of the Kubernetes website.You can use kubeadm upgrade diff to see the changes that would be applied to static pod manifests.In Kubernetes v1.15.0 and later, kubeadm upgrade apply and kubeadm upgrade node will also automatically renew the kubeadm managed certificates on this node, including those stored in kubeconfig files. To opt-out, it is possible to pass the flag --certificate-renewal=false. For more details about certificate renewal see the certificate management documentation.Note:The commands kubeadm upgrade apply and kubeadm upgrade plan have a legacy --config flag which makes it possible to reconfigure the cluster, while performing planning or upgrade of that particular control-plane node. Please be aware that the upgrade workflow was not designed for this scenario and there are reports of unexpected results.kubeadm upgrade planSynopsisCheck which versions are available to upgrade to and validate whether your current cluster is upgradeable. This command can only run on the control plane nodes where the kubeconfig file "admin.conf" exists. To skip the internet check, pass in the optional [version] parameter.kubeadm upgrade plan [version] [flags] Options--allow-experimental-upgradesShow unstable versions of Kubernetes as an upgrade alternative and allow upgrading to an alpha/beta/release candidate versions of Kubernetes.--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--allow-release-candidate-upgradesShow release candidate versions of Kubernetes as an upgrade alternative and allow upgrading to a release candidate versions of Kubernetes.--config stringPath to a kubeadm configuration file.--etcd-upgrade Default: truePerform the upgrade of etcd.-h, --helphelp for plan--ignore-preflight-errors stringsA list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.-o, --output string Default: "text"Output format. One of: text|json|yaml|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.--print-configSpecifies whether the configuration file that will be used in the upgrade should be printed or not.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.Options inherited from parent commands--rootfs st


Question: What are the benefits of kubeadm upgrade?

Answer: kubeadm upgradekubeadm upgrade is a user-friendly command that wraps complex upgrading logic behind one command, with support for both planning an upgrade and actually performing it.kubeadm upgrade guidanceThe steps for performing an upgrade using kubeadm are outlined in this document. For older versions of kubeadm, please refer to older documentation sets of the Kubernetes website.You can use kubeadm upgrade diff to see the changes that would be applied to static pod manifests.In Kubernetes v1.15.0 and later, kubeadm upgrade apply and kubeadm upgrade node will also automatically renew the kubeadm managed certificates on this node, including those stored in kubeconfig files. To opt-out, it is possible to pass the flag --certificate-renewal=false. For more details about certificate renewal see the certificate management documentation.Note:The commands kubeadm upgrade apply and kubeadm upgrade plan have a legacy --config flag which makes it possible to reconfigure the cluster, while performing planning or upgrade of that particular control-plane node. Please be aware that the upgrade workflow was not designed for this scenario and there are reports of unexpected results.kubeadm upgrade planSynopsisCheck which versions are available to upgrade to and validate whether your current cluster is upgradeable. This command can only run on the control plane nodes where the kubeconfig file "admin.conf" exists. To skip the internet check, pass in the optional [version] parameter.kubeadm upgrade plan [version] [flags] Options--allow-experimental-upgradesShow unstable versions of Kubernetes as an upgrade alternative and allow upgrading to an alpha/beta/release candidate versions of Kubernetes.--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--allow-release-candidate-upgradesShow release candidate versions of Kubernetes as an upgrade alternative and allow upgrading to a release candidate versions of Kubernetes.--config stringPath to a kubeadm configuration file.--etcd-upgrade Default: truePerform the upgrade of etcd.-h, --helphelp for plan--ignore-preflight-errors stringsA list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.--kubeconfig string Default: "/etc/kubernetes/admin.conf"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.-o, --output string Default: "text"Output format. One of: text|json|yaml|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.--print-configSpecifies whether the configuration file that will be used in the upgrade should be printed or not.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.Options inherited from parent commands--rootfs st


Question: What is kubeadm upgrade?

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


Question: What is kubeadm upgrade guidance?

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


Question: What is Synopsis?

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


Question: What is Options?

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


Question: What is Options inherited from parent commands?

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


Question: What is Synopsis?

Answer: U p g r a d e   y o u r   K u b e r n e t e s   c l u s t e r   t o   t h e   s p e c i f i e d   v e r s i o n   T h e   " a p p l y   [ v e r s i o n ] "   c o m m a n d   e x e c u t e s   t h e   f o l l o w i n g   p h a s e s :   p r e f l i g h t   R u n   p r e f l i g h t   c h e c k s   b e f o r e   u p g r a d e   c o n t r o l - p l a n e   U p g r a d e   t h e   c o n t r o l   p l a n e   u p l o a d - c o n f i g   U p l o a d   t h e   k u b e a d m   a n d   k u b e l e t   c o n f i g u r a t i o n s   t o   C o n f i g M a p s   / k u b e a d m   U p l o a d   t h e   k u b e a d m   C l u s t e r C o n f i g u r a t i o n   t o   a   C o n f i g M a p   / k u b e l e t   U p l o a d   t h e   k u b e l e t   c o n f i g u r a t i o n   t o   a   C o n f i g M a p   k u b e l e t - c o n f i g   U p g r a d e   t h e   k u b e l e t   c o n f i g u r a t i o n   f o r   t h i s   n o d e   b o o t s t r a p - t o k e n   C o n f i g u r e s   b o o t s t r a p   t o k e n   a n d   c l u s t e r - i n f o   R B A C   r u l e s   a d d o n   U p g r a d e   t h e   d e f a u l t   k u b e a d m   a d d o n s   / c o r e d n s   U p g r a d e   t h e   C o r e D N S   a d d o n   / k u b e - p r o x y   U p g r a d e   t h e   k u b e - p r o x y   a d d o n   p o s t - u p g r a d e   R u n   p o s t   u p g r a d e   t a s k s   k u b e a d m   u p g r a d e   a p p l y   [ v e r s i o n ]


Question: What is Options?

Answer: S h o w   u n s t a b l e   v e r s i o n s   o f   K u b e r n e t e s   a s   a n   u p g r a d e   a l t e r n a t i v e   a n d   a l l o w   u p g r a d i n g   t o   a n   a l p h a / b e t a / r e l e a s e   c a n d i d a t e   v e r s i o n s   o f   K u b e r n e t e s .   S h o w   r e l e a s e   c a n d i d a t e   v e r s i o n s   o f   K u b e r n e t e s   a s   a n   u p g r a d e   a l t e r n a t i v e   a n d   a l l o w   u p g r a d i n g   t o   a   r e l e a s e   c a n d i d a t e   v e r s i o n s   o f   K u b e r n e t e s .   P e r f o r m   t h e   r e n e w a l   o f   c e r t i f i c a t e s   u s e d   b y   c o m p o n e n t   c h a n g e d   d u r i n g   u p g r a d e s .   P a t h   t o   a   k u b e a d m   c o n f i g u r a t i o n   f i l e .   D o   n o t   c h a n g e   a n y   s t a t e ,   j u s t   o u t p u t   w h a t   a c t i o n s   w o u l d   b e   p e r f o r m e d .   P e r f o r m   t h e   u p g r a d e   o f   e t c d .   F o r c e   u p g r a d i n g   a l t h o u g h   s o m e   r e q u i r e m e n t s   m i g h t   n o t   b e   m e t .   T h i s   a l s o   i m p l i e s   n o n - i n t e r a c t i v e   m o d e .   h e l p   f o r   a p p l y   A   l i s t   o f   c h e c k s   w h o s e   e r r o r s   w i l l   b e   s h o w n   a s   w a r n i n g s .   E x a m p l e :   ' I s P r i v i l e g e d U s e r , S w a p ' .   V a l u e   ' a l l '   i g n o r e s   e r r o r s   f r o m   a l l   c h e c k s .   T h e   k u b e c o n f i g   f i l e   t o   u s e   w h e n   t a l k i n g   t o   t h e   c l u s t e r .   I f   t h e   f l a g   i s   n o t   s e t ,   a   s e t   o f   s t a n d a r d   l o c a t i o n s   c a n   b e   s e a r c h e d   f o r   a n   e x i s t i n g   k u b e c o n f i g   f i l e .   P a t h   t o   a   d i r e c t o r y   t h a t   c o n t a i n s   f i l e s   n a m e d   " t a r g e t [ s u f f i x ] [ + p a t c h t y p e ] . e x t e n s i o n " .   F o r   e x a m p


Question: What is Options inherited from parent commands?

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


Question: What is Synopsis?

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


Question: What is Options?

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


Question: What is Options inherited from parent commands?

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


Question: What is Synopsis?

Answer: U p g r a d e   c o m m a n d s   f o r   a   n o d e   i n   t h e   c l u s t e r   T h e   " n o d e "   c o m m a n d   e x e c u t e s   t h e   f o l l o w i n g   p h a s e s :   p r e f l i g h t   R u n   u p g r a d e   n o d e   p r e - f l i g h t   c h e c k s   c o n t r o l - p l a n e   U p g r a d e   t h e   c o n t r o l   p l a n e   i n s t a n c e   d e p l o y e d   o n   t h i s   n o d e ,   i f   a n y   k u b e l e t - c o n f i g   U p g r a d e   t h e   k u b e l e t   c o n f i g u r a t i o n   f o r   t h i s   n o d e   a d d o n   U p g r a d e   t h e   d e f a u l t   k u b e a d m   a d d o n s   / c o r e d n s   U p g r a d e   t h e   C o r e D N S   a d d o n   / k u b e - p r o x y   U p g r a d e   t h e   k u b e - p r o x y   a d d o n   p o s t - u p g r a d e   R u n   p o s t   u p g r a d e   t a s k s   k u b e a d m   u p g r a d e   n o d e   [ f l a g s ]


Question: What is Options?

Answer: P e r f o r m   t h e   r e n e w a l   o f   c e r t i f i c a t e s   u s e d   b y   c o m p o n e n t   c h a n g e d   d u r i n g   u p g r a d e s .   P a t h   t o   a   k u b e a d m   c o n f i g u r a t i o n   f i l e .   D o   n o t   c h a n g e   a n y   s t a t e ,   j u s t   o u t p u t   t h e   a c t i o n s   t h a t   w o u l d   b e   p e r f o r m e d .   P e r f o r m   t h e   u p g r a d e   o f   e t c d .   h e l p   f o r   n o d e   A   l i s t   o f   c h e c k s   w h o s e   e r r o r s   w i l l   b e   s h o w n   a s   w a r n i n g s .   E x a m p l e :   ' I s P r i v i l e g e d U s e r , S w a p ' .   V a l u e   ' a l l '   i g n o r e s   e r r o r s   f r o m   a l l   c h e c k s .   T h e   k u b e c o n f i g   f i l e   t o   u s e   w h e n   t a l k i n g   t o   t h e   c l u s t e r .   I f   t h e   f l a g   i s   n o t   s e t ,   a   s e t   o f   s t a n d a r d   l o c a t i o n s   c a n   b e   s e a r c h e d   f o r   a n   e x i s t i n g   k u b e c o n f i g   f i l e .   P a t h   t o   a   d i r e c t o r y   t h a t   c o n t a i n s   f i l e s   n a m e d   " t a r g e t [ s u f f i x ] [ + p a t c h t y p e ] . e x t e n s i o n " .   F o r   e x a m p l e ,   " k u b e - a p i s e r v e r 0 + m e r g e . y a m l "   o r   j u s t   " e t c d . j s o n " .   " t a r g e t "   c a n   b e   o n e   o f   " k u b e - a p i s e r v e r " ,   " k u b e - c o n t r o l l e r - m a n a g e r " ,   " k u b e - s c h e d u l e r " ,   " e t c d " ,   " k u b e l e t c o n f i g u r a t i o n " ,   " c o r e d n s d e p l o y m e n t " .   " p a t c h t y p e "   c a n   b e   o n e   o f   " s t r a t e g i c " ,   " m e r g e "   o r   " j s o n "   a n d   t h e y   m a t c h   t h e   p a t c h   f o r m a t s   s u p p o r t e d   b y   k u b e c t l .   T h e   d e f a u l t   " p a t c h t y p e "   i s   " s t r a t e g i c " .   " e x t e n s i o n "   m u s t   b e   e i t h e r   " j s o n "


Question: What is Options inherited from parent commands?

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


Question: What is What's next?

Answer: k u b e a d m   c o n f i g   i f   y o u   i n i t i a l i z e d   y o u r   c l u s t e r   u s i n g   k u b e a d m   v 1 . 7 . x   o r   l o w e r ,   t o   c o n f i g u r e   y o u r   c l u s t e r   f o r   k u b e a d m   u p g r a d e


Question: What is Administration with kubeadm?

Answer: Administration with kubeadmIf you don't yet have a cluster, visit bootstrapping clusters with kubeadm.The tasks in this section are aimed at people administering an existing cluster:Adding Linux worker nodesAdding Windows worker nodesUpgrading kubeadm clustersUpgrading Linux nodesUpgrading Windows nodesConfiguring a cgroup driverCertificate Management with kubeadmReconfiguring a kubeadm clusterChanging The Kubernetes Package Repository


Question: How does Administration with kubeadm work?

Answer: Administration with kubeadmIf you don't yet have a cluster, visit bootstrapping clusters with kubeadm.The tasks in this section are aimed at people administering an existing cluster:Adding Linux worker nodesAdding Windows worker nodesUpgrading kubeadm clustersUpgrading Linux nodesUpgrading Windows nodesConfiguring a cgroup driverCertificate Management with kubeadmReconfiguring a kubeadm clusterChanging The Kubernetes Package Repository


Question: When would you use Administration with kubeadm?

Answer: Administration with kubeadmIf you don't yet have a cluster, visit bootstrapping clusters with kubeadm.The tasks in this section are aimed at people administering an existing cluster:Adding Linux worker nodesAdding Windows worker nodesUpgrading kubeadm clustersUpgrading Linux nodesUpgrading Windows nodesConfiguring a cgroup driverCertificate Management with kubeadmReconfiguring a kubeadm clusterChanging The Kubernetes Package Repository


Question: What are the benefits of Administration with kubeadm?

Answer: Administration with kubeadmIf you don't yet have a cluster, visit bootstrapping clusters with kubeadm.The tasks in this section are aimed at people administering an existing cluster:Adding Linux worker nodesAdding Windows worker nodesUpgrading kubeadm clustersUpgrading Linux nodesUpgrading Windows nodesConfiguring a cgroup driverCertificate Management with kubeadmReconfiguring a kubeadm clusterChanging The Kubernetes Package Repository


Question: What is Administration with kubeadm?

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


Question: What is Guaranteed Scheduling For Critical Add-On Pods?

Answer: Guaranteed Scheduling For Critical Add-On PodsKubernetes core components such as the API server, scheduler, and controller-manager run on a control plane node. However, add-ons must run on a regular cluster node. Some of these add-ons are critical to a fully functional cluster, such as metrics-server, DNS, and UI. A cluster may stop working properly if a critical add-on is evicted (either manually or as a side effect of another operation like upgrade) and becomes pending (for example when the cluster is highly utilized and either there are other pending pods that schedule into the space vacated by the evicted critical add-on pod or the amount of resources available on the node changed for some other reason).Note that marking a pod as critical is not meant to prevent evictions entirely; it only prevents the pod from becoming permanently unavailable. A static pod marked as critical can't be evicted. However, non-static pods marked as critical are always rescheduled.Marking pod as criticalTo mark a Pod as critical, set priorityClassName for that Pod to system-cluster-critical or system-node-critical. system-node-critical is the highest available priority, even higher than system-cluster-critical.


Question: How does Guaranteed Scheduling For Critical Add-On Pods work?

Answer: Guaranteed Scheduling For Critical Add-On PodsKubernetes core components such as the API server, scheduler, and controller-manager run on a control plane node. However, add-ons must run on a regular cluster node. Some of these add-ons are critical to a fully functional cluster, such as metrics-server, DNS, and UI. A cluster may stop working properly if a critical add-on is evicted (either manually or as a side effect of another operation like upgrade) and becomes pending (for example when the cluster is highly utilized and either there are other pending pods that schedule into the space vacated by the evicted critical add-on pod or the amount of resources available on the node changed for some other reason).Note that marking a pod as critical is not meant to prevent evictions entirely; it only prevents the pod from becoming permanently unavailable. A static pod marked as critical can't be evicted. However, non-static pods marked as critical are always rescheduled.Marking pod as criticalTo mark a Pod as critical, set priorityClassName for that Pod to system-cluster-critical or system-node-critical. system-node-critical is the highest available priority, even higher than system-cluster-critical.


Question: When would you use Guaranteed Scheduling For Critical Add-On Pods?

Answer: Guaranteed Scheduling For Critical Add-On PodsKubernetes core components such as the API server, scheduler, and controller-manager run on a control plane node. However, add-ons must run on a regular cluster node. Some of these add-ons are critical to a fully functional cluster, such as metrics-server, DNS, and UI. A cluster may stop working properly if a critical add-on is evicted (either manually or as a side effect of another operation like upgrade) and becomes pending (for example when the cluster is highly utilized and either there are other pending pods that schedule into the space vacated by the evicted critical add-on pod or the amount of resources available on the node changed for some other reason).Note that marking a pod as critical is not meant to prevent evictions entirely; it only prevents the pod from becoming permanently unavailable. A static pod marked as critical can't be evicted. However, non-static pods marked as critical are always rescheduled.Marking pod as criticalTo mark a Pod as critical, set priorityClassName for that Pod to system-cluster-critical or system-node-critical. system-node-critical is the highest available priority, even higher than system-cluster-critical.


Question: What are the benefits of Guaranteed Scheduling For Critical Add-On Pods?

Answer: Guaranteed Scheduling For Critical Add-On PodsKubernetes core components such as the API server, scheduler, and controller-manager run on a control plane node. However, add-ons must run on a regular cluster node. Some of these add-ons are critical to a fully functional cluster, such as metrics-server, DNS, and UI. A cluster may stop working properly if a critical add-on is evicted (either manually or as a side effect of another operation like upgrade) and becomes pending (for example when the cluster is highly utilized and either there are other pending pods that schedule into the space vacated by the evicted critical add-on pod or the amount of resources available on the node changed for some other reason).Note that marking a pod as critical is not meant to prevent evictions entirely; it only prevents the pod from becoming permanently unavailable. A static pod marked as critical can't be evicted. However, non-static pods marked as critical are always rescheduled.Marking pod as criticalTo mark a Pod as critical, set priorityClassName for that Pod to system-cluster-critical or system-node-critical. system-node-critical is the highest available priority, even higher than system-cluster-critical.


Question: What is Guaranteed Scheduling For Critical Add-On Pods?

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