Question: What are the benefits of Assign Pod-level CPU and memory resources?

Answer: Assign Pod-level CPU and memory resourcesFEATURE STATE: Kubernetes v1.34 [beta] (enabled by default: true)This page shows how to specify CPU and memory resources for a Pod at pod-level in addition to container-level resource specifications. A Kubernetes node allocates resources to a pod based on the pod's resource requests. These requests can be defined at the pod level or individually for containers within the pod. When both are present, the pod-level requests take precedence.Similarly, a pod's resource usage is restricted by limits, which can also be set at the pod-level or individually for containers within the pod. Again, pod-level limits are prioritized when both are present. This allows for flexible resource management, enabling you to control resource allocation at both the pod and container levels.In order to specify the resources at pod-level, it is required to enable PodLevelResources feature gate.For Pod Level Resources:Priority: When both pod-level and container-level resources are specified, pod-level resources take precedence.QoS: Pod-level resources take precedence in influencing the QoS class of the pod.OOM Score: The OOM score adjustment calculation considers both pod-level and container-level resources.Compatibility: Pod-level resources are designed to be compatible with existing features.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYour Kubernetes server must be at or later than version 1.34.To check the version, enter kubectl version.The PodLevelResources feature gate must be enabled for your control plane and for all nodes in your cluster.LimitationsFor Kubernetes 1.34, resizing pod-level resources has the following limitations:Resource Types: Only CPU, memory and hugepages resources can be specified at pod-level.Operating System: Pod-level resources are not supported for Windows pods.Resource Managers: The Topology Manager, Memory Manager and CPU Manager do not align pods and containers based on pod-level resources as these resource managers don't currently support pod-level resources.In-Place Resize: In-place resize of pod-level resources is not supported. Modifying the pod-level resource limits or requests on a pod result in a field.Forbidden error. The error message explicitly states, "pods with pod-level resources cannot be resized."Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace pod-resources-example Create a pod with memory requests and limits at pod-levelTo specify memory requests for a Pod at pod-level, include the resources.


Question: What is Assign Pod-level CPU and memory resources?

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


Question: What is Before you begin?

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


Question: What is Limitations?

Answer: F o r   K u b e r n e t e s   1 . 3 4 ,   r e s i z i n g   p o d - l e v e l   r e s o u r c e s   h a s   t h e   f o l l o w i n g   l i m i t a t i o n s :   R e s o u r c e   T y p e s :   O n l y   C P U ,   m e m o r y   a n d   h u g e p a g e s   r e s o u r c e s   c a n   b e   s p e c i f i e d   a t   p o d - l e v e l . O p e r a t i n g   S y s t e m :   P o d - l e v e l   r e s o u r c e s   a r e   n o t   s u p p o r t e d   f o r   W i n d o w s   p o d s . R e s o u r c e   M a n a g e r s :   T h e   T o p o l o g y   M a n a g e r ,   M e m o r y   M a n a g e r   a n d   C P U   M a n a g e r   d o   n o t   a l i g n   p o d s   a n d   c o n t a i n e r s   b a s e d   o n   p o d - l e v e l   r e s o u r c e s   a s   t h e s e   r e s o u r c e   m a n a g e r s   d o n ' t   c u r r e n t l y   s u p p o r t   p o d - l e v e l   r e s o u r c e s . I n - P l a c e   R e s i z e :   I n - p l a c e   r e s i z e   o f   p o d - l e v e l   r e s o u r c e s   i s   n o t   s u p p o r t e d .   M o d i f y i n g   t h e   p o d - l e v e l   r e s o u r c e   l i m i t s   o r   r e q u e s t s   o n   a   p o d   r e s u l t   i n   a   f i e l d . F o r b i d d e n   e r r o r .   T h e   e r r o r   m e s s a g e   e x p l i c i t l y   s t a t e s ,   " p o d s   w i t h   p o d - l e v e l   r e s o u r c e s   c a n n o t   b e   r e s i z e d . "


Question: What is Create a namespace?

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


Question: What is Create a pod with memory requests and limits at pod-level?

Answer: T o   s p e c i f y   m e m o r y   r e q u e s t s   f o r   a   P o d   a t   p o d - l e v e l ,   i n c l u d e   t h e   r e s o u r c e s . r e q u e s t s . m e m o r y   f i e l d   i n   t h e   P o d   s p e c   m a n i f e s t .   T o   s p e c i f y   a   m e m o r y   l i m i t ,   i n c l u d e   r e s o u r c e s . l i m i t s . m e m o r y .   I n   t h i s   e x e r c i s e ,   y o u   c r e a t e   a   P o d   t h a t   h a s   o n e   C o n t a i n e r .   T h e   P o d   h a s   a   m e m o r y   r e q u e s t   o f   1 0 0   M i B   a n d   a   m e m o r y   l i m i t   o f   2 0 0   M i B .   H e r e ' s   t h e   c o n f i g u r a t i o n   f i l e   f o r   t h e   P o d :   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 :   m e m o r y - d e m o   n a m e s p a c e :   p o d - r e s o u r c e s - e x a m p l e   s p e c :   r e s o u r c e s :   r e q u e s t s :   m e m o r y :   " 1 0 0 M i "   l i m i t s :   m e m o r y :   " 2 0 0 M i "   c o n t a i n e r s :   -   n a m e :   m e m o r y - d e m o - c t r   i m a g e :   n g i n x   c o m m a n d :   [ " s t r e s s " ]   a r g s :   [ " - - v m " ,   " 1 " ,   " - - v m - b y t e s " ,   " 1 5 0 M " ,   " - - v m - h a n g " ,   " 1 " ]   T h e   a r g s   s e c t i o n   i n   t h e   m a n i f e s t   p r o v i d e s   a r g u m e n t s   f o r   t h e   c o n t a i n e r   w h e n   i t   s t a r t s .   T h e   " - - v m - b y t e s " ,   " 1 5 0 M "   a r g u m e n t s   t e l l   t h e   C o n t a i n e r   t o   a t t e m p t   t o   a l l o c a t e   1 5 0   M i B   o f   m e m o r y .   C r e a t e   t h e   P o d :   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / p o d s / r e s o u r c e / p o d - l e v e l - m e m o r y - r e q u e s t - l i m i t . y a m l   - - n a m e s p a c e = p o d - r e s o u r c e s - e x a m p l e   V e r i f y   t h a t   t h e   P o d   i s   r u n n i n g :   k u b e c t l   g


Question: What is Create a pod with CPU requests and limits at pod-level?

