Question: What is Generating Reference Documentation for Metrics?

Answer: Generating Reference Documentation for MetricsThis page demonstrates the generation of metrics reference documentation.Before you beginRequirements:You need a machine that is running Linux or macOS.You need to have these tools installed:Python v3.7.x+GitGolang version 1.13+Pip used to install PyYAMLPyYAML v5.1.2makegcc compiler/linkerDocker (Required only for kubectl command reference)Your PATH environment variable must include the required build tools, such as the Go binary and python.You need to know how to create a pull request to a GitHub repository. This involves creating your own fork of the repository. For more information, see Work from a local clone.Clone the Kubernetes repositoryThe metric generation happens in the Kubernetes repository. To clone the repository, change directories to where you want the clone to exist.Then, execute the following command:git clone https://www.github.com/kubernetes/kubernetes This creates a kubernetes folder in your current working directory.Generate the metricsInside the cloned Kubernetes repository, locate the test/instrumentation/documentation directory. The metrics documentation is generated in this directory.With each release, new metrics are added. After you run the metrics documentation generator script, copy the metrics documentation to the Kubernetes website and publish the updated metrics documentation.To generate the latest metrics, make sure you are in the root of the cloned Kubernetes directory. Then, execute the following command:./test/instrumentation/update-documentation.sh To check for changes, execute:git status The output is similar to:./test/instrumentation/documentation/documentation.md ./test/instrumentation/documentation/documentation-list.yaml Copy the generated metrics documentation file to the Kubernetes website repositorySet the Kubernetes website root environment variable.Execute the following command to set the website root:export WEBSITE_ROOT=<path to website root> Copy the generated metrics file to the Kubernetes website repository.cp ./test/instrumentation/documentation/documentation.md "${WEBSITE_ROOT}/content/en/docs/reference/instrumentation/metrics.md" Note:If you get an error, check that you have permission to copy the file. You can use chown to change the file ownership back to your own user.Create a pull requestTo create a pull request, follow the instructions in Opening a pull request.What's nextContribute-upstreamGenerating Reference Docs for Kubernetes Components and ToolsGenerating Reference Documentation for kubectl Commands


Question: How does Generating Reference Documentation for Metrics work?

Answer: Generating Reference Documentation for MetricsThis page demonstrates the generation of metrics reference documentation.Before you beginRequirements:You need a machine that is running Linux or macOS.You need to have these tools installed:Python v3.7.x+GitGolang version 1.13+Pip used to install PyYAMLPyYAML v5.1.2makegcc compiler/linkerDocker (Required only for kubectl command reference)Your PATH environment variable must include the required build tools, such as the Go binary and python.You need to know how to create a pull request to a GitHub repository. This involves creating your own fork of the repository. For more information, see Work from a local clone.Clone the Kubernetes repositoryThe metric generation happens in the Kubernetes repository. To clone the repository, change directories to where you want the clone to exist.Then, execute the following command:git clone https://www.github.com/kubernetes/kubernetes This creates a kubernetes folder in your current working directory.Generate the metricsInside the cloned Kubernetes repository, locate the test/instrumentation/documentation directory. The metrics documentation is generated in this directory.With each release, new metrics are added. After you run the metrics documentation generator script, copy the metrics documentation to the Kubernetes website and publish the updated metrics documentation.To generate the latest metrics, make sure you are in the root of the cloned Kubernetes directory. Then, execute the following command:./test/instrumentation/update-documentation.sh To check for changes, execute:git status The output is similar to:./test/instrumentation/documentation/documentation.md ./test/instrumentation/documentation/documentation-list.yaml Copy the generated metrics documentation file to the Kubernetes website repositorySet the Kubernetes website root environment variable.Execute the following command to set the website root:export WEBSITE_ROOT=<path to website root> Copy the generated metrics file to the Kubernetes website repository.cp ./test/instrumentation/documentation/documentation.md "${WEBSITE_ROOT}/content/en/docs/reference/instrumentation/metrics.md" Note:If you get an error, check that you have permission to copy the file. You can use chown to change the file ownership back to your own user.Create a pull requestTo create a pull request, follow the instructions in Opening a pull request.What's nextContribute-upstreamGenerating Reference Docs for Kubernetes Components and ToolsGenerating Reference Documentation for kubectl Commands


Question: When would you use Generating Reference Documentation for Metrics?

Answer: Generating Reference Documentation for MetricsThis page demonstrates the generation of metrics reference documentation.Before you beginRequirements:You need a machine that is running Linux or macOS.You need to have these tools installed:Python v3.7.x+GitGolang version 1.13+Pip used to install PyYAMLPyYAML v5.1.2makegcc compiler/linkerDocker (Required only for kubectl command reference)Your PATH environment variable must include the required build tools, such as the Go binary and python.You need to know how to create a pull request to a GitHub repository. This involves creating your own fork of the repository. For more information, see Work from a local clone.Clone the Kubernetes repositoryThe metric generation happens in the Kubernetes repository. To clone the repository, change directories to where you want the clone to exist.Then, execute the following command:git clone https://www.github.com/kubernetes/kubernetes This creates a kubernetes folder in your current working directory.Generate the metricsInside the cloned Kubernetes repository, locate the test/instrumentation/documentation directory. The metrics documentation is generated in this directory.With each release, new metrics are added. After you run the metrics documentation generator script, copy the metrics documentation to the Kubernetes website and publish the updated metrics documentation.To generate the latest metrics, make sure you are in the root of the cloned Kubernetes directory. Then, execute the following command:./test/instrumentation/update-documentation.sh To check for changes, execute:git status The output is similar to:./test/instrumentation/documentation/documentation.md ./test/instrumentation/documentation/documentation-list.yaml Copy the generated metrics documentation file to the Kubernetes website repositorySet the Kubernetes website root environment variable.Execute the following command to set the website root:export WEBSITE_ROOT=<path to website root> Copy the generated metrics file to the Kubernetes website repository.cp ./test/instrumentation/documentation/documentation.md "${WEBSITE_ROOT}/content/en/docs/reference/instrumentation/metrics.md" Note:If you get an error, check that you have permission to copy the file. You can use chown to change the file ownership back to your own user.Create a pull requestTo create a pull request, follow the instructions in Opening a pull request.What's nextContribute-upstreamGenerating Reference Docs for Kubernetes Components and ToolsGenerating Reference Documentation for kubectl Commands


Question: What are the benefits of Generating Reference Documentation for Metrics?

