Question: How does kubectl config delete-cluster work?

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


Question: When would you use kubectl config delete-cluster?

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


Question: What are the benefits of kubectl config delete-cluster?

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


Question: What is Synopsis?

Answer: D e l e t e   t h e   s p e c i f i e d   c l u s t e r   f r o m   t h e   k u b e c o n f i g .   k u b e c t l   c o n f i g   d e l e t e - c l u s t e r   N A M E


Question: What is Examples?

Answer: #   D e l e t e   t h e   m i n i k u b e   c l u s t e r   k u b e c t l   c o n f i g   d e l e t e - c l u s t e r   m i n i k u b e


Question: What is Options?

Answer: h e l p   f o r   d e l e t e - c l u s t e r


Question: What is Parent Options Inherited?

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


Question: What is See Also?

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


Question: What is Assign Memory Resources to Containers and Pods?

Answer: Assign Memory Resources to Containers and PodsThis page shows how to assign a memory request and a memory limit to a Container. A Container is guaranteed to have as much memory as it requests, but is not allowed to use more memory than its limit.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 KubernetesTo check the version, enter kubectl version.Each node in your cluster must have at least 300 MiB of memory.A few of the steps on this page require you to run the metrics-server service in your cluster. If you have the metrics-server running, you can skip those steps.If you are running Minikube, run the following command to enable the metrics-server:minikube addons enable metrics-server To see whether the metrics-server is running, or another provider of the resource metrics API (metrics.k8s.io), run the following command:kubectl get apiservices If the resource metrics API is available, the output includes a reference to metrics.k8s.io.NAME v1beta1.metrics.k8s.io Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace mem-example Specify a memory request and a memory limitTo specify a memory request for a Container, include the resources:requests field in the Container's resource manifest. To specify a memory limit, include resources:limits.In this exercise, you create a Pod that has one Container. The Container has a memory request of 100 MiB and a memory limit of 200 MiB. Here's the configuration file for the Pod:pods/resource/memory-request-limit.yaml apiVersion: v1 kind: Pod metadata: name: memory-demo namespace: mem-example spec: containers: - name: memory-demo-ctr image: polinux/stress resources: requests: memory: "100Mi" limits: memory: "200Mi" command: ["stress"] args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"] The args section in the configuration file provides arguments for the Container when it starts. The "--vm-bytes", "150M" arguments tell the Container to attempt to allocate 150 MiB of memory.Create the Pod:kubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit.yaml --namespace=mem-example Verify that the Pod Container is running:kubectl get pod memory-demo --namespace=mem-example View detailed information about the Pod:kubectl get pod memory-demo --output=yaml --namespace=mem-example The output shows that the one Container in the Pod has a memory request of 100 MiB and a memory limit of 200 MiB.... resources: requests: memory: 100Mi limits: memory: 200Mi ... Run kubectl top to fetch the metrics for the pod:kubectl top pod memory-dem


Question: How does Assign Memory Resources to Containers and Pods work?

Answer: Assign Memory Resources to Containers and PodsThis page shows how to assign a memory request and a memory limit to a Container. A Container is guaranteed to have as much memory as it requests, but is not allowed to use more memory than its limit.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 KubernetesTo check the version, enter kubectl version.Each node in your cluster must have at least 300 MiB of memory.A few of the steps on this page require you to run the metrics-server service in your cluster. If you have the metrics-server running, you can skip those steps.If you are running Minikube, run the following command to enable the metrics-server:minikube addons enable metrics-server To see whether the metrics-server is running, or another provider of the resource metrics API (metrics.k8s.io), run the following command:kubectl get apiservices If the resource metrics API is available, the output includes a reference to metrics.k8s.io.NAME v1beta1.metrics.k8s.io Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace mem-example Specify a memory request and a memory limitTo specify a memory request for a Container, include the resources:requests field in the Container's resource manifest. To specify a memory limit, include resources:limits.In this exercise, you create a Pod that has one Container. The Container has a memory request of 100 MiB and a memory limit of 200 MiB. Here's the configuration file for the Pod:pods/resource/memory-request-limit.yaml apiVersion: v1 kind: Pod metadata: name: memory-demo namespace: mem-example spec: containers: - name: memory-demo-ctr image: polinux/stress resources: requests: memory: "100Mi" limits: memory: "200Mi" command: ["stress"] args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"] The args section in the configuration file provides arguments for the Container when it starts. The "--vm-bytes", "150M" arguments tell the Container to attempt to allocate 150 MiB of memory.Create the Pod:kubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit.yaml --namespace=mem-example Verify that the Pod Container is running:kubectl get pod memory-demo --namespace=mem-example View detailed information about the Pod:kubectl get pod memory-demo --output=yaml --namespace=mem-example The output shows that the one Container in the Pod has a memory request of 100 MiB and a memory limit of 200 MiB.... resources: requests: memory: 100Mi limits: memory: 200Mi ... Run kubectl top to fetch the metrics for the pod:kubectl top pod memory-dem


Question: When would you use Assign Memory Resources to Containers and Pods?

Answer: Assign Memory Resources to Containers and PodsThis page shows how to assign a memory request and a memory limit to a Container. A Container is guaranteed to have as much memory as it requests, but is not allowed to use more memory than its limit.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 KubernetesTo check the version, enter kubectl version.Each node in your cluster must have at least 300 MiB of memory.A few of the steps on this page require you to run the metrics-server service in your cluster. If you have the metrics-server running, you can skip those steps.If you are running Minikube, run the following command to enable the metrics-server:minikube addons enable metrics-server To see whether the metrics-server is running, or another provider of the resource metrics API (metrics.k8s.io), run the following command:kubectl get apiservices If the resource metrics API is available, the output includes a reference to metrics.k8s.io.NAME v1beta1.metrics.k8s.io Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace mem-example Specify a memory request and a memory limitTo specify a memory request for a Container, include the resources:requests field in the Container's resource manifest. To specify a memory limit, include resources:limits.In this exercise, you create a Pod that has one Container. The Container has a memory request of 100 MiB and a memory limit of 200 MiB. Here's the configuration file for the Pod:pods/resource/memory-request-limit.yaml apiVersion: v1 kind: Pod metadata: name: memory-demo namespace: mem-example spec: containers: - name: memory-demo-ctr image: polinux/stress resources: requests: memory: "100Mi" limits: memory: "200Mi" command: ["stress"] args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"] The args section in the configuration file provides arguments for the Container when it starts. The "--vm-bytes", "150M" arguments tell the Container to attempt to allocate 150 MiB of memory.Create the Pod:kubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit.yaml --namespace=mem-example Verify that the Pod Container is running:kubectl get pod memory-demo --namespace=mem-example View detailed information about the Pod:kubectl get pod memory-demo --output=yaml --namespace=mem-example The output shows that the one Container in the Pod has a memory request of 100 MiB and a memory limit of 200 MiB.... resources: requests: memory: 100Mi limits: memory: 200Mi ... Run kubectl top to fetch the metrics for the pod:kubectl top pod memory-dem