Answer: T o   s p e c i f y   a   C P U   r e q u e s t   f o r   a   P o d ,   i n c l u d e   t h e   r e s o u r c e s . r e q u e s t s . c p u   f i e l d   i n   t h e   P o d   s p e c   m a n i f e s t .   T o   s p e c i f y   a   C P U   l i m i t ,   i n c l u d e   r e s o u r c e s . l i m i t s . c p u .   I n   t h i s   e x e r c i s e ,   y o u   c r e a t e   a   P o d   t h a t   h a s   o n e   c o n t a i n e r .   T h e   P o d   h a s   a   r e q u e s t   o f   0 . 5   C P U   a n d   a   l i m i t   o f   1   C P U .   H e r e   i s   t h e   c o n f i g u r a t i o n   f i l e   f o r   t h e   P o d :   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 :   c p u - d e m o   n a m e s p a c e :   p o d - r e s o u r c e s - e x a m p l e   s p e c :   r e s o u r c e s :   l i m i t s :   c p u :   " 1 "   r e q u e s t s :   c p u :   " 0 . 5 "   c o n t a i n e r s :   -   n a m e :   c p u - d e m o - c t r   i m a g e :   v i s h / s t r e s s   a r g s :   -   - c p u s   -   " 2 "   T h e   a r g s   s e c t i o n   o f   t h e   c o n f i g u r a t i o n   f i l e   p r o v i d e s   a r g u m e n t s   f o r   t h e   c o n t a i n e r   w h e n   i t   s t a r t s .   T h e   - c p u s   " 2 "   a r g u m e n t   t e l l s   t h e   C o n t a i n e r   t o   a t t e m p t   t o   u s e   2   C P U s .   C r e a t e   t h e   P o d :   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / p o d s / r e s o u r c e / p o d - l e v e l - c p u - r e q u e s t - l i m i t . y a m l   - - n a m e s p a c e = p o d - r e s o u r c e s - e x a m p l e   V e r i f y   t h a t   t h e   P o d   i s   r u n n i n g :   k u b e c t l   g e t   p o d   c p u - d e m o   - - n a m e s p a c e = p o d - r e s o u r c e s - e x a m p l e   V i e w   d e t a i l e d   i n f o r m a t i o n   a b o u t   t h e   P o d :   k u b e c t l   g e t   p o d   c p u - d e m o   - - o u t p u t = y a m l   -


Question: What is Create a pod with resource requests and limits at both pod-level and container-level?

Answer: T o   a s s i g n   C P U   a n d   m e m o r y   r e s o u r c e s   t o   a   P o d ,   y o u   c a n   s p e c i f y   t h e m   a t   b o t h   t h e   p o d   l e v e l   a n d   t h e   c o n t a i n e r   l e v e l .   I n c l u d e   t h e   r e s o u r c e s   f i e l d   i n   t h e   P o d   s p e c   t o   d e f i n e   r e s o u r c e s   f o r   t h e   e n t i r e   P o d .   A d d i t i o n a l l y ,   i n c l u d e   t h e   r e s o u r c e s   f i e l d   w i t h i n   c o n t a i n e r ' s   s p e c i f i c a t i o n   i n   t h e   P o d ' s   m a n i f e s t   t o   s e t   c o n t a i n e r - s p e c i f i c   r e s o u r c e   r e q u i r e m e n t s .   I n   t h i s   e x e r c i s e ,   y o u ' l l   c r e a t e   a   P o d   w i t h   t w o   c o n t a i n e r s   t o   e x p l o r e   t h e   i n t e r a c t i o n   o f   p o d - l e v e l   a n d   c o n t a i n e r - l e v e l   r e s o u r c e   s p e c i f i c a t i o n s .   T h e   P o d   i t s e l f   w i l l   h a v e   d e f i n e d   C P U   r e q u e s t s   a n d   l i m i t s ,   w h i l e   o n l y   o n e   o f   t h e   c o n t a i n e r s   w i l l   h a v e   i t s   o w n   e x p l i c i t   r e s o u r c e   r e q u e s t s   a n d   l i m i t s .   T h e   o t h e r   c o n t a i n e r   w i l l   i n h e r i t   t h e   r e s o u r c e   c o n s t r a i n t s   f r o m   t h e   p o d - l e v e l   s e t t i n g s .   H e r e ' s   t h e   c o n f i g u r a t i o n   f i l e   f o r   t h e   P o d :   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 :   p o d - r e s o u r c e s - d e m o   n a m e s p a c e :   p o d - r e s o u r c e s - e x a m p l e   s p e c :   r e s o u r c e s :   l i m i t s :   c p u :   " 1 "   m e m o r y :   " 2 0 0 M i "   r e q u e s t s :   c p u :   " 1 "   m e m o r y :   " 1 0 0 M i "   c o n t a i n e r s :   -   n a m e :   p o d - r e s o u r c e s - d e m o - c t r - 1   i m a g e :   n g i n x


Question: What is Clean up?

Answer: D e l e t e   y o u r   n a m e s p a c e :   k u b e c t l   d e l e t e   n a m e s p a c e   p o d - r e s o u r c e s - e x a m p l e


Question: What is For application developers?

Answer: A s s i g n   M e m o r y   R e s o u r c e s   t o   C o n t a i n e r s   a n d   P o d s A s s i g n   C P U   R e s o u r c e s   t o   C o n t a i n e r s   a n d   P o d s   A s s i g n   M e m o r y   R e s o u r c e s   t o   C o n t a i n e r s   a n d   P o d s   A s s i g n   C P U   R e s o u r c e s   t o   C o n t a i n e r s   a n d   P o d s


Question: What is For cluster administrators?

Answer: C o n f i g u r e   D e f a u l t   M e m o r y   R e q u e s t s   a n d   L i m i t s   f o r   a   N a m e s p a c e C o n f i g u r e   D e f a u l t   C P U   R e q u e s t s   a n d   L i m i t s   f o r   a   N a m e s p a c e C o n f i g u r e   M i n i m u m   a n d   M a x i m u m   M e m o r y   C o n s t r a i n t s   f o r   a   N a m e s p a c e C o n f i g u r e   M i n i m u m   a n d   M a x i m u m   C P U   C o n s t r a i n t s   f o r   a   N a m e s p a c e C o n f i g u r e   M e m o r y   a n d   C P U   Q u o t a s   f o r   a   N a m e s p a c e   C o n f i g u r e   D e f a u l t   M e m o r y   R e q u e s t s   a n d   L i m i t s   f o r   a   N a m e s p a c e   C o n f i g u r e   D e f a u l t   C P U   R e q u e s t s   a n d   L i m i t s   f o r   a   N a m e s p a c e   C o n f i g u r e   M i n i m u m   a n d   M a x i m u m   M e m o r y   C o n s t r a i n t s   f o r   a   N a m e s p a c e   C o n f i g u r e   M i n i m u m   a n d   M a x i m u m   C P U   C o n s t r a i n t s   f o r   a   N a m e s p a c e   C o n f i g u r e   M e m o r y   a n d   C P U   Q u o t a s   f o r   a   N a m e s p a c e


Question: What is Use an Image Volume With a Pod?

Answer: Use an Image Volume With a PodFEATURE STATE: Kubernetes v1.33 [beta] (enabled by default: false)This page shows how to configure a pod using image volumes. This allows you to mount content from OCI registries inside containers.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYour Kubernetes server must be at or later than version v1.31.To check the version, enter kubectl version.The container runtime needs to support the image volumes featureYou need to exec commands in the hostYou need to be able to exec into podsYou need to enable the ImageVolume feature gateRun a Pod that uses an image volumeAn image volume for a pod is enabled by setting the volumes.[*].image field of .spec to a valid reference and consuming it in the volumeMounts of the container. For example:pods/image-volumes.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of a file in the volume:cat /volume/dir/file The output is similar to:1 You can also check another file in a different path:cat /volume/file The output is similar to:2 Use subPath (or subPathExpr)It is possible to utilize subPath or subPathExpr from Kubernetes v1.33 when using the image volume feature.pods/image-volumes-subpath.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume subPath: dir volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes-subpath.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of the file from the dir sub path in the volume:cat /volume/file The output is similar to:1 Further readingimage volumes


Question: How does Use an Image Volume With a Pod work?