Answer: Generating Reference Documentation for MetricsThis page demonstrates the generation of metrics reference documentation.Before you beginRequirements:You need a machine that is running Linux or macOS.You need to have these tools installed:Python v3.7.x+GitGolang version 1.13+Pip used to install PyYAMLPyYAML v5.1.2makegcc compiler/linkerDocker (Required only for kubectl command reference)Your PATH environment variable must include the required build tools, such as the Go binary and python.You need to know how to create a pull request to a GitHub repository. This involves creating your own fork of the repository. For more information, see Work from a local clone.Clone the Kubernetes repositoryThe metric generation happens in the Kubernetes repository. To clone the repository, change directories to where you want the clone to exist.Then, execute the following command:git clone https://www.github.com/kubernetes/kubernetes This creates a kubernetes folder in your current working directory.Generate the metricsInside the cloned Kubernetes repository, locate the test/instrumentation/documentation directory. The metrics documentation is generated in this directory.With each release, new metrics are added. After you run the metrics documentation generator script, copy the metrics documentation to the Kubernetes website and publish the updated metrics documentation.To generate the latest metrics, make sure you are in the root of the cloned Kubernetes directory. Then, execute the following command:./test/instrumentation/update-documentation.sh To check for changes, execute:git status The output is similar to:./test/instrumentation/documentation/documentation.md ./test/instrumentation/documentation/documentation-list.yaml Copy the generated metrics documentation file to the Kubernetes website repositorySet the Kubernetes website root environment variable.Execute the following command to set the website root:export WEBSITE_ROOT=<path to website root> Copy the generated metrics file to the Kubernetes website repository.cp ./test/instrumentation/documentation/documentation.md "${WEBSITE_ROOT}/content/en/docs/reference/instrumentation/metrics.md" Note:If you get an error, check that you have permission to copy the file. You can use chown to change the file ownership back to your own user.Create a pull requestTo create a pull request, follow the instructions in Opening a pull request.What's nextContribute-upstreamGenerating Reference Docs for Kubernetes Components and ToolsGenerating Reference Documentation for kubectl Commands


Question: What is Generating Reference Documentation for Metrics?

Answer: T h i s   p a g e   d e m o n s t r a t e s   t h e   g e n e r a t i o n   o f   m e t r i c s   r e f e r e n c e   d o c u m e n t a t i o n .


Question: What is Requirements:?

Answer: Y o u   n e e d   a   m a c h i n e   t h a t   i s   r u n n i n g   L i n u x   o r   m a c O S . Y o u   n e e d   t o   h a v e   t h e s e   t o o l s   i n s t a l l e d : P y t h o n   v 3 . 7 . x + G i t G o l a n g   v e r s i o n   1 . 1 3 + P i p   u s e d   t o   i n s t a l l   P y Y A M L P y Y A M L   v 5 . 1 . 2 m a k e g c c   c o m p i l e r / l i n k e r D o c k e r   ( R e q u i r e d   o n l y   f o r   k u b e c t l   c o m m a n d   r e f e r e n c e ) Y o u r   P A T H   e n v i r o n m e n t   v a r i a b l e   m u s t   i n c l u d e   t h e   r e q u i r e d   b u i l d   t o o l s ,   s u c h   a s   t h e   G o   b i n a r y   a n d   p y t h o n . Y o u   n e e d   t o   k n o w   h o w   t o   c r e a t e   a   p u l l   r e q u e s t   t o   a   G i t H u b   r e p o s i t o r y .   T h i s   i n v o l v e s   c r e a t i n g   y o u r   o w n   f o r k   o f   t h e   r e p o s i t o r y .   F o r   m o r e   i n f o r m a t i o n ,   s e e   W o r k   f r o m   a   l o c a l   c l o n e .   Y o u   n e e d   a   m a c h i n e   t h a t   i s   r u n n i n g   L i n u x   o r   m a c O S .   Y o u   n e e d   t o   h a v e   t h e s e   t o o l s   i n s t a l l e d :   P y t h o n   v 3 . 7 . x + G i t G o l a n g   v e r s i o n   1 . 1 3 + P i p   u s e d   t o   i n s t a l l   P y Y A M L P y Y A M L   v 5 . 1 . 2 m a k e g c c   c o m p i l e r / l i n k e r D o c k e r   ( R e q u i r e d   o n l y   f o r   k u b e c t l   c o m m a n d   r e f e r e n c e )   Y o u r   P A T H   e n v i r o n m e n t   v a r i a b l e   m u s t   i n c l u d e   t h e   r e q u i r e d   b u i l d   t o o l s ,   s u c h   a s   t h e   G o   b i n a r y   a n d   p y t h o n .   Y o u   n e e d   t o   k n o w   h o w   t o   c r e a t e   a   p u l l   r e q u e s t   t o   a   G i t H u b   r e p o s i t o r y .   T h i s   i n v o l v e s   c r e a t i n g   y o u r   o w n   f o r k   o f   t h e   r e p o s i t o r y .   F o r   m o r


Question: What is Clone the Kubernetes repository?

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


Question: What is Generate the metrics?

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


Question: What is Copy the generated metrics documentation file to the Kubernetes website repository?

Answer: S e t   t h e   K u b e r n e t e s   w e b s i t e   r o o t   e n v i r o n m e n t   v a r i a b l e . E x e c u t e   t h e   f o l l o w i n g   c o m m a n d   t o   s e t   t h e   w e b s i t e   r o o t : e x p o r t   W E B S I T E _ R O O T = < p a t h   t o   w e b s i t e   r o o t >   C o p y   t h e   g e n e r a t e d   m e t r i c s   f i l e   t o   t h e   K u b e r n e t e s   w e b s i t e   r e p o s i t o r y . c p   . / t e s t / i n s t r u m e n t a t i o n / d o c u m e n t a t i o n / d o c u m e n t a t i o n . m d   " $ { W E B S I T E _ R O O T } / c o n t e n t / e n / d o c s / r e f e r e n c e / i n s t r u m e n t a t i o n / m e t r i c s . m d "   N o t e : I f   y o u   g e t   a n   e r r o r ,   c h e c k   t h a t   y o u   h a v e   p e r m i s s i o n   t o   c o p y   t h e   f i l e .   Y o u   c a n   u s e   c h o w n   t o   c h a n g e   t h e   f i l e   o w n e r s h i p   b a c k   t o   y o u r   o w n   u s e r .   S e t   t h e   K u b e r n e t e s   w e b s i t e   r o o t   e n v i r o n m e n t   v a r i a b l e .   E x e c u t e   t h e   f o l l o w i n g   c o m m a n d   t o   s e t   t h e   w e b s i t e   r o o t :   e x p o r t   W E B S I T E _ R O O T = < p a t h   t o   w e b s i t e   r o o t >   C o p y   t h e   g e n e r a t e d   m e t r i c s   f i l e   t o   t h e   K u b e r n e t e s   w e b s i t e   r e p o s i t o r y .   c p   . / t e s t / i n s t r u m e n t a t i o n / d o c u m e n t a t i o n / d o c u m e n t a t i o n . m d   " $ { W E B S I T E _ R O O T } / c o n t e n t / e n / d o c s / r e f e r e n c e / i n s t r u m e n t a t i o n / m e t r i c s . m d "


Question: What is Create a pull request?

Answer: T o   c r e a t e   a   p u l l   r e q u e s t ,   f o l l o w   t h e   i n s t r u c t i o n s   i n   O p e n i n g   a   p u l l   r e q u e s t .


Question: What is What's next?

Answer: C o n t r i b u t e - u p s t r e a m G e n e r a t i n g   R e f e r e n c e   D o c s   f o r   K u b e r n e t e s   C o m p o n e n t s   a n d   T o o l s G e n e r a t i n g   R e f e r e n c e   D o c u m e n t a t i o n   f o r   k u b e c t l   C o m m a n d s


Question: What is Liveness, Readiness, and Startup Probes?