Question: What are the benefits of Assign Memory Resources to Containers and Pods?

Answer: Assign Memory Resources to Containers and PodsThis page shows how to assign a memory request and a memory limit to a Container. A Container is guaranteed to have as much memory as it requests, but is not allowed to use more memory than its limit.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 KubernetesTo check the version, enter kubectl version.Each node in your cluster must have at least 300 MiB of memory.A few of the steps on this page require you to run the metrics-server service in your cluster. If you have the metrics-server running, you can skip those steps.If you are running Minikube, run the following command to enable the metrics-server:minikube addons enable metrics-server To see whether the metrics-server is running, or another provider of the resource metrics API (metrics.k8s.io), run the following command:kubectl get apiservices If the resource metrics API is available, the output includes a reference to metrics.k8s.io.NAME v1beta1.metrics.k8s.io Create a namespaceCreate a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.kubectl create namespace mem-example Specify a memory request and a memory limitTo specify a memory request for a Container, include the resources:requests field in the Container's resource manifest. To specify a memory limit, include resources:limits.In this exercise, you create a Pod that has one Container. The Container has a memory request of 100 MiB and a memory limit of 200 MiB. Here's the configuration file for the Pod:pods/resource/memory-request-limit.yaml apiVersion: v1 kind: Pod metadata: name: memory-demo namespace: mem-example spec: containers: - name: memory-demo-ctr image: polinux/stress resources: requests: memory: "100Mi" limits: memory: "200Mi" command: ["stress"] args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"] The args section in the configuration file provides arguments for the Container when it starts. The "--vm-bytes", "150M" arguments tell the Container to attempt to allocate 150 MiB of memory.Create the Pod:kubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit.yaml --namespace=mem-example Verify that the Pod Container is running:kubectl get pod memory-demo --namespace=mem-example View detailed information about the Pod:kubectl get pod memory-demo --output=yaml --namespace=mem-example The output shows that the one Container in the Pod has a memory request of 100 MiB and a memory limit of 200 MiB.... resources: requests: memory: 100Mi limits: memory: 200Mi ... Run kubectl top to fetch the metrics for the pod:kubectl top pod memory-dem


Question: What is Assign Memory Resources to Containers and Pods?

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


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 T o   c h e c k   t h e   v e r s i o n ,   e n t e r   k u b e c t l   v e r s i o n .   Y o u   n e e d   t o   h a v e   a   K u b e r n e t e s   c l u s t e r ,   a n d   t h e   k u b e c t l   c o m m a n d - l i n e   t o o l   m u s t   b e   c o n f i g u r e d   t o   c o m m u n i c a t e   w i t h   y o u r   c l u s t e r .   I t   i s   r e c o m m e n d e d   t o   r u n   t h i s   t u t o r i a l   o n   a   c l u s t e r   w i t h   a t   l e a s t   t w o   n o d e s   t h a t   a r e   n o t   a c t i n g   a s   c o n t r o l   p l a n e   h o s t s .   I f   y o u   d o   n o t   a l r e a d y   h a v e   a   c l u s t e r ,   y o u   c a n   c r e a t e   o n e   b y   u s i n g   m i n i k u b e   o r   y o u   c a n   u s e   o n e   o f   t h e s e   K u b e r n e t e s   p l a y g r o u n d s :   i x i m i u z   L a b s K i l l e r c o d a K o d e K l o u d P l a y   w i t h   K u b e r n e t e s   T o   c h e c k   t h e   v e r s i o n ,   e n t e r   k u b e c t l   v e r s i o n .   E a c h   n o d e   i n   y o u r   c l u s t e r   m u s t   h a v e   a t   l e a s t   3 0 0   M i B   o f   m e m o r y


Question: What is Create a namespace?

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


Question: What is Specify a memory request and a memory limit?

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


Question: What is Exceed a Container's memory limit?

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


Question: What is Specify a memory request that is too big for your Nodes?

Answer: M e m o r y   r e q u e s t s   a n d   l i m i t s   a r e   a s s o c i a t e d   w i t h   C o n t a i n e r s ,   b u t   i t   i s   u s e f u l   t o   t h i n k   o f   a   P o d   a s   h a v i n g   a   m e m o r y   r e q u e s t   a n d   l i m i t .   T h e   m e m o r y   r e q u e s t   f o r   t h e   P o d   i s   t h e   s u m   o f   t h e   m e m o r y   r e q u e s t s   f o r   a l l   t h e   C o n t a i n e r s   i n   t h e   P o d .   L i k e w i s e ,   t h e   m e m o r y   l i m i t   f o r   t h e   P o d   i s   t h e   s u m   o f   t h e   l i m i t s   o f   a l l   t h e   C o n t a i n e r s   i n   t h e   P o d .   P o d   s c h e d u l i n g   i s   b a s e d   o n   r e q u e s t s .   A   P o d   i s   s c h e d u l e d   t o   r u n   o n   a   N o d e   o n l y   i f   t h e   N o d e   h a s   e n o u g h   a v a i l a b l e   m e m o r y   t o   s a t i s f y   t h e   P o d ' s   m e m o r y   r e q u e s t .   I n   t h i s   e x e r c i s e ,   y o u   c r e a t e   a   P o d   t h a t   h a s   a   m e m o r y   r e q u e s t   s o   b i g   t h a t   i t   e x c e e d s   t h e   c a p a c i t y   o f   a n y   N o d e   i n   y o u r   c l u s t e r .   H e r e   i s   t h e   c o n f i g u r a t i o n   f i l e   f o r   a   P o d   t h a t   h a s   o n e   C o n t a i n e r   w i t h   a   r e q u e s t   f o r   1 0 0 0   G i B   o f   m e m o r y ,   w h i c h   l i k e l y   e x c e e d s   t h e   c a p a c i t y   o f   a n y   N o d e   i n   y o u r   c l u s t e r .   a p i V e r s i o n :   v 1   k i n d :   P o d   m e t a d a t a :   n a m e :   m e m o r y - d e m o - 3   n a m e s p a c e :   m e m - e x a m p l e   s p e c :   c o n t a i n e r s :   -   n a m e :   m e m o r y - d e m o - 3 - c t r   i m a g e :   p o l i n u x / s t r e s s   r e s o u r c e s :   r e q u e s t s :   m e m o r y :   " 1 0 0 0 G i "   l i m i t s :   m e m o r y :   " 1 0 0 0 G i "   c o m m a n d :   [ " s t r e s


Question: What is Memory units?

