Question: What is Container Runtimes?

Answer: Container RuntimesNote: Dockershim has been removed from the Kubernetes project as of release 1.24. Read the Dockershim Removal FAQ for further details.You need to install a container runtime into each node in the cluster so that Pods can run there. This page outlines what is involved and describes related tasks for setting up nodes.Kubernetes 1.34 requires that you use a runtime that conforms with the Container Runtime Interface (CRI).See CRI version support for more information.This page provides an outline of how to use several common container runtimes with Kubernetes.containerdCRI-ODocker EngineMirantis Container RuntimeNote:Kubernetes releases before v1.24 included a direct integration with Docker Engine, using a component named dockershim. That special direct integration is no longer part of Kubernetes (this removal was announced as part of the v1.20 release). You can read Check whether Dockershim removal affects you to understand how this removal might affect you. To learn about migrating from using dockershim, see Migrating from dockershim.If you are running a version of Kubernetes other than v1.34, check the documentation for that version.Install and configure prerequisitesNetwork configurationBy default, the Linux kernel does not allow IPv4 packets to be routed between interfaces. Most Kubernetes cluster networking implementations will change this setting (if needed), but some might expect the administrator to do it for them. (Some might also expect other sysctl parameters to be set, kernel modules to be loaded, etc; consult the documentation for your specific network implementation.)Enable IPv4 packet forwardingTo manually enable IPv4 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 EOF # Apply sysctl params without reboot sudo sysctl --system Verify that net.ipv4.ip_forward is set to 1 with:sysctl net.ipv4.ip_forward cgroup driversOn Linux, control groups are used to constrain resources that are allocated to processes.Both the kubelet and the underlying container runtime need to interface with control groups to enforce resource management for pods and containers and set resources such as cpu/memory requests and limits. To interface with control groups, the kubelet and the container runtime need to use a cgroup driver. It's critical that the kubelet and the container runtime use the same cgroup driver and are configured the same.There are two cgroup drivers available:cgroupfssystemdcgroupfs driverThe cgroupfs driver is the default cgroup driver in the kubelet. When the cgroupfs driver is used, the kubelet and the container runtime directly interface with the cgroup filesystem to configure cgroups.The cgroupfs driver is not recommended when systemd is the init system because systemd expects a single cgroup manager on the system. Additionally, if you use cgroup v2, use the systemd cgroup driver instead of cgroupfs.systemd cgroup driverW


Question: How does Container Runtimes work?

Answer: Container RuntimesNote: Dockershim has been removed from the Kubernetes project as of release 1.24. Read the Dockershim Removal FAQ for further details.You need to install a container runtime into each node in the cluster so that Pods can run there. This page outlines what is involved and describes related tasks for setting up nodes.Kubernetes 1.34 requires that you use a runtime that conforms with the Container Runtime Interface (CRI).See CRI version support for more information.This page provides an outline of how to use several common container runtimes with Kubernetes.containerdCRI-ODocker EngineMirantis Container RuntimeNote:Kubernetes releases before v1.24 included a direct integration with Docker Engine, using a component named dockershim. That special direct integration is no longer part of Kubernetes (this removal was announced as part of the v1.20 release). You can read Check whether Dockershim removal affects you to understand how this removal might affect you. To learn about migrating from using dockershim, see Migrating from dockershim.If you are running a version of Kubernetes other than v1.34, check the documentation for that version.Install and configure prerequisitesNetwork configurationBy default, the Linux kernel does not allow IPv4 packets to be routed between interfaces. Most Kubernetes cluster networking implementations will change this setting (if needed), but some might expect the administrator to do it for them. (Some might also expect other sysctl parameters to be set, kernel modules to be loaded, etc; consult the documentation for your specific network implementation.)Enable IPv4 packet forwardingTo manually enable IPv4 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 EOF # Apply sysctl params without reboot sudo sysctl --system Verify that net.ipv4.ip_forward is set to 1 with:sysctl net.ipv4.ip_forward cgroup driversOn Linux, control groups are used to constrain resources that are allocated to processes.Both the kubelet and the underlying container runtime need to interface with control groups to enforce resource management for pods and containers and set resources such as cpu/memory requests and limits. To interface with control groups, the kubelet and the container runtime need to use a cgroup driver. It's critical that the kubelet and the container runtime use the same cgroup driver and are configured the same.There are two cgroup drivers available:cgroupfssystemdcgroupfs driverThe cgroupfs driver is the default cgroup driver in the kubelet. When the cgroupfs driver is used, the kubelet and the container runtime directly interface with the cgroup filesystem to configure cgroups.The cgroupfs driver is not recommended when systemd is the init system because systemd expects a single cgroup manager on the system. Additionally, if you use cgroup v2, use the systemd cgroup driver instead of cgroupfs.systemd cgroup driverW


Question: When would you use Container Runtimes?

Answer: Container RuntimesNote: Dockershim has been removed from the Kubernetes project as of release 1.24. Read the Dockershim Removal FAQ for further details.You need to install a container runtime into each node in the cluster so that Pods can run there. This page outlines what is involved and describes related tasks for setting up nodes.Kubernetes 1.34 requires that you use a runtime that conforms with the Container Runtime Interface (CRI).See CRI version support for more information.This page provides an outline of how to use several common container runtimes with Kubernetes.containerdCRI-ODocker EngineMirantis Container RuntimeNote:Kubernetes releases before v1.24 included a direct integration with Docker Engine, using a component named dockershim. That special direct integration is no longer part of Kubernetes (this removal was announced as part of the v1.20 release). You can read Check whether Dockershim removal affects you to understand how this removal might affect you. To learn about migrating from using dockershim, see Migrating from dockershim.If you are running a version of Kubernetes other than v1.34, check the documentation for that version.Install and configure prerequisitesNetwork configurationBy default, the Linux kernel does not allow IPv4 packets to be routed between interfaces. Most Kubernetes cluster networking implementations will change this setting (if needed), but some might expect the administrator to do it for them. (Some might also expect other sysctl parameters to be set, kernel modules to be loaded, etc; consult the documentation for your specific network implementation.)Enable IPv4 packet forwardingTo manually enable IPv4 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 EOF # Apply sysctl params without reboot sudo sysctl --system Verify that net.ipv4.ip_forward is set to 1 with:sysctl net.ipv4.ip_forward cgroup driversOn Linux, control groups are used to constrain resources that are allocated to processes.Both the kubelet and the underlying container runtime need to interface with control groups to enforce resource management for pods and containers and set resources such as cpu/memory requests and limits. To interface with control groups, the kubelet and the container runtime need to use a cgroup driver. It's critical that the kubelet and the container runtime use the same cgroup driver and are configured the same.There are two cgroup drivers available:cgroupfssystemdcgroupfs driverThe cgroupfs driver is the default cgroup driver in the kubelet. When the cgroupfs driver is used, the kubelet and the container runtime directly interface with the cgroup filesystem to configure cgroups.The cgroupfs driver is not recommended when systemd is the init system because systemd expects a single cgroup manager on the system. Additionally, if you use cgroup v2, use the systemd cgroup driver instead of cgroupfs.systemd cgroup driverW


Question: What are the benefits of Container Runtimes?

Answer: Container RuntimesNote: Dockershim has been removed from the Kubernetes project as of release 1.24. Read the Dockershim Removal FAQ for further details.You need to install a container runtime into each node in the cluster so that Pods can run there. This page outlines what is involved and describes related tasks for setting up nodes.Kubernetes 1.34 requires that you use a runtime that conforms with the Container Runtime Interface (CRI).See CRI version support for more information.This page provides an outline of how to use several common container runtimes with Kubernetes.containerdCRI-ODocker EngineMirantis Container RuntimeNote:Kubernetes releases before v1.24 included a direct integration with Docker Engine, using a component named dockershim. That special direct integration is no longer part of Kubernetes (this removal was announced as part of the v1.20 release). You can read Check whether Dockershim removal affects you to understand how this removal might affect you. To learn about migrating from using dockershim, see Migrating from dockershim.If you are running a version of Kubernetes other than v1.34, check the documentation for that version.Install and configure prerequisitesNetwork configurationBy default, the Linux kernel does not allow IPv4 packets to be routed between interfaces. Most Kubernetes cluster networking implementations will change this setting (if needed), but some might expect the administrator to do it for them. (Some might also expect other sysctl parameters to be set, kernel modules to be loaded, etc; consult the documentation for your specific network implementation.)Enable IPv4 packet forwardingTo manually enable IPv4 packet forwarding:# sysctl params required by setup, params persist across reboots cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 EOF # Apply sysctl params without reboot sudo sysctl --system Verify that net.ipv4.ip_forward is set to 1 with:sysctl net.ipv4.ip_forward cgroup driversOn Linux, control groups are used to constrain resources that are allocated to processes.Both the kubelet and the underlying container runtime need to interface with control groups to enforce resource management for pods and containers and set resources such as cpu/memory requests and limits. To interface with control groups, the kubelet and the container runtime need to use a cgroup driver. It's critical that the kubelet and the container runtime use the same cgroup driver and are configured the same.There are two cgroup drivers available:cgroupfssystemdcgroupfs driverThe cgroupfs driver is the default cgroup driver in the kubelet. When the cgroupfs driver is used, the kubelet and the container runtime directly interface with the cgroup filesystem to configure cgroups.The cgroupfs driver is not recommended when systemd is the init system because systemd expects a single cgroup manager on the system. Additionally, if you use cgroup v2, use the systemd cgroup driver instead of cgroupfs.systemd cgroup driverW


Question: What is Container Runtimes?

Answer: Y o u   n e e d   t o   i n s t a l l   a   c o n t a i n e r   r u n t i m e   i n t o   e a c h   n o d e   i n   t h e   c l u s t e r   s o   t h a t   P o d s   c a n   r u n   t h e r e .   T h i s   p a g e   o u t l i n e s   w h a t   i s   i n v o l v e d   a n d   d e s c r i b e s   r e l a t e d   t a s k s   f o r   s e t t i n g   u p   n o d e s .   K u b e r n e t e s   1 . 3 4   r e q u i r e s   t h a t   y o u   u s e   a   r u n t i m e   t h a t   c o n f o r m s   w i t h   t h e   C o n t a i n e r   R u n t i m e   I n t e r f a c e   ( C R I ) .   S e e   C R I   v e r s i o n   s u p p o r t   f o r   m o r e   i n f o r m a t i o n .   T h i s   p a g e   p r o v i d e s   a n   o u t l i n e   o f   h o w   t o   u s e   s e v e r a l   c o m m o n   c o n t a i n e r   r u n t i m e s   w i t h   K u b e r n e t e s .   c o n t a i n e r d C R I - O D o c k e r   E n g i n e M i r a n t i s   C o n t a i n e r   R u n t i m e


Question: What is Note:?

Answer: K u b e r n e t e s   r e l e a s e s   b e f o r e   v 1 . 2 4   i n c l u d e d   a   d i r e c t   i n t e g r a t i o n   w i t h   D o c k e r   E n g i n e ,   u s i n g   a   c o m p o n e n t   n a m e d   d o c k e r s h i m .   T h a t   s p e c i a l   d i r e c t   i n t e g r a t i o n   i s   n o   l o n g e r   p a r t   o f   K u b e r n e t e s   ( t h i s   r e m o v a l   w a s   a n n o u n c e d   a s   p a r t   o f   t h e   v 1 . 2 0   r e l e a s e ) .   Y o u   c a n   r e a d   C h e c k   w h e t h e r   D o c k e r s h i m   r e m o v a l   a f f e c t s   y o u   t o   u n d e r s t a n d   h o w   t h i s   r e m o v a l   m i g h t   a f f e c t   y o u .   T o   l e a r n   a b o u t   m i g r a t i n g   f r o m   u s i n g   d o c k e r s h i m ,   s e e   M i g r a t i n g   f r o m   d o c k e r s h i m .   I f   y o u   a r e   r u n n i n g   a   v e r s i o n   o f   K u b e r n e t e s   o t h e r   t h a n   v 1 . 3 4 ,   c h e c k   t h e   d o c u m e n t a t i o n   f o r   t h a t   v e r s i o n .


