Question: What are the benefits of ResourceQuota?

Answer: ResourceQuotaResourceQuota sets aggregate quota restrictions enforced per namespace.apiVersion: v1import "k8s.io/api/core/v1"ResourceQuotaResourceQuota sets aggregate quota restrictions enforced per namespaceapiVersion: v1kind: ResourceQuotametadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec (ResourceQuotaSpec)Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusstatus (ResourceQuotaStatus)Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusResourceQuotaSpecResourceQuotaSpec defines the desired hard limits to enforce for Quota.hard (map[string]Quantity)hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/scopeSelector (ScopeSelector)scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.scopeSelector.matchExpressions ([]ScopedResourceSelectorRequirement)Atomic: will be replaced during a mergeA list of scope selector requirements by scope of the resources.A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.scopeSelector.matchExpressions.operator (string), requiredRepresents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.scopeSelector.matchExpressions.scopeName (string), requiredThe name of the scope that the selector applies to.scopeSelector.matchExpressions.values ([]string)Atomic: will be replaced during a mergeAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.scopes ([]string)Atomic: will be replaced during a mergeA collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.ResourceQuotaStatusResourceQuotaStatus defines the enforced hard limits and observed use.hard (map[string]Quantity)Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/used (map[string]Quantity)Used is the current observed total usage of the resource in the namespace.ResourceQuotaListResourceQuotaList is a list of ResourceQuota items.apiVersion: v1kind: ResourceQuotaListmetadata (ListMeta)Standard list metadata. More info: https://gi


Question: What is ResourceQuota?

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


Question: What is ResourceQuota?

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


Question: What is ResourceQuotaSpec?

Answer: R e s o u r c e Q u o t a S p e c   d e f i n e s   t h e   d e s i r e d   h a r d   l i m i t s   t o   e n f o r c e   f o r   Q u o t a .   h a r d   ( m a p [ s t r i n g ] Q u a n t i t y ) h a r d   i s   t h e   s e t   o f   d e s i r e d   h a r d   l i m i t s   f o r   e a c h   n a m e d   r e s o u r c e .   M o r e   i n f o :   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / p o l i c y / r e s o u r c e - q u o t a s / s c o p e S e l e c t o r   ( S c o p e S e l e c t o r ) s c o p e S e l e c t o r   i s   a l s o   a   c o l l e c t i o n   o f   f i l t e r s   l i k e   s c o p e s   t h a t   m u s t   m a t c h   e a c h   o b j e c t   t r a c k e d   b y   a   q u o t a   b u t   e x p r e s s e d   u s i n g   S c o p e S e l e c t o r O p e r a t o r   i n   c o m b i n a t i o n   w i t h   p o s s i b l e   v a l u e s .   F o r   a   r e s o u r c e   t o   m a t c h ,   b o t h   s c o p e s   A N D   s c o p e S e l e c t o r   ( i f   s p e c i f i e d   i n   s p e c ) ,   m u s t   b e   m a t c h e d . A   s c o p e   s e l e c t o r   r e p r e s e n t s   t h e   A N D   o f   t h e   s e l e c t o r s   r e p r e s e n t e d   b y   t h e   s c o p e d - r e s o u r c e   s e l e c t o r   r e q u i r e m e n t s . s c o p e S e l e c t o r . m a t c h E x p r e s s i o n s   ( [ ] S c o p e d R e s o u r c e S e l e c t o r R e q u i r e m e n t ) A t o m i c :   w i l l   b e   r e p l a c e d   d u r i n g   a   m e r g e A   l i s t   o f   s c o p e   s e l e c t o r   r e q u i r e m e n t s   b y   s c o p e   o f   t h e   r e s o u r c e s . A   s c o p e d - r e s o u r c e   s e l e c t o r   r e q u i r e m e n t   i s   a   s e l e c t o r   t h a t   c o n t a i n s   v a l u e s ,   a   s c o p e   n a m e ,   a n d   a n   o p e r a t o r   t h a t   r e l a t e s   t h e   s c o p e   n a m e   a n d   v a l u e s . s c o p e S e l e c t o r . m a t c h E x p r e s s i o n s . o p e r


Question: What is ResourceQuotaStatus?

Answer: R e s o u r c e Q u o t a S t a t u s   d e f i n e s   t h e   e n f o r c e d   h a r d   l i m i t s   a n d   o b s e r v e d   u s e .   h a r d   ( m a p [ s t r i n g ] Q u a n t i t y ) H a r d   i s   t h e   s e t   o f   e n f o r c e d   h a r d   l i m i t s   f o r   e a c h   n a m e d   r e s o u r c e .   M o r e   i n f o :   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / p o l i c y / r e s o u r c e - q u o t a s / u s e d   ( m a p [ s t r i n g ] Q u a n t i t y ) U s e d   i s   t h e   c u r r e n t   o b s e r v e d   t o t a l   u s a g e   o f   t h e   r e s o u r c e   i n   t h e   n a m e s p a c e .   h a r d   ( m a p [ s t r i n g ] Q u a n t i t y )   H a r d   i s   t h e   s e t   o f   e n f o r c e d   h a r d   l i m i t s   f o r   e a c h   n a m e d   r e s o u r c e .   M o r e   i n f o :   h t t p s : / / k u b e r n e t e s . i o / d o c s / c o n c e p t s / p o l i c y / r e s o u r c e - q u o t a s /   u s e d   ( m a p [ s t r i n g ] Q u a n t i t y )   U s e d   i s   t h e   c u r r e n t   o b s e r v e d   t o t a l   u s a g e   o f   t h e   r e s o u r c e   i n   t h e   n a m e s p a c e .


Question: What is ResourceQuotaList?

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


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a L i s t ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