Answer: T h e   m e m o r y   r e s o u r c e   i s   m e a s u r e d   i n   b y t e s .   Y o u   c a n   e x p r e s s   m e m o r y   a s   a   p l a i n   i n t e g e r   o r   a   f i x e d - p o i n t   i n t e g e r   w i t h   o n e   o f   t h e s e   s u f f i x e s :   E ,   P ,   T ,   G ,   M ,   K ,   E i ,   P i ,   T i ,   G i ,   M i ,   K i .   F o r   e x a m p l e ,   t h e   f o l l o w i n g   r e p r e s e n t   a p p r o x i m a t e l y   t h e   s a m e   v a l u e :   1 2 8 9 7 4 8 4 8 ,   1 2 9 e 6 ,   1 2 9 M ,   1 2 3 M i   D e l e t e   y o u r   P o d :   k u b e c t l   d e l e t e   p o d   m e m o r y - d e m o - 3   - - n a m e s p a c e = m e m - e x a m p l e


Question: What is If you do not specify a memory limit?

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


Question: What is Motivation for memory requests and limits?

Answer: B y   c o n f i g u r i n g   m e m o r y   r e q u e s t s   a n d   l i m i t s   f o r   t h e   C o n t a i n e r s   t h a t   r u n   i n   y o u r   c l u s t e r ,   y o u   c a n   m a k e   e f f i c i e n t   u s e   o f   t h e   m e m o r y   r e s o u r c e s   a v a i l a b l e   o n   y o u r   c l u s t e r ' s   N o d e s .   B y   k e e p i n g   a   P o d ' s   m e m o r y   r e q u e s t   l o w ,   y o u   g i v e   t h e   P o d   a   g o o d   c h a n c e   o f   b e i n g   s c h e d u l e d .   B y   h a v i n g   a   m e m o r y   l i m i t   t h a t   i s   g r e a t e r   t h a n   t h e   m e m o r y   r e q u e s t ,   y o u   a c c o m p l i s h   t w o   t h i n g s :   T h e   P o d   c a n   h a v e   b u r s t s   o f   a c t i v i t y   w h e r e   i t   m a k e s   u s e   o f   m e m o r y   t h a t   h a p p e n s   t o   b e   a v a i l a b l e . T h e   a m o u n t   o f   m e m o r y   a   P o d   c a n   u s e   d u r i n g   a   b u r s t   i s   l i m i t e d   t o   s o m e   r e a s o n a b l e   a m o u n t .


Question: What is Clean up?

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


Question: What is For app developers?

Answer: A s s i g n   C P U   R e s o u r c e s   t o   C o n t a i n e r s   a n d   P o d s A s s i g n   P o d - l e v e l   C P U   a n d   m e m o r y   r e s o u r c e s C o n f i g u r e   Q u a l i t y   o f   S e r v i c e   f o r   P o d s R e s i z e   C P U   a n d   M e m o r y   R e s o u r c e s   a s s i g n e d   t o   C o n t a i n e r s   A s s i g n   C P U   R e s o u r c e s   t o   C o n t a i n e r s   a n d   P o d s   A s s i g n   P o d - l e v e l   C P U   a n d   m e m o r y   r e s o u r c e s   C o n f i g u r e   Q u a l i t y   o f   S e r v i c e   f o r   P o d s   R e s i z e   C P U   a n d   M e m o r y   R e s o u r c e s   a s s i g n e d   t o   C o n t a i n e r s


Question: What is For cluster administrators?

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


Question: What is Scheduling Framework?

Answer: Scheduling FrameworkFEATURE STATE: Kubernetes v1.19 [stable]The scheduling framework is a pluggable architecture for the Kubernetes scheduler. It consists of a set of "plugin" APIs that are compiled directly into the scheduler. These APIs allow most scheduling features to be implemented as plugins, while keeping the scheduling "core" lightweight and maintainable. Refer to the design proposal of the scheduling framework for more technical information on the design of the framework.Framework workflowThe Scheduling Framework defines a few extension points. Scheduler plugins register to be invoked at one or more extension points. Some of these plugins can change the scheduling decisions and some are informational only.Each attempt to schedule one Pod is split into two phases, the scheduling cycle and the binding cycle.Scheduling cycle & binding cycleThe scheduling cycle selects a node for the Pod, and the binding cycle applies that decision to the cluster. Together, a scheduling cycle and binding cycle are referred to as a "scheduling context".Scheduling cycles are run serially, while binding cycles may run concurrently.A scheduling or binding cycle can be aborted if the Pod is determined to be unschedulable or if there is an internal error. The Pod will be returned to the queue and retried.InterfacesThe following picture shows the scheduling context of a Pod and the interfaces that the scheduling framework exposes.One plugin may implement multiple interfaces to perform more complex or stateful tasks.Some interfaces match the scheduler extension points which can be configured through Scheduler Configuration.Scheduling framework extension pointsPreEnqueueThese plugins are called prior to adding Pods to the internal active queue, where Pods are marked as ready for scheduling.Only when all PreEnqueue plugins return Success, the Pod is allowed to enter the active queue. Otherwise, it's placed in the internal unschedulable Pods list, and doesn't get an Unschedulable condition.For more details about how internal scheduler queues work, read Scheduling queue in kube-scheduler.EnqueueExtensionEnqueueExtension is the interface where the plugin can control whether to retry scheduling of Pods rejected by this plugin, based on changes in the cluster. Plugins that implement PreEnqueue, PreFilter, Filter, Reserve or Permit should implement this interface.QueueingHintFEATURE STATE: Kubernetes v1.34 [stable] (enabled by default: true)QueueingHint is a callback function for deciding whether a Pod can be requeued to the active queue or backoff queue. It's executed every time a certain kind of event or change happens in the cluster. When the QueueingHint finds that the event might make the Pod schedulable, the Pod is put into the active queue or the backoff queue so that the scheduler will retry the scheduling of the Pod.QueueSortThese plugins are used to sort Pods in the scheduling queue. A queue sort plugin essentially provides a Less(Pod1, Pod2) function. Only one qu


Question: How does Scheduling Framework work?

