Question: What is Customizing components with the kubeadm API?

Answer: Customizing components with the kubeadm APIThis page covers how to customize the components that kubeadm deploys. For control plane components you can use flags in the ClusterConfiguration structure or patches per-node. For the kubelet and kube-proxy you can use KubeletConfiguration and KubeProxyConfiguration, accordingly.All of these options are possible via the kubeadm configuration API. For more details on each field in the configuration you can navigate to our API reference pages.Note:Customizing the CoreDNS deployment of kubeadm is currently not supported. You must manually patch the kube-system/coredns ConfigMap and recreate the CoreDNS Pods after that. Alternatively, you can skip the default CoreDNS deployment and deploy your own variant. For more details on that see Using init phases with kubeadm.Note:To reconfigure a cluster that has already been created see Reconfiguring a kubeadm cluster.Customizing the control plane with flags in ClusterConfigurationThe kubeadm ClusterConfiguration object exposes a way for users to override the default flags passed to control plane components such as the APIServer, ControllerManager, Scheduler and Etcd. The components are defined using the following structures:apiServercontrollerManagerscheduleretcdThese structures contain a common extraArgs field, that consists of name / value pairs. To override a flag for a control plane component:Add the appropriate extraArgs to your configuration.Add flags to the extraArgs field.Run kubeadm init with --config <YOUR CONFIG YAML>.Note:You can generate a ClusterConfiguration object with default values by running kubeadm config print init-defaults and saving the output to a file of your choice.Note:The ClusterConfiguration object is currently global in kubeadm clusters. This means that any flags that you add, will apply to all instances of the same component on different nodes. To apply individual configuration per component on different nodes you can use patches.Note:Duplicate flags (keys), or passing the same flag --foo multiple times, is currently not supported. To workaround that you must use patches.APIServer flagsFor details, see the reference documentation for kube-apiserver.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 apiServer: extraArgs: - name: "enable-admission-plugins" value: "AlwaysPullImages,DefaultStorageClass" - name: "audit-log-path" value: "/home/johndoe/audit.log" ControllerManager flagsFor details, see the reference documentation for kube-controller-manager.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 controllerManager: extraArgs: - name: "cluster-signing-key-file" value: "/home/johndoe/keys/ca.key" - name: "deployment-controller-sync-period" value: "50" Scheduler flagsFor details, see the reference documentation for kube-scheduler.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0


Question: How does Customizing components with the kubeadm API work?

Answer: Customizing components with the kubeadm APIThis page covers how to customize the components that kubeadm deploys. For control plane components you can use flags in the ClusterConfiguration structure or patches per-node. For the kubelet and kube-proxy you can use KubeletConfiguration and KubeProxyConfiguration, accordingly.All of these options are possible via the kubeadm configuration API. For more details on each field in the configuration you can navigate to our API reference pages.Note:Customizing the CoreDNS deployment of kubeadm is currently not supported. You must manually patch the kube-system/coredns ConfigMap and recreate the CoreDNS Pods after that. Alternatively, you can skip the default CoreDNS deployment and deploy your own variant. For more details on that see Using init phases with kubeadm.Note:To reconfigure a cluster that has already been created see Reconfiguring a kubeadm cluster.Customizing the control plane with flags in ClusterConfigurationThe kubeadm ClusterConfiguration object exposes a way for users to override the default flags passed to control plane components such as the APIServer, ControllerManager, Scheduler and Etcd. The components are defined using the following structures:apiServercontrollerManagerscheduleretcdThese structures contain a common extraArgs field, that consists of name / value pairs. To override a flag for a control plane component:Add the appropriate extraArgs to your configuration.Add flags to the extraArgs field.Run kubeadm init with --config <YOUR CONFIG YAML>.Note:You can generate a ClusterConfiguration object with default values by running kubeadm config print init-defaults and saving the output to a file of your choice.Note:The ClusterConfiguration object is currently global in kubeadm clusters. This means that any flags that you add, will apply to all instances of the same component on different nodes. To apply individual configuration per component on different nodes you can use patches.Note:Duplicate flags (keys), or passing the same flag --foo multiple times, is currently not supported. To workaround that you must use patches.APIServer flagsFor details, see the reference documentation for kube-apiserver.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 apiServer: extraArgs: - name: "enable-admission-plugins" value: "AlwaysPullImages,DefaultStorageClass" - name: "audit-log-path" value: "/home/johndoe/audit.log" ControllerManager flagsFor details, see the reference documentation for kube-controller-manager.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 controllerManager: extraArgs: - name: "cluster-signing-key-file" value: "/home/johndoe/keys/ca.key" - name: "deployment-controller-sync-period" value: "50" Scheduler flagsFor details, see the reference documentation for kube-scheduler.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0


Question: When would you use Customizing components with the kubeadm API?

Answer: Customizing components with the kubeadm APIThis page covers how to customize the components that kubeadm deploys. For control plane components you can use flags in the ClusterConfiguration structure or patches per-node. For the kubelet and kube-proxy you can use KubeletConfiguration and KubeProxyConfiguration, accordingly.All of these options are possible via the kubeadm configuration API. For more details on each field in the configuration you can navigate to our API reference pages.Note:Customizing the CoreDNS deployment of kubeadm is currently not supported. You must manually patch the kube-system/coredns ConfigMap and recreate the CoreDNS Pods after that. Alternatively, you can skip the default CoreDNS deployment and deploy your own variant. For more details on that see Using init phases with kubeadm.Note:To reconfigure a cluster that has already been created see Reconfiguring a kubeadm cluster.Customizing the control plane with flags in ClusterConfigurationThe kubeadm ClusterConfiguration object exposes a way for users to override the default flags passed to control plane components such as the APIServer, ControllerManager, Scheduler and Etcd. The components are defined using the following structures:apiServercontrollerManagerscheduleretcdThese structures contain a common extraArgs field, that consists of name / value pairs. To override a flag for a control plane component:Add the appropriate extraArgs to your configuration.Add flags to the extraArgs field.Run kubeadm init with --config <YOUR CONFIG YAML>.Note:You can generate a ClusterConfiguration object with default values by running kubeadm config print init-defaults and saving the output to a file of your choice.Note:The ClusterConfiguration object is currently global in kubeadm clusters. This means that any flags that you add, will apply to all instances of the same component on different nodes. To apply individual configuration per component on different nodes you can use patches.Note:Duplicate flags (keys), or passing the same flag --foo multiple times, is currently not supported. To workaround that you must use patches.APIServer flagsFor details, see the reference documentation for kube-apiserver.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 apiServer: extraArgs: - name: "enable-admission-plugins" value: "AlwaysPullImages,DefaultStorageClass" - name: "audit-log-path" value: "/home/johndoe/audit.log" ControllerManager flagsFor details, see the reference documentation for kube-controller-manager.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 controllerManager: extraArgs: - name: "cluster-signing-key-file" value: "/home/johndoe/keys/ca.key" - name: "deployment-controller-sync-period" value: "50" Scheduler flagsFor details, see the reference documentation for kube-scheduler.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0