Answer: G E T   / a p i / v 1 / r e s o u r c e q u o t a s


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a L i s t ) :   O K   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   2 0 1   ( R e s o u r c e Q u o t a ) :   C r e a t e d   2 0 2   ( R e s o u r c e Q u o t a ) :   A c c e p t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   2 0 1   ( R e s o u r c e Q u o t a ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   2 0 1   ( R e s o u r c e Q u o t a ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   2 0 1   ( R e s o u r c e Q u o t a ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   2 0 1   ( R e s o u r c e Q u o t a ) :   C r e a t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( R e s o u r c e Q u o t a ) :   O K   2 0 2   ( R e s o u r c e Q u o t a ) :   A c c e p t e d   4 0 1 :   U n a u t h o r i z e d


Question: What is HTTP Request?

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


Question: What is Parameters?

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


Question: What is Response?

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


Question: What is Debug Pods?

Answer: Debug PodsThis guide is to help users debug applications that are deployed into Kubernetes and not behaving correctly. This is not a guide for people who want to debug their cluster. For that you should check out this guide.Diagnosing the problemThe first step in troubleshooting is triage. What is the problem? Is it your Pods, your Replication Controller or your Service?Debugging PodsDebugging Replication ControllersDebugging ServicesDebugging PodsThe first step in debugging a Pod is taking a look at it. Check the current state of the Pod and recent events with the following command:kubectl describe pods ${POD_NAME} Look at the state of the containers in the pod. Are they all Running? Have there been recent restarts?Continue debugging depending on the state of the pods.My pod stays pendingIf a Pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling. Look at the output of the kubectl describe ... command above. There should be messages from the scheduler about why it can not schedule your pod. Reasons include:You don't have enough resources: You may have exhausted the supply of CPU or Memory in your cluster, in this case you need to delete Pods, adjust resource requests, or add new nodes to your cluster. See Compute Resources document for more information.You are using hostPort: When you bind a Pod to a hostPort there are a limited number of places that pod can be scheduled. In most cases, hostPort is unnecessary, try using a Service object to expose your Pod. If you do require hostPort then you can only schedule as many Pods as there are nodes in your Kubernetes cluster.My pod stays waitingIf a Pod is stuck in the Waiting state, then it has been scheduled to a worker node, but it can't run on that machine. Again, the information from kubectl describe ... should be informative. The most common cause of Waiting pods is a failure to pull the image. There are three things to check:Make sure that you have the name of the image correct.Have you pushed the image to the registry?Try to manually pull the image to see if the image can be pulled. For example, if you use Docker on your PC, run docker pull <image>.My pod stays terminatingIf a Pod is stuck in the Terminating state, it means that a deletion has been issued for the Pod, but the control plane is unable to delete the Pod object.This typically happens if the Pod has a finalizer and there is an admission webhook installed in the cluster that prevents the control plane from removing the finalizer.To identify this scenario, check if your cluster has any ValidatingWebhookConfiguration or MutatingWebhookConfiguration that target UPDATE operations for pods resources.If the webhook is provided by a third-party:Make sure you are using the latest version.Disable the webhook for UPDATE operations.Report an issue with the corresponding provider.If you are the author of the webhook:For a


Question: How does Debug Pods work?

Answer: Debug PodsThis guide is to help users debug applications that are deployed into Kubernetes and not behaving correctly. This is not a guide for people who want to debug their cluster. For that you should check out this guide.Diagnosing the problemThe first step in troubleshooting is triage. What is the problem? Is it your Pods, your Replication Controller or your Service?Debugging PodsDebugging Replication ControllersDebugging ServicesDebugging PodsThe first step in debugging a Pod is taking a look at it. Check the current state of the Pod and recent events with the following command:kubectl describe pods ${POD_NAME} Look at the state of the containers in the pod. Are they all Running? Have there been recent restarts?Continue debugging depending on the state of the pods.My pod stays pendingIf a Pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling. Look at the output of the kubectl describe ... command above. There should be messages from the scheduler about why it can not schedule your pod. Reasons include:You don't have enough resources: You may have exhausted the supply of CPU or Memory in your cluster, in this case you need to delete Pods, adjust resource requests, or add new nodes to your cluster. See Compute Resources document for more information.You are using hostPort: When you bind a Pod to a hostPort there are a limited number of places that pod can be scheduled. In most cases, hostPort is unnecessary, try using a Service object to expose your Pod. If you do require hostPort then you can only schedule as many Pods as there are nodes in your Kubernetes cluster.My pod stays waitingIf a Pod is stuck in the Waiting state, then it has been scheduled to a worker node, but it can't run on that machine. Again, the information from kubectl describe ... should be informative. The most common cause of Waiting pods is a failure to pull the image. There are three things to check:Make sure that you have the name of the image correct.Have you pushed the image to the registry?Try to manually pull the image to see if the image can be pulled. For example, if you use Docker on your PC, run docker pull <image>.My pod stays terminatingIf a Pod is stuck in the Terminating state, it means that a deletion has been issued for the Pod, but the control plane is unable to delete the Pod object.This typically happens if the Pod has a finalizer and there is an admission webhook installed in the cluster that prevents the control plane from removing the finalizer.To identify this scenario, check if your cluster has any ValidatingWebhookConfiguration or MutatingWebhookConfiguration that target UPDATE operations for pods resources.If the webhook is provided by a third-party:Make sure you are using the latest version.Disable the webhook for UPDATE operations.Report an issue with the corresponding provider.If you are the author of the webhook:For a


Question: When would you use Debug Pods?

Answer: Debug PodsThis guide is to help users debug applications that are deployed into Kubernetes and not behaving correctly. This is not a guide for people who want to debug their cluster. For that you should check out this guide.Diagnosing the problemThe first step in troubleshooting is triage. What is the problem? Is it your Pods, your Replication Controller or your Service?Debugging PodsDebugging Replication ControllersDebugging ServicesDebugging PodsThe first step in debugging a Pod is taking a look at it. Check the current state of the Pod and recent events with the following command:kubectl describe pods ${POD_NAME} Look at the state of the containers in the pod. Are they all Running? Have there been recent restarts?Continue debugging depending on the state of the pods.My pod stays pendingIf a Pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling. Look at the output of the kubectl describe ... command above. There should be messages from the scheduler about why it can not schedule your pod. Reasons include:You don't have enough resources: You may have exhausted the supply of CPU or Memory in your cluster, in this case you need to delete Pods, adjust resource requests, or add new nodes to your cluster. See Compute Resources document for more information.You are using hostPort: When you bind a Pod to a hostPort there are a limited number of places that pod can be scheduled. In most cases, hostPort is unnecessary, try using a Service object to expose your Pod. If you do require hostPort then you can only schedule as many Pods as there are nodes in your Kubernetes cluster.My pod stays waitingIf a Pod is stuck in the Waiting state, then it has been scheduled to a worker node, but it can't run on that machine. Again, the information from kubectl describe ... should be informative. The most common cause of Waiting pods is a failure to pull the image. There are three things to check:Make sure that you have the name of the image correct.Have you pushed the image to the registry?Try to manually pull the image to see if the image can be pulled. For example, if you use Docker on your PC, run docker pull <image>.My pod stays terminatingIf a Pod is stuck in the Terminating state, it means that a deletion has been issued for the Pod, but the control plane is unable to delete the Pod object.This typically happens if the Pod has a finalizer and there is an admission webhook installed in the cluster that prevents the control plane from removing the finalizer.To identify this scenario, check if your cluster has any ValidatingWebhookConfiguration or MutatingWebhookConfiguration that target UPDATE operations for pods resources.If the webhook is provided by a third-party:Make sure you are using the latest version.Disable the webhook for UPDATE operations.Report an issue with the corresponding provider.If you are the author of the webhook:For a


Question: What are the benefits of Debug Pods?

Answer: Debug PodsThis guide is to help users debug applications that are deployed into Kubernetes and not behaving correctly. This is not a guide for people who want to debug their cluster. For that you should check out this guide.Diagnosing the problemThe first step in troubleshooting is triage. What is the problem? Is it your Pods, your Replication Controller or your Service?Debugging PodsDebugging Replication ControllersDebugging ServicesDebugging PodsThe first step in debugging a Pod is taking a look at it. Check the current state of the Pod and recent events with the following command:kubectl describe pods ${POD_NAME} Look at the state of the containers in the pod. Are they all Running? Have there been recent restarts?Continue debugging depending on the state of the pods.My pod stays pendingIf a Pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling. Look at the output of the kubectl describe ... command above. There should be messages from the scheduler about why it can not schedule your pod. Reasons include:You don't have enough resources: You may have exhausted the supply of CPU or Memory in your cluster, in this case you need to delete Pods, adjust resource requests, or add new nodes to your cluster. See Compute Resources document for more information.You are using hostPort: When you bind a Pod to a hostPort there are a limited number of places that pod can be scheduled. In most cases, hostPort is unnecessary, try using a Service object to expose your Pod. If you do require hostPort then you can only schedule as many Pods as there are nodes in your Kubernetes cluster.My pod stays waitingIf a Pod is stuck in the Waiting state, then it has been scheduled to a worker node, but it can't run on that machine. Again, the information from kubectl describe ... should be informative. The most common cause of Waiting pods is a failure to pull the image. There are three things to check:Make sure that you have the name of the image correct.Have you pushed the image to the registry?Try to manually pull the image to see if the image can be pulled. For example, if you use Docker on your PC, run docker pull <image>.My pod stays terminatingIf a Pod is stuck in the Terminating state, it means that a deletion has been issued for the Pod, but the control plane is unable to delete the Pod object.This typically happens if the Pod has a finalizer and there is an admission webhook installed in the cluster that prevents the control plane from removing the finalizer.To identify this scenario, check if your cluster has any ValidatingWebhookConfiguration or MutatingWebhookConfiguration that target UPDATE operations for pods resources.If the webhook is provided by a third-party:Make sure you are using the latest version.Disable the webhook for UPDATE operations.Report an issue with the corresponding provider.If you are the author of the webhook:For a


Question: What is Debug Pods?

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


Question: What is Diagnosing the problem?

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


Question: What is Debugging Pods?

Answer: T h e   f i r s t   s t e p   i n   d e b u g g i n g   a   P o d   i s   t a k i n g   a   l o o k   a t   i t .   C h e c k   t h e   c u r r e n t   s t a t e   o f   t h e   P o d   a n d   r e c e n t   e v e n t s   w i t h   t h e   f o l l o w i n g   c o m m a n d :   k u b e c t l   d e s c r i b e   p o d s   $ { P O D _ N A M E }   L o o k   a t   t h e   s t a t e   o f   t h e   c o n t a i n e r s   i n   t h e   p o d .   A r e   t h e y   a l l   R u n n i n g ?   H a v e   t h e r e   b e e n   r e c e n t   r e s t a r t s ?   C o n t i n u e   d e b u g g i n g   d e p e n d i n g   o n   t h e   s t a t e   o f   t h e   p o d s .


Question: What is My pod stays pending?

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


Question: What is My pod stays waiting?

Answer: I f   a   P o d   i s   s t u c k   i n   t h e   W a i t i n g   s t a t e ,   t h e n   i t   h a s   b e e n   s c h e d u l e d   t o   a   w o r k e r   n o d e ,   b u t   i t   c a n ' t   r u n   o n   t h a t   m a c h i n e .   A g a i n ,   t h e   i n f o r m a t i o n   f r o m   k u b e c t l   d e s c r i b e   . . .   s h o u l d   b e   i n f o r m a t i v e .   T h e   m o s t   c o m m o n   c a u s e   o f   W a i t i n g   p o d s   i s   a   f a i l u r e   t o   p u l l   t h e   i m a g e .   T h e r e   a r e   t h r e e   t h i n g s   t o   c h e c k :   M a k e   s u r e   t h a t   y o u   h a v e   t h e   n a m e   o f   t h e   i m a g e   c o r r e c t . H a v e   y o u   p u s h e d   t h e   i m a g e   t o   t h e   r e g i s t r y ? T r y   t o   m a n u a l l y   p u l l   t h e   i m a g e   t o   s e e   i f   t h e   i m a g e   c a n   b e   p u l l e d .   F o r   e x a m p l e ,   i f   y o u   u s e   D o c k e r   o n   y o u r   P C ,   r u n   d o c k e r   p u l l   < i m a g e > .


Question: What is My pod stays terminating?

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


Question: What is My pod is crashing or otherwise unhealthy?

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


Question: What is My pod is running but not doing what I told it to do?

Answer: I f   y o u r   p o d   i s   n o t   b e h a v i n g   a s   y o u   e x p e c t e d ,   i t   m a y   b e   t h a t   t h e r e   w a s   a n   e r r o r   i n   y o u r   p o d   d e s c r i p t i o n   ( e . g .   m y p o d . y a m l   f i l e   o n   y o u r   l o c a l   m a c h i n e ) ,   a n d   t h a t   t h e   e r r o r   w a s   s i l e n t l y   i g n o r e d   w h e n   y o u   c r e a t e d   t h e   p o d .   O f t e n   a   s e c t i o n   o f   t h e   p o d   d e s c r i p t i o n   i s   n e s t e d   i n c o r r e c t l y ,   o r   a   k e y   n a m e   i s   t y p e d   i n c o r r e c t l y ,   a n d   s o   t h e   k e y   i s   i g n o r e d .   F o r   e x a m p l e ,   i f   y o u   m i s s p e l l e d   c o m m a n d   a s   c o m m n d   t h e n   t h e   p o d   w i l l   b e   c r e a t e d   b u t   w i l l   n o t   u s e   t h e   c o m m a n d   l i n e   y o u   i n t e n d e d   i t   t o   u s e .   T h e   f i r s t   t h i n g   t o   d o   i s   t o   d e l e t e   y o u r   p o d   a n d   t r y   c r e a t i n g   i t   a g a i n   w i t h   t h e   - - v a l i d a t e   o p t i o n .   F o r   e x a m p l e ,   r u n   k u b e c t l   a p p l y   - - v a l i d a t e   - f   m y p o d . y a m l .   I f   y o u   m i s s p e l l e d   c o m m a n d   a s   c o m m n d   t h e n   w i l l   g i v e   a n   e r r o r   l i k e   t h i s :   I 0 8 0 5   1 0 : 4 3 : 2 5 . 1 2 9 8 5 0   4 6 7 5 7   s c h e m a . g o : 1 2 6 ]   u n k n o w n   f i e l d :   c o m m n d   I 0 8 0 5   1 0 : 4 3 : 2 5 . 1 2 9 9 7 3   4 6 7 5 7   s c h e m a . g o : 1 2 9 ]   t h i s   m a y   b e   a   f a l s e   a l a r m ,   s e e   h t t p s : / / g i t h u b . c o m / k u b e r n e t e s / k u b e r n e t e s / i s s u e s / 6 8 4 2   p o d s / m y p o d   T h e   n e x t   t h i n g   t o   c h e c k   i s   w h e t h e r   t h e   p o d   o n   t h e   a p i s e r v e r   m a t c h e s   t h e   p o d   y o u   m e a n t   t o   c r e a t e


Question: What is Debugging Replication Controllers?

Answer: R e p l i c a t i o n   c o n t r o l l e r s   a r e   f a i r l y   s t r a i g h t f o r w a r d .   T h e y   c a n   e i t h e r   c r e a t e   P o d s   o r   t h e y   c a n ' t .   I f   t h e y   c a n ' t   c r e a t e   p o d s ,   t h e n   p l e a s e   r e f e r   t o   t h e   i n s t r u c t i o n s   a b o v e   t o   d e b u g   y o u r   p o d s .   Y o u   c a n   a l s o   u s e   k u b e c t l   d e s c r i b e   r c   $ { C O N T R O L L E R _ N A M E }   t o   i n t r o s p e c t   e v e n t s   r e l a t e d   t o   t h e   r e p l i c a t i o n   c o n t r o l l e r .


Question: What is Debugging Services?

Answer: S e r v i c e s   p r o v i d e   l o a d   b a l a n c i n g   a c r o s s   a   s e t   o f   p o d s .   T h e r e   a r e   s e v e r a l   c o m m o n   p r o b l e m s   t h a t   c a n   m a k e   S e r v i c e s   n o t   w o r k   p r o p e r l y .   T h e   f o l l o w i n g   i n s t r u c t i o n s   s h o u l d   h e l p   d e b u g   S e r v i c e   p r o b l e m s .   F i r s t ,   v e r i f y   t h a t   t h e r e   a r e   e n d p o i n t s   f o r   t h e   s e r v i c e .   F o r   e v e r y   S e r v i c e   o b j e c t ,   t h e   a p i s e r v e r   m a k e s   o n e   o r   m o r e   E n d p o i n t S l i c e   r e s o u r c e s   a v a i l a b l e .   Y o u   c a n   v i e w   t h e s e   r e s o u r c e s   w i t h :   k u b e c t l   g e t   e n d p o i n t s l i c e s   - l   k u b e r n e t e s . i o / s e r v i c e - n a m e = $ { S E R V I C E _ N A M E }   M a k e   s u r e   t h a t   t h e   e n d p o i n t s   i n   t h e   E n d p o i n t S l i c e s   m a t c h   u p   w i t h   t h e   n u m b e r   o f   p o d s   t h a t   y o u   e x p e c t   t o   b e   m e m b e r s   o f   y o u r   s e r v i c e .   F o r   e x a m p l e ,   i f   y o u r   S e r v i c e   i s   f o r   a n   n g i n x   c o n t a i n e r   w i t h   3   r e p l i c a s ,   y o u   w o u l d   e x p e c t   t o   s e e   t h r e e   d i f f e r e n t   I P   a d d r e s s e s   i n   t h e   S e r v i c e ' s   e n d p o i n t   s l i c e s .


Question: What is My service is missing endpoints?

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


Question: What is Network traffic is not forwarded?

Answer: P l e a s e   s e e   d e b u g g i n g   s e r v i c e   f o r   m o r e   i n f o r m a t i o n .


Question: What is What's next?

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


Question: What is Assigning Pods to Nodes?

Answer: Assigning Pods to NodesYou can constrain a Pod so that it is restricted to run on particular node(s), or to prefer to run on particular nodes. There are several ways to do this and the recommended approaches all use label selectors to facilitate the selection. Often, you do not need to set any such constraints; the scheduler will automatically do a reasonable placement (for example, spreading your Pods across nodes so as not place Pods on a node with insufficient free resources). However, there are some circumstances where you may want to control which node the Pod deploys to, for example, to ensure that a Pod ends up on a node with an SSD attached to it, or to co-locate Pods from two different services that communicate a lot into the same availability zone.You can use any of the following methods to choose where Kubernetes schedules specific Pods:nodeSelector field matching against node labelsAffinity and anti-affinitynodeName fieldPod topology spread constraintsNode labelsLike many other Kubernetes objects, nodes have labels. You can attach labels manually. Kubernetes also populates a standard set of labels on all nodes in a cluster.Note:The value of these labels is cloud provider specific and is not guaranteed to be reliable. For example, the value of kubernetes.io/hostname may be the same as the node name in some environments and a different value in other environments.Node isolation/restrictionAdding labels to nodes allows you to target Pods for scheduling on specific nodes or groups of nodes. You can use this functionality to ensure that specific Pods only run on nodes with certain isolation, security, or regulatory properties.If you use labels for node isolation, choose label keys that the kubelet cannot modify. This prevents a compromised node from setting those labels on itself so that the scheduler schedules workloads onto the compromised node.The NodeRestriction admission plugin prevents the kubelet from setting or modifying labels with a node-restriction.kubernetes.io/ prefix.To make use of that label prefix for node isolation:Ensure you are using the Node authorizer and have enabled the NodeRestriction admission plugin.Add labels with the node-restriction.kubernetes.io/ prefix to your nodes, and use those labels in your node selectors. For example, example.com.node-restriction.kubernetes.io/fips=true or example.com.node-restriction.kubernetes.io/pci-dss=true.nodeSelectornodeSelector is the simplest recommended form of node selection constraint. You can add the nodeSelector field to your Pod specification and specify the node labels you want the target node to have. Kubernetes only schedules the Pod onto nodes that have each of the labels you specify.See Assign Pods to Nodes for more information.Affinity and anti-affinitynodeSelector is the simplest way to constrain Pods to nodes with specific labels. Affinity and anti-affinity expand the types of constraints you can define. Some of the benefits of affinity and anti-affinity include:T


Question: How does Assigning Pods to Nodes work?

Answer: Assigning Pods to NodesYou can constrain a Pod so that it is restricted to run on particular node(s), or to prefer to run on particular nodes. There are several ways to do this and the recommended approaches all use label selectors to facilitate the selection. Often, you do not need to set any such constraints; the scheduler will automatically do a reasonable placement (for example, spreading your Pods across nodes so as not place Pods on a node with insufficient free resources). However, there are some circumstances where you may want to control which node the Pod deploys to, for example, to ensure that a Pod ends up on a node with an SSD attached to it, or to co-locate Pods from two different services that communicate a lot into the same availability zone.You can use any of the following methods to choose where Kubernetes schedules specific Pods:nodeSelector field matching against node labelsAffinity and anti-affinitynodeName fieldPod topology spread constraintsNode labelsLike many other Kubernetes objects, nodes have labels. You can attach labels manually. Kubernetes also populates a standard set of labels on all nodes in a cluster.Note:The value of these labels is cloud provider specific and is not guaranteed to be reliable. For example, the value of kubernetes.io/hostname may be the same as the node name in some environments and a different value in other environments.Node isolation/restrictionAdding labels to nodes allows you to target Pods for scheduling on specific nodes or groups of nodes. You can use this functionality to ensure that specific Pods only run on nodes with certain isolation, security, or regulatory properties.If you use labels for node isolation, choose label keys that the kubelet cannot modify. This prevents a compromised node from setting those labels on itself so that the scheduler schedules workloads onto the compromised node.The NodeRestriction admission plugin prevents the kubelet from setting or modifying labels with a node-restriction.kubernetes.io/ prefix.To make use of that label prefix for node isolation:Ensure you are using the Node authorizer and have enabled the NodeRestriction admission plugin.Add labels with the node-restriction.kubernetes.io/ prefix to your nodes, and use those labels in your node selectors. For example, example.com.node-restriction.kubernetes.io/fips=true or example.com.node-restriction.kubernetes.io/pci-dss=true.nodeSelectornodeSelector is the simplest recommended form of node selection constraint. You can add the nodeSelector field to your Pod specification and specify the node labels you want the target node to have. Kubernetes only schedules the Pod onto nodes that have each of the labels you specify.See Assign Pods to Nodes for more information.Affinity and anti-affinitynodeSelector is the simplest way to constrain Pods to nodes with specific labels. Affinity and anti-affinity expand the types of constraints you can define. Some of the benefits of affinity and anti-affinity include:T


Question: When would you use Assigning Pods to Nodes?

Answer: Assigning Pods to NodesYou can constrain a Pod so that it is restricted to run on particular node(s), or to prefer to run on particular nodes. There are several ways to do this and the recommended approaches all use label selectors to facilitate the selection. Often, you do not need to set any such constraints; the scheduler will automatically do a reasonable placement (for example, spreading your Pods across nodes so as not place Pods on a node with insufficient free resources). However, there are some circumstances where you may want to control which node the Pod deploys to, for example, to ensure that a Pod ends up on a node with an SSD attached to it, or to co-locate Pods from two different services that communicate a lot into the same availability zone.You can use any of the following methods to choose where Kubernetes schedules specific Pods:nodeSelector field matching against node labelsAffinity and anti-affinitynodeName fieldPod topology spread constraintsNode labelsLike many other Kubernetes objects, nodes have labels. You can attach labels manually. Kubernetes also populates a standard set of labels on all nodes in a cluster.Note:The value of these labels is cloud provider specific and is not guaranteed to be reliable. For example, the value of kubernetes.io/hostname may be the same as the node name in some environments and a different value in other environments.Node isolation/restrictionAdding labels to nodes allows you to target Pods for scheduling on specific nodes or groups of nodes. You can use this functionality to ensure that specific Pods only run on nodes with certain isolation, security, or regulatory properties.If you use labels for node isolation, choose label keys that the kubelet cannot modify. This prevents a compromised node from setting those labels on itself so that the scheduler schedules workloads onto the compromised node.The NodeRestriction admission plugin prevents the kubelet from setting or modifying labels with a node-restriction.kubernetes.io/ prefix.To make use of that label prefix for node isolation:Ensure you are using the Node authorizer and have enabled the NodeRestriction admission plugin.Add labels with the node-restriction.kubernetes.io/ prefix to your nodes, and use those labels in your node selectors. For example, example.com.node-restriction.kubernetes.io/fips=true or example.com.node-restriction.kubernetes.io/pci-dss=true.nodeSelectornodeSelector is the simplest recommended form of node selection constraint. You can add the nodeSelector field to your Pod specification and specify the node labels you want the target node to have. Kubernetes only schedules the Pod onto nodes that have each of the labels you specify.See Assign Pods to Nodes for more information.Affinity and anti-affinitynodeSelector is the simplest way to constrain Pods to nodes with specific labels. Affinity and anti-affinity expand the types of constraints you can define. Some of the benefits of affinity and anti-affinity include:T


Question: What are the benefits of Assigning Pods to Nodes?

Answer: Assigning Pods to NodesYou can constrain a Pod so that it is restricted to run on particular node(s), or to prefer to run on particular nodes. There are several ways to do this and the recommended approaches all use label selectors to facilitate the selection. Often, you do not need to set any such constraints; the scheduler will automatically do a reasonable placement (for example, spreading your Pods across nodes so as not place Pods on a node with insufficient free resources). However, there are some circumstances where you may want to control which node the Pod deploys to, for example, to ensure that a Pod ends up on a node with an SSD attached to it, or to co-locate Pods from two different services that communicate a lot into the same availability zone.You can use any of the following methods to choose where Kubernetes schedules specific Pods:nodeSelector field matching against node labelsAffinity and anti-affinitynodeName fieldPod topology spread constraintsNode labelsLike many other Kubernetes objects, nodes have labels. You can attach labels manually. Kubernetes also populates a standard set of labels on all nodes in a cluster.Note:The value of these labels is cloud provider specific and is not guaranteed to be reliable. For example, the value of kubernetes.io/hostname may be the same as the node name in some environments and a different value in other environments.Node isolation/restrictionAdding labels to nodes allows you to target Pods for scheduling on specific nodes or groups of nodes. You can use this functionality to ensure that specific Pods only run on nodes with certain isolation, security, or regulatory properties.If you use labels for node isolation, choose label keys that the kubelet cannot modify. This prevents a compromised node from setting those labels on itself so that the scheduler schedules workloads onto the compromised node.The NodeRestriction admission plugin prevents the kubelet from setting or modifying labels with a node-restriction.kubernetes.io/ prefix.To make use of that label prefix for node isolation:Ensure you are using the Node authorizer and have enabled the NodeRestriction admission plugin.Add labels with the node-restriction.kubernetes.io/ prefix to your nodes, and use those labels in your node selectors. For example, example.com.node-restriction.kubernetes.io/fips=true or example.com.node-restriction.kubernetes.io/pci-dss=true.nodeSelectornodeSelector is the simplest recommended form of node selection constraint. You can add the nodeSelector field to your Pod specification and specify the node labels you want the target node to have. Kubernetes only schedules the Pod onto nodes that have each of the labels you specify.See Assign Pods to Nodes for more information.Affinity and anti-affinitynodeSelector is the simplest way to constrain Pods to nodes with specific labels. Affinity and anti-affinity expand the types of constraints you can define. Some of the benefits of affinity and anti-affinity include:T


Question: What is Assigning Pods to Nodes?

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


Question: What is Node labels?

Answer: L i k e   m a n y   o t h e r   K u b e r n e t e s   o b j e c t s ,   n o d e s   h a v e   l a b e l s .   Y o u   c a n   a t t a c h   l a b e l s   m a n u a l l y .   K u b e r n e t e s   a l s o   p o p u l a t e s   a   s t a n d a r d   s e t   o f   l a b e l s   o n   a l l   n o d e s   i n   a   c l u s t e r .


Question: What is Node isolation/restriction?

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


Question: What is nodeSelector?

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


Question: What is Affinity and anti-affinity?

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


Question: What is Node affinity?

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


Question: What is Note:?

Answer: Y o u   c a n   s p e c i f y   n o d e   a f f i n i t i e s   u s i n g   t h e   . s p e c . a f f i n i t y . n o d e A f f i n i t y   f i e l d   i n   y o u r   P o d   s p e c .   F o r   e x a m p l e ,   c o n s i d e r   t h e   f o l l o w i n g   P o d   s p e c :   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 :   w i t h - n o d e - a f f i n i t y   s p e c :   a f f i n i t y :   n o d e A f f i n i t y :   r e q u i r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   n o d e S e l e c t o r T e r m s :   -   m a t c h E x p r e s s i o n s :   -   k e y :   t o p o l o g y . k u b e r n e t e s . i o / z o n e   o p e r a t o r :   I n   v a l u e s :   -   a n t a r c t i c a - e a s t 1   -   a n t a r c t i c a - w e s t 1   p r e f e r r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   -   w e i g h t :   1   p r e f e r e n c e :   m a t c h E x p r e s s i o n s :   -   k e y :   a n o t h e r - n o d e - l a b e l - k e y   o p e r a t o r :   I n   v a l u e s :   -   a n o t h e r - n o d e - l a b e l - v a l u e   c o n t a i n e r s :   -   n a m e :   w i t h - n o d e - a f f i n i t y   i m a g e :   r e g i s t r y . k 8 s . i o / p a u s e : 3 . 8   I n   t h i s   e x a m p l e ,   t h e   f o l l o w i n g   r u l e s   a p p l y :   T h e   n o d e   m u s t   h a v e   a   l a b e l   w i t h   t h e   k e y   t o p o l o g y . k u b e r n e t e s . i o / z o n e   a n d   t h e   v a l u e   o f   t h a t   l a b e l   m u s t   b e   e i t h e r   a n t a r c t i c a - e a s t 1   o r   a n t a r c t i c a - w e s t 1 . T h e   n o d e   p r e f e r a b l y   h a s   a   l a b e l   w i t h   t h e   k e y   a n o t h e r - n o d e - l a b e l - k e y   a n d   t h e   v a l u e   a n o t h e r - n o d e - l a b e l - v a l u e .   Y o u   c a n   u s e   t h e   o p e r a t o r   f i e l d   t o   s p e c i f y   a   l o g i


Question: What is Note:?

Answer: I f   y o u   s p e c i f y   b o t h   n o d e S e l e c t o r   a n d   n o d e A f f i n i t y ,   b o t h   m u s t   b e   s a t i s f i e d   f o r   t h e   P o d   t o   b e   s c h e d u l e d   o n t o   a   n o d e .   I f   y o u   s p e c i f y   m u l t i p l e   t e r m s   i n   n o d e S e l e c t o r T e r m s   a s s o c i a t e d   w i t h   n o d e A f f i n i t y   t y p e s ,   t h e n   t h e   P o d   c a n   b e   s c h e d u l e d   o n t o   a   n o d e   i f   o n e   o f   t h e   s p e c i f i e d   t e r m s   c a n   b e   s a t i s f i e d   ( t e r m s   a r e   O R e d ) .   I f   y o u   s p e c i f y   m u l t i p l e   e x p r e s s i o n s   i n   a   s i n g l e   m a t c h E x p r e s s i o n s   f i e l d   a s s o c i a t e d   w i t h   a   t e r m   i n   n o d e S e l e c t o r T e r m s ,   t h e n   t h e   P o d   c a n   b e   s c h e d u l e d   o n t o   a   n o d e   o n l y   i f   a l l   t h e   e x p r e s s i o n s   a r e   s a t i s f i e d   ( e x p r e s s i o n s   a r e   A N D e d ) .   S e e   A s s i g n   P o d s   t o   N o d e s   u s i n g   N o d e   A f f i n i t y   f o r   m o r e   i n f o r m a t i o n .


Question: What is Node affinity weight?

Answer: Y o u   c a n   s p e c i f y   a   w e i g h t   b e t w e e n   1   a n d   1 0 0   f o r   e a c h   i n s t a n c e   o f   t h e   p r e f e r r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n   a f f i n i t y   t y p e .   W h e n   t h e   s c h e d u l e r   f i n d s   n o d e s   t h a t   m e e t   a l l   t h e   o t h e r   s c h e d u l i n g   r e q u i r e m e n t s   o f   t h e   P o d ,   t h e   s c h e d u l e r   i t e r a t e s   t h r o u g h   e v e r y   p r e f e r r e d   r u l e   t h a t   t h e   n o d e   s a t i s f i e s   a n d   a d d s   t h e   v a l u e   o f   t h e   w e i g h t   f o r   t h a t   e x p r e s s i o n   t o   a   s u m .   T h e   f i n a l   s u m   i s   a d d e d   t o   t h e   s c o r e   o f   o t h e r   p r i o r i t y   f u n c t i o n s   f o r   t h e   n o d e .   N o d e s   w i t h   t h e   h i g h e s t   t o t a l   s c o r e   a r e   p r i o r i t i z e d   w h e n   t h e   s c h e d u l e r   m a k e s   a   s c h e d u l i n g   d e c i s i o n   f o r   t h e   P o d .   F o r   e x a m p l e ,   c o n s i d e r   t h e   f o l l o w i n g   P o d   s p e c :   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 :   w i t h - a f f i n i t y - p r e f e r r e d - w e i g h t   s p e c :   a f f i n i t y :   n o d e A f f i n i t y :   r e q u i r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   n o d e S e l e c t o r T e r m s :   -   m a t c h E x p r e s s i o n s :   -   k e y :   k u b e r n e t e s . i o / o s   o p e r a t o r :   I n   v a l u e s :   -   l i n u x   p r e f e r r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   -   w e i g h t :   1   p r e f e r e n c e :   m a t c h E x p r e s s i o n s :   -   k e y :   l a b e l - 1   o p e r a t o r :   I n   v a l u e s :   -   k e y - 1   -   w e i g h t :   5 0   p r e f e r e n c e :   m a


Question: What is Node affinity per scheduling profile?

Answer: W h e n   c o n f i g u r i n g   m u l t i p l e   s c h e d u l i n g   p r o f i l e s ,   y o u   c a n   a s s o c i a t e   a   p r o f i l e   w i t h   a   n o d e   a f f i n i t y ,   w h i c h   i s   u s e f u l   i f   a   p r o f i l e   o n l y   a p p l i e s   t o   a   s p e c i f i c   s e t   o f   n o d e s .   T o   d o   s o ,   a d d   a n   a d d e d A f f i n i t y   t o   t h e   a r g s   f i e l d   o f   t h e   N o d e A f f i n i t y   p l u g i n   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 .   F o r   e x a m p l e :   a p i V e r s i o n :   k u b e s c h e d u l e r . c o n f i g . k 8 s . i o / v 1   k i n d :   K u b e S c h e d u l e r C o n f i g u r a t i o n   p r o f i l e s :   -   s c h e d u l e r N a m e :   d e f a u l t - s c h e d u l e r   -   s c h e d u l e r N a m e :   f o o - s c h e d u l e r   p l u g i n C o n f i g :   -   n a m e :   N o d e A f f i n i t y   a r g s :   a d d e d A f f i n i t y :   r e q u i r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   n o d e S e l e c t o r T e r m s :   -   m a t c h E x p r e s s i o n s :   -   k e y :   s c h e d u l e r - p r o f i l e   o p e r a t o r :   I n   v a l u e s :   -   f o o   T h e   a d d e d A f f i n i t y   i s   a p p l i e d   t o   a l l   P o d s   t h a t   s e t   . s p e c . s c h e d u l e r N a m e   t o   f o o - s c h e d u l e r ,   i n   a d d i t i o n   t o   t h e   N o d e A f f i n i t y   s p e c i f i e d   i n   t h e   P o d S p e c .   T h a t   i s ,   i n   o r d e r   t o   m a t c h   t h e   P o d ,   n o d e s   n e e d   t o   s a t i s f y   a d d e d A f f i n i t y   a n d   t h e   P o d ' s   . s p e c . N o d e A f f i n i t y .   S i n c e   t h e   a d d e d A f f i n i t y   i s   n o t   v i s i b l e   t o   e n d   u s e r s ,   i t s   b e h a v i o r   m i g h t   b e   u n e x p e c t e d   t o   t h e m .   U s e   n o d e   l a b e l s   t h


Question: What is Inter-pod affinity and anti-affinity?

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


Question: What is Types of Inter-pod Affinity and Anti-affinity?

Answer: I n t e r - p o d   a f f i n i t y   a n d   a n t i - a f f i n i t y   t a k e   t h e   f o r m   " t h i s   P o d   s h o u l d   ( o r ,   i n   t h e   c a s e   o f   a n t i - a f f i n i t y ,   s h o u l d   n o t )   r u n   i n   a n   X   i f   t h a t   X   i s   a l r e a d y   r u n n i n g   o n e   o r   m o r e   P o d s   t h a t   m e e t   r u l e   Y " ,   w h e r e   X   i s   a   t o p o l o g y   d o m a i n   l i k e   n o d e ,   r a c k ,   c l o u d   p r o v i d e r   z o n e   o r   r e g i o n ,   o r   s i m i l a r   a n d   Y   i s   t h e   r u l e   K u b e r n e t e s   t r i e s   t o   s a t i s f y .   Y o u   e x p r e s s   t h e s e   r u l e s   ( Y )   a s   l a b e l   s e l e c t o r s   w i t h   a n   o p t i o n a l   a s s o c i a t e d   l i s t   o f   n a m e s p a c e s .   P o d s   a r e   n a m e s p a c e d   o b j e c t s   i n   K u b e r n e t e s ,   s o   P o d   l a b e l s   a l s o   i m p l i c i t l y   h a v e   n a m e s p a c e s .   A n y   l a b e l   s e l e c t o r s   f o r   P o d   l a b e l s   s h o u l d   s p e c i f y   t h e   n a m e s p a c e s   i n   w h i c h   K u b e r n e t e s   s h o u l d   l o o k   f o r   t h o s e   l a b e l s .   Y o u   e x p r e s s   t h e   t o p o l o g y   d o m a i n   ( X )   u s i n g   a   t o p o l o g y K e y ,   w h i c h   i s   t h e   k e y   f o r   t h e   n o d e   l a b e l   t h a t   t h e   s y s t e m   u s e s   t o   d e n o t e   t h e   d o m a i n .   F o r   e x a m p l e s ,   s e e   W e l l - K n o w n   L a b e l s ,   A n n o t a t i o n s   a n d   T a i n t s .


Question: What is Note:?

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


Question: What is Scheduling Behavior?

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


Question: What is Scheduling a Group of Pods with Inter-pod Affinity to Themselves?

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


Question: What is Pod Affinity Example?

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


Question: What is Namespace Selector?

Answer: Y o u   c a n   a l s o   s e l e c t   m a t c h i n g   n a m e s p a c e s   u s i n g   n a m e s p a c e S e l e c t o r ,   w h i c h   i s   a   l a b e l   q u e r y   o v e r   t h e   s e t   o f   n a m e s p a c e s .   T h e   a f f i n i t y   t e r m   i s   a p p l i e d   t o   n a m e s p a c e s   s e l e c t e d   b y   b o t h   n a m e s p a c e S e l e c t o r   a n d   t h e   n a m e s p a c e s   f i e l d .   N o t e   t h a t   a n   e m p t y   n a m e s p a c e S e l e c t o r   ( { } )   m a t c h e s   a l l   n a m e s p a c e s ,   w h i l e   a   n u l l   o r   e m p t y   n a m e s p a c e s   l i s t   a n d   n u l l   n a m e s p a c e S e l e c t o r   m a t c h e s   t h e   n a m e s p a c e   o f   t h e   P o d   w h e r e   t h e   r u l e   i s   d e f i n e d .


Question: What is Note:?

Answer: T h e   m a t c h L a b e l K e y s   f i e l d   i s   a   b e t a - l e v e l   f i e l d   a n d   i s   e n a b l e d   b y   d e f a u l t   i n   K u b e r n e t e s   1 . 3 4 .   W h e n   y o u   w a n t   t o   d i s a b l e   i t ,   y o u   h a v e   t o   d i s a b l e   i t   e x p l i c i t l y   v i a   t h e   M a t c h L a b e l K e y s I n P o d A f f i n i t y   f e a t u r e   g a t e .   K u b e r n e t e s   i n c l u d e s   a n   o p t i o n a l   m a t c h L a b e l K e y s   f i e l d   f o r   P o d   a f f i n i t y   o r   a n t i - a f f i n i t y .   T h e   f i e l d   s p e c i f i e s   k e y s   f o r   t h e   l a b e l s   t h a t   s h o u l d   m a t c h   w i t h   t h e   i n c o m i n g   P o d ' s   l a b e l s ,   w h e n   s a t i s f y i n g   t h e   P o d   ( a n t i ) a f f i n i t y .   T h e   k e y s   a r e   u s e d   t o   l o o k   u p   v a l u e s   f r o m   t h e   P o d   l a b e l s ;   t h o s e   k e y - v a l u e   l a b e l s   a r e   c o m b i n e d   ( u s i n g   A N D )   w i t h   t h e   m a t c h   r e s t r i c t i o n s   d e f i n e d   u s i n g   t h e   l a b e l S e l e c t o r   f i e l d .   T h e   c o m b i n e d   f i l t e r i n g   s e l e c t s   t h e   s e t   o f   e x i s t i n g   P o d s   t h a t   w i l l   b e   t a k e n   i n t o   P o d   ( a n t i ) a f f i n i t y   c a l c u l a t i o n .


Question: What is Caution:?

Answer: A   c o m m o n   u s e   c a s e   i s   t o   u s e   m a t c h L a b e l K e y s   w i t h   p o d - t e m p l a t e - h a s h   ( s e t   o n   P o d s   m a n a g e d   a s   p a r t   o f   a   D e p l o y m e n t ,   w h e r e   t h e   v a l u e   i s   u n i q u e   f o r   e a c h   r e v i s i o n ) .   U s i n g   p o d - t e m p l a t e - h a s h   i n   m a t c h L a b e l K e y s   a l l o w s   y o u   t o   t a r g e t   t h e   P o d s   t h a t   b e l o n g   t o   t h e   s a m e   r e v i s i o n   a s   t h e   i n c o m i n g   P o d ,   s o   t h a t   a   r o l l i n g   u p g r a d e   w o n ' t   b r e a k   a f f i n i t y .   a p i V e r s i o n :   a p p s / v 1   k i n d :   D e p l o y m e n t   m e t a d a t a :   n a m e :   a p p l i c a t i o n - s e r v e r   . . .   s p e c :   t e m p l a t e :   s p e c :   a f f i n i t y :   p o d A f f i n i t y :   r e q u i r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   -   l a b e l S e l e c t o r :   m a t c h E x p r e s s i o n s :   -   k e y :   a p p   o p e r a t o r :   I n   v a l u e s :   -   d a t a b a s e   t o p o l o g y K e y :   t o p o l o g y . k u b e r n e t e s . i o / z o n e   #   O n l y   P o d s   f r o m   a   g i v e n   r o l l o u t   a r e   t a k e n   i n t o   c o n s i d e r a t i o n   w h e n   c a l c u l a t i n g   p o d   a f f i n i t y .   #   I f   y o u   u p d a t e   t h e   D e p l o y m e n t ,   t h e   r e p l a c e m e n t   P o d s   f o l l o w   t h e i r   o w n   a f f i n i t y   r u l e s   #   ( i f   t h e r e   a r e   a n y   d e f i n e d   i n   t h e   n e w   P o d   t e m p l a t e )   m a t c h L a b e l K e y s :   -   p o d - t e m p l a t e - h a s h


Question: What is Note:?

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


Question: What is Caution:?

Answer: O n e   e x a m p l e   u s e   c a s e   i s   t o   e n s u r e   P o d s   g o   t o   t h e   t o p o l o g y   d o m a i n   ( n o d e ,   z o n e ,   e t c )   w h e r e   o n l y   P o d s   f r o m   t h e   s a m e   t e n a n t   o r   t e a m   a r e   s c h e d u l e d   i n .   I n   o t h e r   w o r d s ,   y o u   w a n t   t o   a v o i d   r u n n i n g   P o d s   f r o m   t w o   d i f f e r e n t   t e n a n t s   o n   t h e   s a m e   t o p o l o g y   d o m a i n   a t   t h e   s a m e   t i m e .   a p i V e r s i o n :   v 1   k i n d :   P o d   m e t a d a t a :   l a b e l s :   #   A s s u m e   t h a t   a l l   r e l e v a n t   P o d s   h a v e   a   " t e n a n t "   l a b e l   s e t   t e n a n t :   t e n a n t - a   . . .   s p e c :   a f f i n i t y :   p o d A f f i n i t y :   r e q u i r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   #   e n s u r e   t h a t   P o d s   a s s o c i a t e d   w i t h   t h i s   t e n a n t   l a n d   o n   t h e   c o r r e c t   n o d e   p o o l   -   m a t c h L a b e l K e y s :   -   t e n a n t   t o p o l o g y K e y :   n o d e - p o o l   p o d A n t i A f f i n i t y :   r e q u i r e d D u r i n g S c h e d u l i n g I g n o r e d D u r i n g E x e c u t i o n :   #   e n s u r e   t h a t   P o d s   a s s o c i a t e d   w i t h   t h i s   t e n a n t   c a n ' t   s c h e d u l e   t o   n o d e s   u s e d   f o r   a n o t h e r   t e n a n t   -   m i s m a t c h L a b e l K e y s :   -   t e n a n t   #   w h a t e v e r   t h e   v a l u e   o f   t h e   " t e n a n t "   l a b e l   f o r   t h i s   P o d ,   p r e v e n t   #   s c h e d u l i n g   t o   n o d e s   i n   a n y   p o o l   w h e r e   a n y   P o d   f r o m   a   d i f f e r e n t   #   t e n a n t   i s   r u n n i n g .   l a b e l S e l e c t o r :   #   W e   h a v e   t o   h a v e   t h e   l a b e l S e l e c t o r   w h i c h   s e l e c t s   o n