Answer: Use an Image Volume With a PodFEATURE STATE: Kubernetes v1.33 [beta] (enabled by default: false)This page shows how to configure a pod using image volumes. This allows you to mount content from OCI registries inside containers.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYour Kubernetes server must be at or later than version v1.31.To check the version, enter kubectl version.The container runtime needs to support the image volumes featureYou need to exec commands in the hostYou need to be able to exec into podsYou need to enable the ImageVolume feature gateRun a Pod that uses an image volumeAn image volume for a pod is enabled by setting the volumes.[*].image field of .spec to a valid reference and consuming it in the volumeMounts of the container. For example:pods/image-volumes.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of a file in the volume:cat /volume/dir/file The output is similar to:1 You can also check another file in a different path:cat /volume/file The output is similar to:2 Use subPath (or subPathExpr)It is possible to utilize subPath or subPathExpr from Kubernetes v1.33 when using the image volume feature.pods/image-volumes-subpath.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume subPath: dir volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes-subpath.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of the file from the dir sub path in the volume:cat /volume/file The output is similar to:1 Further readingimage volumes


Question: When would you use Use an Image Volume With a Pod?

Answer: Use an Image Volume With a PodFEATURE STATE: Kubernetes v1.33 [beta] (enabled by default: false)This page shows how to configure a pod using image volumes. This allows you to mount content from OCI registries inside containers.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYour Kubernetes server must be at or later than version v1.31.To check the version, enter kubectl version.The container runtime needs to support the image volumes featureYou need to exec commands in the hostYou need to be able to exec into podsYou need to enable the ImageVolume feature gateRun a Pod that uses an image volumeAn image volume for a pod is enabled by setting the volumes.[*].image field of .spec to a valid reference and consuming it in the volumeMounts of the container. For example:pods/image-volumes.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of a file in the volume:cat /volume/dir/file The output is similar to:1 You can also check another file in a different path:cat /volume/file The output is similar to:2 Use subPath (or subPathExpr)It is possible to utilize subPath or subPathExpr from Kubernetes v1.33 when using the image volume feature.pods/image-volumes-subpath.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume subPath: dir volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes-subpath.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of the file from the dir sub path in the volume:cat /volume/file The output is similar to:1 Further readingimage volumes


Question: What are the benefits of Use an Image Volume With a Pod?

Answer: Use an Image Volume With a PodFEATURE STATE: Kubernetes v1.33 [beta] (enabled by default: false)This page shows how to configure a pod using image volumes. This allows you to mount content from OCI registries inside containers.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesYour Kubernetes server must be at or later than version v1.31.To check the version, enter kubectl version.The container runtime needs to support the image volumes featureYou need to exec commands in the hostYou need to be able to exec into podsYou need to enable the ImageVolume feature gateRun a Pod that uses an image volumeAn image volume for a pod is enabled by setting the volumes.[*].image field of .spec to a valid reference and consuming it in the volumeMounts of the container. For example:pods/image-volumes.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of a file in the volume:cat /volume/dir/file The output is similar to:1 You can also check another file in a different path:cat /volume/file The output is similar to:2 Use subPath (or subPathExpr)It is possible to utilize subPath or subPathExpr from Kubernetes v1.33 when using the image volume feature.pods/image-volumes-subpath.yaml apiVersion: v1 kind: Pod metadata: name: image-volume spec: containers: - name: shell command: ["sleep", "infinity"] image: debian volumeMounts: - name: volume mountPath: /volume subPath: dir volumes: - name: volume image: reference: quay.io/crio/artifact:v2 pullPolicy: IfNotPresent Create the pod on your cluster:kubectl apply -f https://k8s.io/examples/pods/image-volumes-subpath.yaml Attach to the container:kubectl attach -it image-volume bash Check the content of the file from the dir sub path in the volume:cat /volume/file The output is similar to:1 Further readingimage volumes


Question: What is Use an Image Volume With a Pod?

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


Question: What is Before you begin?

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


Question: What is Run a Pod that uses an image volume?

Answer: A n   i m a g e   v o l u m e   f o r   a   p o d   i s   e n a b l e d   b y   s e t t i n g   t h e   v o l u m e s . [ * ] . i m a g e   f i e l d   o f   . s p e c   t o   a   v a l i d   r e f e r e n c e   a n d   c o n s u m i n g   i t   i n   t h e   v o l u m e M o u n t s   o f   t h e   c o n t a i n e r .   F o r   e x a m p l e :   a p i V e r s i o n :   v 1   k i n d :   P o d   m e t a d a t a :   n a m e :   i m a g e - v o l u m e   s p e c :   c o n t a i n e r s :   -   n a m e :   s h e l l   c o m m a n d :   [ " s l e e p " ,   " i n f i n i t y " ]   i m a g e :   d e b i a n   v o l u m e M o u n t s :   -   n a m e :   v o l u m e   m o u n t P a t h :   / v o l u m e   v o l u m e s :   -   n a m e :   v o l u m e   i m a g e :   r e f e r e n c e :   q u a y . i o / c r i o / a r t i f a c t : v 2   p u l l P o l i c y :   I f N o t P r e s e n t   C r e a t e   t h e   p o d   o n   y o u r   c l u s t e r : k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / p o d s / i m a g e - v o l u m e s . y a m l   A t t a c h   t o   t h e   c o n t a i n e r : k u b e c t l   a t t a c h   - i t   i m a g e - v o l u m e   b a s h   C h e c k   t h e   c o n t e n t   o f   a   f i l e   i n   t h e   v o l u m e : c a t   / v o l u m e / d i r / f i l e   T h e   o u t p u t   i s   s i m i l a r   t o : 1   Y o u   c a n   a l s o   c h e c k   a n o t h e r   f i l e   i n   a   d i f f e r e n t   p a t h : c a t   / v o l u m e / f i l e   T h e   o u t p u t   i s   s i m i l a r   t o : 2   C r e a t e   t h e   p o d   o n   y o u r   c l u s t e r :   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / p o d s / i m a g e - v o l u m e s . y a m l   A t t a c h   t o   t h e   c o n t a i n e r :   k u b e c t l   a t t a c h   - i t   i m a g e - v o l u m e   b a s h   C h e c k   t h e   c o n t e n t   o f   a   f i l e   i n   t h e   v o l u m e :   c a t   / v o l u m


Question: What is Use subPath (or subPathExpr)?

Answer: I t   i s   p o s s i b l e   t o   u t i l i z e   s u b P a t h   o r   s u b P a t h E x p r   f r o m   K u b e r n e t e s   v 1 . 3 3   w h e n   u s i n g   t h e   i m a g e   v o l u m e   f e a t u r e .   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 :   i m a g e - v o l u m e   s p e c :   c o n t a i n e r s :   -   n a m e :   s h e l l   c o m m a n d :   [ " s l e e p " ,   " i n f i n i t y " ]   i m a g e :   d e b i a n   v o l u m e M o u n t s :   -   n a m e :   v o l u m e   m o u n t P a t h :   / v o l u m e   s u b P a t h :   d i r   v o l u m e s :   -   n a m e :   v o l u m e   i m a g e :   r e f e r e n c e :   q u a y . i o / c r i o / a r t i f a c t : v 2   p u l l P o l i c y :   I f N o t P r e s e n t   C r e a t e   t h e   p o d   o n   y o u r   c l u s t e r : k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / p o d s / i m a g e - v o l u m e s - s u b p a t h . y a m l   A t t a c h   t o   t h e   c o n t a i n e r : k u b e c t l   a t t a c h   - i t   i m a g e - v o l u m e   b a s h   C h e c k   t h e   c o n t e n t   o f   t h e   f i l e   f r o m   t h e   d i r   s u b   p a t h   i n   t h e   v o l u m e : c a t   / v o l u m e / f i l e   T h e   o u t p u t   i s   s i m i l a r   t o : 1   C r e a t e   t h e   p o d   o n   y o u r   c l u s t e r :   k u b e c t l   a p p l y   - f   h t t p s : / / k 8 s . i o / e x a m p l e s / p o d s / i m a g e - v o l u m e s - s u b p a t h . y a m l   A t t a c h   t o   t h e   c o n t a i n e r :   k u b e c t l   a t t a c h   - i t   i m a g e - v o l u m e   b a s h   C h e c k   t h e   c o n t e n t   o f   t h e   f i l e   f r o m   t h e   d i r   s u b   p a t h   i n   t h e   v o l u m e :   c a t   / v o l u m e / f i l e   T h e   o u t p u t   i s   s i m i l a r   t o :   1