Question: What are the benefits of Customizing components with the kubeadm API?

Answer: Customizing components with the kubeadm APIThis page covers how to customize the components that kubeadm deploys. For control plane components you can use flags in the ClusterConfiguration structure or patches per-node. For the kubelet and kube-proxy you can use KubeletConfiguration and KubeProxyConfiguration, accordingly.All of these options are possible via the kubeadm configuration API. For more details on each field in the configuration you can navigate to our API reference pages.Note:Customizing the CoreDNS deployment of kubeadm is currently not supported. You must manually patch the kube-system/coredns ConfigMap and recreate the CoreDNS Pods after that. Alternatively, you can skip the default CoreDNS deployment and deploy your own variant. For more details on that see Using init phases with kubeadm.Note:To reconfigure a cluster that has already been created see Reconfiguring a kubeadm cluster.Customizing the control plane with flags in ClusterConfigurationThe kubeadm ClusterConfiguration object exposes a way for users to override the default flags passed to control plane components such as the APIServer, ControllerManager, Scheduler and Etcd. The components are defined using the following structures:apiServercontrollerManagerscheduleretcdThese structures contain a common extraArgs field, that consists of name / value pairs. To override a flag for a control plane component:Add the appropriate extraArgs to your configuration.Add flags to the extraArgs field.Run kubeadm init with --config <YOUR CONFIG YAML>.Note:You can generate a ClusterConfiguration object with default values by running kubeadm config print init-defaults and saving the output to a file of your choice.Note:The ClusterConfiguration object is currently global in kubeadm clusters. This means that any flags that you add, will apply to all instances of the same component on different nodes. To apply individual configuration per component on different nodes you can use patches.Note:Duplicate flags (keys), or passing the same flag --foo multiple times, is currently not supported. To workaround that you must use patches.APIServer flagsFor details, see the reference documentation for kube-apiserver.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 apiServer: extraArgs: - name: "enable-admission-plugins" value: "AlwaysPullImages,DefaultStorageClass" - name: "audit-log-path" value: "/home/johndoe/audit.log" ControllerManager flagsFor details, see the reference documentation for kube-controller-manager.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0 controllerManager: extraArgs: - name: "cluster-signing-key-file" value: "/home/johndoe/keys/ca.key" - name: "deployment-controller-sync-period" value: "50" Scheduler flagsFor details, see the reference documentation for kube-scheduler.Example usage:apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration kubernetesVersion: v1.16.0


Question: What is Customizing components with the kubeadm API?

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


Question: What is Customizing the control plane with flags in ClusterConfiguration?

Answer: T h e   k u b e a d m   C l u s t e r C o n f i g u r a t i o n   o b j e c t   e x p o s e s   a   w a y   f o r   u s e r s   t o   o v e r r i d e   t h e   d e f a u l t   f l a g s   p a s s e d   t o   c o n t r o l   p l a n e   c o m p o n e n t s   s u c h   a s   t h e   A P I S e r v e r ,   C o n t r o l l e r M a n a g e r ,   S c h e d u l e r   a n d   E t c d .   T h e   c o m p o n e n t s   a r e   d e f i n e d   u s i n g   t h e   f o l l o w i n g   s t r u c t u r e s :   a p i S e r v e r c o n t r o l l e r M a n a g e r s c h e d u l e r e t c d   T h e s e   s t r u c t u r e s   c o n t a i n   a   c o m m o n   e x t r a A r g s   f i e l d ,   t h a t   c o n s i s t s   o f   n a m e   /   v a l u e   p a i r s .   T o   o v e r r i d e   a   f l a g   f o r   a   c o n t r o l   p l a n e   c o m p o n e n t :   A d d   t h e   a p p r o p r i a t e   e x t r a A r g s   t o   y o u r   c o n f i g u r a t i o n . A d d   f l a g s   t o   t h e   e x t r a A r g s   f i e l d . R u n   k u b e a d m   i n i t   w i t h   - - c o n f i g   < Y O U R   C O N F I G   Y A M L > .


Question: What is APIServer flags?

Answer: F o r   d e t a i l s ,   s e e   t h e   r e f e r e n c e   d o c u m e n t a t i o n   f o r   k u b e - a p i s e r v e r .   E x a m p l e   u s a g e :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   k u b e r n e t e s V e r s i o n :   v 1 . 1 6 . 0   a p i S e r v e r :   e x t r a A r g s :   -   n a m e :   " e n a b l e - a d m i s s i o n - p l u g i n s "   v a l u e :   " A l w a y s P u l l I m a g e s , D e f a u l t S t o r a g e C l a s s "   -   n a m e :   " a u d i t - l o g - p a t h "   v a l u e :   " / h o m e / j o h n d o e / a u d i t . l o g "


Question: What is ControllerManager flags?

Answer: F o r   d e t a i l s ,   s e e   t h e   r e f e r e n c e   d o c u m e n t a t i o n   f o r   k u b e - c o n t r o l l e r - m a n a g e r .   E x a m p l e   u s a g e :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   k u b e r n e t e s V e r s i o n :   v 1 . 1 6 . 0   c o n t r o l l e r M a n a g e r :   e x t r a A r g s :   -   n a m e :   " c l u s t e r - s i g n i n g - k e y - f i l e "   v a l u e :   " / h o m e / j o h n d o e / k e y s / c a . k e y "   -   n a m e :   " d e p l o y m e n t - c o n t r o l l e r - s y n c - p e r i o d "   v a l u e :   " 5 0 "


Question: What is Scheduler flags?

Answer: F o r   d e t a i l s ,   s e e   t h e   r e f e r e n c e   d o c u m e n t a t i o n   f o r   k u b e - s c h e d u l e r .   E x a m p l e   u s a g e :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   k u b e r n e t e s V e r s i o n :   v 1 . 1 6 . 0   s c h e d u l e r :   e x t r a A r g s :   -   n a m e :   " c o n f i g "   v a l u e :   " / e t c / k u b e r n e t e s / s c h e d u l e r - c o n f i g . y a m l "   e x t r a V o l u m e s :   -   n a m e :   s c h e d u l e r c o n f i g   h o s t P a t h :   / h o m e / j o h n d o e / s c h e d c o n f i g . y a m l   m o u n t P a t h :   / e t c / k u b e r n e t e s / s c h e d u l e r - c o n f i g . y a m l   r e a d O n l y :   t r u e   p a t h T y p e :   " F i l e "


Question: What is Etcd flags?

Answer: F o r   d e t a i l s ,   s e e   t h e   e t c d   s e r v e r   d o c u m e n t a t i o n .   E x a m p l e   u s a g e :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   C l u s t e r C o n f i g u r a t i o n   e t c d :   l o c a l :   e x t r a A r g s :   -   n a m e :   " e l e c t i o n - t i m e o u t "   v a l u e :   1 0 0 0


Question: What is Customizing with patches?