Question: What is Network configuration?

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


Question: What is Enable IPv4 packet forwarding?

Answer: T o   m a n u a l l y   e n a b l e   I P v 4   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   / e t c / s y s c t l . d / k 8 s . c o n f   n e t . i p v 4 . i p _ f o r w a r d   =   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   V e r i f y   t h a t   n e t . i p v 4 . i p _ f o r w a r d   i s   s e t   t o   1   w i t h :   s y s c t l   n e t . i p v 4 . i p _ f o r w a r d


Question: What is cgroup drivers?

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


Question: What is cgroupfs driver?

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


Question: What is systemd cgroup driver?

Answer: W h e n   s y s t e m d   i s   c h o s e n   a s   t h e   i n i t   s y s t e m   f o r   a   L i n u x   d i s t r i b u t i o n ,   t h e   i n i t   p r o c e s s   g e n e r a t e s   a n d   c o n s u m e s   a   r o o t   c o n t r o l   g r o u p   ( c g r o u p )   a n d   a c t s   a s   a   c g r o u p   m a n a g e r .   s y s t e m d   h a s   a   t i g h t   i n t e g r a t i o n   w i t h   c g r o u p s   a n d   a l l o c a t e s   a   c g r o u p   p e r   s y s t e m d   u n i t .   A s   a   r e s u l t ,   i f   y o u   u s e   s y s t e m d   a s   t h e   i n i t   s y s t e m   w i t h   t h e   c g r o u p f s   d r i v e r ,   t h e   s y s t e m   g e t s   t w o   d i f f e r e n t   c g r o u p   m a n a g e r s .   T w o   c g r o u p   m a n a g e r s   r e s u l t   i n   t w o   v i e w s   o f   t h e   a v a i l a b l e   a n d   i n - u s e   r e s o u r c e s   i n   t h e   s y s t e m .   I n   s o m e   c a s e s ,   n o d e s   t h a t   a r e   c o n f i g u r e d   t o   u s e   c g r o u p f s   f o r   t h e   k u b e l e t   a n d   c o n t a i n e r   r u n t i m e ,   b u t   u s e   s y s t e m d   f o r   t h e   r e s t   o f   t h e   p r o c e s s e s   b e c o m e   u n s t a b l e   u n d e r   r e s o u r c e   p r e s s u r e .   T h e   a p p r o a c h   t o   m i t i g a t e   t h i s   i n s t a b i l i t y   i s   t o   u s e   s y s t e m d   a s   t h e   c g r o u p   d r i v e r   f o r   t h e   k u b e l e t   a n d   t h e   c o n t a i n e r   r u n t i m e   w h e n   s y s t e m d   i s   t h e   s e l e c t e d   i n i t   s y s t e m .   T o   s e t   s y s t e m d   a s   t h e   c g r o u p   d r i v e r ,   e d i t   t h e   K u b e l e t C o n f i g u r a t i o n   o p t i o n   o f   c g r o u p D r i v e r   a n d   s e t   i t   t o   s y s t e m d .   F o r   e x a m p l e :   a p i V e r s i o n :   k u b e l e t . c o n f i g . k 8 s . i o / v 1 b e t a 1   k i n d :   K u b e l e t


Question: What is Note:?

Answer: I f   y o u   c o n f i g u r e   s y s t e m d   a s   t h e   c g r o u p   d r i v e r   f o r   t h e   k u b e l e t ,   y o u   m u s t   a l s o   c o n f i g u r e   s y s t e m d   a s   t h e   c g r o u p   d r i v e r   f o r   t h e   c o n t a i n e r   r u n t i m e .   R e f e r   t o   t h e   d o c u m e n t a t i o n   f o r   y o u r   c o n t a i n e r   r u n t i m e   f o r   i n s t r u c t i o n s .   F o r   e x a m p l e :   c o n t a i n e r d C R I - O   I n   K u b e r n e t e s   1 . 3 4 ,   w i t h   t h e   K u b e l e t C g r o u p D r i v e r F r o m C R I   f e a t u r e   g a t e   e n a b l e d   a n d   a   c o n t a i n e r   r u n t i m e   t h a t   s u p p o r t s   t h e   R u n t i m e C o n f i g   C R I   R P C ,   t h e   k u b e l e t   a u t o m a t i c a l l y   d e t e c t s   t h e   a p p r o p r i a t e   c g r o u p   d r i v e r   f r o m   t h e   r u n t i m e ,   a n d   i g n o r e s   t h e   c g r o u p D r i v e r   s e t t i n g   w i t h i n   t h e   k u b e l e t   c o n f i g u r a t i o n .   H o w e v e r ,   o l d e r   v e r s i o n s   o f   c o n t a i n e r   r u n t i m e s   ( s p e c i f i c a l l y ,   c o n t a i n e r d   1 . y   a n d   b e l o w )   d o   n o t   s u p p o r t   t h e   R u n t i m e C o n f i g   C R I   R P C ,   a n d   m a y   n o t   r e s p o n d   c o r r e c t l y   t o   t h i s   q u e r y ,   a n d   t h u s   t h e   K u b e l e t   f a l l s   b a c k   t o   u s i n g   t h e   v a l u e   i n   i t s   o w n   - - c g r o u p - d r i v e r   f l a g .   I n   K u b e r n e t e s   1 . 3 6 ,   t h i s   f a l l b a c k   b e h a v i o r   w i l l   b e   d r o p p e d ,   a n d   o l d e r   v e r s i o n s   o f   c o n t a i n e r d   w i l l   f a i l   w i t h   n e w e r   k u b e l e t s .


Question: What is Caution:?

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


Question: What is Migrating to the systemd driver in kubeadm managed clusters?

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


Question: What is CRI version support?

Answer: Y o u r   c o n t a i n e r   r u n t i m e   m u s t   s u p p o r t   a t   l e a s t   v 1 a l p h a 2   o f   t h e   c o n t a i n e r   r u n t i m e   i n t e r f a c e .   K u b e r n e t e s   s t a r t i n g   v 1 . 2 6   o n l y   w o r k s   w i t h   v 1   o f   t h e   C R I   A P I .   E a r l i e r   v e r s i o n s   d e f a u l t   t o   v 1   v e r s i o n ,   h o w e v e r   i f   a   c o n t a i n e r   r u n t i m e   d o e s   n o t   s u p p o r t   t h e   v 1   A P I ,   t h e   k u b e l e t   f a l l s   b a c k   t o   u s i n g   t h e   ( d e p r e c a t e d )   v 1 a l p h a 2   A P I   i n s t e a d .


Question: What is containerd?

Answer: T h i s   s e c t i o n   o u t l i n e s   t h e   n e c e s s a r y   s t e p s   t o   u s e   c o n t a i n e r d   a s   C R I   r u n t i m e .   T o   i n s t a l l   c o n t a i n e r d   o n   y o u r   s y s t e m ,   f o l l o w   t h e   i n s t r u c t i o n s   o n   g e t t i n g   s t a r t e d   w i t h   c o n t a i n e r d .   R e t u r n   t o   t h i s   s t e p   o n c e   y o u ' v e   c r e a t e d   a   v a l i d   c o n f i g . t o m l   c o n f i g u r a t i o n   f i l e .   Y o u   c a n   f i n d   t h i s   f i l e   u n d e r   t h e   p a t h   / e t c / c o n t a i n e r d / c o n f i g . t o m l .   Y o u   c a n   f i n d   t h i s   f i l e   u n d e r   t h e   p a t h   / e t c / c o n t a i n e r d / c o n f i g . t o m l .   Y o u   c a n   f i n d   t h i s   f i l e   u n d e r   t h e   p a t h   C : \ P r o g r a m   F i l e s \ c o n t a i n e r d \ c o n f i g . t o m l .   Y o u   c a n   f i n d   t h i s   f i l e   u n d e r   t h e   p a t h   C : \ P r o g r a m   F i l e s \ c o n t a i n e r d \ c o n f i g . t o m l .   O n   L i n u x   t h e   d e f a u l t   C R I   s o c k e t   f o r   c o n t a i n e r d   i s   / r u n / c o n t a i n e r d / c o n t a i n e r d . s o c k .   O n   W i n d o w s   t h e   d e f a u l t   C R I   e n d p o i n t   i s   n p i p e : / / . / p i p e / c o n t a i n e r d - c o n t a i n e r d .


Question: What is Configuring the systemd cgroup driver?

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


Question: What is Note:?

Answer: I f   y o u   i n s t a l l e d   c o n t a i n e r d   f r o m   a   p a c k a g e   ( f o r   e x a m p l e ,   R P M   o r   . d e b ) ,   y o u   m a y   f i n d   t h a t   t h e   C R I   i n t e g r a t i o n   p l u g i n   i s   d i s a b l e d   b y   d e f a u l t .   Y o u   n e e d   C R I   s u p p o r t   e n a b l e d   t o   u s e   c o n t a i n e r d   w i t h   K u b e r n e t e s .   M a k e   s u r e   t h a t   c r i   i s   n o t   i n c l u d e d   i n   t h e d i s a b l e d _ p l u g i n s   l i s t   w i t h i n   / e t c / c o n t a i n e r d / c o n f i g . t o m l ;   i f   y o u   m a d e   c h a n g e s   t o   t h a t   f i l e ,   a l s o   r e s t a r t   c o n t a i n e r d .   I f   y o u   e x p e r i e n c e   c o n t a i n e r   c r a s h   l o o p s   a f t e r   t h e   i n i t i a l   c l u s t e r   i n s t a l l a t i o n   o r   a f t e r   i n s t a l l i n g   a   C N I ,   t h e   c o n t a i n e r d   c o n f i g u r a t i o n   p r o v i d e d   w i t h   t h e   p a c k a g e   m i g h t   c o n t a i n   i n c o m p a t i b l e   c o n f i g u r a t i o n   p a r a m e t e r s .   C o n s i d e r   r e s e t t i n g   t h e   c o n t a i n e r d   c o n f i g u r a t i o n   w i t h   c o n t a i n e r d   c o n f i g   d e f a u l t   >   / e t c / c o n t a i n e r d / c o n f i g . t o m l   a s   s p e c i f i e d   i n   g e t t i n g - s t a r t e d . m d   a n d   t h e n   s e t   t h e   c o n f i g u r a t i o n   p a r a m e t e r s   s p e c i f i e d   a b o v e   a c c o r d i n g l y .   I f   y o u   a p p l y   t h i s   c h a n g e ,   m a k e   s u r e   t o   r e s t a r t   c o n t a i n e r d :   s u d o   s y s t e m c t l   r e s t a r t   c o n t a i n e r d   W h e n   u s i n g   k u b e a d m ,   m a n u a l l y   c o n f i g u r e   t h e   c g r o u p   d r i v e r   f o r   k u b e l e t .   I n   K u b e r n e t e s   v 1 . 2 8 ,   y o u   c a n   e n a b l e   a u t o m a t i c


Question: What is Overriding the sandbox (pause) image?

Answer: I n   y o u r   c o n t a i n e r d   c o n f i g   y o u   c a n   o v e r w r i t e   t h e   s a n d b o x   i m a g e   b y   s e t t i n g   t h e   f o l l o w i n g   c o n f i g :   [ p l u g i n s . " i o . c o n t a i n e r d . g r p c . v 1 . c r i " ]   s a n d b o x _ i m a g e   =   " r e g i s t r y . k 8 s . i o / p a u s e : 3 . 1 0 "   Y o u   m i g h t   n e e d   t o   r e s t a r t   c o n t a i n e r d   a s   w e l l   o n c e   y o u ' v e   u p d a t e d   t h e   c o n f i g   f i l e :   s y s t e m c t l   r e s t a r t   c o n t a i n e r d .


Question: What is CRI-O?