Answer: Scheduling FrameworkFEATURE STATE: Kubernetes v1.19 [stable]The scheduling framework is a pluggable architecture for the Kubernetes scheduler. It consists of a set of "plugin" APIs that are compiled directly into the scheduler. These APIs allow most scheduling features to be implemented as plugins, while keeping the scheduling "core" lightweight and maintainable. Refer to the design proposal of the scheduling framework for more technical information on the design of the framework.Framework workflowThe Scheduling Framework defines a few extension points. Scheduler plugins register to be invoked at one or more extension points. Some of these plugins can change the scheduling decisions and some are informational only.Each attempt to schedule one Pod is split into two phases, the scheduling cycle and the binding cycle.Scheduling cycle & binding cycleThe scheduling cycle selects a node for the Pod, and the binding cycle applies that decision to the cluster. Together, a scheduling cycle and binding cycle are referred to as a "scheduling context".Scheduling cycles are run serially, while binding cycles may run concurrently.A scheduling or binding cycle can be aborted if the Pod is determined to be unschedulable or if there is an internal error. The Pod will be returned to the queue and retried.InterfacesThe following picture shows the scheduling context of a Pod and the interfaces that the scheduling framework exposes.One plugin may implement multiple interfaces to perform more complex or stateful tasks.Some interfaces match the scheduler extension points which can be configured through Scheduler Configuration.Scheduling framework extension pointsPreEnqueueThese plugins are called prior to adding Pods to the internal active queue, where Pods are marked as ready for scheduling.Only when all PreEnqueue plugins return Success, the Pod is allowed to enter the active queue. Otherwise, it's placed in the internal unschedulable Pods list, and doesn't get an Unschedulable condition.For more details about how internal scheduler queues work, read Scheduling queue in kube-scheduler.EnqueueExtensionEnqueueExtension is the interface where the plugin can control whether to retry scheduling of Pods rejected by this plugin, based on changes in the cluster. Plugins that implement PreEnqueue, PreFilter, Filter, Reserve or Permit should implement this interface.QueueingHintFEATURE STATE: Kubernetes v1.34 [stable] (enabled by default: true)QueueingHint is a callback function for deciding whether a Pod can be requeued to the active queue or backoff queue. It's executed every time a certain kind of event or change happens in the cluster. When the QueueingHint finds that the event might make the Pod schedulable, the Pod is put into the active queue or the backoff queue so that the scheduler will retry the scheduling of the Pod.QueueSortThese plugins are used to sort Pods in the scheduling queue. A queue sort plugin essentially provides a Less(Pod1, Pod2) function. Only one qu


Question: When would you use Scheduling Framework?

Answer: Scheduling FrameworkFEATURE STATE: Kubernetes v1.19 [stable]The scheduling framework is a pluggable architecture for the Kubernetes scheduler. It consists of a set of "plugin" APIs that are compiled directly into the scheduler. These APIs allow most scheduling features to be implemented as plugins, while keeping the scheduling "core" lightweight and maintainable. Refer to the design proposal of the scheduling framework for more technical information on the design of the framework.Framework workflowThe Scheduling Framework defines a few extension points. Scheduler plugins register to be invoked at one or more extension points. Some of these plugins can change the scheduling decisions and some are informational only.Each attempt to schedule one Pod is split into two phases, the scheduling cycle and the binding cycle.Scheduling cycle & binding cycleThe scheduling cycle selects a node for the Pod, and the binding cycle applies that decision to the cluster. Together, a scheduling cycle and binding cycle are referred to as a "scheduling context".Scheduling cycles are run serially, while binding cycles may run concurrently.A scheduling or binding cycle can be aborted if the Pod is determined to be unschedulable or if there is an internal error. The Pod will be returned to the queue and retried.InterfacesThe following picture shows the scheduling context of a Pod and the interfaces that the scheduling framework exposes.One plugin may implement multiple interfaces to perform more complex or stateful tasks.Some interfaces match the scheduler extension points which can be configured through Scheduler Configuration.Scheduling framework extension pointsPreEnqueueThese plugins are called prior to adding Pods to the internal active queue, where Pods are marked as ready for scheduling.Only when all PreEnqueue plugins return Success, the Pod is allowed to enter the active queue. Otherwise, it's placed in the internal unschedulable Pods list, and doesn't get an Unschedulable condition.For more details about how internal scheduler queues work, read Scheduling queue in kube-scheduler.EnqueueExtensionEnqueueExtension is the interface where the plugin can control whether to retry scheduling of Pods rejected by this plugin, based on changes in the cluster. Plugins that implement PreEnqueue, PreFilter, Filter, Reserve or Permit should implement this interface.QueueingHintFEATURE STATE: Kubernetes v1.34 [stable] (enabled by default: true)QueueingHint is a callback function for deciding whether a Pod can be requeued to the active queue or backoff queue. It's executed every time a certain kind of event or change happens in the cluster. When the QueueingHint finds that the event might make the Pod schedulable, the Pod is put into the active queue or the backoff queue so that the scheduler will retry the scheduling of the Pod.QueueSortThese plugins are used to sort Pods in the scheduling queue. A queue sort plugin essentially provides a Less(Pod1, Pod2) function. Only one qu


Question: What are the benefits of Scheduling Framework?

Answer: Scheduling FrameworkFEATURE STATE: Kubernetes v1.19 [stable]The scheduling framework is a pluggable architecture for the Kubernetes scheduler. It consists of a set of "plugin" APIs that are compiled directly into the scheduler. These APIs allow most scheduling features to be implemented as plugins, while keeping the scheduling "core" lightweight and maintainable. Refer to the design proposal of the scheduling framework for more technical information on the design of the framework.Framework workflowThe Scheduling Framework defines a few extension points. Scheduler plugins register to be invoked at one or more extension points. Some of these plugins can change the scheduling decisions and some are informational only.Each attempt to schedule one Pod is split into two phases, the scheduling cycle and the binding cycle.Scheduling cycle & binding cycleThe scheduling cycle selects a node for the Pod, and the binding cycle applies that decision to the cluster. Together, a scheduling cycle and binding cycle are referred to as a "scheduling context".Scheduling cycles are run serially, while binding cycles may run concurrently.A scheduling or binding cycle can be aborted if the Pod is determined to be unschedulable or if there is an internal error. The Pod will be returned to the queue and retried.InterfacesThe following picture shows the scheduling context of a Pod and the interfaces that the scheduling framework exposes.One plugin may implement multiple interfaces to perform more complex or stateful tasks.Some interfaces match the scheduler extension points which can be configured through Scheduler Configuration.Scheduling framework extension pointsPreEnqueueThese plugins are called prior to adding Pods to the internal active queue, where Pods are marked as ready for scheduling.Only when all PreEnqueue plugins return Success, the Pod is allowed to enter the active queue. Otherwise, it's placed in the internal unschedulable Pods list, and doesn't get an Unschedulable condition.For more details about how internal scheduler queues work, read Scheduling queue in kube-scheduler.EnqueueExtensionEnqueueExtension is the interface where the plugin can control whether to retry scheduling of Pods rejected by this plugin, based on changes in the cluster. Plugins that implement PreEnqueue, PreFilter, Filter, Reserve or Permit should implement this interface.QueueingHintFEATURE STATE: Kubernetes v1.34 [stable] (enabled by default: true)QueueingHint is a callback function for deciding whether a Pod can be requeued to the active queue or backoff queue. It's executed every time a certain kind of event or change happens in the cluster. When the QueueingHint finds that the event might make the Pod schedulable, the Pod is put into the active queue or the backoff queue so that the scheduler will retry the scheduling of the Pod.QueueSortThese plugins are used to sort Pods in the scheduling queue. A queue sort plugin essentially provides a Less(Pod1, Pod2) function. Only one qu