Answer: K u b e a d m   a l l o w s   y o u   t o   p a s s   a   d i r e c t o r y   w i t h   p a t c h   f i l e s   t o   I n i t C o n f i g u r a t i o n   a n d   J o i n C o n f i g u r a t i o n   o n   i n d i v i d u a l   n o d e s .   T h e s e   p a t c h e s   c a n   b e   u s e d   a s   t h e   l a s t   c u s t o m i z a t i o n   s t e p   b e f o r e   c o m p o n e n t   c o n f i g u r a t i o n   i s   w r i t t e n   t o   d i s k .   Y o u   c a n   p a s s   t h i s   f i l e   t o   k u b e a d m   i n i t   w i t h   - - c o n f i g   < Y O U R   C O N F I G   Y A M L > :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   I n i t C o n f i g u r a t i o n   p a t c h e s :   d i r e c t o r y :   / h o m e / u s e r / s o m e d i r


Question: What is Note:?

Answer: Y o u   c a n   p a s s   t h i s   f i l e   t o   k u b e a d m   j o i n   w i t h   - - c o n f i g   < Y O U R   C O N F I G   Y A M L > :   a p i V e r s i o n :   k u b e a d m . k 8 s . i o / v 1 b e t a 4   k i n d :   J o i n C o n f i g u r a t i o n   p a t c h e s :   d i r e c t o r y :   / h o m e / u s e r / s o m e d i r   T h e   d i r e c t o r y   m u s t   c o n t a i n   f i l e s   n a m e d   t a r g e t [ s u f f i x ] [ + p a t c h t y p e ] . e x t e n s i o n .   F o r   e x a m p l e ,   k u b e - a p i s e r v e r 0 + m e r g e . y a m l   o r   j u s t   e t c d . j s o n .   t a r g e t   c a n   b e   o n e   o f   k u b e - a p i s e r v e r ,   k u b e - c o n t r o l l e r - m a n a g e r ,   k u b e - s c h e d u l e r ,   e t c d   a n d   k u b e l e t c o n f i g u r a t i o n . s u f f i x   i s   a n   o p t i o n a l   s t r i n g   t h a t   c a n   b e   u s e d   t o   d e t e r m i n e   w h i c h   p a t c h e s   a r e   a p p l i e d   f i r s t   a l p h a - n u m e r i c a l l y . p a t c h t y p e   c a n   b e   o n e   o f   s t r a t e g i c ,   m e r g e   o r   j s o n   a n d   t h e s e   m u s t   m a t c h   t h e   p a t c h i n g   f o r m a t s   s u p p o r t e d   b y   k u b e c t l .   T h e   d e f a u l t   p a t c h t y p e   i s   s t r a t e g i c . e x t e n s i o n   m u s t   b e   e i t h e r   j s o n   o r   y a m l .


Question: What is Customizing the kubelet?

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


Question: What is Customizing kube-proxy?

Answer: T o   c u s t o m i z e   k u b e - p r o x y   y o u   c a n   p a s s   a   K u b e P r o x y C o n f i g u r a t i o n   n e x t   y o u r   C l u s t e r C o n f i g u r a t i o n   o r   I n i t C o n f i g u r a t i o n   t o   k u b e a d m   i n i t   s e p a r a t e d   b y   - - - .   F o r   m o r e   d e t a i l s   y o u   c a n   n a v i g a t e   t o   o u r   A P I   r e f e r e n c e   p a g e s .


Question: What is Extending Kubernetes?

Answer: Extending KubernetesDifferent ways to change the behavior of your Kubernetes cluster.Kubernetes is highly configurable and extensible. As a result, there is rarely a need to fork or submit patches to the Kubernetes project code.This guide describes the options for customizing a Kubernetes cluster. It is aimed at cluster operators who want to understand how to adapt their Kubernetes cluster to the needs of their work environment. Developers who are prospective Platform Developers or Kubernetes Project Contributors will also find it useful as an introduction to what extension points and patterns exist, and their trade-offs and limitations.Customization approaches can be broadly divided into configuration, which only involves changing command line arguments, local configuration files, or API resources; and extensions, which involve running additional programs, additional network services, or both. This document is primarily about extensions.ConfigurationConfiguration files and command arguments are documented in the Reference section of the online documentation, with a page for each binary:kube-apiserverkube-controller-managerkube-schedulerkubeletkube-proxyCommand arguments and configuration files may not always be changeable in a hosted Kubernetes service or a distribution with managed installation. When they are changeable, they are usually only changeable by the cluster operator. Also, they are subject to change in future Kubernetes versions, and setting them may require restarting processes. For those reasons, they should be used only when there are no other options.Built-in policy APIs, such as ResourceQuota, NetworkPolicy and Role-based Access Control (RBAC), are built-in Kubernetes APIs that provide declaratively configured policy settings. APIs are typically usable even with hosted Kubernetes services and with managed Kubernetes installations. The built-in policy APIs follow the same conventions as other Kubernetes resources such as Pods. When you use a policy APIs that is stable, you benefit from a defined support policy like other Kubernetes APIs. For these reasons, policy APIs are recommended over configuration files and command arguments where suitable.ExtensionsExtensions are software components that extend and deeply integrate with Kubernetes. They adapt it to support new types and new kinds of hardware.Many cluster administrators use a hosted or distribution instance of Kubernetes. These clusters come with extensions pre-installed. As a result, most Kubernetes users will not need to install extensions and even fewer users will need to author new ones.Extension patternsKubernetes is designed to be automated by writing client programs. Any program that reads and/or writes to the Kubernetes API can provide useful automation. Automation can run on the cluster or off it. By following the guidance in this doc you can write highly available and robust automation. Automation generally works with any Kubernetes cluster, including hosted cluste


Question: How does Extending Kubernetes work?

Answer: Extending KubernetesDifferent ways to change the behavior of your Kubernetes cluster.Kubernetes is highly configurable and extensible. As a result, there is rarely a need to fork or submit patches to the Kubernetes project code.This guide describes the options for customizing a Kubernetes cluster. It is aimed at cluster operators who want to understand how to adapt their Kubernetes cluster to the needs of their work environment. Developers who are prospective Platform Developers or Kubernetes Project Contributors will also find it useful as an introduction to what extension points and patterns exist, and their trade-offs and limitations.Customization approaches can be broadly divided into configuration, which only involves changing command line arguments, local configuration files, or API resources; and extensions, which involve running additional programs, additional network services, or both. This document is primarily about extensions.ConfigurationConfiguration files and command arguments are documented in the Reference section of the online documentation, with a page for each binary:kube-apiserverkube-controller-managerkube-schedulerkubeletkube-proxyCommand arguments and configuration files may not always be changeable in a hosted Kubernetes service or a distribution with managed installation. When they are changeable, they are usually only changeable by the cluster operator. Also, they are subject to change in future Kubernetes versions, and setting them may require restarting processes. For those reasons, they should be used only when there are no other options.Built-in policy APIs, such as ResourceQuota, NetworkPolicy and Role-based Access Control (RBAC), are built-in Kubernetes APIs that provide declaratively configured policy settings. APIs are typically usable even with hosted Kubernetes services and with managed Kubernetes installations. The built-in policy APIs follow the same conventions as other Kubernetes resources such as Pods. When you use a policy APIs that is stable, you benefit from a defined support policy like other Kubernetes APIs. For these reasons, policy APIs are recommended over configuration files and command arguments where suitable.ExtensionsExtensions are software components that extend and deeply integrate with Kubernetes. They adapt it to support new types and new kinds of hardware.Many cluster administrators use a hosted or distribution instance of Kubernetes. These clusters come with extensions pre-installed. As a result, most Kubernetes users will not need to install extensions and even fewer users will need to author new ones.Extension patternsKubernetes is designed to be automated by writing client programs. Any program that reads and/or writes to the Kubernetes API can provide useful automation. Automation can run on the cluster or off it. By following the guidance in this doc you can write highly available and robust automation. Automation generally works with any Kubernetes cluster, including hosted cluste