Answer: Liveness, Readiness, and Startup ProbesKubernetes has various types of probes:Liveness probeReadiness probeStartup probeLiveness probeLiveness probes determine when to restart a container. For example, liveness probes could catch a deadlock when an application is running but unable to make progress.If a container fails its liveness probe repeatedly, the kubelet restarts the container.Liveness probes do not wait for readiness probes to succeed. If you want to wait before executing a liveness probe, you can either define initialDelaySeconds or use a startup probe.Readiness probeReadiness probes determine when a container is ready to accept traffic. This is useful when waiting for an application to perform time-consuming initial tasks that depend on its backing services; for example: establishing network connections, loading files, and warming caches. Readiness probes can also be useful later in the container’s lifecycle, for example, when recovering from temporary faults or overloads.If the readiness probe returns a failed state, Kubernetes removes the pod from all matching service endpoints.Readiness probes run on the container during its whole lifecycle.Startup probeA startup probe verifies whether the application within a container is started. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.If such a probe is configured, it disables liveness and readiness checks until it succeeds.This type of probe is only executed at startup, unlike liveness and readiness probes, which are run periodically.Read more about the Configure Liveness, Readiness and Startup Probes.


Question: How does Liveness, Readiness, and Startup Probes work?

Answer: Liveness, Readiness, and Startup ProbesKubernetes has various types of probes:Liveness probeReadiness probeStartup probeLiveness probeLiveness probes determine when to restart a container. For example, liveness probes could catch a deadlock when an application is running but unable to make progress.If a container fails its liveness probe repeatedly, the kubelet restarts the container.Liveness probes do not wait for readiness probes to succeed. If you want to wait before executing a liveness probe, you can either define initialDelaySeconds or use a startup probe.Readiness probeReadiness probes determine when a container is ready to accept traffic. This is useful when waiting for an application to perform time-consuming initial tasks that depend on its backing services; for example: establishing network connections, loading files, and warming caches. Readiness probes can also be useful later in the container’s lifecycle, for example, when recovering from temporary faults or overloads.If the readiness probe returns a failed state, Kubernetes removes the pod from all matching service endpoints.Readiness probes run on the container during its whole lifecycle.Startup probeA startup probe verifies whether the application within a container is started. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.If such a probe is configured, it disables liveness and readiness checks until it succeeds.This type of probe is only executed at startup, unlike liveness and readiness probes, which are run periodically.Read more about the Configure Liveness, Readiness and Startup Probes.


Question: When would you use Liveness, Readiness, and Startup Probes?

Answer: Liveness, Readiness, and Startup ProbesKubernetes has various types of probes:Liveness probeReadiness probeStartup probeLiveness probeLiveness probes determine when to restart a container. For example, liveness probes could catch a deadlock when an application is running but unable to make progress.If a container fails its liveness probe repeatedly, the kubelet restarts the container.Liveness probes do not wait for readiness probes to succeed. If you want to wait before executing a liveness probe, you can either define initialDelaySeconds or use a startup probe.Readiness probeReadiness probes determine when a container is ready to accept traffic. This is useful when waiting for an application to perform time-consuming initial tasks that depend on its backing services; for example: establishing network connections, loading files, and warming caches. Readiness probes can also be useful later in the container’s lifecycle, for example, when recovering from temporary faults or overloads.If the readiness probe returns a failed state, Kubernetes removes the pod from all matching service endpoints.Readiness probes run on the container during its whole lifecycle.Startup probeA startup probe verifies whether the application within a container is started. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.If such a probe is configured, it disables liveness and readiness checks until it succeeds.This type of probe is only executed at startup, unlike liveness and readiness probes, which are run periodically.Read more about the Configure Liveness, Readiness and Startup Probes.


Question: What are the benefits of Liveness, Readiness, and Startup Probes?

Answer: Liveness, Readiness, and Startup ProbesKubernetes has various types of probes:Liveness probeReadiness probeStartup probeLiveness probeLiveness probes determine when to restart a container. For example, liveness probes could catch a deadlock when an application is running but unable to make progress.If a container fails its liveness probe repeatedly, the kubelet restarts the container.Liveness probes do not wait for readiness probes to succeed. If you want to wait before executing a liveness probe, you can either define initialDelaySeconds or use a startup probe.Readiness probeReadiness probes determine when a container is ready to accept traffic. This is useful when waiting for an application to perform time-consuming initial tasks that depend on its backing services; for example: establishing network connections, loading files, and warming caches. Readiness probes can also be useful later in the container’s lifecycle, for example, when recovering from temporary faults or overloads.If the readiness probe returns a failed state, Kubernetes removes the pod from all matching service endpoints.Readiness probes run on the container during its whole lifecycle.Startup probeA startup probe verifies whether the application within a container is started. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.If such a probe is configured, it disables liveness and readiness checks until it succeeds.This type of probe is only executed at startup, unlike liveness and readiness probes, which are run periodically.Read more about the Configure Liveness, Readiness and Startup Probes.


Question: What is Liveness, Readiness, and Startup Probes?

Answer: K u b e r n e t e s   h a s   v a r i o u s   t y p e s   o f   p r o b e s :   L i v e n e s s   p r o b e R e a d i n e s s   p r o b e S t a r t u p   p r o b e


Question: What is Liveness probe?

Answer: L i v e n e s s   p r o b e s   d e t e r m i n e   w h e n   t o   r e s t a r t   a   c o n t a i n e r .   F o r   e x a m p l e ,   l i v e n e s s   p r o b e s   c o u l d   c a t c h   a   d e a d l o c k   w h e n   a n   a p p l i c a t i o n   i s   r u n n i n g   b u t   u n a b l e   t o   m a k e   p r o g r e s s .   I f   a   c o n t a i n e r   f a i l s   i t s   l i v e n e s s   p r o b e   r e p e a t e d l y ,   t h e   k u b e l e t   r e s t a r t s   t h e   c o n t a i n e r .   L i v e n e s s   p r o b e s   d o   n o t   w a i t   f o r   r e a d i n e s s   p r o b e s   t o   s u c c e e d .   I f   y o u   w a n t   t o   w a i t   b e f o r e   e x e c u t i n g   a   l i v e n e s s   p r o b e ,   y o u   c a n   e i t h e r   d e f i n e   i n i t i a l D e l a y S e c o n d s   o r   u s e   a   s t a r t u p   p r o b e .


Question: What is Readiness probe?

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


Question: What is Startup probe?

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


Question: What is kubectl config current-context?

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


Question: How does kubectl config current-context work?

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


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

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


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

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


Question: What is Synopsis?

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


Question: What is Examples?

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


Question: What is Options?

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


Question: What is Parent Options Inherited?

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


Question: What is See Also?

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


Question: What is Dual-stack support with kubeadm?