Question: What is Scheduling Framework?

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


Question: What is Framework workflow?

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


Question: What is Scheduling cycle & binding cycle?

Answer: T h e   s c h e d u l i n g   c y c l e   s e l e c t s   a   n o d e   f o r   t h e   P o d ,   a n d   t h e   b i n d i n g   c y c l e   a p p l i e s   t h a t   d e c i s i o n   t o   t h e   c l u s t e r .   T o g e t h e r ,   a   s c h e d u l i n g   c y c l e   a n d   b i n d i n g   c y c l e   a r e   r e f e r r e d   t o   a s   a   " s c h e d u l i n g   c o n t e x t " .   S c h e d u l i n g   c y c l e s   a r e   r u n   s e r i a l l y ,   w h i l e   b i n d i n g   c y c l e s   m a y   r u n   c o n c u r r e n t l y .   A   s c h e d u l i n g   o r   b i n d i n g   c y c l e   c a n   b e   a b o r t e d   i f   t h e   P o d   i s   d e t e r m i n e d   t o   b e   u n s c h e d u l a b l e   o r   i f   t h e r e   i s   a n   i n t e r n a l   e r r o r .   T h e   P o d   w i l l   b e   r e t u r n e d   t o   t h e   q u e u e   a n d   r e t r i e d .


Question: What is Interfaces?

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


Question: What is PreEnqueue?

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


Question: What is EnqueueExtension?

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


Question: What is QueueingHint?

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


Question: What is QueueSort?

Answer: T h e s e   p l u g i n s   a r e   u s e d   t o   s o r t   P o d s   i n   t h e   s c h e d u l i n g   q u e u e .   A   q u e u e   s o r t   p l u g i n   e s s e n t i a l l y   p r o v i d e s   a   L e s s ( P o d 1 ,   P o d 2 )   f u n c t i o n .   O n l y   o n e   q u e u e   s o r t   p l u g i n   m a y   b e   e n a b l e d   a t   a   t i m e .


Question: What is PreFilter?

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


Question: What is Filter?

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


Question: What is PostFilter?

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


Question: What is PreScore?

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


Question: What is Score?

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


Question: What is Capacity scoring?

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


Question: What is NormalizeScore?

Answer: T h e s e   p l u g i n s   a r e   u s e d   t o   m o d i f y   s c o r e s   b e f o r e   t h e   s c h e d u l e r   c o m p u t e s   a   f i n a l   r a n k i n g   o f   N o d e s .   A   p l u g i n   t h a t   r e g i s t e r s   f o r   t h i s   e x t e n s i o n   p o i n t   w i l l   b e   c a l l e d   w i t h   t h e   S c o r e   r e s u l t s   f r o m   t h e   s a m e   p l u g i n .   T h i s   i s   c a l l e d   o n c e   p e r   p l u g i n   p e r   s c h e d u l i n g   c y c l e .   F o r   e x a m p l e ,   s u p p o s e   a   p l u g i n   B l i n k i n g L i g h t S c o r e r   r a n k s   N o d e s   b a s e d   o n   h o w   m a n y   b l i n k i n g   l i g h t s   t h e y   h a v e .   f u n c   S c o r e N o d e ( _   * v 1 . p o d ,   n   * v 1 . N o d e )   ( i n t ,   e r r o r )   {   r e t u r n   g e t B l i n k i n g L i g h t C o u n t ( n )   }   H o w e v e r ,   t h e   m a x i m u m   c o u n t   o f   b l i n k i n g   l i g h t s   m a y   b e   s m a l l   c o m p a r e d   t o   N o d e S c o r e M a x .   T o   f i x   t h i s ,   B l i n k i n g L i g h t S c o r e r   s h o u l d   a l s o   r e g i s t e r   f o r   t h i s   e x t e n s i o n   p o i n t .   f u n c   N o r m a l i z e S c o r e s ( s c o r e s   m a p [ s t r i n g ] i n t )   {   h i g h e s t   : =   0   f o r   _ ,   s c o r e   : =   r a n g e   s c o r e s   {   h i g h e s t   =   m a x ( h i g h e s t ,   s c o r e )   }   f o r   n o d e ,   s c o r e   : =   r a n g e   s c o r e s   {   s c o r e s [ n o d e ]   =   s c o r e * N o d e S c o r e M a x / h i g h e s t   }   }   I f   a n y   N o r m a l i z e S c o r e   p l u g i n   r e t u r n s   a n   e r r o r ,   t h e   s c h e d u l i n g   c y c l e   i s   a b o r t e d .


Question: What is Reserve?

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


Question: What is Permit?

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


Question: What is PreBind?

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


Question: What is Bind?

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


Question: What is PostBind?

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


Question: What is Plugin API?

Answer: T h e r e   a r e   t w o   s t e p s   t o   t h e   p l u g i n   A P I .   F i r s t ,   p l u g i n s   m u s t   r e g i s t e r   a n d   g e t   c o n f i g u r e d ,   t h e n   t h e y   u s e   t h e   e x t e n s i o n   p o i n t   i n t e r f a c e s .   E x t e n s i o n   p o i n t   i n t e r f a c e s   h a v e   t h e   f o l l o w i n g   f o r m .   t y p e   P l u g i n   i n t e r f a c e   {   N a m e ( )   s t r i n g   }   t y p e   Q u e u e S o r t P l u g i n   i n t e r f a c e   {   P l u g i n   L e s s ( * v 1 . p o d ,   * v 1 . p o d )   b o o l   }   t y p e   P r e F i l t e r P l u g i n   i n t e r f a c e   {   P l u g i n   P r e F i l t e r ( c o n t e x t . C o n t e x t ,   * f r a m e w o r k . C y c l e S t a t e ,   * v 1 . p o d )   e r r o r   }   / /   . . .


Question: What is Plugin configuration?

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


Question: What is Container Environment?

Answer: Container EnvironmentThis page describes the resources available to Containers in the Container environment.Container environmentThe Kubernetes Container environment provides several important resources to Containers:A filesystem, which is a combination of an image and one or more volumes.Information about the Container itself.Information about other objects in the cluster.Container informationThe hostname of a Container is the name of the Pod in which the Container is running. It is available through the hostname command or the gethostname function call in libc.The Pod name and namespace are available as environment variables through the downward API.User defined environment variables from the Pod definition are also available to the Container, as are any environment variables specified statically in the container image.Cluster informationA list of all services that were running when a Container was created is available to that Container as environment variables. This list is limited to services within the same namespace as the new Container's Pod and Kubernetes control plane services.For a service named foo that maps to a Container named bar, the following variables are defined:FOO_SERVICE_HOST=<the host the service is running on> FOO_SERVICE_PORT=<the port the service is running on> Services have dedicated IP addresses and are available to the Container via DNS, if DNS addon is enabled. What's nextLearn more about Container lifecycle hooks.Get hands-on experience attaching handlers to Container lifecycle events.