Question: When would you use Extending Kubernetes?

Answer: Extending KubernetesDifferent ways to change the behavior of your Kubernetes cluster.Kubernetes is highly configurable and extensible. As a result, there is rarely a need to fork or submit patches to the Kubernetes project code.This guide describes the options for customizing a Kubernetes cluster. It is aimed at cluster operators who want to understand how to adapt their Kubernetes cluster to the needs of their work environment. Developers who are prospective Platform Developers or Kubernetes Project Contributors will also find it useful as an introduction to what extension points and patterns exist, and their trade-offs and limitations.Customization approaches can be broadly divided into configuration, which only involves changing command line arguments, local configuration files, or API resources; and extensions, which involve running additional programs, additional network services, or both. This document is primarily about extensions.ConfigurationConfiguration files and command arguments are documented in the Reference section of the online documentation, with a page for each binary:kube-apiserverkube-controller-managerkube-schedulerkubeletkube-proxyCommand arguments and configuration files may not always be changeable in a hosted Kubernetes service or a distribution with managed installation. When they are changeable, they are usually only changeable by the cluster operator. Also, they are subject to change in future Kubernetes versions, and setting them may require restarting processes. For those reasons, they should be used only when there are no other options.Built-in policy APIs, such as ResourceQuota, NetworkPolicy and Role-based Access Control (RBAC), are built-in Kubernetes APIs that provide declaratively configured policy settings. APIs are typically usable even with hosted Kubernetes services and with managed Kubernetes installations. The built-in policy APIs follow the same conventions as other Kubernetes resources such as Pods. When you use a policy APIs that is stable, you benefit from a defined support policy like other Kubernetes APIs. For these reasons, policy APIs are recommended over configuration files and command arguments where suitable.ExtensionsExtensions are software components that extend and deeply integrate with Kubernetes. They adapt it to support new types and new kinds of hardware.Many cluster administrators use a hosted or distribution instance of Kubernetes. These clusters come with extensions pre-installed. As a result, most Kubernetes users will not need to install extensions and even fewer users will need to author new ones.Extension patternsKubernetes is designed to be automated by writing client programs. Any program that reads and/or writes to the Kubernetes API can provide useful automation. Automation can run on the cluster or off it. By following the guidance in this doc you can write highly available and robust automation. Automation generally works with any Kubernetes cluster, including hosted cluste


Question: What are the benefits of Extending Kubernetes?

Answer: Extending KubernetesDifferent ways to change the behavior of your Kubernetes cluster.Kubernetes is highly configurable and extensible. As a result, there is rarely a need to fork or submit patches to the Kubernetes project code.This guide describes the options for customizing a Kubernetes cluster. It is aimed at cluster operators who want to understand how to adapt their Kubernetes cluster to the needs of their work environment. Developers who are prospective Platform Developers or Kubernetes Project Contributors will also find it useful as an introduction to what extension points and patterns exist, and their trade-offs and limitations.Customization approaches can be broadly divided into configuration, which only involves changing command line arguments, local configuration files, or API resources; and extensions, which involve running additional programs, additional network services, or both. This document is primarily about extensions.ConfigurationConfiguration files and command arguments are documented in the Reference section of the online documentation, with a page for each binary:kube-apiserverkube-controller-managerkube-schedulerkubeletkube-proxyCommand arguments and configuration files may not always be changeable in a hosted Kubernetes service or a distribution with managed installation. When they are changeable, they are usually only changeable by the cluster operator. Also, they are subject to change in future Kubernetes versions, and setting them may require restarting processes. For those reasons, they should be used only when there are no other options.Built-in policy APIs, such as ResourceQuota, NetworkPolicy and Role-based Access Control (RBAC), are built-in Kubernetes APIs that provide declaratively configured policy settings. APIs are typically usable even with hosted Kubernetes services and with managed Kubernetes installations. The built-in policy APIs follow the same conventions as other Kubernetes resources such as Pods. When you use a policy APIs that is stable, you benefit from a defined support policy like other Kubernetes APIs. For these reasons, policy APIs are recommended over configuration files and command arguments where suitable.ExtensionsExtensions are software components that extend and deeply integrate with Kubernetes. They adapt it to support new types and new kinds of hardware.Many cluster administrators use a hosted or distribution instance of Kubernetes. These clusters come with extensions pre-installed. As a result, most Kubernetes users will not need to install extensions and even fewer users will need to author new ones.Extension patternsKubernetes is designed to be automated by writing client programs. Any program that reads and/or writes to the Kubernetes API can provide useful automation. Automation can run on the cluster or off it. By following the guidance in this doc you can write highly available and robust automation. Automation generally works with any Kubernetes cluster, including hosted cluste


Question: What is Extending Kubernetes?

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


Question: What is Configuration?

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


Question: What is Extensions?

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


Question: What is Extension patterns?

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


Question: What is Note:?

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


Question: What is Extension points?

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


Question: What is Key to the figure?

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


Question: What is Extension point choice flowchart?

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


Question: What is Client extensions?

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


Question: What is Custom resource definitions?

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


Question: What is API aggregation layer?

Answer: Y o u   c a n   u s e   K u b e r n e t e s '   A P I   A g g r e g a t i o n   L a y e r   t o   i n t e g r a t e   t h e   K u b e r n e t e s   A P I   w i t h   a d d i t i o n a l   s e r v i c e s   s u c h   a s   f o r   m e t r i c s .


Question: What is Combining new APIs with automation?

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


Question: What is Changing built-in resources?

Answer: W h e n   y o u   e x t e n d   t h e   K u b e r n e t e s   A P I   b y   a d d i n g   c u s t o m   r e s o u r c e s ,   t h e   a d d e d   r e s o u r c e s   a l w a y s   f a l l   i n t o   a   n e w   A P I   G r o u p s .   Y o u   c a n n o t   r e p l a c e   o r   c h a n g e   e x i s t i n g   A P I   g r o u p s .   A d d i n g   a n   A P I   d o e s   n o t   d i r e c t l y   l e t   y o u   a f f e c t   t h e   b e h a v i o r   o f   e x i s t i n g   A P I s   ( s u c h   a s   P o d s ) ,   w h e r e a s   A P I   A c c e s s   E x t e n s i o n s   d o .


Question: What is API access extensions?