Answer: Dual-stack support with kubeadmFEATURE STATE: Kubernetes v1.23 [stable]Your Kubernetes cluster includes dual-stack networking, which means that cluster networking lets you use either address family. In a cluster, the control plane can assign both an IPv4 address and an IPv6 address to a single Pod or a Service.Before you beginYou need to have installed the kubeadm tool, following the steps from Installing kubeadm.For each server that you want to use as a node, make sure it allows IPv6 forwarding.Enable IPv6 packet forwardingTo check if IPv6 packet forwarding is enabled:sysctl net.ipv6.conf.all.forwarding If the output is net.ipv6.conf.all.forwarding = 1 it is already enabled. Otherwise it is not enabled yet.To manually enable IPv6 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee -a /etc/sysctl.d/k8s.conf net.ipv6.conf.all.forwarding = 1 EOF # Apply sysctl params without reboot sudo sysctl --system You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global unicast address block from within 2000::/3, using a range that is assigned to the operator. You don't have to route the cluster's IP address ranges to the public internet.The size of the IP address allocations should be suitable for the number of Pods and Services that you are planning to run.Note:If you are upgrading an existing cluster with the kubeadm upgrade command, kubeadm does not support making modifications to the pod IP address range (“cluster CIDR”) nor to the cluster's Service address range (“Service CIDR”).Create a dual-stack clusterTo create a dual-stack cluster with kubeadm init you can pass command line arguments similar to the following example:# These address ranges are examples kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112 To make things clearer, here is an example kubeadm configuration file kubeadm-config.yaml for the primary dual-stack control plane node.--- apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration networking: podSubnet: 10.244.0.0/16,2001:db8:42:0::/56 serviceSubnet: 10.96.0.0/16,2001:db8:42:1::/112 --- apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: "10.100.0.1" bindPort: 6443 nodeRegistration: kubeletExtraArgs: - name: "node-ip" value: "10.100.0.2,fd00:1:2:3::2" advertiseAddress in InitConfiguration specifies the IP address that the API Server will advertise it is listening on. The value of advertiseAddress equals the --apiserver-advertise-address flag of kubeadm init.Run kubeadm to initiate the dual-stack control plane node:kubeadm init --config=kubeadm-config.yaml The kube-controller-manager flags --node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6 are set with default values. See configure IPv4/IPv6 dual stack.Note:The --apiserver-advertise-address flag does no


Question: How does Dual-stack support with kubeadm work?

Answer: Dual-stack support with kubeadmFEATURE STATE: Kubernetes v1.23 [stable]Your Kubernetes cluster includes dual-stack networking, which means that cluster networking lets you use either address family. In a cluster, the control plane can assign both an IPv4 address and an IPv6 address to a single Pod or a Service.Before you beginYou need to have installed the kubeadm tool, following the steps from Installing kubeadm.For each server that you want to use as a node, make sure it allows IPv6 forwarding.Enable IPv6 packet forwardingTo check if IPv6 packet forwarding is enabled:sysctl net.ipv6.conf.all.forwarding If the output is net.ipv6.conf.all.forwarding = 1 it is already enabled. Otherwise it is not enabled yet.To manually enable IPv6 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee -a /etc/sysctl.d/k8s.conf net.ipv6.conf.all.forwarding = 1 EOF # Apply sysctl params without reboot sudo sysctl --system You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global unicast address block from within 2000::/3, using a range that is assigned to the operator. You don't have to route the cluster's IP address ranges to the public internet.The size of the IP address allocations should be suitable for the number of Pods and Services that you are planning to run.Note:If you are upgrading an existing cluster with the kubeadm upgrade command, kubeadm does not support making modifications to the pod IP address range (“cluster CIDR”) nor to the cluster's Service address range (“Service CIDR”).Create a dual-stack clusterTo create a dual-stack cluster with kubeadm init you can pass command line arguments similar to the following example:# These address ranges are examples kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112 To make things clearer, here is an example kubeadm configuration file kubeadm-config.yaml for the primary dual-stack control plane node.--- apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration networking: podSubnet: 10.244.0.0/16,2001:db8:42:0::/56 serviceSubnet: 10.96.0.0/16,2001:db8:42:1::/112 --- apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: "10.100.0.1" bindPort: 6443 nodeRegistration: kubeletExtraArgs: - name: "node-ip" value: "10.100.0.2,fd00:1:2:3::2" advertiseAddress in InitConfiguration specifies the IP address that the API Server will advertise it is listening on. The value of advertiseAddress equals the --apiserver-advertise-address flag of kubeadm init.Run kubeadm to initiate the dual-stack control plane node:kubeadm init --config=kubeadm-config.yaml The kube-controller-manager flags --node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6 are set with default values. See configure IPv4/IPv6 dual stack.Note:The --apiserver-advertise-address flag does no


Question: When would you use Dual-stack support with kubeadm?

Answer: Dual-stack support with kubeadmFEATURE STATE: Kubernetes v1.23 [stable]Your Kubernetes cluster includes dual-stack networking, which means that cluster networking lets you use either address family. In a cluster, the control plane can assign both an IPv4 address and an IPv6 address to a single Pod or a Service.Before you beginYou need to have installed the kubeadm tool, following the steps from Installing kubeadm.For each server that you want to use as a node, make sure it allows IPv6 forwarding.Enable IPv6 packet forwardingTo check if IPv6 packet forwarding is enabled:sysctl net.ipv6.conf.all.forwarding If the output is net.ipv6.conf.all.forwarding = 1 it is already enabled. Otherwise it is not enabled yet.To manually enable IPv6 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee -a /etc/sysctl.d/k8s.conf net.ipv6.conf.all.forwarding = 1 EOF # Apply sysctl params without reboot sudo sysctl --system You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global unicast address block from within 2000::/3, using a range that is assigned to the operator. You don't have to route the cluster's IP address ranges to the public internet.The size of the IP address allocations should be suitable for the number of Pods and Services that you are planning to run.Note:If you are upgrading an existing cluster with the kubeadm upgrade command, kubeadm does not support making modifications to the pod IP address range (“cluster CIDR”) nor to the cluster's Service address range (“Service CIDR”).Create a dual-stack clusterTo create a dual-stack cluster with kubeadm init you can pass command line arguments similar to the following example:# These address ranges are examples kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112 To make things clearer, here is an example kubeadm configuration file kubeadm-config.yaml for the primary dual-stack control plane node.--- apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration networking: podSubnet: 10.244.0.0/16,2001:db8:42:0::/56 serviceSubnet: 10.96.0.0/16,2001:db8:42:1::/112 --- apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: "10.100.0.1" bindPort: 6443 nodeRegistration: kubeletExtraArgs: - name: "node-ip" value: "10.100.0.2,fd00:1:2:3::2" advertiseAddress in InitConfiguration specifies the IP address that the API Server will advertise it is listening on. The value of advertiseAddress equals the --apiserver-advertise-address flag of kubeadm init.Run kubeadm to initiate the dual-stack control plane node:kubeadm init --config=kubeadm-config.yaml The kube-controller-manager flags --node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6 are set with default values. See configure IPv4/IPv6 dual stack.Note:The --apiserver-advertise-address flag does no


Question: What are the benefits of Dual-stack support with kubeadm?

Answer: Dual-stack support with kubeadmFEATURE STATE: Kubernetes v1.23 [stable]Your Kubernetes cluster includes dual-stack networking, which means that cluster networking lets you use either address family. In a cluster, the control plane can assign both an IPv4 address and an IPv6 address to a single Pod or a Service.Before you beginYou need to have installed the kubeadm tool, following the steps from Installing kubeadm.For each server that you want to use as a node, make sure it allows IPv6 forwarding.Enable IPv6 packet forwardingTo check if IPv6 packet forwarding is enabled:sysctl net.ipv6.conf.all.forwarding If the output is net.ipv6.conf.all.forwarding = 1 it is already enabled. Otherwise it is not enabled yet.To manually enable IPv6 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee -a /etc/sysctl.d/k8s.conf net.ipv6.conf.all.forwarding = 1 EOF # Apply sysctl params without reboot sudo sysctl --system You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global unicast address block from within 2000::/3, using a range that is assigned to the operator. You don't have to route the cluster's IP address ranges to the public internet.The size of the IP address allocations should be suitable for the number of Pods and Services that you are planning to run.Note:If you are upgrading an existing cluster with the kubeadm upgrade command, kubeadm does not support making modifications to the pod IP address range (“cluster CIDR”) nor to the cluster's Service address range (“Service CIDR”).Create a dual-stack clusterTo create a dual-stack cluster with kubeadm init you can pass command line arguments similar to the following example:# These address ranges are examples kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112 To make things clearer, here is an example kubeadm configuration file kubeadm-config.yaml for the primary dual-stack control plane node.--- apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration networking: podSubnet: 10.244.0.0/16,2001:db8:42:0::/56 serviceSubnet: 10.96.0.0/16,2001:db8:42:1::/112 --- apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: "10.100.0.1" bindPort: 6443 nodeRegistration: kubeletExtraArgs: - name: "node-ip" value: "10.100.0.2,fd00:1:2:3::2" advertiseAddress in InitConfiguration specifies the IP address that the API Server will advertise it is listening on. The value of advertiseAddress equals the --apiserver-advertise-address flag of kubeadm init.Run kubeadm to initiate the dual-stack control plane node:kubeadm init --config=kubeadm-config.yaml The kube-controller-manager flags --node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6 are set with default values. See configure IPv4/IPv6 dual stack.Note:The --apiserver-advertise-address flag does no