Answer: T h i s   s e c t i o n   c o n t a i n s   t h e   n e c e s s a r y   s t e p s   t o   i n s t a l l   C R I - O   a s   a   c o n t a i n e r   r u n t i m e .   T o   i n s t a l l   C R I - O ,   f o l l o w   C R I - O   I n s t a l l   I n s t r u c t i o n s .


Question: What is cgroup driver?

Answer: C R I - O   u s e s   t h e   s y s t e m d   c g r o u p   d r i v e r   p e r   d e f a u l t ,   w h i c h   i s   l i k e l y   t o   w o r k   f i n e   f o r   y o u .   T o   s w i t c h   t o   t h e   c g r o u p f s   c g r o u p   d r i v e r ,   e i t h e r   e d i t   / e t c / c r i o / c r i o . c o n f   o r   p l a c e   a   d r o p - i n   c o n f i g u r a t i o n   i n   / e t c / c r i o / c r i o . c o n f . d / 0 2 - c g r o u p - m a n a g e r . c o n f ,   f o r   e x a m p l e :   [ c r i o . r u n t i m e ]   c o n m o n _ c g r o u p   =   " p o d "   c g r o u p _ m a n a g e r   =   " c g r o u p f s "   Y o u   s h o u l d   a l s o   n o t e   t h e   c h a n g e d   c o n m o n _ c g r o u p ,   w h i c h   h a s   t o   b e   s e t   t o   t h e   v a l u e   p o d   w h e n   u s i n g   C R I - O   w i t h   c g r o u p f s .   I t   i s   g e n e r a l l y   n e c e s s a r y   t o   k e e p   t h e   c g r o u p   d r i v e r   c o n f i g u r a t i o n   o f   t h e   k u b e l e t   ( u s u a l l y   d o n e   v i a   k u b e a d m )   a n d   C R I - O   i n   s y n c .   I n   K u b e r n e t e s   v 1 . 2 8 ,   y o u   c a n   e n a b l e   a u t o m a t i c   d e t e c t i o n   o f   t h e   c g r o u p   d r i v e r   a s   a n   a l p h a   f e a t u r e .   S e e   s y s t e m d   c g r o u p   d r i v e r   f o r   m o r e   d e t a i l s .   F o r   C R I - O ,   t h e   C R I   s o c k e t   i s   / v a r / r u n / c r i o / c r i o . s o c k   b y   d e f a u l t .


Question: What is Overriding the sandbox (pause) image?

Answer: I n   y o u r   C R I - O   c o n f i g   y o u   c a n   s e t   t h e   f o l l o w i n g   c o n f i g   v a l u e :   [ c r i o . i m a g e ]   p a u s e _ i m a g e = " r e g i s t r y . k 8 s . i o / p a u s e : 3 . 1 0 "   T h i s   c o n f i g   o p t i o n   s u p p o r t s   l i v e   c o n f i g u r a t i o n   r e l o a d   t o   a p p l y   t h i s   c h a n g e :   s y s t e m c t l   r e l o a d   c r i o   o r   b y   s e n d i n g   S I G H U P   t o   t h e   c r i o   p r o c e s s .


Question: What is Note:?

Answer: O n   e a c h   o f   y o u r   n o d e s ,   i n s t a l l   D o c k e r   f o r   y o u r   L i n u x   d i s t r i b u t i o n   a s   p e r   I n s t a l l   D o c k e r   E n g i n e . I n s t a l l   c r i - d o c k e r d ,   f o l l o w i n g   t h e   d i r e c t i o n s   i n   t h e   i n s t a l l   s e c t i o n   o f   t h e   d o c u m e n t a t i o n .   O n   e a c h   o f   y o u r   n o d e s ,   i n s t a l l   D o c k e r   f o r   y o u r   L i n u x   d i s t r i b u t i o n   a s   p e r   I n s t a l l   D o c k e r   E n g i n e .   I n s t a l l   c r i - d o c k e r d ,   f o l l o w i n g   t h e   d i r e c t i o n s   i n   t h e   i n s t a l l   s e c t i o n   o f   t h e   d o c u m e n t a t i o n .   F o r   c r i - d o c k e r d ,   t h e   C R I   s o c k e t   i s   / r u n / c r i - d o c k e r d . s o c k   b y   d e f a u l t .


Question: What is Mirantis Container Runtime?

Answer: M i r a n t i s   C o n t a i n e r   R u n t i m e   ( M C R )   i s   a   c o m m e r c i a l l y   a v a i l a b l e   c o n t a i n e r   r u n t i m e   t h a t   w a s   f o r m e r l y   k n o w n   a s   D o c k e r   E n t e r p r i s e   E d i t i o n .   Y o u   c a n   u s e   M i r a n t i s   C o n t a i n e r   R u n t i m e   w i t h   K u b e r n e t e s   u s i n g   t h e   o p e n   s o u r c e   c r i - d o c k e r d   c o m p o n e n t ,   i n c l u d e d   w i t h   M C R .   T o   l e a r n   m o r e   a b o u t   h o w   t o   i n s t a l l   M i r a n t i s   C o n t a i n e r   R u n t i m e ,   v i s i t   M C R   D e p l o y m e n t   G u i d e .   C h e c k   t h e   s y s t e m d   u n i t   n a m e d   c r i - d o c k e r . s o c k e t   t o   f i n d   o u t   t h e   p a t h   t o   t h e   C R I   s o c k e t .


Question: What is Overriding the sandbox (pause) image?

Answer: T h e   c r i - d o c k e r d   a d a p t e r   a c c e p t s   a   c o m m a n d   l i n e   a r g u m e n t   f o r   s p e c i f y i n g   w h i c h   c o n t a i n e r   i m a g e   t o   u s e   a s   t h e   P o d   i n f r a s t r u c t u r e   c o n t a i n e r   ( “ p a u s e   i m a g e ” ) .   T h e   c o m m a n d   l i n e   a r g u m e n t   t o   u s e   i s   - - p o d - i n f r a - c o n t a i n e r - i m a g e .


Question: What is What's next?

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


Question: What is Command line tool (kubectl)?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Command line tool (kubectl)1: Introduction to kubectl2: kubectl Quick Reference3: kubectl reference3.1: kubectl3.2: kubectl annotate3.3: kubectl api-resources3.4: kubectl api-versions3.5: kubectl apply3.5.1: kubectl apply edit-last-applied3.5.2: kubectl apply set-last-applied3.5.3: kubectl apply view-last-applied3.6: kubectl attach3.7: kubectl auth3.7.1: kubectl auth can-i3.7.2: kubectl auth reconcile3.7.3: kubectl auth whoami3.8: kubectl autoscale3.9: kubectl certificate3.9.1: kubectl certificate approve3.9.2: kubectl certificate deny3.10: kubectl cluster-info3.10.1: kubectl cluster-info dump3.11: kubectl completion3.12: kubectl config3.12.1: kubectl config current-context3.12.2: kubectl config delete-cluster3.12.3: kubectl config delete-context3.12.4: kubectl config delete-user3.12.5: kubectl config get-clusters3.12.6: kubectl config get-contexts3.12.7: kubectl config get-users3.12.8: kubectl config rename-context3.12.9: kubectl config set3.12.10: kubectl config set-cluster3.12.11: kubectl config set-context3.12.12: kubectl config set-credentials3.12.13: kubectl config unset3.12.14: kubectl config use-context3.12.15: kubectl config view3.13: kubectl cordon3.14: kubectl cp3.15: kubectl create3.15.1: kubectl create clusterrole3.15.2: kubectl create clusterrolebinding3.15.3: kubectl create configmap3.15.4: kubectl create cronjob3.15.5: kubectl create deployment3.15.6: kubectl create ingress3.15.7: kubectl create job3.15.8: kubectl create namespace3.15.9: kubectl create poddisruptionbudget3.15.10: kubectl create priorityclass3.15.11: kubectl create quota3.15.12: kubectl create role3.15.13: kubectl create rolebinding3.15.14: kubectl create secret3.15.15: kubectl create secret docker-registry3.15.16: kubectl create secret generic3.15.17: kubectl create secret tls3.15.18: kubectl create service3.15.19: kubectl create service clusterip3.15.20: kubectl create service externalname3.15.21: kubectl create service loadbalancer3.15.22: kubectl create service nodeport3.15.23: kubectl create serviceaccount3.15.24: kubectl create token3.16: kubectl debug3.17: kubectl delete3.18: kubectl describe3.19: kubectl diff3.20: kubectl drain3.21: kubectl edit3.22: kubectl events3.23: kubectl exec3.24: kubectl explain3.25: kubectl expose3.26: kubectl get3.27: kubectl kustomize3.28: kubectl label3.29: kubectl logs3.30: kubectl options3.31: kubectl patch3.32: kubectl plugin3.32.1: kubectl plugin list3.33: kubectl port-forward3.34: kubectl proxy3.35: kubectl replace3.36: kubectl rollout3.36.1: kubectl rollout history3.36.2: kubectl rollout pause3.36.3: kubectl rollout restart3.36.4: kubectl rollout resume3.36.5: kubectl rollout status3.36.6: kubectl rollout undo3.37: kubectl run3.38: kubectl scale3.39: kubectl set3.39.1: kubectl set env3.39.2: kubectl set image3.39.3: kubectl set resources3.39.4: kubectl set selector3.39.5: kubectl set serviceaccount3.39.6: kube


Question: How does Command line tool (kubectl) work?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Command line tool (kubectl)1: Introduction to kubectl2: kubectl Quick Reference3: kubectl reference3.1: kubectl3.2: kubectl annotate3.3: kubectl api-resources3.4: kubectl api-versions3.5: kubectl apply3.5.1: kubectl apply edit-last-applied3.5.2: kubectl apply set-last-applied3.5.3: kubectl apply view-last-applied3.6: kubectl attach3.7: kubectl auth3.7.1: kubectl auth can-i3.7.2: kubectl auth reconcile3.7.3: kubectl auth whoami3.8: kubectl autoscale3.9: kubectl certificate3.9.1: kubectl certificate approve3.9.2: kubectl certificate deny3.10: kubectl cluster-info3.10.1: kubectl cluster-info dump3.11: kubectl completion3.12: kubectl config3.12.1: kubectl config current-context3.12.2: kubectl config delete-cluster3.12.3: kubectl config delete-context3.12.4: kubectl config delete-user3.12.5: kubectl config get-clusters3.12.6: kubectl config get-contexts3.12.7: kubectl config get-users3.12.8: kubectl config rename-context3.12.9: kubectl config set3.12.10: kubectl config set-cluster3.12.11: kubectl config set-context3.12.12: kubectl config set-credentials3.12.13: kubectl config unset3.12.14: kubectl config use-context3.12.15: kubectl config view3.13: kubectl cordon3.14: kubectl cp3.15: kubectl create3.15.1: kubectl create clusterrole3.15.2: kubectl create clusterrolebinding3.15.3: kubectl create configmap3.15.4: kubectl create cronjob3.15.5: kubectl create deployment3.15.6: kubectl create ingress3.15.7: kubectl create job3.15.8: kubectl create namespace3.15.9: kubectl create poddisruptionbudget3.15.10: kubectl create priorityclass3.15.11: kubectl create quota3.15.12: kubectl create role3.15.13: kubectl create rolebinding3.15.14: kubectl create secret3.15.15: kubectl create secret docker-registry3.15.16: kubectl create secret generic3.15.17: kubectl create secret tls3.15.18: kubectl create service3.15.19: kubectl create service clusterip3.15.20: kubectl create service externalname3.15.21: kubectl create service loadbalancer3.15.22: kubectl create service nodeport3.15.23: kubectl create serviceaccount3.15.24: kubectl create token3.16: kubectl debug3.17: kubectl delete3.18: kubectl describe3.19: kubectl diff3.20: kubectl drain3.21: kubectl edit3.22: kubectl events3.23: kubectl exec3.24: kubectl explain3.25: kubectl expose3.26: kubectl get3.27: kubectl kustomize3.28: kubectl label3.29: kubectl logs3.30: kubectl options3.31: kubectl patch3.32: kubectl plugin3.32.1: kubectl plugin list3.33: kubectl port-forward3.34: kubectl proxy3.35: kubectl replace3.36: kubectl rollout3.36.1: kubectl rollout history3.36.2: kubectl rollout pause3.36.3: kubectl rollout restart3.36.4: kubectl rollout resume3.36.5: kubectl rollout status3.36.6: kubectl rollout undo3.37: kubectl run3.38: kubectl scale3.39: kubectl set3.39.1: kubectl set env3.39.2: kubectl set image3.39.3: kubectl set resources3.39.4: kubectl set selector3.39.5: kubectl set serviceaccount3.39.6: kube