Answer: W h e n   a   r e q u e s t   r e a c h e s   t h e   K u b e r n e t e s   A P I   S e r v e r ,   i t   i s   f i r s t   a u t h e n t i c a t e d ,   t h e n   a u t h o r i z e d ,   a n d   i s   t h e n   s u b j e c t   t o   v a r i o u s   t y p e s   o f   a d m i s s i o n   c o n t r o l   ( s o m e   r e q u e s t s   a r e   i n   f a c t   n o t   a u t h e n t i c a t e d ,   a n d   g e t   s p e c i a l   t r e a t m e n t ) .   S e e   C o n t r o l l i n g   A c c e s s   t o   t h e   K u b e r n e t e s   A P I   f o r   m o r e   o n   t h i s   f l o w .   E a c h   o f   t h e   s t e p s   i n   t h e   K u b e r n e t e s   a u t h e n t i c a t i o n   /   a u t h o r i z a t i o n   f l o w   o f f e r s   e x t e n s i o n   p o i n t s .


Question: What is Authentication?

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


Question: What is Authorization?

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


Question: What is Dynamic admission control?

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


Question: What is Device plugins?

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


Question: What is Storage plugins?

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


Question: What is Network plugins?

Answer: Y o u r   K u b e r n e t e s   c l u s t e r   n e e d s   a   n e t w o r k   p l u g i n   i n   o r d e r   t o   h a v e   a   w o r k i n g   P o d   n e t w o r k   a n d   t o   s u p p o r t   o t h e r   a s p e c t s   o f   t h e   K u b e r n e t e s   n e t w o r k   m o d e l .   N e t w o r k   P l u g i n s   a l l o w   K u b e r n e t e s   t o   w o r k   w i t h   d i f f e r e n t   n e t w o r k i n g   t o p o l o g i e s   a n d   t e c h n o l o g i e s .


Question: What is Kubelet image credential provider plugins?

Answer: F E A T U R E   S T A T E :   K u b e r n e t e s   v 1 . 2 6   [ s t a b l e ] K u b e l e t   i m a g e   c r e d e n t i a l   p r o v i d e r s   a r e   p l u g i n s   f o r   t h e   k u b e l e t   t o   d y n a m i c a l l y   r e t r i e v e   i m a g e   r e g i s t r y   c r e d e n t i a l s .   T h e   c r e d e n t i a l s   a r e   t h e n   u s e d   w h e n   p u l l i n g   i m a g e s   f r o m   c o n t a i n e r   i m a g e   r e g i s t r i e s   t h a t   m a t c h   t h e   c o n f i g u r a t i o n .   T h e   p l u g i n s   c a n   c o m m u n i c a t e   w i t h   e x t e r n a l   s e r v i c e s   o r   u s e   l o c a l   f i l e s   t o   o b t a i n   c r e d e n t i a l s .   T h i s   w a y ,   t h e   k u b e l e t   d o e s   n o t   n e e d   t o   h a v e   s t a t i c   c r e d e n t i a l s   f o r   e a c h   r e g i s t r y ,   a n d   c a n   s u p p o r t   v a r i o u s   a u t h e n t i c a t i o n   m e t h o d s   a n d   p r o t o c o l s .   F o r   p l u g i n   c o n f i g u r a t i o n   d e t a i l s ,   s e e   C o n f i g u r e   a   k u b e l e t   i m a g e   c r e d e n t i a l   p r o v i d e r .


Question: What is Scheduling extensions?

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


Question: What is What's next?

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


Question: What is kubectl api-resources?

Answer: kubectl api-resourcesSynopsisPrint the supported API resources on the server.kubectl api-resources [flags] Examples # Print the supported API resources kubectl api-resources # Print the supported API resources with more information kubectl api-resources -o wide # Print the supported API resources sorted by a column kubectl api-resources --sort-by=name # Print the supported namespaced resources kubectl api-resources --namespaced=true # Print the supported non-namespaced resources kubectl api-resources --namespaced=false # Print the supported API resources with a specific APIGroup kubectl api-resources --api-group=rbac.authorization.k8s.io Options--api-group stringLimit to resources in the specified API group.--cachedUse the cached list of resources if available.--categories stringsLimit to resources that belong to the specified categories.-h, --helphelp for api-resources--namespaced Default: trueIf false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.--no-headersWhen using the default or custom-column output format, don't print headers (default print headers).-o, --output stringOutput format. One of: (json, yaml, name, wide).--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--sort-by stringIf non-empty, sort list of resources using specified field. The field can be either 'name' or 'kind'.--verbs stringsLimit to resources that support the specified verbs.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringPath to the kubeconfig file to use for CLI requests.--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profi


Question: How does kubectl api-resources work?

Answer: kubectl api-resourcesSynopsisPrint the supported API resources on the server.kubectl api-resources [flags] Examples # Print the supported API resources kubectl api-resources # Print the supported API resources with more information kubectl api-resources -o wide # Print the supported API resources sorted by a column kubectl api-resources --sort-by=name # Print the supported namespaced resources kubectl api-resources --namespaced=true # Print the supported non-namespaced resources kubectl api-resources --namespaced=false # Print the supported API resources with a specific APIGroup kubectl api-resources --api-group=rbac.authorization.k8s.io Options--api-group stringLimit to resources in the specified API group.--cachedUse the cached list of resources if available.--categories stringsLimit to resources that belong to the specified categories.-h, --helphelp for api-resources--namespaced Default: trueIf false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.--no-headersWhen using the default or custom-column output format, don't print headers (default print headers).-o, --output stringOutput format. One of: (json, yaml, name, wide).--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--sort-by stringIf non-empty, sort list of resources using specified field. The field can be either 'name' or 'kind'.--verbs stringsLimit to resources that support the specified verbs.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringPath to the kubeconfig file to use for CLI requests.--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profi


Question: When would you use kubectl api-resources?

Answer: kubectl api-resourcesSynopsisPrint the supported API resources on the server.kubectl api-resources [flags] Examples # Print the supported API resources kubectl api-resources # Print the supported API resources with more information kubectl api-resources -o wide # Print the supported API resources sorted by a column kubectl api-resources --sort-by=name # Print the supported namespaced resources kubectl api-resources --namespaced=true # Print the supported non-namespaced resources kubectl api-resources --namespaced=false # Print the supported API resources with a specific APIGroup kubectl api-resources --api-group=rbac.authorization.k8s.io Options--api-group stringLimit to resources in the specified API group.--cachedUse the cached list of resources if available.--categories stringsLimit to resources that belong to the specified categories.-h, --helphelp for api-resources--namespaced Default: trueIf false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.--no-headersWhen using the default or custom-column output format, don't print headers (default print headers).-o, --output stringOutput format. One of: (json, yaml, name, wide).--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--sort-by stringIf non-empty, sort list of resources using specified field. The field can be either 'name' or 'kind'.--verbs stringsLimit to resources that support the specified verbs.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringPath to the kubeconfig file to use for CLI requests.--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profi


Question: What are the benefits of kubectl api-resources?