Question: What is Dual-stack support with kubeadm?

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


Question: What is Before you begin?

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


Question: What is Enable IPv6 packet forwarding?

Answer: T o   c h e c k   i f   I P v 6   p a c k e t   f o r w a r d i n g   i s   e n a b l e d :   s y s c t l   n e t . i p v 6 . c o n f . a l l . f o r w a r d i n g   I f   t h e   o u t p u t   i s   n e t . i p v 6 . c o n f . a l l . f o r w a r d i n g   =   1   i t   i s   a l r e a d y   e n a b l e d .   O t h e r w i s e   i t   i s   n o t   e n a b l e d   y e t .   T o   m a n u a l l y   e n a b l e   I P v 6   p a c k e t   f o r w a r d i n g :   #   s y s c t l   p a r a m s   r e q u i r e d   b y   s e t u p ,   p a r a m s   p e r s i s t   a c r o s s   r e b o o t s   c a t   < < E O F   |   s u d o   t e e   - a   / e t c / s y s c t l . d / k 8 s . c o n f   n e t . i p v 6 . c o n f . a l l . f o r w a r d i n g   =   1   E O F   #   A p p l y   s y s c t l   p a r a m s   w i t h o u t   r e b o o t   s u d o   s y s c t l   - - s y s t e m   Y o u   n e e d   t o   h a v e   a n   I P v 4   a n d   a n d   I P v 6   a d d r e s s   r a n g e   t o   u s e .   C l u s t e r   o p e r a t o r s   t y p i c a l l y   u s e   p r i v a t e   a d d r e s s   r a n g e s   f o r   I P v 4 .   F o r   I P v 6 ,   a   c l u s t e r   o p e r a t o r   t y p i c a l l y   c h o o s e s   a   g l o b a l   u n i c a s t   a d d r e s s   b l o c k   f r o m   w i t h i n   2 0 0 0 : : / 3 ,   u s i n g   a   r a n g e   t h a t   i s   a s s i g n e d   t o   t h e   o p e r a t o r .   Y o u   d o n ' t   h a v e   t o   r o u t e   t h e   c l u s t e r ' s   I P   a d d r e s s   r a n g e s   t o   t h e   p u b l i c   i n t e r n e t .   T h e   s i z e   o f   t h e   I P   a d d r e s s   a l l o c a t i o n s   s h o u l d   b e   s u i t a b l e   f o r   t h e   n u m b e r   o f   P o d s   a n d   S e r v i c e s   t h a t   y o u   a r e   p l a n n i n g   t o   r u n .


Question: What is Create a dual-stack cluster?

Answer: T o   c r e a t e   a   d u a l - s t a c k   c l u s t e r   w i t h   k u b e a d m   i n i t   y o u   c a n   p a s s   c o m m a n d   l i n e   a r g u m e n t s   s i m i l a r   t o   t h e   f o l l o w i n g   e x a m p l e :   #   T h e s e   a d d r e s s   r a n g e s   a r e   e x a m p l e s   k u b e a d m   i n i t   - - p o d - n e t w o r k - c i d r = 1 0 . 2 4 4 . 0 . 0 / 1 6 , 2 0 0 1 : d b 8 : 4 2 : 0 : : / 5 6   - - s e r v i c e - c i d r = 1 0 . 9 6 . 0 . 0 / 1 6 , 2 0 0 1 : d b 8 : 4 2 : 1 : : / 1 1 2   T o   m a k e   t h i n g s   c l e a r e r ,   h e r e   i s   a n   e x a m p l e   k u b e a d m   c o n f i g u r a t i o n   f i l e   k u b e a d m - c o n f i g . y a m l   f o r   t h e   p r i m a r y   d u a l - s t a c k   c o n t r o l   p l a n e   n o d e .   - - -   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   n e t w o r k i n g :   p o d S u b n e t :   1 0 . 2 4 4 . 0 . 0 / 1 6 , 2 0 0 1 : d b 8 : 4 2 : 0 : : / 5 6   s e r v i c e S u b n e t :   1 0 . 9 6 . 0 . 0 / 1 6 , 2 0 0 1 : d b 8 : 4 2 : 1 : : / 1 1 2   - - -   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   I n i t C o n f i g u r a t i o n   l o c a l A P I E n d p o i n t :   a d v e r t i s e A d d r e s s :   " 1 0 . 1 0 0 . 0 . 1 "   b i n d P o r t :   6 4 4 3   n o d e R e g i s t r a t i o n :   k u b e l e t E x t r a A r g s :   -   n a m e :   " n o d e - i p "   v a l u e :   " 1 0 . 1 0 0 . 0 . 2 , f d 0 0 : 1 : 2 : 3 : : 2 "   a d v e r t i s e A d d r e s s   i n   I n i t C o n f i g u r a t i o n   s p e c i f i e s   t h e   I P   a d d r e s s   t h a t   t h e   A P I   S e r v e r   w i l l   a d v e r t i s e   i t   i s   l i s t e n i n g   o n .   T h e   v a l u e   o f   a d v e r t i s e A d d r e s s   e q u a l s   t h e   - - a p i s e r v e r - a d v e r t i s e - a d d r e s s   f l a g   o f   k u b e a d m   i n i t .


Question: What is Join a node to dual-stack cluster?