Question: What is Further reading?

Answer: i m a g e   v o l u m e s


Question: What is PodTemplate?

Answer: PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1import "k8s.io/api/core/v1"PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1kind: PodTemplatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatemplate (PodTemplateSpec)Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateSpecPodTemplateSpec describes the data a pod should have when created from a templatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateListPodTemplateList is a list of PodTemplates.apiVersion: v1kind: PodTemplateListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]PodTemplate), requiredList of pod templatesOperationsget read the specified PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplates/{name}Parametersname (in path): string, requiredname of the PodTemplatenamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (PodTemplate): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplatesParametersnamespace (in path): string, requirednamespaceallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/podtemplatesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedcreate create a PodTemplateHTTP RequestPOST /api/v1/namespaces/{namespace}/pod


Question: How does PodTemplate work?

Answer: PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1import "k8s.io/api/core/v1"PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1kind: PodTemplatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatemplate (PodTemplateSpec)Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateSpecPodTemplateSpec describes the data a pod should have when created from a templatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateListPodTemplateList is a list of PodTemplates.apiVersion: v1kind: PodTemplateListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]PodTemplate), requiredList of pod templatesOperationsget read the specified PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplates/{name}Parametersname (in path): string, requiredname of the PodTemplatenamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (PodTemplate): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplatesParametersnamespace (in path): string, requirednamespaceallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/podtemplatesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedcreate create a PodTemplateHTTP RequestPOST /api/v1/namespaces/{namespace}/pod


Question: When would you use PodTemplate?

Answer: PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1import "k8s.io/api/core/v1"PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1kind: PodTemplatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatemplate (PodTemplateSpec)Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateSpecPodTemplateSpec describes the data a pod should have when created from a templatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateListPodTemplateList is a list of PodTemplates.apiVersion: v1kind: PodTemplateListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]PodTemplate), requiredList of pod templatesOperationsget read the specified PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplates/{name}Parametersname (in path): string, requiredname of the PodTemplatenamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (PodTemplate): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplatesParametersnamespace (in path): string, requirednamespaceallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/podtemplatesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedcreate create a PodTemplateHTTP RequestPOST /api/v1/namespaces/{namespace}/pod


Question: What are the benefits of PodTemplate?

Answer: PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1import "k8s.io/api/core/v1"PodTemplatePodTemplate describes a template for creating copies of a predefined pod.apiVersion: v1kind: PodTemplatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatatemplate (PodTemplateSpec)Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateSpecPodTemplateSpec describes the data a pod should have when created from a templatemetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (PodSpec)Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodTemplateListPodTemplateList is a list of PodTemplates.apiVersion: v1kind: PodTemplateListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]PodTemplate), requiredList of pod templatesOperationsget read the specified PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplates/{name}Parametersname (in path): string, requiredname of the PodTemplatenamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (PodTemplate): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/namespaces/{namespace}/podtemplatesParametersnamespace (in path): string, requirednamespaceallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedlist list or watch objects of kind PodTemplateHTTP RequestGET /api/v1/podtemplatesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (PodTemplateList): OK401: Unauthorizedcreate create a PodTemplateHTTP RequestPOST /api/v1/namespaces/{namespace}/pod


Question: What is PodTemplate?

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


Question: What is PodTemplate?

Answer: P o d T e m p l a t e   d e s c r i b e s   a   t e m p l a t e   f o r   c r e a t i n g   c o p i e s   o f   a   p r e d e f i n e d   p o d .   a p i V e r s i o n :   v 1 k i n d :   P o d T e m p l a t e m e t a d a t a   ( O b j e c t M e t a ) S t a n d a r d   o b j e c t ' s   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # m e t a d a t a t e m p l a t e   ( P o d T e m p l a t e S p e c ) T e m p l a t e   d e f i n e s   t h e   p o d s   t h a t   w i l l   b e   c r e a t e d   f r o m   t h i s   p o d   t e m p l a t e .   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # s p e c - a n d - s t a t u s   a p i V e r s i o n :   v 1   k i n d :   P o d T e m p l a t e   m e t a d a t a   ( O b j e c t M e t a )   S t a n d a r d   o b j e c t ' s   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # m e t a d a t a   t e m p l a t e   ( P o d T e m p l a t e S p e c )   T e m p l a t e   d e f i n e s   t h e   p o d s   t h a t   w i l l   b e   c r e a t e d   f r o m   t h i s   p o d   t e m p l a t e .   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # s p e c - a n d - s t a t u s


Question: What is PodTemplateSpec?

Answer: P o d T e m p l a t e S p e c   d e s c r i b e s   t h e   d a t a   a   p o d   s h o u l d   h a v e   w h e n   c r e a t e d   f r o m   a   t e m p l a t e   m e t a d a t a   ( O b j e c t M e t a ) S t a n d a r d   o b j e c t ' s   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # m e t a d a t a s p e c   ( P o d S p e c ) S p e c i f i c a t i o n   o f   t h e   d e s i r e d   b e h a v i o r   o f   t h e   p o d .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # s p e c - a n d - s t a t u s   m e t a d a t a   ( O b j e c t M e t a )   S t a n d a r d   o b j e c t ' s   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # m e t a d a t a   s p e c   ( P o d S p e c )   S p e c i f i c a t i o n   o f   t h e   d e s i r e d   b e h a v i o r   o f   t h e   p o d .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # s p e c - a n d - s t a t u s


Question: What is PodTemplateList?

Answer: P o d T e m p l a t e L i s t   i s   a   l i s t   o f   P o d T e m p l a t e s .   a p i V e r s i o n :   v 1 k i n d :   P o d T e m p l a t e L i s t m e t a d a t a   ( L i s t M e t a ) S t a n d a r d   l i s t   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # t y p e s - k i n d s i t e m s   ( [ ] P o d T e m p l a t e ) ,   r e q u i r e d L i s t   o f   p o d   t e m p l a t e s   a p i V e r s i o n :   v 1   k i n d :   P o d T e m p l a t e L i s t   m e t a d a t a   ( L i s t M e t a )   S t a n d a r d   l i s t   m e t a d a t a .   M o r e   i n f o :   h t t p s : / / g i t . k 8 s . i o / c o m m u n i t y / c o n t r i b u t o r s / d e v e l / s i g - a r c h i t e c t u r e / a p i - c o n v e n t i o n s . m d # t y p e s - k i n d s   i t e m s   ( [ ] P o d T e m p l a t e ) ,   r e q u i r e d   L i s t   o f   p o d   t e m p l a t e s