Answer: kubectl api-resourcesSynopsisPrint the supported API resources on the server.kubectl api-resources [flags] Examples # Print the supported API resources kubectl api-resources # Print the supported API resources with more information kubectl api-resources -o wide # Print the supported API resources sorted by a column kubectl api-resources --sort-by=name # Print the supported namespaced resources kubectl api-resources --namespaced=true # Print the supported non-namespaced resources kubectl api-resources --namespaced=false # Print the supported API resources with a specific APIGroup kubectl api-resources --api-group=rbac.authorization.k8s.io Options--api-group stringLimit to resources in the specified API group.--cachedUse the cached list of resources if available.--categories stringsLimit to resources that belong to the specified categories.-h, --helphelp for api-resources--namespaced Default: trueIf false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.--no-headersWhen using the default or custom-column output format, don't print headers (default print headers).-o, --output stringOutput format. One of: (json, yaml, name, wide).--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--sort-by stringIf non-empty, sort list of resources using specified field. The field can be either 'name' or 'kind'.--verbs stringsLimit to resources that support the specified verbs.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringPath to the kubeconfig file to use for CLI requests.--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profi


Question: What is Synopsis?

Answer: P r i n t   t h e   s u p p o r t e d   A P I   r e s o u r c e s   o n   t h e   s e r v e r .   k u b e c t l   a p i - r e s o u r c e s   [ f l a g s ]


Question: What is Examples?

Answer: #   P r i n t   t h e   s u p p o r t e d   A P I   r e s o u r c e s   k u b e c t l   a p i - r e s o u r c e s   #   P r i n t   t h e   s u p p o r t e d   A P I   r e s o u r c e s   w i t h   m o r e   i n f o r m a t i o n   k u b e c t l   a p i - r e s o u r c e s   - o   w i d e   #   P r i n t   t h e   s u p p o r t e d   A P I   r e s o u r c e s   s o r t e d   b y   a   c o l u m n   k u b e c t l   a p i - r e s o u r c e s   - - s o r t - b y = n a m e   #   P r i n t   t h e   s u p p o r t e d   n a m e s p a c e d   r e s o u r c e s   k u b e c t l   a p i - r e s o u r c e s   - - n a m e s p a c e d = t r u e   #   P r i n t   t h e   s u p p o r t e d   n o n - n a m e s p a c e d   r e s o u r c e s   k u b e c t l   a p i - r e s o u r c e s   - - n a m e s p a c e d = f a l s e   #   P r i n t   t h e   s u p p o r t e d   A P I   r e s o u r c e s   w i t h   a   s p e c i f i c   A P I G r o u p   k u b e c t l   a p i - r e s o u r c e s   - - a p i - g r o u p = r b a c . a u t h o r i z a t i o n . k 8 s . i o


Question: What is Options?

Answer: L i m i t   t o   r e s o u r c e s   i n   t h e   s p e c i f i e d   A P I   g r o u p .   U s e   t h e   c a c h e d   l i s t   o f   r e s o u r c e s   i f   a v a i l a b l e .   L i m i t   t o   r e s o u r c e s   t h a t   b e l o n g   t o   t h e   s p e c i f i e d   c a t e g o r i e s .   h e l p   f o r   a p i - r e s o u r c e s   I f   f a l s e ,   n o n - n a m e s p a c e d   r e s o u r c e s   w i l l   b e   r e t u r n e d ,   o t h e r w i s e   r e t u r n i n g   n a m e s p a c e d   r e s o u r c e s   b y   d e f a u l t .   W h e n   u s i n g   t h e   d e f a u l t   o r   c u s t o m - c o l u m n   o u t p u t   f o r m a t ,   d o n ' t   p r i n t   h e a d e r s   ( d e f a u l t   p r i n t   h e a d e r s ) .   O u t p u t   f o r m a t .   O n e   o f :   ( j s o n ,   y a m l ,   n a m e ,   w i d e ) .   I f   t r u e ,   k e e p   t h e   m a n a g e d F i e l d s   w h e n   p r i n t i n g   o b j e c t s   i n   J S O N   o r   Y A M L   f o r m a t .   I f   n o n - e m p t y ,   s o r t   l i s t   o f   r e s o u r c e s   u s i n g   s p e c i f i e d   f i e l d .   T h e   f i e l d   c a n   b e   e i t h e r   ' n a m e '   o r   ' k i n d ' .   L i m i t   t o   r e s o u r c e s   t h a t   s u p p o r t   t h e   s p e c i f i e d   v e r b s .


Question: What is Parent Options Inherited?

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


Question: What is See Also?

Answer: k u b e c t l   -   k u b e c t l   c o n t r o l s   t h e   K u b e r n e t e s   c l u s t e r   m a n a g e r   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 HorizontalPodAutoscaler Walkthrough?

Answer: HorizontalPodAutoscaler WalkthroughA HorizontalPodAutoscaler (HPA for short) automatically updates a workload resource (such as a Deployment or StatefulSet), with the aim of automatically scaling the workload to match demand.Horizontal scaling means that the response to increased load is to deploy more Pods. This is different from vertical scaling, which for Kubernetes would mean assigning more resources (for example: memory or CPU) to the Pods that are already running for the workload.If the load decreases, and the number of Pods is above the configured minimum, the HorizontalPodAutoscaler instructs the workload resource (the Deployment, StatefulSet, or other similar resource) to scale back down.This document walks you through an example of enabling HorizontalPodAutoscaler to automatically manage scale for an example web app. This example workload is Apache httpd running some PHP code.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.23.To check the version, enter kubectl version.If you're running an older release of Kubernetes, refer to the version of the documentation for that release (see available documentation versions).To follow this walkthrough, you also need to use a cluster that has a Metrics Server deployed and configured. The Kubernetes Metrics Server collects resource metrics from the kubelets in your cluster, and exposes those metrics through the Kubernetes API, using an APIService to add new kinds of resource that represent metric readings.To learn how to deploy the Metrics Server, see the metrics-server documentation.If you are running Minikube, run the following command to enable metrics-server:minikube addons enable metrics-server Run and expose php-apache serverTo demonstrate a HorizontalPodAutoscaler, you will first start a Deployment that runs a container using the hpa-example image, and expose it as a Service using the following manifest:application/php-apache.yaml apiVersion: apps/v1 kind: Deployment metadata: name: php-apache spec: selector: matchLabels: run: php-apache template: metadata: labels: run: php-apache spec: containers: - name: php-apache image: registry.k8s.io/hpa-example ports: - containerPort: 80 resources: limits: cpu: 500m requests: cpu: 200m --- apiVersion: v1 kind: Service metadata: name: php-apache labels: run: php-apache spec: ports: - port: 80 selector: run: php-apache To do so, run the following command:kubectl apply -f https://k8s.io/examples/application/php-apache.yaml deployment.apps/php-apache created service/php-apache created Create the HorizontalPodAutosca


Question: How does HorizontalPodAutoscaler Walkthrough work?