Answer: B e f o r e   j o i n i n g   a   n o d e ,   m a k e   s u r e   t h a t   t h e   n o d e   h a s   I P v 6   r o u t a b l e   n e t w o r k   i n t e r f a c e   a n d   a l l o w s   I P v 6   f o r w a r d i n g .   H e r e   i s   a n   e x a m p l e   k u b e a d m   c o n f i g u r a t i o n   f i l e   k u b e a d m - c o n f i g . y a m l   f o r   j o i n i n g   a   w o r k e r   n o d e   t o   t h e   c l u s t e r .   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   J o i n C o n f i g u r a t i o n   d i s c o v e r y :   b o o t s t r a p T o k e n :   a p i S e r v e r E n d p o i n t :   1 0 . 1 0 0 . 0 . 1 : 6 4 4 3   t o k e n :   " c l v l d h . v j j w g 1 6 u c n h p 9 4 q r "   c a C e r t H a s h e s :   -   " s h a 2 5 6 : a 4 8 6 3 c d e 7 0 6 c f c 5 8 0 a 4 3 9 f 8 4 2 c c 6 5 d 5 e f 1 1 2 b 7 b 2 b e 3 1 6 2 8 5 1 3 a 9 8 8 1 c f 0 d 9 f e 0 e "   #   c h a n g e   a u t h   i n f o   a b o v e   t o   m a t c h   t h e   a c t u a l   t o k e n   a n d   C A   c e r t i f i c a t e   h a s h   f o r   y o u r   c l u s t e r   n o d e R e g i s t r a t i o n :   k u b e l e t E x t r a A r g s :   -   n a m e :   " n o d e - i p "   v a l u e :   " 1 0 . 1 0 0 . 0 . 2 , f d 0 0 : 1 : 2 : 3 : : 3 "   A l s o ,   h e r e   i s   a n   e x a m p l e   k u b e a d m   c o n f i g u r a t i o n   f i l e   k u b e a d m - c o n f i g . y a m l   f o r   j o i n i n g   a n o t h e r   c o n t r o l   p l a n e   n o d e   t o   t h e   c l u s t e r .   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   J o i n C o n f i g u r a t i o n   c o n t r o l P l a n e :   l o c a l A P I E n d p o i n t :   a d v e r t i s e A d d r e s s :   " 1 0 . 1 0 0 . 0 . 2 "   b i n d P o r t :   6 4 4 3   d i s c o v e r y :   b o o t s t r a p T o k e n :   a p i S e r v e r E n d p o i n t :   1 0 . 1 0 0 . 0 . 1 : 6 4 4 3   t o k e n :   " c l v l d h . v j j w g 1 6 u c n h p 9 4 q r


Question: What is Note:?

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


Question: What is What's next?

Answer: V a l i d a t e   I P v 4 / I P v 6   d u a l - s t a c k   n e t w o r k i n g R e a d   a b o u t   D u a l - s t a c k   c l u s t e r   n e t w o r k i n g L e a r n   m o r e   a b o u t   t h e   k u b e a d m   c o n f i g u r a t i o n   f o r m a t


Question: What is Deployments?

Answer: DeploymentsA Deployment manages a set of Pods to run an application workload, usually one that doesn't maintain state.A Deployment provides declarative updates for Pods and ReplicaSets.You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.Note:Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below.Use CaseThe following are typical use cases for Deployments:Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. Check the status of the rollout to see if it succeeds or not.Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. A new ReplicaSet is created, and the Deployment gradually scales it up while scaling down the old ReplicaSet, ensuring Pods are replaced at a controlled rate. Each new ReplicaSet updates the revision of the Deployment.Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. Each rollback updates the revision of the Deployment.Scale up the Deployment to facilitate more load.Pause the rollout of a Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout.Use the status of the Deployment as an indicator that a rollout has stuck.Clean up older ReplicaSets that you don't need anymore.Creating a DeploymentThe following is an example of a Deployment. It creates a ReplicaSet to bring up three nginx Pods:controllers/nginx-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment 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 In this example:A Deployment named nginx-deployment is created, indicated by the .metadata.name field. This name will become the basis for the ReplicaSets and Pods which are created later. See Writing a Deployment Spec for more details.The Deployment creates a ReplicaSet that creates three replicated Pods, indicated by the .spec.replicas field.The .spec.selector field defines how the created ReplicaSet finds which Pods to manage. In this case, you select a label that is defined in the Pod template (app: nginx). However, more sophisticated selection rules are possible, as long as the Pod template itself satisfies the rule.Note:The .spec.selector.matchLabels field is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". All of the requirements, from both matchLabels and matchExpressions, must be satisfied in order to match.The .spec.


Question: How does Deployments work?

Answer: DeploymentsA Deployment manages a set of Pods to run an application workload, usually one that doesn't maintain state.A Deployment provides declarative updates for Pods and ReplicaSets.You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.Note:Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below.Use CaseThe following are typical use cases for Deployments:Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. Check the status of the rollout to see if it succeeds or not.Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. A new ReplicaSet is created, and the Deployment gradually scales it up while scaling down the old ReplicaSet, ensuring Pods are replaced at a controlled rate. Each new ReplicaSet updates the revision of the Deployment.Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. Each rollback updates the revision of the Deployment.Scale up the Deployment to facilitate more load.Pause the rollout of a Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout.Use the status of the Deployment as an indicator that a rollout has stuck.Clean up older ReplicaSets that you don't need anymore.Creating a DeploymentThe following is an example of a Deployment. It creates a ReplicaSet to bring up three nginx Pods:controllers/nginx-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment 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 In this example:A Deployment named nginx-deployment is created, indicated by the .metadata.name field. This name will become the basis for the ReplicaSets and Pods which are created later. See Writing a Deployment Spec for more details.The Deployment creates a ReplicaSet that creates three replicated Pods, indicated by the .spec.replicas field.The .spec.selector field defines how the created ReplicaSet finds which Pods to manage. In this case, you select a label that is defined in the Pod template (app: nginx). However, more sophisticated selection rules are possible, as long as the Pod template itself satisfies the rule.Note:The .spec.selector.matchLabels field is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". All of the requirements, from both matchLabels and matchExpressions, must be satisfied in order to match.The .spec.


Question: When would you use Deployments?

Answer: DeploymentsA Deployment manages a set of Pods to run an application workload, usually one that doesn't maintain state.A Deployment provides declarative updates for Pods and ReplicaSets.You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.Note:Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below.Use CaseThe following are typical use cases for Deployments:Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. Check the status of the rollout to see if it succeeds or not.Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. A new ReplicaSet is created, and the Deployment gradually scales it up while scaling down the old ReplicaSet, ensuring Pods are replaced at a controlled rate. Each new ReplicaSet updates the revision of the Deployment.Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. Each rollback updates the revision of the Deployment.Scale up the Deployment to facilitate more load.Pause the rollout of a Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout.Use the status of the Deployment as an indicator that a rollout has stuck.Clean up older ReplicaSets that you don't need anymore.Creating a DeploymentThe following is an example of a Deployment. It creates a ReplicaSet to bring up three nginx Pods:controllers/nginx-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment 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 In this example:A Deployment named nginx-deployment is created, indicated by the .metadata.name field. This name will become the basis for the ReplicaSets and Pods which are created later. See Writing a Deployment Spec for more details.The Deployment creates a ReplicaSet that creates three replicated Pods, indicated by the .spec.replicas field.The .spec.selector field defines how the created ReplicaSet finds which Pods to manage. In this case, you select a label that is defined in the Pod template (app: nginx). However, more sophisticated selection rules are possible, as long as the Pod template itself satisfies the rule.Note:The .spec.selector.matchLabels field is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". All of the requirements, from both matchLabels and matchExpressions, must be satisfied in order to match.The .spec.


Question: What are the benefits of Deployments?