Question: How does Container Environment work?

Answer: Container EnvironmentThis page describes the resources available to Containers in the Container environment.Container environmentThe Kubernetes Container environment provides several important resources to Containers:A filesystem, which is a combination of an image and one or more volumes.Information about the Container itself.Information about other objects in the cluster.Container informationThe hostname of a Container is the name of the Pod in which the Container is running. It is available through the hostname command or the gethostname function call in libc.The Pod name and namespace are available as environment variables through the downward API.User defined environment variables from the Pod definition are also available to the Container, as are any environment variables specified statically in the container image.Cluster informationA list of all services that were running when a Container was created is available to that Container as environment variables. This list is limited to services within the same namespace as the new Container's Pod and Kubernetes control plane services.For a service named foo that maps to a Container named bar, the following variables are defined:FOO_SERVICE_HOST=<the host the service is running on> FOO_SERVICE_PORT=<the port the service is running on> Services have dedicated IP addresses and are available to the Container via DNS, if DNS addon is enabled. What's nextLearn more about Container lifecycle hooks.Get hands-on experience attaching handlers to Container lifecycle events.


Question: When would you use Container Environment?

Answer: Container EnvironmentThis page describes the resources available to Containers in the Container environment.Container environmentThe Kubernetes Container environment provides several important resources to Containers:A filesystem, which is a combination of an image and one or more volumes.Information about the Container itself.Information about other objects in the cluster.Container informationThe hostname of a Container is the name of the Pod in which the Container is running. It is available through the hostname command or the gethostname function call in libc.The Pod name and namespace are available as environment variables through the downward API.User defined environment variables from the Pod definition are also available to the Container, as are any environment variables specified statically in the container image.Cluster informationA list of all services that were running when a Container was created is available to that Container as environment variables. This list is limited to services within the same namespace as the new Container's Pod and Kubernetes control plane services.For a service named foo that maps to a Container named bar, the following variables are defined:FOO_SERVICE_HOST=<the host the service is running on> FOO_SERVICE_PORT=<the port the service is running on> Services have dedicated IP addresses and are available to the Container via DNS, if DNS addon is enabled. What's nextLearn more about Container lifecycle hooks.Get hands-on experience attaching handlers to Container lifecycle events.


Question: What are the benefits of Container Environment?

Answer: Container EnvironmentThis page describes the resources available to Containers in the Container environment.Container environmentThe Kubernetes Container environment provides several important resources to Containers:A filesystem, which is a combination of an image and one or more volumes.Information about the Container itself.Information about other objects in the cluster.Container informationThe hostname of a Container is the name of the Pod in which the Container is running. It is available through the hostname command or the gethostname function call in libc.The Pod name and namespace are available as environment variables through the downward API.User defined environment variables from the Pod definition are also available to the Container, as are any environment variables specified statically in the container image.Cluster informationA list of all services that were running when a Container was created is available to that Container as environment variables. This list is limited to services within the same namespace as the new Container's Pod and Kubernetes control plane services.For a service named foo that maps to a Container named bar, the following variables are defined:FOO_SERVICE_HOST=<the host the service is running on> FOO_SERVICE_PORT=<the port the service is running on> Services have dedicated IP addresses and are available to the Container via DNS, if DNS addon is enabled. What's nextLearn more about Container lifecycle hooks.Get hands-on experience attaching handlers to Container lifecycle events.


Question: What is Container Environment?

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


Question: What is Container environment?

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


Question: What is Container information?

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


Question: What is Cluster information?

Answer: A   l i s t   o f   a l l   s e r v i c e s   t h a t   w e r e   r u n n i n g   w h e n   a   C o n t a i n e r   w a s   c r e a t e d   i s   a v a i l a b l e   t o   t h a t   C o n t a i n e r   a s   e n v i r o n m e n t   v a r i a b l e s .   T h i s   l i s t   i s   l i m i t e d   t o   s e r v i c e s   w i t h i n   t h e   s a m e   n a m e s p a c e   a s   t h e   n e w   C o n t a i n e r ' s   P o d   a n d   K u b e r n e t e s   c o n t r o l   p l a n e   s e r v i c e s .   F o r   a   s e r v i c e   n a m e d   f o o   t h a t   m a p s   t o   a   C o n t a i n e r   n a m e d   b a r ,   t h e   f o l l o w i n g   v a r i a b l e s   a r e   d e f i n e d :   F O O _ S E R V I C E _ H O S T = < t h e   h o s t   t h e   s e r v i c e   i s   r u n n i n g   o n >   F O O _ S E R V I C E _ P O R T = < t h e   p o r t   t h e   s e r v i c e   i s   r u n n i n g   o n >   S e r v i c e s   h a v e   d e d i c a t e d   I P   a d d r e s s e s   a n d   a r e   a v a i l a b l e   t o   t h e   C o n t a i n e r   v i a   D N S ,   i f   D N S   a d d o n   i s   e n a b l e d .


Question: What is What's next?

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


Question: What is Windows debugging tips?

Answer: Windows debugging tipsNode-level troubleshootingMy Pods are stuck at "Container Creating" or restarting over and overEnsure that your pause image is compatible with your Windows OS version. See Pause container to see the latest / recommended pause image and/or get more information.Note:If using containerd as your container runtime the pause image is specified in the plugins.plugins.cri.sandbox_image field of the of config.toml configuration file.My pods show status as ErrImgPull or ImagePullBackOffEnsure that your Pod is getting scheduled to a compatible Windows Node.More information on how to specify a compatible node for your Pod can be found in this guide.Network troubleshootingMy Windows Pods do not have network connectivityIf you are using virtual machines, ensure that MAC spoofing is enabled on all the VM network adapter(s).My Windows Pods cannot ping external resourcesWindows Pods do not have outbound rules programmed for the ICMP protocol. However, TCP/UDP is supported. When trying to demonstrate connectivity to resources outside of the cluster, substitute ping <IP> with corresponding curl <IP> commands.If you are still facing problems, most likely your network configuration in cni.conf deserves some extra attention. You can always edit this static file. The configuration update will apply to any new Kubernetes resources.One of the Kubernetes networking requirements (see Kubernetes model) is for cluster communication to occur without NAT internally. To honor this requirement, there is an ExceptionList for all the communication where you do not want outbound NAT to occur. However, this also means that you need to exclude the external IP you are trying to query from the ExceptionList. Only then will the traffic originating from your Windows pods be SNAT'ed correctly to receive a response from the outside world. In this regard, your ExceptionList in cni.conf should look as follows:"ExceptionList": [ "10.244.0.0/16", # Cluster subnet "10.96.0.0/12", # Service subnet "10.127.130.0/24" # Management (host) subnet ] My Windows node cannot access NodePort type ServicesLocal NodePort access from the node itself fails. This is a known limitation. NodePort access works from other nodes or external clients.vNICs and HNS endpoints of containers are being deletedThis issue can be caused when the hostname-override parameter is not passed to kube-proxy. To resolve it, users need to pass the hostname to kube-proxy as follows:C:\k\kube-proxy.exe --hostname-override=$(hostname) My Windows node cannot access my services using the service IPThis is a known limitation of the networking stack on Windows. However, Windows Pods can access the Service IP.No network adapter is found when starting the kubeletThe Windows networking stack needs a virtual adapter for Kubernetes networking to work. If the following commands return no results (in an admin shell), virtual network creation — a necessary prerequisite for the kubelet to work — has failed:Get-HnsNetwork | ? Na