Answer: HorizontalPodAutoscaler WalkthroughA HorizontalPodAutoscaler (HPA for short) automatically updates a workload resource (such as a Deployment or StatefulSet), with the aim of automatically scaling the workload to match demand.Horizontal scaling means that the response to increased load is to deploy more Pods. This is different from vertical scaling, which for Kubernetes would mean assigning more resources (for example: memory or CPU) to the Pods that are already running for the workload.If the load decreases, and the number of Pods is above the configured minimum, the HorizontalPodAutoscaler instructs the workload resource (the Deployment, StatefulSet, or other similar resource) to scale back down.This document walks you through an example of enabling HorizontalPodAutoscaler to automatically manage scale for an example web app. This example workload is Apache httpd running some PHP code.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.23.To check the version, enter kubectl version.If you're running an older release of Kubernetes, refer to the version of the documentation for that release (see available documentation versions).To follow this walkthrough, you also need to use a cluster that has a Metrics Server deployed and configured. The Kubernetes Metrics Server collects resource metrics from the kubelets in your cluster, and exposes those metrics through the Kubernetes API, using an APIService to add new kinds of resource that represent metric readings.To learn how to deploy the Metrics Server, see the metrics-server documentation.If you are running Minikube, run the following command to enable metrics-server:minikube addons enable metrics-server Run and expose php-apache serverTo demonstrate a HorizontalPodAutoscaler, you will first start a Deployment that runs a container using the hpa-example image, and expose it as a Service using the following manifest:application/php-apache.yaml apiVersion: apps/v1 kind: Deployment metadata: name: php-apache spec: selector: matchLabels: run: php-apache template: metadata: labels: run: php-apache spec: containers: - name: php-apache image: registry.k8s.io/hpa-example ports: - containerPort: 80 resources: limits: cpu: 500m requests: cpu: 200m --- apiVersion: v1 kind: Service metadata: name: php-apache labels: run: php-apache spec: ports: - port: 80 selector: run: php-apache To do so, run the following command:kubectl apply -f https://k8s.io/examples/application/php-apache.yaml deployment.apps/php-apache created service/php-apache created Create the HorizontalPodAutosca


Question: When would you use HorizontalPodAutoscaler Walkthrough?

Answer: HorizontalPodAutoscaler WalkthroughA HorizontalPodAutoscaler (HPA for short) automatically updates a workload resource (such as a Deployment or StatefulSet), with the aim of automatically scaling the workload to match demand.Horizontal scaling means that the response to increased load is to deploy more Pods. This is different from vertical scaling, which for Kubernetes would mean assigning more resources (for example: memory or CPU) to the Pods that are already running for the workload.If the load decreases, and the number of Pods is above the configured minimum, the HorizontalPodAutoscaler instructs the workload resource (the Deployment, StatefulSet, or other similar resource) to scale back down.This document walks you through an example of enabling HorizontalPodAutoscaler to automatically manage scale for an example web app. This example workload is Apache httpd running some PHP code.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.23.To check the version, enter kubectl version.If you're running an older release of Kubernetes, refer to the version of the documentation for that release (see available documentation versions).To follow this walkthrough, you also need to use a cluster that has a Metrics Server deployed and configured. The Kubernetes Metrics Server collects resource metrics from the kubelets in your cluster, and exposes those metrics through the Kubernetes API, using an APIService to add new kinds of resource that represent metric readings.To learn how to deploy the Metrics Server, see the metrics-server documentation.If you are running Minikube, run the following command to enable metrics-server:minikube addons enable metrics-server Run and expose php-apache serverTo demonstrate a HorizontalPodAutoscaler, you will first start a Deployment that runs a container using the hpa-example image, and expose it as a Service using the following manifest:application/php-apache.yaml apiVersion: apps/v1 kind: Deployment metadata: name: php-apache spec: selector: matchLabels: run: php-apache template: metadata: labels: run: php-apache spec: containers: - name: php-apache image: registry.k8s.io/hpa-example ports: - containerPort: 80 resources: limits: cpu: 500m requests: cpu: 200m --- apiVersion: v1 kind: Service metadata: name: php-apache labels: run: php-apache spec: ports: - port: 80 selector: run: php-apache To do so, run the following command:kubectl apply -f https://k8s.io/examples/application/php-apache.yaml deployment.apps/php-apache created service/php-apache created Create the HorizontalPodAutosca


Question: What are the benefits of HorizontalPodAutoscaler Walkthrough?

Answer: HorizontalPodAutoscaler WalkthroughA HorizontalPodAutoscaler (HPA for short) automatically updates a workload resource (such as a Deployment or StatefulSet), with the aim of automatically scaling the workload to match demand.Horizontal scaling means that the response to increased load is to deploy more Pods. This is different from vertical scaling, which for Kubernetes would mean assigning more resources (for example: memory or CPU) to the Pods that are already running for the workload.If the load decreases, and the number of Pods is above the configured minimum, the HorizontalPodAutoscaler instructs the workload resource (the Deployment, StatefulSet, or other similar resource) to scale back down.This document walks you through an example of enabling HorizontalPodAutoscaler to automatically manage scale for an example web app. This example workload is Apache httpd running some PHP code.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.23.To check the version, enter kubectl version.If you're running an older release of Kubernetes, refer to the version of the documentation for that release (see available documentation versions).To follow this walkthrough, you also need to use a cluster that has a Metrics Server deployed and configured. The Kubernetes Metrics Server collects resource metrics from the kubelets in your cluster, and exposes those metrics through the Kubernetes API, using an APIService to add new kinds of resource that represent metric readings.To learn how to deploy the Metrics Server, see the metrics-server documentation.If you are running Minikube, run the following command to enable metrics-server:minikube addons enable metrics-server Run and expose php-apache serverTo demonstrate a HorizontalPodAutoscaler, you will first start a Deployment that runs a container using the hpa-example image, and expose it as a Service using the following manifest:application/php-apache.yaml apiVersion: apps/v1 kind: Deployment metadata: name: php-apache spec: selector: matchLabels: run: php-apache template: metadata: labels: run: php-apache spec: containers: - name: php-apache image: registry.k8s.io/hpa-example ports: - containerPort: 80 resources: limits: cpu: 500m requests: cpu: 200m --- apiVersion: v1 kind: Service metadata: name: php-apache labels: run: php-apache spec: ports: - port: 80 selector: run: php-apache To do so, run the following command:kubectl apply -f https://k8s.io/examples/application/php-apache.yaml deployment.apps/php-apache created service/php-apache created Create the HorizontalPodAutosca


Question: What is HorizontalPodAutoscaler Walkthrough?

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


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 . 2 3 . 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 . I f   y o u ' r e   r u n n i n g   a n   o l d e r   r e l e a s e   o f   K u b e r n e t e s ,   r e f e r   t o   t h e   v e r s i o n   o f   t h e   d o c u m e n t a t i o n   f o r   t h a t   r e l e a s e   ( s e e   a v a i l a b l e   d o c u m e n t a t i o n   v e r s i o n s ) .   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


Question: What is Run and expose php-apache server?

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


Question: What is Create the HorizontalPodAutoscaler?