Question: When would you use Command line tool (kubectl)?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Command line tool (kubectl)1: Introduction to kubectl2: kubectl Quick Reference3: kubectl reference3.1: kubectl3.2: kubectl annotate3.3: kubectl api-resources3.4: kubectl api-versions3.5: kubectl apply3.5.1: kubectl apply edit-last-applied3.5.2: kubectl apply set-last-applied3.5.3: kubectl apply view-last-applied3.6: kubectl attach3.7: kubectl auth3.7.1: kubectl auth can-i3.7.2: kubectl auth reconcile3.7.3: kubectl auth whoami3.8: kubectl autoscale3.9: kubectl certificate3.9.1: kubectl certificate approve3.9.2: kubectl certificate deny3.10: kubectl cluster-info3.10.1: kubectl cluster-info dump3.11: kubectl completion3.12: kubectl config3.12.1: kubectl config current-context3.12.2: kubectl config delete-cluster3.12.3: kubectl config delete-context3.12.4: kubectl config delete-user3.12.5: kubectl config get-clusters3.12.6: kubectl config get-contexts3.12.7: kubectl config get-users3.12.8: kubectl config rename-context3.12.9: kubectl config set3.12.10: kubectl config set-cluster3.12.11: kubectl config set-context3.12.12: kubectl config set-credentials3.12.13: kubectl config unset3.12.14: kubectl config use-context3.12.15: kubectl config view3.13: kubectl cordon3.14: kubectl cp3.15: kubectl create3.15.1: kubectl create clusterrole3.15.2: kubectl create clusterrolebinding3.15.3: kubectl create configmap3.15.4: kubectl create cronjob3.15.5: kubectl create deployment3.15.6: kubectl create ingress3.15.7: kubectl create job3.15.8: kubectl create namespace3.15.9: kubectl create poddisruptionbudget3.15.10: kubectl create priorityclass3.15.11: kubectl create quota3.15.12: kubectl create role3.15.13: kubectl create rolebinding3.15.14: kubectl create secret3.15.15: kubectl create secret docker-registry3.15.16: kubectl create secret generic3.15.17: kubectl create secret tls3.15.18: kubectl create service3.15.19: kubectl create service clusterip3.15.20: kubectl create service externalname3.15.21: kubectl create service loadbalancer3.15.22: kubectl create service nodeport3.15.23: kubectl create serviceaccount3.15.24: kubectl create token3.16: kubectl debug3.17: kubectl delete3.18: kubectl describe3.19: kubectl diff3.20: kubectl drain3.21: kubectl edit3.22: kubectl events3.23: kubectl exec3.24: kubectl explain3.25: kubectl expose3.26: kubectl get3.27: kubectl kustomize3.28: kubectl label3.29: kubectl logs3.30: kubectl options3.31: kubectl patch3.32: kubectl plugin3.32.1: kubectl plugin list3.33: kubectl port-forward3.34: kubectl proxy3.35: kubectl replace3.36: kubectl rollout3.36.1: kubectl rollout history3.36.2: kubectl rollout pause3.36.3: kubectl rollout restart3.36.4: kubectl rollout resume3.36.5: kubectl rollout status3.36.6: kubectl rollout undo3.37: kubectl run3.38: kubectl scale3.39: kubectl set3.39.1: kubectl set env3.39.2: kubectl set image3.39.3: kubectl set resources3.39.4: kubectl set selector3.39.5: kubectl set serviceaccount3.39.6: kube


Question: What are the benefits of Command line tool (kubectl)?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Command line tool (kubectl)1: Introduction to kubectl2: kubectl Quick Reference3: kubectl reference3.1: kubectl3.2: kubectl annotate3.3: kubectl api-resources3.4: kubectl api-versions3.5: kubectl apply3.5.1: kubectl apply edit-last-applied3.5.2: kubectl apply set-last-applied3.5.3: kubectl apply view-last-applied3.6: kubectl attach3.7: kubectl auth3.7.1: kubectl auth can-i3.7.2: kubectl auth reconcile3.7.3: kubectl auth whoami3.8: kubectl autoscale3.9: kubectl certificate3.9.1: kubectl certificate approve3.9.2: kubectl certificate deny3.10: kubectl cluster-info3.10.1: kubectl cluster-info dump3.11: kubectl completion3.12: kubectl config3.12.1: kubectl config current-context3.12.2: kubectl config delete-cluster3.12.3: kubectl config delete-context3.12.4: kubectl config delete-user3.12.5: kubectl config get-clusters3.12.6: kubectl config get-contexts3.12.7: kubectl config get-users3.12.8: kubectl config rename-context3.12.9: kubectl config set3.12.10: kubectl config set-cluster3.12.11: kubectl config set-context3.12.12: kubectl config set-credentials3.12.13: kubectl config unset3.12.14: kubectl config use-context3.12.15: kubectl config view3.13: kubectl cordon3.14: kubectl cp3.15: kubectl create3.15.1: kubectl create clusterrole3.15.2: kubectl create clusterrolebinding3.15.3: kubectl create configmap3.15.4: kubectl create cronjob3.15.5: kubectl create deployment3.15.6: kubectl create ingress3.15.7: kubectl create job3.15.8: kubectl create namespace3.15.9: kubectl create poddisruptionbudget3.15.10: kubectl create priorityclass3.15.11: kubectl create quota3.15.12: kubectl create role3.15.13: kubectl create rolebinding3.15.14: kubectl create secret3.15.15: kubectl create secret docker-registry3.15.16: kubectl create secret generic3.15.17: kubectl create secret tls3.15.18: kubectl create service3.15.19: kubectl create service clusterip3.15.20: kubectl create service externalname3.15.21: kubectl create service loadbalancer3.15.22: kubectl create service nodeport3.15.23: kubectl create serviceaccount3.15.24: kubectl create token3.16: kubectl debug3.17: kubectl delete3.18: kubectl describe3.19: kubectl diff3.20: kubectl drain3.21: kubectl edit3.22: kubectl events3.23: kubectl exec3.24: kubectl explain3.25: kubectl expose3.26: kubectl get3.27: kubectl kustomize3.28: kubectl label3.29: kubectl logs3.30: kubectl options3.31: kubectl patch3.32: kubectl plugin3.32.1: kubectl plugin list3.33: kubectl port-forward3.34: kubectl proxy3.35: kubectl replace3.36: kubectl rollout3.36.1: kubectl rollout history3.36.2: kubectl rollout pause3.36.3: kubectl rollout restart3.36.4: kubectl rollout resume3.36.5: kubectl rollout status3.36.6: kubectl rollout undo3.37: kubectl run3.38: kubectl scale3.39: kubectl set3.39.1: kubectl set env3.39.2: kubectl set image3.39.3: kubectl set resources3.39.4: kubectl set selector3.39.5: kubectl set serviceaccount3.39.6: kube


Question: What is Command line tool (kubectl)?

Answer: 1 :   I n t r o d u c t i o n   t o   k u b e c t l 2 :   k u b e c t l   Q u i c k   R e f e r e n c e 3 :   k u b e c t l   r e f e r e n c e 3 . 1 :   k u b e c t l 3 . 2 :   k u b e c t l   a n n o t a t e 3 . 3 :   k u b e c t l   a p i - r e s o u r c e s 3 . 4 :   k u b e c t l   a p i - v e r s i o n s 3 . 5 :   k u b e c t l   a p p l y 3 . 5 . 1 :   k u b e c t l   a p p l y   e d i t - l a s t - a p p l i e d 3 . 5 . 2 :   k u b e c t l   a p p l y   s e t - l a s t - a p p l i e d 3 . 5 . 3 :   k u b e c t l   a p p l y   v i e w - l a s t - a p p l i e d 3 . 6 :   k u b e c t l   a t t a c h 3 . 7 :   k u b e c t l   a u t h 3 . 7 . 1 :   k u b e c t l   a u t h   c a n - i 3 . 7 . 2 :   k u b e c t l   a u t h   r e c o n c i l e 3 . 7 . 3 :   k u b e c t l   a u t h   w h o a m i 3 . 8 :   k u b e c t l   a u t o s c a l e 3 . 9 :   k u b e c t l   c e r t i f i c a t e 3 . 9 . 1 :   k u b e c t l   c e r t i f i c a t e   a p p r o v e 3 . 9 . 2 :   k u b e c t l   c e r t i f i c a t e   d e n y 3 . 1 0 :   k u b e c t l   c l u s t e r - i n f o 3 . 1 0 . 1 :   k u b e c t l   c l u s t e r - i n f o   d u m p 3 . 1 1 :   k u b e c t l   c o m p l e t i o n 3 . 1 2 :   k u b e c t l   c o n f i g 3 . 1 2 . 1 :   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 3 . 1 2 . 2 :   k u b e c t l   c o n f i g   d e l e t e - c l u s t e r 3 . 1 2 . 3 :   k u b e c t l   c o n f i g   d e l e t e - c o n t e x t 3 . 1 2 . 4 :   k u b e c t l   c o n f i g   d e l e t e - u s e r 3 . 1 2 . 5 :   k u b e c t l   c o n f i g   g e t - c l u s t e r s 3 . 1 2 . 6 :   k u b e c t l   c o n f i g   g e t - c o n t e x t s 3 . 1 2 . 7 :   k u b e c t l   c o n f i g   g e t - u s e r s 3 . 1 2 . 8 :   k u b e c t l   c o n f i g   r e n a m e - c o n t e x t 3 . 1 2 . 9 :   k u b e c t l   c o n f i g   s e t 3 . 1 2 . 1 0 :   k u b e c t l   c o n f i g   s e t - c l u s t e r 3 . 1 2 . 1 1 :   k u b e c t l   c o n f i g   s e t - c o n t e x t 3 .


Question: What is Syntax?

Answer: U s e   t h e   f o l l o w i n g   s y n t a x   t o   r u n   k u b e c t l   c o m m a n d s   f r o m   y o u r   t e r m i n a l   w i n d o w :   k u b e c t l   [ c o m m a n d ]   [ T Y P E ]   [ N A M E ]   [ f l a g s ]   w h e r e   c o m m a n d ,   T Y P E ,   N A M E ,   a n d   f l a g s   a r e :   c o m m a n d :   S p e c i f i e s   t h e   o p e r a t i o n   t h a t   y o u   w a n t   t o   p e r f o r m   o n   o n e   o r   m o r e   r e s o u r c e s ,   f o r   e x a m p l e   c r e a t e ,   g e t ,   d e s c r i b e ,   d e l e t e . T Y P E :   S p e c i f i e s   t h e   r e s o u r c e   t y p e .   R e s o u r c e   t y p e s   a r e   c a s e - i n s e n s i t i v e   a n d   y o u   c a n   s p e c i f y   t h e   s i n g u l a r ,   p l u r a l ,   o r   a b b r e v i a t e d   f o r m s .   F o r   e x a m p l e ,   t h e   f o l l o w i n g   c o m m a n d s   p r o d u c e   t h e   s a m e   o u t p u t : k u b e c t l   g e t   p o d   p o d 1   k u b e c t l   g e t   p o d s   p o d 1   k u b e c t l   g e t   p o   p o d 1   N A M E :   S p e c i f i e s   t h e   n a m e   o f   t h e   r e s o u r c e .   N a m e s   a r e   c a s e - s e n s i t i v e .   I f   t h e   n a m e   i s   o m i t t e d ,   d e t a i l s   f o r   a l l   r e s o u r c e s   a r e   d i s p l a y e d ,   f o r   e x a m p l e   k u b e c t l   g e t   p o d s . W h e n   p e r f o r m i n g   a n   o p e r a t i o n   o n   m u l t i p l e   r e s o u r c e s ,   y o u   c a n   s p e c i f y   e a c h   r e s o u r c e   b y   t y p e   a n d   n a m e   o r   s p e c i f y   o n e   o r   m o r e   f i l e s : T o   s p e c i f y   r e s o u r c e s   b y   t y p e   a n d   n a m e : T o   g r o u p   r e s o u r c e s   i f   t h e y   a r e   a l l   t h e   s a m e   t y p e :   T Y P E 1   n a m e 1   n a m e 2   n a m e < # > . E x a m p l e :   k u b e c t l   g e t   p o d   e x a m p l e - p o d 1   e x a m p l e - p o d 2 T o   s