Question: What is HTTP Request?

Answer: G E T   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d t e m p l a t e s / { n a m e }


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( P o d T e m p l a t e ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: G E T   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d t e m p l a t e s


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( P o d T e m p l a t e L i s t ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: G E T   / a p i / v 1 / p o d t e m p l a t e s


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( P o d T e m p l a t e L i s t ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: P O S T   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d t e m p l a t e s


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is HTTP Request?

Answer: P U T   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d t e m p l a t e s / { n a m e }


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( P o d T e m p l a t e ) :   O K   2 0 1   ( P o d T e m p l a t e ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: P A T C H   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d t e m p l a t e s / { n a m e }


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( P o d T e m p l a t e ) :   O K   2 0 1   ( P o d T e m p l a t e ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: D E L E T E   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d t e m p l a t e s / { n a m e }


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is HTTP Request?

Answer: D E L E T E   / a p i / v 1 / n a m e s p a c e s / { n a m e s p a c e } / p o d t e m p l a t e s


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is Kubernetes Self-Healing?

Answer: Kubernetes Self-HealingKubernetes is designed with self-healing capabilities that help maintain the health and availability of workloads. It automatically replaces failed containers, reschedules workloads when nodes become unavailable, and ensures that the desired state of the system is maintained.Self-Healing capabilitiesContainer-level restarts: If a container inside a Pod fails, Kubernetes restarts it based on the restartPolicy.Replica replacement: If a Pod in a Deployment or StatefulSet fails, Kubernetes creates a replacement Pod to maintain the specified number of replicas. If a Pod fails that is part of a DaemonSet fails, the control plane creates a replacement Pod to run on the same node.Persistent storage recovery: If a node is running a Pod with a PersistentVolume (PV) attached, and the node fails, Kubernetes can reattach the volume to a new Pod on a different node.Load balancing for Services: If a Pod behind a Service fails, Kubernetes automatically removes it from the Service's endpoints to route traffic only to healthy Pods.Here are some of the key components that provide Kubernetes self-healing:kubelet: Ensures that containers are running, and restarts those that fail.ReplicaSet, StatefulSet and DaemonSet controller: Maintains the desired number of Pod replicas.PersistentVolume controller: Manages volume attachment and detachment for stateful workloads.ConsiderationsStorage Failures: If a persistent volume becomes unavailable, recovery steps may be required.Application Errors: Kubernetes can restart containers, but underlying application issues must be addressed separately.What's nextRead more about PodsLearn about Kubernetes ControllersExplore PersistentVolumesRead about node autoscaling. Node autoscaling also provides automatic healing if or when nodes fail in your cluster.


Question: How does Kubernetes Self-Healing work?

Answer: Kubernetes Self-HealingKubernetes is designed with self-healing capabilities that help maintain the health and availability of workloads. It automatically replaces failed containers, reschedules workloads when nodes become unavailable, and ensures that the desired state of the system is maintained.Self-Healing capabilitiesContainer-level restarts: If a container inside a Pod fails, Kubernetes restarts it based on the restartPolicy.Replica replacement: If a Pod in a Deployment or StatefulSet fails, Kubernetes creates a replacement Pod to maintain the specified number of replicas. If a Pod fails that is part of a DaemonSet fails, the control plane creates a replacement Pod to run on the same node.Persistent storage recovery: If a node is running a Pod with a PersistentVolume (PV) attached, and the node fails, Kubernetes can reattach the volume to a new Pod on a different node.Load balancing for Services: If a Pod behind a Service fails, Kubernetes automatically removes it from the Service's endpoints to route traffic only to healthy Pods.Here are some of the key components that provide Kubernetes self-healing:kubelet: Ensures that containers are running, and restarts those that fail.ReplicaSet, StatefulSet and DaemonSet controller: Maintains the desired number of Pod replicas.PersistentVolume controller: Manages volume attachment and detachment for stateful workloads.ConsiderationsStorage Failures: If a persistent volume becomes unavailable, recovery steps may be required.Application Errors: Kubernetes can restart containers, but underlying application issues must be addressed separately.What's nextRead more about PodsLearn about Kubernetes ControllersExplore PersistentVolumesRead about node autoscaling. Node autoscaling also provides automatic healing if or when nodes fail in your cluster.


Question: When would you use Kubernetes Self-Healing?

Answer: Kubernetes Self-HealingKubernetes is designed with self-healing capabilities that help maintain the health and availability of workloads. It automatically replaces failed containers, reschedules workloads when nodes become unavailable, and ensures that the desired state of the system is maintained.Self-Healing capabilitiesContainer-level restarts: If a container inside a Pod fails, Kubernetes restarts it based on the restartPolicy.Replica replacement: If a Pod in a Deployment or StatefulSet fails, Kubernetes creates a replacement Pod to maintain the specified number of replicas. If a Pod fails that is part of a DaemonSet fails, the control plane creates a replacement Pod to run on the same node.Persistent storage recovery: If a node is running a Pod with a PersistentVolume (PV) attached, and the node fails, Kubernetes can reattach the volume to a new Pod on a different node.Load balancing for Services: If a Pod behind a Service fails, Kubernetes automatically removes it from the Service's endpoints to route traffic only to healthy Pods.Here are some of the key components that provide Kubernetes self-healing:kubelet: Ensures that containers are running, and restarts those that fail.ReplicaSet, StatefulSet and DaemonSet controller: Maintains the desired number of Pod replicas.PersistentVolume controller: Manages volume attachment and detachment for stateful workloads.ConsiderationsStorage Failures: If a persistent volume becomes unavailable, recovery steps may be required.Application Errors: Kubernetes can restart containers, but underlying application issues must be addressed separately.What's nextRead more about PodsLearn about Kubernetes ControllersExplore PersistentVolumesRead about node autoscaling. Node autoscaling also provides automatic healing if or when nodes fail in your cluster.


Question: What are the benefits of Kubernetes Self-Healing?

Answer: Kubernetes Self-HealingKubernetes is designed with self-healing capabilities that help maintain the health and availability of workloads. It automatically replaces failed containers, reschedules workloads when nodes become unavailable, and ensures that the desired state of the system is maintained.Self-Healing capabilitiesContainer-level restarts: If a container inside a Pod fails, Kubernetes restarts it based on the restartPolicy.Replica replacement: If a Pod in a Deployment or StatefulSet fails, Kubernetes creates a replacement Pod to maintain the specified number of replicas. If a Pod fails that is part of a DaemonSet fails, the control plane creates a replacement Pod to run on the same node.Persistent storage recovery: If a node is running a Pod with a PersistentVolume (PV) attached, and the node fails, Kubernetes can reattach the volume to a new Pod on a different node.Load balancing for Services: If a Pod behind a Service fails, Kubernetes automatically removes it from the Service's endpoints to route traffic only to healthy Pods.Here are some of the key components that provide Kubernetes self-healing:kubelet: Ensures that containers are running, and restarts those that fail.ReplicaSet, StatefulSet and DaemonSet controller: Maintains the desired number of Pod replicas.PersistentVolume controller: Manages volume attachment and detachment for stateful workloads.ConsiderationsStorage Failures: If a persistent volume becomes unavailable, recovery steps may be required.Application Errors: Kubernetes can restart containers, but underlying application issues must be addressed separately.What's nextRead more about PodsLearn about Kubernetes ControllersExplore PersistentVolumesRead about node autoscaling. Node autoscaling also provides automatic healing if or when nodes fail in your cluster.


Question: What is Kubernetes Self-Healing?

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


Question: What is Self-Healing capabilities?

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


Question: What is Considerations?

Answer: S t o r a g e   F a i l u r e s :   I f   a   p e r s i s t e n t   v o l u m e   b e c o m e s   u n a v a i l a b l e ,   r e c o v e r y   s t e p s   m a y   b e   r e q u i r e d . A p p l i c a t i o n   E r r o r s :   K u b e r n e t e s   c a n   r e s t a r t   c o n t a i n e r s ,   b u t   u n d e r l y i n g   a p p l i c a t i o n   i s s u e s   m u s t   b e   a d d r e s s e d   s e p a r a t e l y .   S t o r a g e   F a i l u r e s :   I f   a   p e r s i s t e n t   v o l u m e   b e c o m e s   u n a v a i l a b l e ,   r e c o v e r y   s t e p s   m a y   b e   r e q u i r e d .   A p p l i c a t i o n   E r r o r s :   K u b e r n e t e s   c a n   r e s t a r t   c o n t a i n e r s ,   b u t   u n d e r l y i n g   a p p l i c a t i o n   i s s u e s   m u s t   b e   a d d r e s s e d   s e p a r a t e l y .


Question: What is What's next?

Answer: R e a d   m o r e   a b o u t   P o d s L e a r n   a b o u t   K u b e r n e t e s   C o n t r o l l e r s E x p l o r e   P e r s i s t e n t V o l u m e s R e a d   a b o u t   n o d e   a u t o s c a l i n g .   N o d e   a u t o s c a l i n g   a l s o   p r o v i d e s   a u t o m a t i c   h e a l i n g   i f   o r   w h e n   n o d e s   f a i l   i n   y o u r   c l u s t e r .


Question: What is Recommended Labels?

Answer: Recommended LabelsYou can visualize and manage Kubernetes objects with more tools than kubectl and the dashboard. A common set of labels allows tools to work interoperably, describing objects in a common manner that all tools can understand.In addition to supporting tooling, the recommended labels describe applications in a way that can be queried.The metadata is organized around the concept of an application. Kubernetes is not a platform as a service (PaaS) and doesn't have or enforce a formal notion of an application. Instead, applications are informal and described with metadata. The definition of what an application contains is loose.Note:These are recommended labels. They make it easier to manage applications but aren't required for any core tooling.Shared labels and annotations share a common prefix: app.kubernetes.io. Labels without a prefix are private to users. The shared prefix ensures that shared labels do not interfere with custom user labels.LabelsIn order to take full advantage of using these labels, they should be applied on every resource object.KeyDescriptionExampleTypeapp.kubernetes.io/nameThe name of the applicationmysqlstringapp.kubernetes.io/instanceA unique name identifying the instance of an applicationmysql-abcxyzstringapp.kubernetes.io/versionThe current version of the application (e.g., a SemVer 1.0, revision hash, etc.)5.7.21stringapp.kubernetes.io/componentThe component within the architecturedatabasestringapp.kubernetes.io/part-ofThe name of a higher level application this one is part ofwordpressstringapp.kubernetes.io/managed-byThe tool being used to manage the operation of an applicationHelmstringTo illustrate these labels in action, consider the following StatefulSet object:# This is an excerpt apiVersion: apps/v1 kind: StatefulSet metadata: labels: app.kubernetes.io/name: mysql app.kubernetes.io/instance: mysql-abcxyz app.kubernetes.io/version: "5.7.21" app.kubernetes.io/component: database app.kubernetes.io/part-of: wordpress app.kubernetes.io/managed-by: Helm Applications And Instances Of ApplicationsAn application can be installed one or more times into a Kubernetes cluster and, in some cases, the same namespace. For example, WordPress can be installed more than once where different websites are different installations of WordPress.The name of an application and the instance name are recorded separately. For example, WordPress has a app.kubernetes.io/name of wordpress while it has an instance name, represented as app.kubernetes.io/instance with a value of wordpress-abcxyz. This enables the application and instance of the application to be identifiable. Every instance of an application must have a unique name.ExamplesTo illustrate different ways to use these labels the following examples have varying complexity.A Simple Stateless ServiceConsider the case for a simple stateless service deployed using Deployment and Service objects. The following two snippets represent how the labels could be used in their simples


Question: How does Recommended Labels work?

Answer: Recommended LabelsYou can visualize and manage Kubernetes objects with more tools than kubectl and the dashboard. A common set of labels allows tools to work interoperably, describing objects in a common manner that all tools can understand.In addition to supporting tooling, the recommended labels describe applications in a way that can be queried.The metadata is organized around the concept of an application. Kubernetes is not a platform as a service (PaaS) and doesn't have or enforce a formal notion of an application. Instead, applications are informal and described with metadata. The definition of what an application contains is loose.Note:These are recommended labels. They make it easier to manage applications but aren't required for any core tooling.Shared labels and annotations share a common prefix: app.kubernetes.io. Labels without a prefix are private to users. The shared prefix ensures that shared labels do not interfere with custom user labels.LabelsIn order to take full advantage of using these labels, they should be applied on every resource object.KeyDescriptionExampleTypeapp.kubernetes.io/nameThe name of the applicationmysqlstringapp.kubernetes.io/instanceA unique name identifying the instance of an applicationmysql-abcxyzstringapp.kubernetes.io/versionThe current version of the application (e.g., a SemVer 1.0, revision hash, etc.)5.7.21stringapp.kubernetes.io/componentThe component within the architecturedatabasestringapp.kubernetes.io/part-ofThe name of a higher level application this one is part ofwordpressstringapp.kubernetes.io/managed-byThe tool being used to manage the operation of an applicationHelmstringTo illustrate these labels in action, consider the following StatefulSet object:# This is an excerpt apiVersion: apps/v1 kind: StatefulSet metadata: labels: app.kubernetes.io/name: mysql app.kubernetes.io/instance: mysql-abcxyz app.kubernetes.io/version: "5.7.21" app.kubernetes.io/component: database app.kubernetes.io/part-of: wordpress app.kubernetes.io/managed-by: Helm Applications And Instances Of ApplicationsAn application can be installed one or more times into a Kubernetes cluster and, in some cases, the same namespace. For example, WordPress can be installed more than once where different websites are different installations of WordPress.The name of an application and the instance name are recorded separately. For example, WordPress has a app.kubernetes.io/name of wordpress while it has an instance name, represented as app.kubernetes.io/instance with a value of wordpress-abcxyz. This enables the application and instance of the application to be identifiable. Every instance of an application must have a unique name.ExamplesTo illustrate different ways to use these labels the following examples have varying complexity.A Simple Stateless ServiceConsider the case for a simple stateless service deployed using Deployment and Service objects. The following two snippets represent how the labels could be used in their simples


Question: When would you use Recommended Labels?

Answer: Recommended LabelsYou can visualize and manage Kubernetes objects with more tools than kubectl and the dashboard. A common set of labels allows tools to work interoperably, describing objects in a common manner that all tools can understand.In addition to supporting tooling, the recommended labels describe applications in a way that can be queried.The metadata is organized around the concept of an application. Kubernetes is not a platform as a service (PaaS) and doesn't have or enforce a formal notion of an application. Instead, applications are informal and described with metadata. The definition of what an application contains is loose.Note:These are recommended labels. They make it easier to manage applications but aren't required for any core tooling.Shared labels and annotations share a common prefix: app.kubernetes.io. Labels without a prefix are private to users. The shared prefix ensures that shared labels do not interfere with custom user labels.LabelsIn order to take full advantage of using these labels, they should be applied on every resource object.KeyDescriptionExampleTypeapp.kubernetes.io/nameThe name of the applicationmysqlstringapp.kubernetes.io/instanceA unique name identifying the instance of an applicationmysql-abcxyzstringapp.kubernetes.io/versionThe current version of the application (e.g., a SemVer 1.0, revision hash, etc.)5.7.21stringapp.kubernetes.io/componentThe component within the architecturedatabasestringapp.kubernetes.io/part-ofThe name of a higher level application this one is part ofwordpressstringapp.kubernetes.io/managed-byThe tool being used to manage the operation of an applicationHelmstringTo illustrate these labels in action, consider the following StatefulSet object:# This is an excerpt apiVersion: apps/v1 kind: StatefulSet metadata: labels: app.kubernetes.io/name: mysql app.kubernetes.io/instance: mysql-abcxyz app.kubernetes.io/version: "5.7.21" app.kubernetes.io/component: database app.kubernetes.io/part-of: wordpress app.kubernetes.io/managed-by: Helm Applications And Instances Of ApplicationsAn application can be installed one or more times into a Kubernetes cluster and, in some cases, the same namespace. For example, WordPress can be installed more than once where different websites are different installations of WordPress.The name of an application and the instance name are recorded separately. For example, WordPress has a app.kubernetes.io/name of wordpress while it has an instance name, represented as app.kubernetes.io/instance with a value of wordpress-abcxyz. This enables the application and instance of the application to be identifiable. Every instance of an application must have a unique name.ExamplesTo illustrate different ways to use these labels the following examples have varying complexity.A Simple Stateless ServiceConsider the case for a simple stateless service deployed using Deployment and Service objects. The following two snippets represent how the labels could be used in their simples


Question: What are the benefits of Recommended Labels?

Answer: Recommended LabelsYou can visualize and manage Kubernetes objects with more tools than kubectl and the dashboard. A common set of labels allows tools to work interoperably, describing objects in a common manner that all tools can understand.In addition to supporting tooling, the recommended labels describe applications in a way that can be queried.The metadata is organized around the concept of an application. Kubernetes is not a platform as a service (PaaS) and doesn't have or enforce a formal notion of an application. Instead, applications are informal and described with metadata. The definition of what an application contains is loose.Note:These are recommended labels. They make it easier to manage applications but aren't required for any core tooling.Shared labels and annotations share a common prefix: app.kubernetes.io. Labels without a prefix are private to users. The shared prefix ensures that shared labels do not interfere with custom user labels.LabelsIn order to take full advantage of using these labels, they should be applied on every resource object.KeyDescriptionExampleTypeapp.kubernetes.io/nameThe name of the applicationmysqlstringapp.kubernetes.io/instanceA unique name identifying the instance of an applicationmysql-abcxyzstringapp.kubernetes.io/versionThe current version of the application (e.g., a SemVer 1.0, revision hash, etc.)5.7.21stringapp.kubernetes.io/componentThe component within the architecturedatabasestringapp.kubernetes.io/part-ofThe name of a higher level application this one is part ofwordpressstringapp.kubernetes.io/managed-byThe tool being used to manage the operation of an applicationHelmstringTo illustrate these labels in action, consider the following StatefulSet object:# This is an excerpt apiVersion: apps/v1 kind: StatefulSet metadata: labels: app.kubernetes.io/name: mysql app.kubernetes.io/instance: mysql-abcxyz app.kubernetes.io/version: "5.7.21" app.kubernetes.io/component: database app.kubernetes.io/part-of: wordpress app.kubernetes.io/managed-by: Helm Applications And Instances Of ApplicationsAn application can be installed one or more times into a Kubernetes cluster and, in some cases, the same namespace. For example, WordPress can be installed more than once where different websites are different installations of WordPress.The name of an application and the instance name are recorded separately. For example, WordPress has a app.kubernetes.io/name of wordpress while it has an instance name, represented as app.kubernetes.io/instance with a value of wordpress-abcxyz. This enables the application and instance of the application to be identifiable. Every instance of an application must have a unique name.ExamplesTo illustrate different ways to use these labels the following examples have varying complexity.A Simple Stateless ServiceConsider the case for a simple stateless service deployed using Deployment and Service objects. The following two snippets represent how the labels could be used in their simples


Question: What is Recommended Labels?

Answer: Y o u   c a n   v i s u a l i z e   a n d   m a n a g e   K u b e r n e t e s   o b j e c t s   w i t h   m o r e   t o o l s   t h a n   k u b e c t l   a n d   t h e   d a s h b o a r d .   A   c o m m o n   s e t   o f   l a b e l s   a l l o w s   t o o l s   t o   w o r k   i n t e r o p e r a b l y ,   d e s c r i b i n g   o b j e c t s   i n   a   c o m m o n   m a n n e r   t h a t   a l l   t o o l s   c a n   u n d e r s t a n d .   I n   a d d i t i o n   t o   s u p p o r t i n g   t o o l i n g ,   t h e   r e c o m m e n d e d   l a b e l s   d e s c r i b e   a p p l i c a t i o n s   i n   a   w a y   t h a t   c a n   b e   q u e r i e d .   T h e   m e t a d a t a   i s   o r g a n i z e d   a r o u n d   t h e   c o n c e p t   o f   a n   a p p l i c a t i o n .   K u b e r n e t e s   i s   n o t   a   p l a t f o r m   a s   a   s e r v i c e   ( P a a S )   a n d   d o e s n ' t   h a v e   o r   e n f o r c e   a   f o r m a l   n o t i o n   o f   a n   a p p l i c a t i o n .   I n s t e a d ,   a p p l i c a t i o n s   a r e   i n f o r m a l   a n d   d e s c r i b e d   w i t h   m e t a d a t a .   T h e   d e f i n i t i o n   o f   w h a t   a n   a p p l i c a t i o n   c o n t a i n s   i s   l o o s e .


Question: What is Note:?

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


Question: What is Labels?

Answer: I n   o r d e r   t o   t a k e   f u l l   a d v a n t a g e   o f   u s i n g   t h e s e   l a b e l s ,   t h e y   s h o u l d   b e   a p p l i e d   o n   e v e r y   r e s o u r c e   o b j e c t .   T o   i l l u s t r a t e   t h e s e   l a b e l s   i n   a c t i o n ,   c o n s i d e r   t h e   f o l l o w i n g   S t a t e f u l S e t   o b j e c t :   #   T h i s   i s   a n   e x c e r p t   a p i V e r s i o n :   a p p s / v 1   k i n d :   S t a t e f u l S e t   m e t a d a t a :   l a b e l s :   a p p . k u b e r n e t e s . i o / n a m e :   m y s q l   a p p . k u b e r n e t e s . i o / i n s t a n c e :   m y s q l - a b c x y z   a p p . k u b e r n e t e s . i o / v e r s i o n :   " 5 . 7 . 2 1 "   a p p . k u b e r n e t e s . i o / c o m p o n e n t :   d a t a b a s e   a p p . k u b e r n e t e s . i o / p a r t - o f :   w o r d p r e s s   a p p . k u b e r n e t e s . i o / m a n a g e d - b y :   H e l m


Question: What is Applications And Instances Of Applications?

Answer: A n   a p p l i c a t i o n   c a n   b e   i n s t a l l e d   o n e   o r   m o r e   t i m e s   i n t o   a   K u b e r n e t e s   c l u s t e r   a n d ,   i n   s o m e   c a s e s ,   t h e   s a m e   n a m e s p a c e .   F o r   e x a m p l e ,   W o r d P r e s s   c a n   b e   i n s t a l l e d   m o r e   t h a n   o n c e   w h e r e   d i f f e r e n t   w e b s i t e s   a r e   d i f f e r e n t   i n s t a l l a t i o n s   o f   W o r d P r e s s .   T h e   n a m e   o f   a n   a p p l i c a t i o n   a n d   t h e   i n s t a n c e   n a m e   a r e   r e c o r d e d   s e p a r a t e l y .   F o r   e x a m p l e ,   W o r d P r e s s   h a s   a   a p p . k u b e r n e t e s . i o / n a m e   o f   w o r d p r e s s   w h i l e   i t   h a s   a n   i n s t a n c e   n a m e ,   r e p r e s e n t e d   a s   a p p . k u b e r n e t e s . i o / i n s t a n c e   w i t h   a   v a l u e   o f   w o r d p r e s s - a b c x y z .   T h i s   e n a b l e s   t h e   a p p l i c a t i o n   a n d   i n s t a n c e   o f   t h e   a p p l i c a t i o n   t o   b e   i d e n t i f i a b l e .   E v e r y   i n s t a n c e   o f   a n   a p p l i c a t i o n   m u s t   h a v e   a   u n i q u e   n a m e .


Question: What is Examples?

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


Question: What is A Simple Stateless Service?

Answer: C o n s i d e r   t h e   c a s e   f o r   a   s i m p l e   s t a t e l e s s   s e r v i c e   d e p l o y e d   u s i n g   D e p l o y m e n t   a n d   S e r v i c e   o b j e c t s .   T h e   f o l l o w i n g   t w o   s n i p p e t s   r e p r e s e n t   h o w   t h e   l a b e l s   c o u l d   b e   u s e d   i n   t h e i r   s i m p l e s t   f o r m .   T h e   D e p l o y m e n t   i s   u s e d   t o   o v e r s e e   t h e   p o d s   r u n n i n g   t h e   a p p l i c a t i o n   i t s e l f .   a p i V e r s i o n :   a p p s / v 1   k i n d :   D e p l o y m e n t   m e t a d a t a :   l a b e l s :   a p p . k u b e r n e t e s . i o / n a m e :   m y s e r v i c e   a p p . k u b e r n e t e s . i o / i n s t a n c e :   m y s e r v i c e - a b c x y z   . . .   T h e   S e r v i c e   i s   u s e d   t o   e x p o s e   t h e   a p p l i c a t i o n .   a p i V e r s i o n :   v 1   k i n d :   S e r v i c e   m e t a d a t a :   l a b e l s :   a p p . k u b e r n e t e s . i o / n a m e :   m y s e r v i c e   a p p . k u b e r n e t e s . i o / i n s t a n c e :   m y s e r v i c e - a b c x y z   . . .


Question: What is Web Application With A Database?

Answer: C o n s i d e r   a   s l i g h t l y   m o r e   c o m p l i c a t e d   a p p l i c a t i o n :   a   w e b   a p p l i c a t i o n   ( W o r d P r e s s )   u s i n g   a   d a t a b a s e   ( M y S Q L ) ,   i n s t a l l e d   u s i n g   H e l m .   T h e   f o l l o w i n g   s n i p p e t s   i l l u s t r a t e   t h e   s t a r t   o f   o b j e c t s   u s e d   t o   d e p l o y   t h i s   a p p l i c a t i o n .   T h e   s t a r t   t o   t h e   f o l l o w i n g   D e p l o y m e n t   i s   u s e d   f o r   W o r d P r e s s :   a p i V e r s i o n :   a p p s / v 1   k i n d :   D e p l o y m e n t   m e t a d a t a :   l a b e l s :   a p p . k u b e r n e t e s . i o / n a m e :   w o r d p r e s s   a p p . k u b e r n e t e s . i o / i n s t a n c e :   w o r d p r e s s - a b c x y z   a p p . k u b e r n e t e s . i o / v e r s i o n :   " 4 . 9 . 4 "   a p p . k u b e r n e t e s . i o / m a n a g e d - b y :   H e l m   a p p . k u b e r n e t e s . i o / c o m p o n e n t :   s e r v e r   a p p . k u b e r n e t e s . i o / p a r t - o f :   w o r d p r e s s   . . .   T h e   S e r v i c e   i s   u s e d   t o   e x p o s e   W o r d P r e s s :   a p i V e r s i o n :   v 1   k i n d :   S e r v i c e   m e t a d a t a :   l a b e l s :   a p p . k u b e r n e t e s . i o / n a m e :   w o r d p r e s s   a p p . k u b e r n e t e s . i o / i n s t a n c e :   w o r d p r e s s - a b c x y z   a p p . k u b e r n e t e s . i o / v e r s i o n :   " 4 . 9 . 4 "   a p p . k u b e r n e t e s . i o / m a n a g e d - b y :   H e l m   a p p . k u b e r n e t e s . i o / c o m p o n e n t :   s e r v e r   a p p . k u b e r n e t e s . i o / p a r t - o f :   w o r d p r e s s   . . .   M y S Q L   i s   e x p o s e d   a s   a   S t a t e f u l S e t   w i t h   m e t a d a t a   f o r   b o t h   i t   a n d   t h e   l a r g e r   a p p l i c a t i o n   i t   b e l o n g s   t o :   a p i V e r s i o n :   a p p s / v 1   k i n d :


Question: What is Administer a Cluster?

Answer: Administer a ClusterLearn common tasks for administering a cluster.Administration with kubeadmOverprovision Node Capacity For A ClusterMigrating from dockershimGenerate Certificates ManuallyManage Memory, CPU, and API ResourcesInstall a Network Policy ProviderAccess Clusters Using the Kubernetes APIAdvertise Extended Resources for a NodeAutoscale the DNS Service in a ClusterChange the Access Mode of a PersistentVolume to ReadWriteOncePodChange the default StorageClassSwitching from Polling to CRI Event-based Updates to Container StatusChange the Reclaim Policy of a PersistentVolumeCloud Controller Manager AdministrationConfigure a kubelet image credential providerConfigure Quotas for API ObjectsControl CPU Management Policies on the NodeControl Topology Management Policies on a nodeCustomizing DNS ServiceDebugging DNS ResolutionDeclare Network PolicyDeveloping Cloud Controller ManagerEnable Or Disable A Kubernetes APIEncrypting Confidential Data at RestDecrypt Confidential Data that is Already Encrypted at RestGuaranteed Scheduling For Critical Add-On PodsIP Masquerade Agent User GuideLimit Storage ConsumptionMigrate Replicated Control Plane To Use Cloud Controller ManagerOperating etcd clusters for KubernetesReserve Compute Resources for System DaemonsRunning Kubernetes Node Components as a Non-root UserSafely Drain a NodeSecuring a ClusterSet Kubelet Parameters Via A Configuration FileShare a Cluster with NamespacesUpgrade A ClusterUse Cascading Deletion in a ClusterUsing a KMS provider for data encryptionUsing CoreDNS for Service DiscoveryUsing NodeLocal DNSCache in Kubernetes ClustersUsing sysctls in a Kubernetes ClusterUtilizing the NUMA-aware Memory ManagerVerify Signed Kubernetes Artifacts