Answer: N o w   t h a t   t h e   s e r v e r   i s   r u n n i n g ,   c r e a t e   t h e   a u t o s c a l e r   u s i n g   k u b e c t l .   T h e   k u b e c t l   a u t o s c a l e   s u b c o m m a n d ,   p a r t   o f   k u b e c t l ,   h e l p s   y o u   d o   t h i s .   Y o u   w i l l   s h o r t l y   r u n   a   c o m m a n d   t h a t   c r e a t e s   a   H o r i z o n t a l P o d A u t o s c a l e r   t h a t   m a i n t a i n s   b e t w e e n   1   a n d   1 0   r e p l i c a s   o f   t h e   P o d s   c o n t r o l l e d   b y   t h e   p h p - a p a c h e   D e p l o y m e n t   t h a t   y o u   c r e a t e d   i n   t h e   f i r s t   s t e p   o f   t h e s e   i n s t r u c t i o n s .   R o u g h l y   s p e a k i n g ,   t h e   H P A   c o n t r o l l e r   w i l l   i n c r e a s e   a n d   d e c r e a s e   t h e   n u m b e r   o f   r e p l i c a s   ( b y   u p d a t i n g   t h e   D e p l o y m e n t )   t o   m a i n t a i n   a n   a v e r a g e   C P U   u t i l i z a t i o n   a c r o s s   a l l   P o d s   o f   5 0 % .   T h e   D e p l o y m e n t   t h e n   u p d a t e s   t h e   R e p l i c a S e t   -   t h i s   i s   p a r t   o f   h o w   a l l   D e p l o y m e n t s   w o r k   i n   K u b e r n e t e s   -   a n d   t h e n   t h e   R e p l i c a S e t   e i t h e r   a d d s   o r   r e m o v e s   P o d s   b a s e d   o n   t h e   c h a n g e   t o   i t s   . s p e c .   S i n c e   e a c h   p o d   r e q u e s t s   2 0 0   m i l l i - c o r e s   b y   k u b e c t l   r u n ,   t h i s   m e a n s   a n   a v e r a g e   C P U   u s a g e   o f   1 0 0   m i l l i - c o r e s .   S e e   A l g o r i t h m   d e t a i l s   f o r   m o r e   d e t a i l s   o n   t h e   a l g o r i t h m .   C r e a t e   t h e   H o r i z o n t a l P o d A u t o s c a l e r :   k u b e c t l   a u t o s c a l e   d e p l o y m e n t   p h p - a p a c h e   - - c p u = 5 0 %   - - m i n = 1   - - m a x = 1 0   h o r i z


Question: What is Increase the load?

Answer: N e x t ,   s e e   h o w   t h e   a u t o s c a l e r   r e a c t s   t o   i n c r e a s e d   l o a d .   T o   d o   t h i s ,   y o u ' l l   s t a r t   a   d i f f e r e n t   P o d   t o   a c t   a s   a   c l i e n t .   T h e   c o n t a i n e r   w i t h i n   t h e   c l i e n t   P o d   r u n s   i n   a n   i n f i n i t e   l o o p ,   s e n d i n g   q u e r i e s   t o   t h e   p h p - a p a c h e   s e r v i c e .   #   R u n   t h i s   i n   a   s e p a r a t e   t e r m i n a l   #   s o   t h a t   t h e   l o a d   g e n e r a t i o n   c o n t i n u e s   a n d   y o u   c a n   c a r r y   o n   w i t h   t h e   r e s t   o f   t h e   s t e p s   k u b e c t l   r u n   - i   - - t t y   l o a d - g e n e r a t o r   - - r m   - - i m a g e = b u s y b o x : 1 . 2 8   - - r e s t a r t = N e v e r   - -   / b i n / s h   - c   " w h i l e   s l e e p   0 . 0 1 ;   d o   w g e t   - q   - O -   h t t p : / / p h p - a p a c h e ;   d o n e "   N o w   r u n :   #   t y p e   C t r l + C   t o   e n d   t h e   w a t c h   w h e n   y o u ' r e   r e a d y   k u b e c t l   g e t   h p a   p h p - a p a c h e   - - w a t c h   W i t h i n   a   m i n u t e   o r   s o ,   y o u   s h o u l d   s e e   t h e   h i g h e r   C P U   l o a d ;   f o r   e x a m p l e :   N A M E   R E F E R E N C E   T A R G E T   M I N P O D S   M A X P O D S   R E P L I C A S   A G E   p h p - a p a c h e   D e p l o y m e n t / p h p - a p a c h e / s c a l e   3 0 5 %   /   5 0 %   1   1 0   1   3 m   a n d   t h e n ,   m o r e   r e p l i c a s .   F o r   e x a m p l e :   N A M E   R E F E R E N C E   T A R G E T   M I N P O D S   M A X P O D S   R E P L I C A S   A G E   p h p - a p a c h e   D e p l o y m e n t / p h p - a p a c h e / s c a l e   3 0 5 %   /   5 0 %   1   1 0   7   3 m   H e r e ,   C P U   c o n s u m p t i o n   h a s   i n c r e a s e d   t o   3 0 5 %   o f   t h e   r e q u e s t .   A s   a   r e s u l t ,   t h e   D e p l


Question: What is Stop generating load?

Answer: T o   f i n i s h   t h e   e x a m p l e ,   s t o p   s e n d i n g   t h e   l o a d .   I n   t h e   t e r m i n a l   w h e r e   y o u   c r e a t e d   t h e   P o d   t h a t   r u n s   a   b u s y b o x   i m a g e ,   t e r m i n a t e   t h e   l o a d   g e n e r a t i o n   b y   t y p i n g   < C t r l >   +   C .   T h e n   v e r i f y   t h e   r e s u l t   s t a t e   ( a f t e r   a   m i n u t e   o r   s o ) :   #   t y p e   C t r l + C   t o   e n d   t h e   w a t c h   w h e n   y o u ' r e   r e a d y   k u b e c t l   g e t   h p a   p h p - a p a c h e   - - w a t c h   T h e   o u t p u t   i s   s i m i l a r   t o :   N A M E   R E F E R E N C E   T A R G E T   M I N P O D S   M A X P O D S   R E P L I C A S   A G E   p h p - a p a c h e   D e p l o y m e n t / p h p - a p a c h e / s c a l e   0 %   /   5 0 %   1   1 0   1   1 1 m   a n d   t h e   D e p l o y m e n t   a l s o   s h o w s   t h a t   i t   h a s   s c a l e d   d o w n :   k u b e c t l   g e t   d e p l o y m e n t   p h p - a p a c h e   N A M E   R E A D Y   U P - T O - D A T E   A V A I L A B L E   A G E   p h p - a p a c h e   1 / 1   1   1   2 7 m   O n c e   C P U   u t i l i z a t i o n   d r o p p e d   t o   0 ,   t h e   H P A   a u t o m a t i c a l l y   s c a l e d   t h e   n u m b e r   o f   r e p l i c a s   b a c k   d o w n   t o   1 .   A u t o s c a l i n g   t h e   r e p l i c a s   m a y   t a k e   a   f e w   m i n u t e s .


Question: What is Autoscaling on multiple metrics and custom metrics?

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