Answer: DeploymentsA Deployment manages a set of Pods to run an application workload, usually one that doesn't maintain state.A Deployment provides declarative updates for Pods and ReplicaSets.You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.Note:Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below.Use CaseThe following are typical use cases for Deployments:Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. Check the status of the rollout to see if it succeeds or not.Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. A new ReplicaSet is created, and the Deployment gradually scales it up while scaling down the old ReplicaSet, ensuring Pods are replaced at a controlled rate. Each new ReplicaSet updates the revision of the Deployment.Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. Each rollback updates the revision of the Deployment.Scale up the Deployment to facilitate more load.Pause the rollout of a Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout.Use the status of the Deployment as an indicator that a rollout has stuck.Clean up older ReplicaSets that you don't need anymore.Creating a DeploymentThe following is an example of a Deployment. It creates a ReplicaSet to bring up three nginx Pods:controllers/nginx-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment 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 In this example:A Deployment named nginx-deployment is created, indicated by the .metadata.name field. This name will become the basis for the ReplicaSets and Pods which are created later. See Writing a Deployment Spec for more details.The Deployment creates a ReplicaSet that creates three replicated Pods, indicated by the .spec.replicas field.The .spec.selector field defines how the created ReplicaSet finds which Pods to manage. In this case, you select a label that is defined in the Pod template (app: nginx). However, more sophisticated selection rules are possible, as long as the Pod template itself satisfies the rule.Note:The .spec.selector.matchLabels field is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". All of the requirements, from both matchLabels and matchExpressions, must be satisfied in order to match.The .spec.


Question: What is Deployments?

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


Question: What is Use Case?

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


Question: What is Creating a Deployment?

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


Question: What is Note:?

Answer: T h e   . s p e c . t e m p l a t e   f i e l d   c o n t a i n s   t h e   f o l l o w i n g   s u b - f i e l d s :   T h e   P o d s   a r e   l a b e l e d   a p p :   n g i n x u s i n g   t h e   . m e t a d a t a . l a b e l s   f i e l d . T h e   P o d   t e m p l a t e ' s   s p e c i f i c a t i o n ,   o r   . s p e c   f i e l d ,   i n d i c a t e s   t h a t   t h e   P o d s   r u n   o n e   c o n t a i n e r ,   n g i n x ,   w h i c h   r u n s   t h e   n g i n x   D o c k e r   H u b   i m a g e   a t   v e r s i o n   1 . 1 4 . 2 . C r e a t e   o n e   c o n t a i n e r   a n d   n a m e   i t   n g i n x   u s i n g   t h e   . s p e c . c o n t a i n e r s [ 0 ] . n a m e   f i e l d .   B e f o r e   y o u   b e g i n ,   m a k e   s u r e   y o u r   K u b e r n e t e s   c l u s t e r   i s   u p   a n d   r u n n i n g .   F o l l o w   t h e   s t e p s   g i v e n   b e l o w   t o   c r e a t e   t h e   a b o v e   D e p l o y m e n t :   C r e a t e   t h e   D e p l o y m e n t   b y   r u n n i n g   t h e   f o l l o w i n g   c o m m a n d : 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 / c o n t r o l l e r s / n g i n x - d e p l o y m e n t . y a m l   R u n   k u b e c t l   g e t   d e p l o y m e n t s   t o   c h e c k   i f   t h e   D e p l o y m e n t   w a s   c r e a t e d . I f   t h e   D e p l o y m e n t   i s   s t i l l   b e i n g   c r e a t e d ,   t h e   o u t p u t   i s   s i m i l a r   t o   t h e   f o l l o w i n g : N A M E   R E A D Y   U P - T O - D A T E   A V A I L A B L E   A G E   n g i n x - d e p l o y m e n t   0 / 3   0   0   1 s   W h e n   y o u   i n s p e c t   t h e   D e p l o y m e n t s   i n   y o u r   c l u s t e r ,   t h e   f o l l o w i n g   f i e l d s   a r e   d i s p l a y e d : N A M E   l i s t s   t h e   n a m e s   o f   t h e   D e p l o y m e n t s   i n   t h e   n a m e s p a c e . R E A D Y   d i s p l a y s   h o w   m a n y


Question: What is Note:?

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


Question: What is Caution:?

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


Question: What is Note:?

Answer: F o l l o w   t h e   s t e p s   g i v e n   b e l o w   t o   u p d a t e   y o u r   D e p l o y m e n t :   L e t ' s   u p d a t e   t h e   n g i n x   P o d s   t o   u s e   t h e   n g i n x : 1 . 1 6 . 1   i m a g e   i n s t e a d   o f   t h e   n g i n x : 1 . 1 4 . 2   i m a g e . k u b e c t l   s e t   i m a g e   d e p l o y m e n t . v 1 . a p p s / n g i n x - d e p l o y m e n t   n g i n x = n g i n x : 1 . 1 6 . 1   o r   u s e   t h e   f o l l o w i n g   c o m m a n d : k u b e c t l   s e t   i m a g e   d e p l o y m e n t / n g i n x - d e p l o y m e n t   n g i n x = n g i n x : 1 . 1 6 . 1   w h e r e   d e p l o y m e n t / n g i n x - d e p l o y m e n t   i n d i c a t e s   t h e   D e p l o y m e n t ,   n g i n x   i n d i c a t e s   t h e   C o n t a i n e r   t h e   u p d a t e   w i l l   t a k e   p l a c e   a n d   n g i n x : 1 . 1 6 . 1   i n d i c a t e s   t h e   n e w   i m a g e   a n d   i t s   t a g . T h e   o u t p u t   i s   s i m i l a r   t o : d e p l o y m e n t . a p p s / n g i n x - d e p l o y m e n t   i m a g e   u p d a t e d   A l t e r n a t i v e l y ,   y o u   c a n   e d i t   t h e   D e p l o y m e n t   a n d   c h a n g e   . s p e c . t e m p l a t e . s p e c . c o n t a i n e r s [ 0 ] . i m a g e   f r o m   n g i n x : 1 . 1 4 . 2   t o   n g i n x : 1 . 1 6 . 1 : k u b e c t l   e d i t   d e p l o y m e n t / n g i n x - d e p l o y m e n t   T h e   o u t p u t   i s   s i m i l a r   t o : d e p l o y m e n t . a p p s / n g i n x - d e p l o y m e n t   e d i t e d   T o   s e e   t h e   r o l l o u t   s t a t u s ,   r u n : 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 / n g i n x - d e p l o y m e n t   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s : W a i t i n g   f o r   r o l l o u t   t o   f i n i s h :   2   o u t   o f   3   n e w   r e p l i c a s   h a v e   b e e n   u p d a t e d . . .   o r d e p l o y m e n t   " n g i n x - d


Question: What is Rollover (aka multiple updates in-flight)?