Question: How does Windows debugging tips work?

Answer: Windows debugging tipsNode-level troubleshootingMy Pods are stuck at "Container Creating" or restarting over and overEnsure that your pause image is compatible with your Windows OS version. See Pause container to see the latest / recommended pause image and/or get more information.Note:If using containerd as your container runtime the pause image is specified in the plugins.plugins.cri.sandbox_image field of the of config.toml configuration file.My pods show status as ErrImgPull or ImagePullBackOffEnsure that your Pod is getting scheduled to a compatible Windows Node.More information on how to specify a compatible node for your Pod can be found in this guide.Network troubleshootingMy Windows Pods do not have network connectivityIf you are using virtual machines, ensure that MAC spoofing is enabled on all the VM network adapter(s).My Windows Pods cannot ping external resourcesWindows Pods do not have outbound rules programmed for the ICMP protocol. However, TCP/UDP is supported. When trying to demonstrate connectivity to resources outside of the cluster, substitute ping <IP> with corresponding curl <IP> commands.If you are still facing problems, most likely your network configuration in cni.conf deserves some extra attention. You can always edit this static file. The configuration update will apply to any new Kubernetes resources.One of the Kubernetes networking requirements (see Kubernetes model) is for cluster communication to occur without NAT internally. To honor this requirement, there is an ExceptionList for all the communication where you do not want outbound NAT to occur. However, this also means that you need to exclude the external IP you are trying to query from the ExceptionList. Only then will the traffic originating from your Windows pods be SNAT'ed correctly to receive a response from the outside world. In this regard, your ExceptionList in cni.conf should look as follows:"ExceptionList": [ "10.244.0.0/16", # Cluster subnet "10.96.0.0/12", # Service subnet "10.127.130.0/24" # Management (host) subnet ] My Windows node cannot access NodePort type ServicesLocal NodePort access from the node itself fails. This is a known limitation. NodePort access works from other nodes or external clients.vNICs and HNS endpoints of containers are being deletedThis issue can be caused when the hostname-override parameter is not passed to kube-proxy. To resolve it, users need to pass the hostname to kube-proxy as follows:C:\k\kube-proxy.exe --hostname-override=$(hostname) My Windows node cannot access my services using the service IPThis is a known limitation of the networking stack on Windows. However, Windows Pods can access the Service IP.No network adapter is found when starting the kubeletThe Windows networking stack needs a virtual adapter for Kubernetes networking to work. If the following commands return no results (in an admin shell), virtual network creation — a necessary prerequisite for the kubelet to work — has failed:Get-HnsNetwork | ? Na


Question: When would you use Windows debugging tips?

Answer: Windows debugging tipsNode-level troubleshootingMy Pods are stuck at "Container Creating" or restarting over and overEnsure that your pause image is compatible with your Windows OS version. See Pause container to see the latest / recommended pause image and/or get more information.Note:If using containerd as your container runtime the pause image is specified in the plugins.plugins.cri.sandbox_image field of the of config.toml configuration file.My pods show status as ErrImgPull or ImagePullBackOffEnsure that your Pod is getting scheduled to a compatible Windows Node.More information on how to specify a compatible node for your Pod can be found in this guide.Network troubleshootingMy Windows Pods do not have network connectivityIf you are using virtual machines, ensure that MAC spoofing is enabled on all the VM network adapter(s).My Windows Pods cannot ping external resourcesWindows Pods do not have outbound rules programmed for the ICMP protocol. However, TCP/UDP is supported. When trying to demonstrate connectivity to resources outside of the cluster, substitute ping <IP> with corresponding curl <IP> commands.If you are still facing problems, most likely your network configuration in cni.conf deserves some extra attention. You can always edit this static file. The configuration update will apply to any new Kubernetes resources.One of the Kubernetes networking requirements (see Kubernetes model) is for cluster communication to occur without NAT internally. To honor this requirement, there is an ExceptionList for all the communication where you do not want outbound NAT to occur. However, this also means that you need to exclude the external IP you are trying to query from the ExceptionList. Only then will the traffic originating from your Windows pods be SNAT'ed correctly to receive a response from the outside world. In this regard, your ExceptionList in cni.conf should look as follows:"ExceptionList": [ "10.244.0.0/16", # Cluster subnet "10.96.0.0/12", # Service subnet "10.127.130.0/24" # Management (host) subnet ] My Windows node cannot access NodePort type ServicesLocal NodePort access from the node itself fails. This is a known limitation. NodePort access works from other nodes or external clients.vNICs and HNS endpoints of containers are being deletedThis issue can be caused when the hostname-override parameter is not passed to kube-proxy. To resolve it, users need to pass the hostname to kube-proxy as follows:C:\k\kube-proxy.exe --hostname-override=$(hostname) My Windows node cannot access my services using the service IPThis is a known limitation of the networking stack on Windows. However, Windows Pods can access the Service IP.No network adapter is found when starting the kubeletThe Windows networking stack needs a virtual adapter for Kubernetes networking to work. If the following commands return no results (in an admin shell), virtual network creation — a necessary prerequisite for the kubelet to work — has failed:Get-HnsNetwork | ? Na


Question: What are the benefits of Windows debugging tips?