Question: What is Caution:?

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


Question: What is In-cluster authentication and namespace overrides?

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


Question: What is Operations?

Answer: T h e   f o l l o w i n g   t a b l e   i n c l u d e s   s h o r t   d e s c r i p t i o n s   a n d   t h e   g e n e r a l   s y n t a x   f o r   a l l   o f   t h e   k u b e c t l   o p e r a t i o n s :   T o   l e a r n   m o r e   a b o u t   c o m m a n d   o p e r a t i o n s ,   s e e   t h e   k u b e c t l   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 Resource types?

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


Question: What is Output options?

Answer: U s e   t h e   f o l l o w i n g   s e c t i o n s   f o r   i n f o r m a t i o n   a b o u t   h o w   y o u   c a n   f o r m a t   o r   s o r t   t h e   o u t p u t   o f   c e r t a i n   c o m m a n d s .   F o r   d e t a i l s   a b o u t   w h i c h   c o m m a n d s   s u p p o r t   t h e   v a r i o u s   o u t p u t   o p t i o n s ,   s e e   t h e   k u b e c t l   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 Formatting output?

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


Question: What is Syntax?

Answer: k u b e c t l   [ c o m m a n d ]   [ T Y P E ]   [ N A M E ]   - o   < o u t p u t _ f o r m a t >   D e p e n d i n g   o n   t h e   k u b e c t l   o p e r a t i o n ,   t h e   f o l l o w i n g   o u t p u t   f o r m a t s   a r e   s u p p o r t e d :


Question: What is Example?

Answer: I n   t h i s   e x a m p l e ,   t h e   f o l l o w i n g   c o m m a n d   o u t p u t s   t h e   d e t a i l s   f o r   a   s i n g l e   p o d   a s   a   Y A M L   f o r m a t t e d   o b j e c t :   k u b e c t l   g e t   p o d   w e b - p o d - 1 3 j e 7   - o   y a m l   R e m e m b e r :   S e e   t h e   k u b e c t l   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   d e t a i l s   a b o u t   w h i c h   o u t p u t   f o r m a t   i s   s u p p o r t e d   b y   e a c h   c o m m a n d .


Question: What is Custom columns?

Answer: T o   d e f i n e   c u s t o m   c o l u m n s   a n d   o u t p u t   o n l y   t h e   d e t a i l s   t h a t   y o u   w a n t   i n t o   a   t a b l e ,   y o u   c a n   u s e   t h e   c u s t o m - c o l u m n s   o p t i o n .   Y o u   c a n   c h o o s e   t o   d e f i n e   t h e   c u s t o m   c o l u m n s   i n l i n e   o r   u s e   a   t e m p l a t e   f i l e :   - o   c u s t o m - c o l u m n s = < s p e c >   o r   - o   c u s t o m - c o l u m n s - f i l e = < f i l e n a m e > .


Question: What is Examples?

Answer: I n l i n e :   k u b e c t l   g e t   p o d s   < p o d - n a m e >   - o   c u s t o m - c o l u m n s = N A M E : . m e t a d a t a . n a m e , R S R C : . m e t a d a t a . r e s o u r c e V e r s i o n   T e m p l a t e   f i l e :   k u b e c t l   g e t   p o d s   < p o d - n a m e >   - o   c u s t o m - c o l u m n s - f i l e = t e m p l a t e . t x t   w h e r e   t h e   t e m p l a t e . t x t   f i l e   c o n t a i n s :   N A M E   R S R C   m e t a d a t a . n a m e   m e t a d a t a . r e s o u r c e V e r s i o n   T h e   r e s u l t   o f   r u n n i n g   e i t h e r   c o m m a n d   i s   s i m i l a r   t o :   N A M E   R S R C   s u b m i t - q u e u e   6 1 0 9 9 5


Question: What is Server-side columns?

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


Question: What is Examples?

Answer: T o   p r i n t   i n f o r m a t i o n   a b o u t   t h e   s t a t u s   o f   a   p o d ,   u s e   a   c o m m a n d   l i k e   t h e   f o l l o w i n g :   k u b e c t l   g e t   p o d s   < p o d - n a m e >   - - s e r v e r - p r i n t = f a l s e   T h e   o u t p u t   i s   s i m i l a r   t o :   N A M E   A G E   p o d - n a m e   1 m


Question: What is Sorting list objects?

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


Question: What is Syntax?

Answer: k u b e c t l   [ c o m m a n d ]   [ T Y P E ]   [ N A M E ]   - - s o r t - b y = < j s o n p a t h _ e x p >


Question: What is Example?

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


Question: What is Examples: Common operations?

Answer: U s e   t h e   f o l l o w i n g   s e t   o f   e x a m p l e s   t o   h e l p   y o u   f a m i l i a r i z e   y o u r s e l f   w i t h   r u n n i n g   t h e   c o m m o n l y   u s e d   k u b e c t l   o p e r a t i o n s :   k u b e c t l   a p p l y   -   A p p l y   o r   U p d a t e   a   r e s o u r c e   f r o m   a   f i l e   o r   s t d i n .   #   C r e a t e   a   s e r v i c e   u s i n g   t h e   d e f i n i t i o n   i n   e x a m p l e - s e r v i c e . y a m l .   k u b e c t l   a p p l y   - f   e x a m p l e - s e r v i c e . y a m l   #   C r e a t e   a   r e p l i c a t i o n   c o n t r o l l e r   u s i n g   t h e   d e f i n i t i o n   i n   e x a m p l e - c o n t r o l l e r . y a m l .   k u b e c t l   a p p l y   - f   e x a m p l e - c o n t r o l l e r . y a m l   #   C r e a t e   t h e   o b j e c t s   t h a t   a r e   d e f i n e d   i n   a n y   . y a m l ,   . y m l ,   o r   . j s o n   f i l e   w i t h i n   t h e   < d i r e c t o r y >   d i r e c t o r y .   k u b e c t l   a p p l y   - f   < d i r e c t o r y >   k u b e c t l   g e t   -   L i s t   o n e   o r   m o r e   r e s o u r c e s .   #   L i s t   a l l   p o d s   i n   p l a i n - t e x t   o u t p u t   f o r m a t .   k u b e c t l   g e t   p o d s   #   L i s t   a l l   p o d s   i n   p l a i n - t e x t   o u t p u t   f o r m a t   a n d   i n c l u d e   a d d i t i o n a l   i n f o r m a t i o n   ( s u c h   a s   n o d e   n a m e ) .   k u b e c t l   g e t   p o d s   - o   w i d e   #   L i s t   t h e   r e p l i c a t i o n   c o n t r o l l e r   w i t h   t h e   s p e c i f i e d   n a m e   i n   p l a i n - t e x t   o u t p u t   f o r m a t .   T i p :   Y o u   c a n   s h o r t e n   a n d   r e p l a c e   t h e   ' r e p l i c a t i o n c o n t r o l l e r '   r e s o u r c e   t y p e   w i t h   t h e   a l i a s   ' r c ' .   k u b e c t l   g e t   r e p l i c a t i o n c o n t r o l l e r   < r c - n a m e >


Question: What is Note:?

Answer: k u b e c t l   d e l e t e   -   D e l e t e   r e s o u r c e s   e i t h e r   f r o m   a   f i l e ,   s t d i n ,   o r   s p e c i f y i n g   l a b e l   s e l e c t o r s ,   n a m e s ,   r e s o u r c e   s e l e c t o r s ,   o r   r e s o u r c e s .   #   D e l e t e   a   p o d   u s i n g   t h e   t y p e   a n d   n a m e   s p e c i f i e d   i n   t h e   p o d . y a m l   f i l e .   k u b e c t l   d e l e t e   - f   p o d . y a m l   #   D e l e t e   a l l   t h e   p o d s   a n d   s e r v i c e s   t h a t   h a v e   t h e   l a b e l   ' < l a b e l - k e y > = < l a b e l - v a l u e > ' .   k u b e c t l   d e l e t e   p o d s , s e r v i c e s   - l   < l a b e l - k e y > = < l a b e l - v a l u e >   #   D e l e t e   a l l   p o d s ,   i n c l u d i n g   u n i n i t i a l i z e d   o n e s .   k u b e c t l   d e l e t e   p o d s   - - a l l   k u b e c t l   e x e c   -   E x e c u t e   a   c o m m a n d   a g a i n s t   a   c o n t a i n e r   i n   a   p o d .   #   G e t   o u t p u t   f r o m   r u n n i n g   ' d a t e '   f r o m   p o d   < p o d - n a m e > .   B y   d e f a u l t ,   o u t p u t   i s   f r o m   t h e   f i r s t   c o n t a i n e r .   k u b e c t l   e x e c   < p o d - n a m e >   - -   d a t e   #   G e t   o u t p u t   f r o m   r u n n i n g   ' d a t e '   i n   c o n t a i n e r   < c o n t a i n e r - n a m e >   o f   p o d   < p o d - n a m e > .   k u b e c t l   e x e c   < p o d - n a m e >   - c   < c o n t a i n e r - n a m e >   - -   d a t e   #   G e t   a n   i n t e r a c t i v e   T T Y   a n d   r u n   / b i n / b a s h   f r o m   p o d   < p o d - n a m e > .   B y   d e f a u l t ,   o u t p u t   i s   f r o m   t h e   f i r s t   c o n t a i n e r .   k u b e c t l   e x e c   - t i   < p o d - n a m e >   - -   / b i n / b a s h   k u b e c t l   l o g s   -   P r i n t   t h e   l o g s   f o r   a   c o n t a i n e r   i n   a   p o d .   #   R e t u r n   a   s


Question: What is Examples: Creating and using plugins?

Answer: U s e   t h e   f o l l o w i n g   s e t   o f   e x a m p l e s   t o   h e l p   y o u   f a m i l i a r i z e   y o u r s e l f   w i t h   w r i t i n g   a n d   u s i n g   k u b e c t l   p l u g i n s :   #   c r e a t e   a   s i m p l e   p l u g i n   i n   a n y   l a n g u a g e   a n d   n a m e   t h e   r e s u l t i n g   e x e c u t a b l e   f i l e   #   s o   t h a t   i t   b e g i n s   w i t h   t h e   p r e f i x   " k u b e c t l - "   c a t   . / k u b e c t l - h e l l o   # ! / b i n / s h   #   t h i s   p l u g i n   p r i n t s   t h e   w o r d s   " h e l l o   w o r l d "   e c h o   " h e l l o   w o r l d "   W i t h   a   p l u g i n   w r i t t e n ,   l e t ' s   m a k e   i t   e x e c u t a b l e :   c h m o d   a + x   . / k u b e c t l - h e l l o   #   a n d   m o v e   i t   t o   a   l o c a t i o n   i n   o u r   P A T H   s u d o   m v   . / k u b e c t l - h e l l o   / u s r / l o c a l / b i n   s u d o   c h o w n   r o o t : r o o t   / u s r / l o c a l / b i n   #   Y o u   h a v e   n o w   c r e a t e d   a n d   " i n s t a l l e d "   a   k u b e c t l   p l u g i n .   #   Y o u   c a n   b e g i n   u s i n g   t h i s   p l u g i n   b y   i n v o k i n g   i t   f r o m   k u b e c t l   a s   i f   i t   w e r e   a   r e g u l a r   c o m m a n d   k u b e c t l   h e l l o   h e l l o   w o r l d   #   Y o u   c a n   " u n i n s t a l l "   a   p l u g i n ,   b y   r e m o v i n g   i t   f r o m   t h e   f o l d e r   i n   y o u r   #   $ P A T H   w h e r e   y o u   p l a c e d   i t   s u d o   r m   / u s r / l o c a l / b i n / k u b e c t l - h e l l o   I n   o r d e r   t o   v i e w   a l l   o f   t h e   p l u g i n s   t h a t   a r e   a v a i l a b l e   t o   k u b e c t l ,   u s e   t h e   k u b e c t l   p l u g i n   l i s t   s u b c o m m a n d :   k u b e c t l   p l u g i n   l i s t   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   k u