Answer: E a c h   t i m e   a   n e w   D e p l o y m e n t   i s   o b s e r v e d   b y   t h e   D e p l o y m e n t   c o n t r o l l e r ,   a   R e p l i c a S e t   i s   c r e a t e d   t o   b r i n g   u p   t h e   d e s i r e d   P o d s .   I f   t h e   D e p l o y m e n t   i s   u p d a t e d ,   t h e   e x i s t i n g   R e p l i c a S e t   t h a t   c o n t r o l s   P o d s   w h o s e   l a b e l s   m a t c h   . s p e c . s e l e c t o r   b u t   w h o s e   t e m p l a t e   d o e s   n o t   m a t c h   . s p e c . t e m p l a t e   a r e   s c a l e d   d o w n .   E v e n t u a l l y ,   t h e   n e w   R e p l i c a S e t   i s   s c a l e d   t o   . s p e c . r e p l i c a s   a n d   a l l   o l d   R e p l i c a S e t s   i s   s c a l e d   t o   0 .   I f   y o u   u p d a t e   a   D e p l o y m e n t   w h i l e   a n   e x i s t i n g   r o l l o u t   i s   i n   p r o g r e s s ,   t h e   D e p l o y m e n t   c r e a t e s   a   n e w   R e p l i c a S e t   a s   p e r   t h e   u p d a t e   a n d   s t a r t   s c a l i n g   t h a t   u p ,   a n d   r o l l s   o v e r   t h e   R e p l i c a S e t   t h a t   i t   w a s   s c a l i n g   u p   p r e v i o u s l y   - -   i t   w i l l   a d d   i t   t o   i t s   l i s t   o f   o l d   R e p l i c a S e t s   a n d   s t a r t   s c a l i n g   i t   d o w n .   F o r   e x a m p l e ,   s u p p o s e   y o u   c r e a t e   a   D e p l o y m e n t   t o   c r e a t e   5   r e p l i c a s   o f   n g i n x : 1 . 1 4 . 2 ,   b u t   t h e n   u p d a t e   t h e   D e p l o y m e n t   t o   c r e a t e   5   r e p l i c a s   o f   n g i n x : 1 . 1 6 . 1 ,   w h e n   o n l y   3   r e p l i c a s   o f   n g i n x : 1 . 1 4 . 2   h a d   b e e n   c r e a t e d .   I n   t h a t   c a s e ,   t h e   D e p l o y m e n t   i m m e d i a t e l y   s t a r t s   k i l l i n g   t h e   3   n g i n x : 1 . 1 4 . 2   P o d s   t h a t   i t   h a d   c r e a t e d ,   a n d


Question: What is Label selector updates?

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


Question: What is Note:?

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


Question: What is Rolling Back a Deployment?

Answer: S o m e t i m e s ,   y o u   m a y   w a n t   t o   r o l l b a c k   a   D e p l o y m e n t ;   f o r   e x a m p l e ,   w h e n   t h e   D e p l o y m e n t   i s   n o t   s t a b l e ,   s u c h   a s   c r a s h   l o o p i n g .   B y   d e f a u l t ,   a l l   o f   t h e   D e p l o y m e n t ' s   r o l l o u t   h i s t o r y   i s   k e p t   i n   t h e   s y s t e m   s o   t h a t   y o u   c a n   r o l l b a c k   a n y t i m e   y o u   w a n t   ( y o u   c a n   c h a n g e   t h a t   b y   m o d i f y i n g   r e v i s i o n   h i s t o r y   l i m i t ) .


Question: What is Note:?

Answer: S u p p o s e   t h a t   y o u   m a d e   a   t y p o   w h i l e   u p d a t i n g   t h e   D e p l o y m e n t ,   b y   p u t t i n g   t h e   i m a g e   n a m e   a s   n g i n x : 1 . 1 6 1   i n s t e a d   o f   n g i n x : 1 . 1 6 . 1 : k u b e c t l   s e t   i m a g e   d e p l o y m e n t / n g i n x - d e p l o y m e n t   n g i n x = n g i n x : 1 . 1 6 1   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s : d e p l o y m e n t . a p p s / n g i n x - d e p l o y m e n t   i m a g e   u p d a t e d   T h e   r o l l o u t   g e t s   s t u c k .   Y o u   c a n   v e r i f y   i t   b y   c h e c k i n g   t h e   r o l l o u t   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   d e p l o y m e n t / n g i n x - d e p l o y m e n t   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s : W a i t i n g   f o r   r o l l o u t   t o   f i n i s h :   1   o u t   o f   3   n e w   r e p l i c a s   h a v e   b e e n   u p d a t e d . . .   P r e s s   C t r l - C   t o   s t o p   t h e   a b o v e   r o l l o u t   s t a t u s   w a t c h .   F o r   m o r e   i n f o r m a t i o n   o n   s t u c k   r o l l o u t s ,   r e a d   m o r e   h e r e . Y o u   s e e   t h a t   t h e   n u m b e r   o f   o l d   r e p l i c a s   ( a d d i n g   t h e   r e p l i c a   c o u n t   f r o m   n g i n x - d e p l o y m e n t - 1 5 6 4 1 8 0 3 6 5   a n d   n g i n x - d e p l o y m e n t - 2 0 3 5 3 8 4 2 1 1 )   i s   3 ,   a n d   t h e   n u m b e r   o f   n e w   r e p l i c a s   ( f r o m   n g i n x - d e p l o y m e n t - 3 0 6 6 7 2 4 1 9 1 )   i s   1 . k u b e c t l   g e t   r s   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s : N A M E   D E S I R E D   C U R R E N T   R E A D Y   A G E   n g i n x - d e p l o y m e n t - 1 5 6 4 1 8 0 3 6 5   3   3   3   2 5 s   n g i n x - d e p l o y m e n t - 2 0 3 5 3 8 4 2 1 1   0   0   0   3 6 s   n g i n x - d e p l o y m e n t - 3 0 6 6 7 2 4 1 9 1   1   1   0   6


Question: What is Note:?

Answer: G e t   t h e   d e s c r i p t i o n   o f   t h e   D e p l o y m e n t :   k u b e c t l   d e s c r i b e   d e p l o y m e n t   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   N a m e :   n g i n x - d e p l o y m e n t   N a m e s p a c e :   d e f a u l t   C r e a t i o n T i m e s t a m p :   T u e ,   1 5   M a r   2 0 1 6   1 4 : 4 8 : 0 4   - 0 7 0 0   L a b e l s :   a p p = n g i n x   S e l e c t o r :   a p p = n g i n x   R e p l i c a s :   3   d e s i r e d   |   1   u p d a t e d   |   4   t o t a l   |   3   a v a i l a b l e   |   1   u n a v a i l a b l e   S t r a t e g y T y p e :   R o l l i n g U p d a t e   M i n R e a d y S e c o n d s :   0   R o l l i n g U p d a t e S t r a t e g y :   2 5 %   m a x   u n a v a i l a b l e ,   2 5 %   m a x   s u r g e   P o d   T e m p l a t e :   L a b e l s :   a p p = n g i n x   C o n t a i n e r s :   n g i n x :   I m a g e :   n g i n x : 1 . 1 6 1   P o r t :   8 0 / T C P   H o s t   P o r t :   0 / T C P   E n v i r o n m e n t :   < n o n e >   M o u n t s :   < n o n e >   V o l u m e s :   < n o n e >   C o n d i t i o n s :   T y p e   S t a t u s   R e a s o n   - - - -   - - - - - -   - - - - - -   A v a i l a b l e   T r u e   M i n i m u m R e p l i c a s A v a i l a b l e   P r o g r e s s i n g   T r u e   R e p l i c a S e t U p d a t e d   O l d R e p l i c a S e t s :   n g i n x - d e p l o y m e n t - 1 5 6 4 1 8 0 3 6 5   ( 3 / 3   r e p l i c a s   c r e a t e d )   N e w R e p l i c a S e t :   n g i n x - d e p l o y m e n t - 3 0 6 6 7 2 4 1 9 1   ( 1 / 1   r e p l i c a s   c r e a t e d )   E v e n t s :   F i r s t S e e n   L a s t S e e n   C o u n t   F r o m   S u b O b j e c t P a t h   T y p e   R e a s o n   M e s s a g e   - - - - - - - - -   - - - - - - - -   - - - - -   - - - -   - - - - - - - - - - - - -   - - - - - - - -   - - - - - -   - - - - - - -   1 m   1 m   1   { d e p l o y m e n t - c o n t r o l l e r   }   N o r m a l   S c a l i


Question: What is Checking Rollout History of a Deployment?

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


Question: What is Rolling Back to a Previous Revision?

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