Answer: Windows debugging tipsNode-level troubleshootingMy Pods are stuck at "Container Creating" or restarting over and overEnsure that your pause image is compatible with your Windows OS version. See Pause container to see the latest / recommended pause image and/or get more information.Note:If using containerd as your container runtime the pause image is specified in the plugins.plugins.cri.sandbox_image field of the of config.toml configuration file.My pods show status as ErrImgPull or ImagePullBackOffEnsure that your Pod is getting scheduled to a compatible Windows Node.More information on how to specify a compatible node for your Pod can be found in this guide.Network troubleshootingMy Windows Pods do not have network connectivityIf you are using virtual machines, ensure that MAC spoofing is enabled on all the VM network adapter(s).My Windows Pods cannot ping external resourcesWindows Pods do not have outbound rules programmed for the ICMP protocol. However, TCP/UDP is supported. When trying to demonstrate connectivity to resources outside of the cluster, substitute ping <IP> with corresponding curl <IP> commands.If you are still facing problems, most likely your network configuration in cni.conf deserves some extra attention. You can always edit this static file. The configuration update will apply to any new Kubernetes resources.One of the Kubernetes networking requirements (see Kubernetes model) is for cluster communication to occur without NAT internally. To honor this requirement, there is an ExceptionList for all the communication where you do not want outbound NAT to occur. However, this also means that you need to exclude the external IP you are trying to query from the ExceptionList. Only then will the traffic originating from your Windows pods be SNAT'ed correctly to receive a response from the outside world. In this regard, your ExceptionList in cni.conf should look as follows:"ExceptionList": [ "10.244.0.0/16", # Cluster subnet "10.96.0.0/12", # Service subnet "10.127.130.0/24" # Management (host) subnet ] My Windows node cannot access NodePort type ServicesLocal NodePort access from the node itself fails. This is a known limitation. NodePort access works from other nodes or external clients.vNICs and HNS endpoints of containers are being deletedThis issue can be caused when the hostname-override parameter is not passed to kube-proxy. To resolve it, users need to pass the hostname to kube-proxy as follows:C:\k\kube-proxy.exe --hostname-override=$(hostname) My Windows node cannot access my services using the service IPThis is a known limitation of the networking stack on Windows. However, Windows Pods can access the Service IP.No network adapter is found when starting the kubeletThe Windows networking stack needs a virtual adapter for Kubernetes networking to work. If the following commands return no results (in an admin shell), virtual network creation — a necessary prerequisite for the kubelet to work — has failed:Get-HnsNetwork | ? Na


Question: What is Node-level troubleshooting?

Answer: M y   P o d s   a r e   s t u c k   a t   " C o n t a i n e r   C r e a t i n g "   o r   r e s t a r t i n g   o v e r   a n d   o v e r E n s u r e   t h a t   y o u r   p a u s e   i m a g e   i s   c o m p a t i b l e   w i t h   y o u r   W i n d o w s   O S   v e r s i o n .   S e e   P a u s e   c o n t a i n e r   t o   s e e   t h e   l a t e s t   /   r e c o m m e n d e d   p a u s e   i m a g e   a n d / o r   g e t   m o r e   i n f o r m a t i o n . N o t e : I f   u s i n g   c o n t a i n e r d   a s   y o u r   c o n t a i n e r   r u n t i m e   t h e   p a u s e   i m a g e   i s   s p e c i f i e d   i n   t h e   p l u g i n s . p l u g i n s . c r i . s a n d b o x _ i m a g e   f i e l d   o f   t h e   o f   c o n f i g . t o m l   c o n f i g u r a t i o n   f i l e . M y   p o d s   s h o w   s t a t u s   a s   E r r I m g P u l l   o r   I m a g e P u l l B a c k O f f E n s u r e   t h a t   y o u r   P o d   i s   g e t t i n g   s c h e d u l e d   t o   a   c o m p a t i b l e   W i n d o w s   N o d e . M o r e   i n f o r m a t i o n   o n   h o w   t o   s p e c i f y   a   c o m p a t i b l e   n o d e   f o r   y o u r   P o d   c a n   b e   f o u n d   i n   t h i s   g u i d e .   M y   P o d s   a r e   s t u c k   a t   " C o n t a i n e r   C r e a t i n g "   o r   r e s t a r t i n g   o v e r   a n d   o v e r   E n s u r e   t h a t   y o u r   p a u s e   i m a g e   i s   c o m p a t i b l e   w i t h   y o u r   W i n d o w s   O S   v e r s i o n .   S e e   P a u s e   c o n t a i n e r   t o   s e e   t h e   l a t e s t   /   r e c o m m e n d e d   p a u s e   i m a g e   a n d / o r   g e t   m o r e   i n f o r m a t i o n .


Question: What is Note:?

Answer: M y   p o d s   s h o w   s t a t u s   a s   E r r I m g P u l l   o r   I m a g e P u l l B a c k O f f   E n s u r e   t h a t   y o u r   P o d   i s   g e t t i n g   s c h e d u l e d   t o   a   c o m p a t i b l e   W i n d o w s   N o d e .   M o r e   i n f o r m a t i o n   o n   h o w   t o   s p e c i f y   a   c o m p a t i b l e   n o d e   f o r   y o u r   P o d   c a n   b e   f o u n d   i n   t h i s   g u i d e .


Question: What is Network troubleshooting?

Answer: M y   W i n d o w s   P o d s   d o   n o t   h a v e   n e t w o r k   c o n n e c t i v i t y I f   y o u   a r e   u s i n g   v i r t u a l   m a c h i n e s ,   e n s u r e   t h a t   M A C   s p o o f i n g   i s   e n a b l e d   o n   a l l   t h e   V M   n e t w o r k   a d a p t e r ( s ) . M y   W i n d o w s   P o d s   c a n n o t   p i n g   e x t e r n a l   r e s o u r c e s W i n d o w s   P o d s   d o   n o t   h a v e   o u t b o u n d   r u l e s   p r o g r a m m e d   f o r   t h e   I C M P   p r o t o c o l .   H o w e v e r ,   T C P / U D P   i s   s u p p o r t e d .   W h e n   t r y i n g   t o   d e m o n s t r a t e   c o n n e c t i v i t y   t o   r e s o u r c e s   o u t s i d e   o f   t h e   c l u s t e r ,   s u b s t i t u t e   p i n g   < I P >   w i t h   c o r r e s p o n d i n g   c u r l   < I P >   c o m m a n d s . I f   y o u   a r e   s t i l l   f a c i n g   p r o b l e m s ,   m o s t   l i k e l y   y o u r   n e t w o r k   c o n f i g u r a t i o n   i n   c n i . c o n f   d e s e r v e s   s o m e   e x t r a   a t t e n t i o n .   Y o u   c a n   a l w a y s   e d i t   t h i s   s t a t i c   f i l e .   T h e   c o n f i g u r a t i o n   u p d a t e   w i l l   a p p l y   t o   a n y   n e w   K u b e r n e t e s   r e s o u r c e s . O n e   o f   t h e   K u b e r n e t e s   n e t w o r k i n g   r e q u i r e m e n t s   ( s e e   K u b e r n e t e s   m o d e l )   i s   f o r   c l u s t e r   c o m m u n i c a t i o n   t o   o c c u r   w i t h o u t   N A T   i n t e r n a l l y .   T o   h o n o r   t h i s   r e q u i r e m e n t ,   t h e r e   i s   a n   E x c e p t i o n L i s t   f o r   a l l   t h e   c o m m u n i c a t i o n   w h e r e   y o u   d o   n o t   w a n t   o u t b o u n d   N A T   t o   o c c u r .   H o w e v e r ,   t h i s   a l s o   m e a n s   t h a t   y o u   n e e d   t o   e x c l u d e   t h e   e x t e r n a l   I P   y o u   a r e   t r y i n g   t o