Question: What is What's next?

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


Question: What is 1 - Introduction to kubectl?

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


Question: What is Command Families?

Answer: M o s t   k u b e c t l   c o m m a n d s   t y p i c a l l y   f a l l   i n t o   o n e   o f   a   f e w   c a t e g o r i e s :


Question: What is Declarative Application Management?

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


Question: What is Printing State about Workloads?

Answer: U s e r s   w i l l   n e e d   t o   v i e w   w o r k l o a d   s t a t e .   P r i n t i n g   s u m m a r i z e   s t a t e   a n d   i n f o r m a t i o n   a b o u t   r e s o u r c e s P r i n t i n g   c o m p l e t e   s t a t e   a n d   i n f o r m a t i o n   a b o u t   r e s o u r c e s P r i n t i n g   s p e c i f i c   f i e l d s   f r o m   r e s o u r c e s Q u e r y   r e s o u r c e s   m a t c h i n g   l a b e l s


Question: What is Debugging Workloads?

Answer: k u b e c t l   s u p p o r t s   d e b u g g i n g   b y   p r o v i d i n g   c o m m a n d s   f o r :   P r i n t i n g   C o n t a i n e r   l o g s P r i n t i n g   c l u s t e r   e v e n t s E x e c   o r   a t t a c h i n g   t o   a   C o n t a i n e r C o p y i n g   f i l e s   f r o m   C o n t a i n e r s   i n   t h e   c l u s t e r   t o   a   u s e r ' s   f i l e s y s t e m


Question: What is Cluster Management?

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


Question: What is Porcelain?

Answer: U s e r s   m a y   f i n d   u s i n g   r e s o u r c e   c o n f i g u r a t i o n   o v e r l y   v e r b o s e   f o r   d e v e l o p m e n t   a n d   p r e f e r   t o   w o r k   w i t h   t h e   c l u s t e r   i m p e r a t i v e l y   w i t h   a   s h e l l - l i k e   w o r k f l o w .   k u b e c t l   o f f e r s   p o r c e l a i n   c o m m a n d s   f o r   g e n e r a t i n g   a n d   m o d i f y i n g   r e s o u r c e s .   G e n e r a t i n g   +   c r e a t i n g   r e s o u r c e s   s u c h   a s   D e p l o y m e n t s ,   S t a t e f u l S e t s ,   S e r v i c e s ,   C o n f i g M a p s ,   e t c . S e t t i n g   f i e l d s   o n   r e s o u r c e s E d i t i n g   ( l i v e )   r e s o u r c e s   i n   a   t e x t   e d i t o r


Question: What is 2 - kubectl Quick Reference?

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


Question: What is BASH?

Answer: s o u r c e   < ( k u b e c t l   c o m p l e t i o n   b a s h )   #   s e t   u p   a u t o c o m p l e t e   i n   b a s h   i n t o   t h e   c u r r e n t   s h e l l ,   b a s h - c o m p l e t i o n   p a c k a g e   s h o u l d   b e   i n s t a l l e d   f i r s t .   e c h o   " s o u r c e   < ( k u b e c t l   c o m p l e t i o n   b a s h ) "   > >   ~ / . b a s h r c   #   a d d   a u t o c o m p l e t e   p e r m a n e n t l y   t o   y o u r   b a s h   s h e l l .   Y o u   c a n   a l s o   u s e   a   s h o r t h a n d   a l i a s   f o r   k u b e c t l   t h a t   a l s o   w o r k s   w i t h   c o m p l e t i o n :   a l i a s   k = k u b e c t l   c o m p l e t e   - o   d e f a u l t   - F   _ _ s t a r t _ k u b e c t l   k


Question: What is ZSH?

Answer: s o u r c e   < ( k u b e c t l   c o m p l e t i o n   z s h )   #   s e t   u p   a u t o c o m p l e t e   i n   z s h   i n t o   t h e   c u r r e n t   s h e l l   e c h o   ' [ [   $ c o m m a n d s [ k u b e c t l ]   ] ]   & &   s o u r c e   < ( k u b e c t l   c o m p l e t i o n   z s h ) '   > >   ~ / . z s h r c   #   a d d   a u t o c o m p l e t e   p e r m a n e n t l y   t o   y o u r   z s h   s h e l l


Question: What is Note:?

Answer: e c h o   ' k u b e c t l   c o m p l e t i o n   f i s h   |   s o u r c e '   >   ~ / . c o n f i g / f i s h / c o m p l e t i o n s / k u b e c t l . f i s h   & &   s o u r c e   ~ / . c o n f i g / f i s h / c o m p l e t i o n s / k u b e c t l . f i s h


Question: What is A note on --all-namespaces?

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


Question: What is Kubectl context and configuration?

Answer: S e t   w h i c h   K u b e r n e t e s   c l u s t e r   k u b e c t l   c o m m u n i c a t e s   w i t h   a n d   m o d i f i e s   c o n f i g u r a t i o n   i n f o r m a t i o n .   S e e   A u t h e n t i c a t i n g   A c r o s s   C l u s t e r s   w i t h   k u b e c o n f i g   d o c u m e n t a t i o n   f o r   d e t a i l e d   c o n f i g   f i l e   i n f o r m a t i o n .   k u b e c t l   c o n f i g   v i e w   #   S h o w   M e r g e d   k u b e c o n f i g   s e t t i n g s .   #   u s e   m u l t i p l e   k u b e c o n f i g   f i l e s   a t   t h e   s a m e   t i m e   a n d   v i e w   m e r g e d   c o n f i g   K U B E C O N F I G = ~ / . k u b e / c o n f i g : ~ / . k u b e / k u b c o n f i g 2   k u b e c t l   c o n f i g   v i e w   #   S h o w   m e r g e d   k u b e c o n f i g   s e t t i n g s   a n d   r a w   c e r t i f i c a t e   d a t a   a n d   e x p o s e d   s e c r e t s   k u b e c t l   c o n f i g   v i e w   - - r a w   #   g e t   t h e   p a s s w o r d   f o r   t h e   e 2 e   u s e r   k u b e c t l   c o n f i g   v i e w   - o   j s o n p a t h = ' { . u s e r s [ ? ( @ . n a m e   = =   " e 2 e " ) ] . u s e r . p a s s w o r d } '   #   g e t   t h e   c e r t i f i c a t e   f o r   t h e   e 2 e   u s e r   k u b e c t l   c o n f i g   v i e w   - - r a w   - o   j s o n p a t h = ' { . u s e r s [ ? ( . n a m e   = =   " e 2 e " ) ] . u s e r . c l i e n t - c e r t i f i c a t e - d a t a } '   |   b a s e 6 4   - d   k u b e c t l   c o n f i g   v i e w   - o   j s o n p a t h = ' { . u s e r s [ ] . n a m e } '   #   d i s p l a y   t h e   f i r s t   u s e r   k u b e c t l   c o n f i g   v i e w   - o   j s o n p a t h = ' { . u s e r s [ * ] . n a m e } '   #   g e t   a   l i s t   o f   u s e r s   k u b e c t l   c o n f i g   g e t - c o n t e x t s   #   d i s p l a y   l i s t   o f   c o n t e x t s   k u b e c t l   c o n f i g   g e t - c o n t e x t s   - o   n a m e   #   g e t


Question: What is Kubectl apply?

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


Question: What is Creating objects?

Answer: K u b e r n e t e s   m a n i f e s t s   c a n   b e   d e f i n e d   i n   Y A M L   o r   J S O N .   T h e   f i l e   e x t e n s i o n   . y a m l ,   . y m l ,   a n d   . j s o n   c a n   b e   u s e d .   k u b e c t l   a p p l y   - f   . / m y - m a n i f e s t . y a m l   #   c r e a t e   r e s o u r c e ( s )   k u b e c t l   a p p l y   - f   . / m y 1 . y a m l   - f   . / m y 2 . y a m l   #   c r e a t e   f r o m   m u l t i p l e   f i l e s   k u b e c t l   a p p l y   - f   . / d i r   #   c r e a t e   r e s o u r c e ( s )   i n   a l l   m a n i f e s t   f i l e s   i n   d i r   k u b e c t l   a p p l y   - f   h t t p s : / / e x a m p l e . c o m / m a n i f e s t . y a m l   #   c r e a t e   r e s o u r c e ( s )   f r o m   u r l   ( N o t e :   t h i s   i s   a n   e x a m p l e   d o m a i n   a n d   d o e s   n o t   c o n t a i n   a   v a l i d   m a n i f e s t )   k u b e c t l   c r e a t e   d e p l o y m e n t   n g i n x   - - i m a g e = n g i n x   #   s t a r t   a   s i n g l e   i n s t a n c e   o f   n g i n x   #   c r e a t e   a   J o b   w h i c h   p r i n t s   " H e l l o   W o r l d "   k u b e c t l   c r e a t e   j o b   h e l l o   - - i m a g e = b u s y b o x : 1 . 2 8   - -   e c h o   " H e l l o   W o r l d "   #   c r e a t e   a   C r o n J o b   t h a t   p r i n t s   " H e l l o   W o r l d "   e v e r y   m i n u t e   k u b e c t l   c r e a t e   c r o n j o b   h e l l o   - - i m a g e = b u s y b o x : 1 . 2 8   - - s c h e d u l e = " * / 1   *   *   *   * "   - -   e c h o   " H e l l o   W o r l d "   k u b e c t l   e x p l a i n   p o d s   #   g e t   t h e   d o c u m e n t a t i o n   f o r   p o d   m a n i f e s t s   #   C r e a t e   m u l t i p l e   Y A M L   o b j e c t s   f r o m   s t d i n   k u b e c t l   a p p l y   - f   -   < < E O F   a p i V e r s i o n :   v 1   k i n d :   P o d   m e t a d a t a :   n a m e :   b u s y b o x - s l e e p   s p e c :   c


Question: What is Viewing and finding resources?

Answer: #   G e t   c o m m a n d s   w i t h   b a s i c   o u t p u t   k u b e c t l   g e t   s e r v i c e s   #   L i s t   a l l   s e r v i c e s   i n   t h e   n a m e s p a c e   k u b e c t l   g e t   p o d s   - - a l l - n a m e s p a c e s   #   L i s t   a l l   p o d s   i n   a l l   n a m e s p a c e s   k u b e c t l   g e t   p o d s   - o   w i d e   #   L i s t   a l l   p o d s   i n   t h e   c u r r e n t   n a m e s p a c e ,   w i t h   m o r e   d e t a i l s   k u b e c t l   g e t   d e p l o y m e n t   m y - d e p   #   L i s t   a   p a r t i c u l a r   d e p l o y m e n t   k u b e c t l   g e t   p o d s   #   L i s t   a l l   p o d s   i n   t h e   n a m e s p a c e   k u b e c t l   g e t   p o d   m y - p o d   - o   y a m l   #   G e t   a   p o d ' s   Y A M L   #   D e s c r i b e   c o m m a n d s   w i t h   v e r b o s e   o u t p u t   k u b e c t l   d e s c r i b e   n o d e s   m y - n o d e   k u b e c t l   d e s c r i b e   p o d s   m y - p o d   #   L i s t   S e r v i c e s   S o r t e d   b y   N a m e   k u b e c t l   g e t   s e r v i c e s   - - s o r t - b y = . m e t a d a t a . n a m e   #   L i s t   p o d s   S o r t e d   b y   R e s t a r t   C o u n t   k u b e c t l   g e t   p o d s   - - s o r t - b y = ' . s t a t u s . c o n t a i n e r S t a t u s e s [ 0 ] . r e s t a r t C o u n t '   #   L i s t   P e r s i s t e n t V o l u m e s   s o r t e d   b y   c a p a c i t y   k u b e c t l   g e t   p v   - - s o r t - b y = . s p e c . c a p a c i t y . s t o r a g e   #   G e t   t h e   v e r s i o n   l a b e l   o f   a l l   p o d s   w i t h   l a b e l   a p p = c a s s a n d r a   k u b e c t l   g e t   p o d s   - - s e l e c t o r = a p p = c a s s a n d r a   - o   \   j s o n p a t h = ' { . i t e m s [ * ] . m e t a d a t a . l a b e l s . v e r s i o n } '   #   R e t r i e v e   t h e   v a l u e   o f   a   k e y   w i t h   d o t s ,   e . g .   ' c a . c r t '   k u b e c t l   g


Question: What is Updating resources?

Answer: 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 / f r o n t e n d   w w w = i m a g e : v 2   #   R o l l i n g   u p d a t e   " w w w "   c o n t a i n e r s   o f   " f r o n t e n d "   d e p l o y m e n t ,   u p d a t i n g   t h e   i m a g e   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 / f r o n t e n d   #   C h e c k   t h e   h i s t o r y   o f   d e p l o y m e n t s   i n c l u d i n g   t h e   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 / f r o n t e n d   #   R o l l b a c k   t o   t h e   p r e v i o u 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   u n d o   d e p l o y m e n t / f r o n t e n d   - - t o - r e v i s i o n = 2   #   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   k u b e c t l   r o l l o u t   s t a t u s   - w   d e p l o y m e n t / f r o n t e n d   #   W a t c h   r o l l i n g   u p d a t e   s t a t u s   o f   " f r o n t e n d "   d e p l o y m e n t   u n t i l   c o m p l e t i o n   k u b e c t l   r o l l o u t   r e s t a r t   d e p l o y m e n t / f r o n t e n d   #   R o l l i n g   r e s t a r t   o f   t h e   " f r o n t e n d "   d e p l o y m e n t   c a t   p o d . j s o n   |   k u b e c t l   r e p l a c e   - f   -   #   R e p l a c e   a   p o d   b a s e d   o n   t h e   J S O N   p a s s e d   i n t o   s t d i n   #   F o r c e   r e p l a c e ,   d e l e t e   a n d   t h e n   r e - c r e a t e   t h e   r e s o u r c e .   W i l l   c a u s e   a   s e r v i c e   o u t a g e .   k u b e c t l   r e p l a c e   - - f o r c e   - f   . / p o d . j s o n   #   C r e a t e   a   s e r v i c e   f o r   a   r e p l i c a t e d   n g i n x ,   w h i c h   s e r v e s   o n   p o r t   8 0   a n d   c o n n e c t s   t o   t h e   c o n t a i n e r s   o n   p o r t   8 0 0 0   k u b e c t l   e x p o s e   r c   n g i n x   - - p o r t = 8 0   - - t a r g e t - p o r t = 8 0 0 0   #   U p d a t e   a   s i


Question: What is Patching resources?

Answer: #   P a r t i a l l y   u p d a t e   a   n o d e   k u b e c t l   p a t c h   n o d e   k 8 s - n o d e - 1   - p   ' { " s p e c " : { " u n s c h e d u l a b l e " : t r u e } } '   #   U p d a t e   a   c o n t a i n e r ' s   i m a g e ;   s p e c . c o n t a i n e r s [ * ] . n a m e   i s   r e q u i r e d   b e c a u s e   i t ' s   a   m e r g e   k e y   k u b e c t l   p a t c h   p o d   v a l i d - p o d   - p   ' { " s p e c " : { " c o n t a i n e r s " : [ { " n a m e " : " k u b e r n e t e s - s e r v e - h o s t n a m e " , " i m a g e " : " n e w   i m a g e " } ] } } '   #   U p d a t e   a   c o n t a i n e r ' s   i m a g e   u s i n g   a   j s o n   p a t c h   w i t h   p o s i t i o n a l   a r r a y s   k u b e c t l   p a t c h   p o d   v a l i d - p o d   - - t y p e = ' j s o n '   - p = ' [ { " o p " :   " r e p l a c e " ,   " p a t h " :   " / s p e c / c o n t a i n e r s / 0 / i m a g e " ,   " v a l u e " : " n e w   i m a g e " } ] '   #   D i s a b l e   a   d e p l o y m e n t   l i v e n e s s P r o b e   u s i n g   a   j s o n   p a t c h   w i t h   p o s i t i o n a l   a r r a y s   k u b e c t l   p a t c h   d e p l o y m e n t   v a l i d - d e p l o y m e n t   - - t y p e   j s o n   - p = ' [ { " o p " :   " r e m o v e " ,   " p a t h " :   " / 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 / l i v e n e s s P r o b e " } ] '   #   A d d   a   n e w   e l e m e n t   t o   a   p o s i t i o n a l   a r r a y   k u b e c t l   p a t c h   s a   d e f a u l t   - - t y p e = ' j s o n '   - p = ' [ { " o p " :   " a d d " ,   " p a t h " :   " / s e c r e t s / 1 " ,   " v a l u e " :   { " n a m e " :   " w h a t e v e r "   }   } ] '   #   U p d a t e   a   d e p l o y m e n t ' s   r e p l i c a   c o u n t   b y   p a t c h i n g   i t s   s c a l e   s u b r e s o u r c e   k u b e c t l   p a t c h   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   - - s u b r e s o u r c e = ' s c a l


Question: What is Editing resources?

Answer: E d i t   a n y   A P I   r e s o u r c e   i n   y o u r   p r e f e r r e d   e d i t o r .   k u b e c t l   e d i t   s v c / d o c k e r - r e g i s t r y   #   E d i t   t h e   s e r v i c e   n a m e d   d o c k e r - r e g i s t r y   K U B E _ E D I T O R = " n a n o "   k u b e c t l   e d i t   s v c / d o c k e r - r e g i s t r y   #   U s e   a n   a l t e r n a t i v e   e d i t o r


Question: What is Scaling resources?

Answer: k u b e c t l   s c a l e   - - r e p l i c a s = 3   r s / f o o   #   S c a l e   a   r e p l i c a s e t   n a m e d   ' f o o '   t o   3   k u b e c t l   s c a l e   - - r e p l i c a s = 3   - f   f o o . y a m l   #   S c a l e   a   r e s o u r c e   s p e c i f i e d   i n   " f o o . y a m l "   t o   3   k u b e c t l   s c a l e   - - c u r r e n t - r e p l i c a s = 2   - - r e p l i c a s = 3   d e p l o y m e n t / m y s q l   #   I f   t h e   d e p l o y m e n t   n a m e d   m y s q l ' s   c u r r e n t   s i z e   i s   2 ,   s c a l e   m y s q l   t o   3   k u b e c t l   s c a l e   - - r e p l i c a s = 5   r c / f o o   r c / b a r   r c / b a z   #   S c a l e   m u l t i p l e   r e p l i c a t i o n   c o n t r o l l e r s


Question: What is Deleting resources?

Answer: k u b e c t l   d e l e t e   - f   . / p o d . j s o n   #   D e l e t e   a   p o d   u s i n g   t h e   t y p e   a n d   n a m e   s p e c i f i e d   i n   p o d . j s o n   k u b e c t l   d e l e t e   p o d   u n w a n t e d   - - n o w   #   D e l e t e   a   p o d   w i t h   n o   g r a c e   p e r i o d   k u b e c t l   d e l e t e   p o d , s e r v i c e   b a z   f o o   #   D e l e t e   p o d s   a n d   s e r v i c e s   w i t h   s a m e   n a m e s   " b a z "   a n d   " f o o "   k u b e c t l   d e l e t e   p o d s , s e r v i c e s   - l   n a m e = m y L a b e l   #   D e l e t e   p o d s   a n d   s e r v i c e s   w i t h   l a b e l   n a m e = m y L a b e l   k u b e c t l   - n   m y - n s   d e l e t e   p o d , s v c   - - a l l   #   D e l e t e   a l l   p o d s   a n d   s e r v i c e s   i n   n a m e s p a c e   m y - n s ,   #   D e l e t e   a l l   p o d s   m a t c h i n g   t h e   a w k   p a t t e r n 1   o r   p a t t e r n 2   k u b e c t l   g e t   p o d s   - n   m y n a m e s p a c e   - - n o - h e a d e r s = t r u e   |   a w k   ' / p a t t e r n 1 | p a t t e r n 2 / { p r i n t   $ 1 } '   |   x a r g s   k u b e c t l   d e l e t e   - n   m y n a m e s p a c e   p o d


Question: What is Interacting with running Pods?

Answer: k u b e c t l   l o g s   m y - p o d   #   d u m p   p o d   l o g s   ( s t d o u t )   k u b e c t l   l o g s   - l   n a m e = m y L a b e l   #   d u m p   p o d   l o g s ,   w i t h   l a b e l   n a m e = m y L a b e l   ( s t d o u t )   k u b e c t l   l o g s   m y - p o d   - - p r e v i o u s   #   d u m p   p o d   l o g s   ( s t d o u t )   f o r   a   p r e v i o u s   i n s t a n t i a t i o n   o f   a   c o n t a i n e r   k u b e c t l   l o g s   m y - p o d   - c   m y - c o n t a i n e r   #   d u m p   p o d   c o n t a i n e r   l o g s   ( s t d o u t ,   m u l t i - c o n t a i n e r   c a s e )   k u b e c t l   l o g s   - l   n a m e = m y L a b e l   - c   m y - c o n t a i n e r   #   d u m p   p o d   c o n t a i n e r   l o g s ,   w i t h   l a b e l   n a m e = m y L a b e l   ( s t d o u t )   k u b e c t l   l o g s   m y - p o d   - c   m y - c o n t a i n e r   - - p r e v i o u s   #   d u m p   p o d   c o n t a i n e r   l o g s   ( s t d o u t ,   m u l t i - c o n t a i n e r   c a s e )   f o r   a   p r e v i o u s   i n s t a n t i a t i o n   o f   a   c o n t a i n e r   k u b e c t l   l o g s   - f   m y - p o d   #   s t r e a m   p o d   l o g s   ( s t d o u t )   k u b e c t l   l o g s   - f   m y - p o d   - c   m y - c o n t a i n e r   #   s t r e a m   p o d   c o n t a i n e r   l o g s   ( s t d o u t ,   m u l t i - c o n t a i n e r   c a s e )   k u b e c t l   l o g s   - f   - l   n a m e = m y L a b e l   - - a l l - c o n t a i n e r s   #   s t r e a m   a l l   p o d s   l o g s   w i t h   l a b e l   n a m e = m y L a b e l   ( s t d o u t )   k u b e c t l   r u n   - i   - - t t y   b u s y b o x   - - i m a g e = b u s y b o x : 1 . 2 8   - -   s h   #   R u n   p o d   a s   i n t e r a c t i v e   s h e l l   k u b e c t l   r u n   n g i n x   - - i m a g e = n g i n x   - n   m y n a m e s p a c e   #   S t a r t   a   s i n g l e   i n s t a n c e   o f   n g i n x   p o d   i n   t


Question: What is Copying files and directories to and from containers?

Answer: k u b e c t l   c p   / t m p / f o o _ d i r   m y - p o d : / t m p / b a r _ d i r   #   C o p y   / t m p / f o o _ d i r   l o c a l   d i r e c t o r y   t o   / t m p / b a r _ d i r   i n   a   r e m o t e   p o d   i n   t h e   c u r r e n t   n a m e s p a c e   k u b e c t l   c p   / t m p / f o o   m y - p o d : / t m p / b a r   - c   m y - c o n t a i n e r   #   C o p y   / t m p / f o o   l o c a l   f i l e   t o   / t m p / b a r   i n   a   r e m o t e   p o d   i n   a   s p e c i f i c   c o n t a i n e r   k u b e c t l   c p   / t m p / f o o   m y - n a m e s p a c e / m y - p o d : / t m p / b a r   #   C o p y   / t m p / f o o   l o c a l   f i l e   t o   / t m p / b a r   i n   a   r e m o t e   p o d   i n   n a m e s p a c e   m y - n a m e s p a c e   k u b e c t l   c p   m y - n a m e s p a c e / m y - p o d : / t m p / f o o   / t m p / b a r   #   C o p y   / t m p / f o o   f r o m   a   r e m o t e   p o d   t o   / t m p / b a r   l o c a l l y


Question: What is Note:?

Answer: t a r   c f   -   / t m p / f o o   |   k u b e c t l   e x e c   - i   - n   m y - n a m e s p a c e   m y - p o d   - -   t a r   x f   -   - C   / t m p / b a r   #   C o p y   / t m p / f o o   l o c a l   f i l e   t o   / t m p / b a r   i n   a   r e m o t e   p o d   i n   n a m e s p a c e   m y - n a m e s p a c e   k u b e c t l   e x e c   - n   m y - n a m e s p a c e   m y - p o d   - -   t a r   c f   -   / t m p / f o o   |   t a r   x f   -   - C   / t m p / b a r   #   C o p y   / t m p / f o o   f r o m   a   r e m o t e   p o d   t o   / t m p / b a r   l o c a l l y


Question: What is Interacting with Deployments and Services?

Answer: k u b e c t l   l o g s   d e p l o y / m y - d e p l o y m e n t   #   d u m p   P o d   l o g s   f o r   a   D e p l o y m e n t   ( s i n g l e - c o n t a i n e r   c a s e )   k u b e c t l   l o g s   d e p l o y / m y - d e p l o y m e n t   - c   m y - c o n t a i n e r   #   d u m p   P o d   l o g s   f o r   a   D e p l o y m e n t   ( m u l t i - c o n t a i n e r   c a s e )   k u b e c t l   p o r t - f o r w a r d   s v c / m y - s e r v i c e   5 0 0 0   #   l i s t e n   o n   l o c a l   p o r t   5 0 0 0   a n d   f o r w a r d   t o   p o r t   5 0 0 0   o n   S e r v i c e   b a c k e n d   k u b e c t l   p o r t - f o r w a r d   s v c / m y - s e r v i c e   5 0 0 0 : m y - s e r v i c e - p o r t   #   l i s t e n   o n   l o c a l   p o r t   5 0 0 0   a n d   f o r w a r d   t o   S e r v i c e   t a r g e t   p o r t   w i t h   n a m e   < m y - s e r v i c e - p o r t >   k u b e c t l   p o r t - f o r w a r d   d e p l o y / m y - d e p l o y m e n t   5 0 0 0 : 6 0 0 0   #   l i s t e n   o n   l o c a l   p o r t   5 0 0 0   a n d   f o r w a r d   t o   p o r t   6 0 0 0   o n   a   P o d   c r e a t e d   b y   < m y - d e p l o y m e n t >   k u b e c t l   e x e c   d e p l o y / m y - d e p l o y m e n t   - -   l s   #   r u n   c o m m a n d   i n   f i r s t   P o d   a n d   f i r s t   c o n t a i n e r   i n   D e p l o y m e n t   ( s i n g l e -   o r   m u l t i - c o n t a i n e r   c a s e s )


Question: What is Interacting with Nodes and cluster?

Answer: k u b e c t l   c o r d o n   m y - n o d e   #   M a r k   m y - n o d e   a s   u n s c h e d u l a b l e   k u b e c t l   d r a i n   m y - n o d e   #   D r a i n   m y - n o d e   i n   p r e p a r a t i o n   f o r   m a i n t e n a n c e   k u b e c t l   u n c o r d o n   m y - n o d e   #   M a r k   m y - n o d e   a s   s c h e d u l a b l e   k u b e c t l   t o p   n o d e   #   S h o w   m e t r i c s   f o r   a l l   n o d e s   k u b e c t l   t o p   n o d e   m y - n o d e   #   S h o w   m e t r i c s   f o r   a   g i v e n   n o d e   k u b e c t l   c l u s t e r - i n f o   #   D i s p l a y   a d d r e s s e s   o f   t h e   m a s t e r   a n d   s e r v i c e s   k u b e c t l   c l u s t e r - i n f o   d u m p   #   D u m p   c u r r e n t   c l u s t e r   s t a t e   t o   s t d o u t   k u b e c t l   c l u s t e r - i n f o   d u m p   - - o u t p u t - d i r e c t o r y = / p a t h / t o / c l u s t e r - s t a t e   #   D u m p   c u r r e n t   c l u s t e r   s t a t e   t o   / p a t h / t o / c l u s t e r - s t a t e   #   V i e w   e x i s t i n g   t a i n t s   o n   w h i c h   e x i s t   o n   c u r r e n t   n o d e s .   k u b e c t l   g e t   n o d e s   - o = ' c u s t o m - c o l u m n s = N o d e N a m e : . m e t a d a t a . n a m e , T a i n t K e y : . s p e c . t a i n t s [ * ] . k e y , T a i n t V a l u e : . s p e c . t a i n t s [ * ] . v a l u e , T a i n t E f f e c t : . s p e c . t a i n t s [ * ] . e f f e c t '   #   I f   a   t a i n t   w i t h   t h a t   k e y   a n d   e f f e c t   a l r e a d y   e x i s t s ,   i t s   v a l u e   i s   r e p l a c e d   a s   s p e c i f i e d .   k u b e c t l   t a i n t   n o d e s   f o o   d e d i c a t e d = s p e c i a l - u s e r : N o S c h e d u l e


Question: What is Resource types?

Answer: L i s t   a l l   s u p p o r t e d   r e s o u r c e   t y p e s   a l o n g   w i t h   t h e i r   s h o r t n a m e s ,   A P I   g r o u p ,   w h e t h e r   t h e y   a r e   n a m e s p a c e d ,   a n d   k i n d :   k u b e c t l   a p i - r e s o u r c e s   O t h e r   o p e r a t i o n s   f o r   e x p l o r i n g   A P I   r e s o u r c e s :   k u b e c t l   a p i - r e s o u r c e s   - - n a m e s p a c e d = t r u e   #   A l l   n a m e s p a c e d   r e s o u r c e s   k u b e c t l   a p i - r e s o u r c e s   - - n a m e s p a c e d = f a l s e   #   A l l   n o n - n a m e s p a c e d   r e s o u r c e s   k u b e c t l   a p i - r e s o u r c e s   - o   n a m e   #   A l l   r e s o u r c e s   w i t h   s i m p l e   o u t p u t   ( o n l y   t h e   r e s o u r c e   n a m e )   k u b e c t l   a p i - r e s o u r c e s   - o   w i d e   #   A l l   r e s o u r c e s   w i t h   e x p a n d e d   ( a k a   " w i d e " )   o u t p u t   k u b e c t l   a p i - r e s o u r c e s   - - v e r b s = l i s t , g e t   #   A l l   r e s o u r c e s   t h a t   s u p p o r t   t h e   " l i s t "   a n d   " g e t "   r e q u e s t   v e r b s   k u b e c t l   a p i - r e s o u r c e s   - - a p i - g r o u p = e x t e n s i o n s   #   A l l   r e s o u r c e s   i n   t h e   " e x t e n s i o n s "   A P I   g r o u p


Question: What is Formatting output?

Answer: T o   o u t p u t   d e t a i l s   t o   y o u r   t e r m i n a l   w i n d o w   i n   a   s p e c i f i c   f o r m a t ,   a d d   t h e   - o   ( o r   - - o u t p u t )   f l a g   t o   a   s u p p o r t e d   k u b e c t l   c o m m a n d .   E x a m p l e s   u s i n g   - o = c u s t o m - c o l u m n s :   #   A l l   i m a g e s   r u n n i n g   i n   a   c l u s t e r   k u b e c t l   g e t   p o d s   - A   - o = c u s t o m - c o l u m n s = ' D A T A : s p e c . c o n t a i n e r s [ * ] . i m a g e '   #   A l l   i m a g e s   r u n n i n g   i n   n a m e s p a c e :   d e f a u l t ,   g r o u p e d   b y   P o d   k u b e c t l   g e t   p o d s   - - n a m e s p a c e   d e f a u l t   - - o u t p u t = c u s t o m - c o l u m n s = " N A M E : . m e t a d a t a . n a m e , I M A G E : . s p e c . c o n t a i n e r s [ * ] . i m a g e "   #   A l l   i m a g e s   e x c l u d i n g   " r e g i s t r y . k 8 s . i o / c o r e d n s : 1 . 6 . 2 "   k u b e c t l   g e t   p o d s   - A   - o = c u s t o m - c o l u m n s = ' D A T A : s p e c . c o n t a i n e r s [ ? ( @ . i m a g e ! = " r e g i s t r y . k 8 s . i o / c o r e d n s : 1 . 6 . 2 " ) ] . i m a g e '   #   A l l   f i e l d s   u n d e r   m e t a d a t a   r e g a r d l e s s   o f   n a m e   k u b e c t l   g e t   p o d s   - A   - o = c u s t o m - c o l u m n s = ' D A T A : m e t a d a t a . * '   M o r e   e x a m p l e s   i n   t h e   k u b e c t l   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 Kubectl output verbosity and debugging?

Answer: K u b e c t l   v e r b o s i t y   i s   c o n t r o l l e d   w i t h   t h e   - v   o r   - - v   f l a g s   f o l l o w e d   b y   a n   i n t e g e r   r e p r e s e n t i n g   t h e   l o g   l e v e l .   G e n e r a l   K u b e r n e t e s   l o g g i n g   c o n v e n t i o n s   a n d   t h e   a s s o c i a t e d   l o g   l e v e l s   a r e   d e s c r i b e d   h e r e .


Question: What is What's next?

Answer: R e a d   t h e   k u b e c t l   o v e r v i e w   a n d   l e a r n   a b o u t   J s o n P a t h . S e e   k u b e c t l   o p t i o n s . S e e   k u b e r c   o p t i o n s . A l s o   r e a d   k u b e c t l   U s a g e   C o n v e n t i o n s   t o   u n d e r s t a n d   h o w   t o   u s e   k u b e c t l   i n   r e u s a b l e   s c r i p t s . S e e   m o r e   c o m m u n i t y   k u b e c t l   c h e a t s h e e t s .   R e a d   t h e   k u b e c t l   o v e r v i e w   a n d   l e a r n   a b o u t   J s o n P a t h .   S e e   k u b e c t l   o p t i o n s .   S e e   k u b e r c   o p t i o n s .   A l s o   r e a d   k u b e c t l   U s a g e   C o n v e n t i o n s   t o   u n d e r s t a n d   h o w   t o   u s e   k u b e c t l   i n   r e u s a b l e   s c r i p t s .   S e e   m o r e   c o m m u n i t y   k u b e c t l   c h e a t s h e e t s .


Question: What is Synopsis?

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


Question: What is Options?

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   h e l p   f o r   k u b e c t l   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   P a t h   t o   t h e   k u b e c o n f i g   f i l e   t o   u s e   f o r   C L I   r e q u e s t s .   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