Question: What is VolumeAttributesClass?

Answer: VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.apiVersion: storage.k8s.io/v1import "k8s.io/api/storage/v1"VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatadriverName (string), requiredName of the CSI driver This field is immutable.parameters (map[string]string)parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an "Infeasible" state in the modifyVolumeStatus field.VolumeAttributesClassListVolumeAttributesClassList is a collection of VolumeAttributesClass objects.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassListmetadata (ListMeta)Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataitems ([]VolumeAttributesClass), requireditems is the list of VolumeAttributesClass objects.Operationsget read the specified VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclasses/{name}Parametersname (in path): string, requiredname of the VolumeAttributesClasspretty (in query): stringprettyResponse200 (VolumeAttributesClass): OK401: Unauthorizedlist list or watch objects of kind VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclassesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (VolumeAttributesClassList): OK401: Unauthorizedcreate create a VolumeAttributesClassHTTP RequestPOST /apis/storage.k8s.io/v1/


Question: How does VolumeAttributesClass work?

Answer: VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.apiVersion: storage.k8s.io/v1import "k8s.io/api/storage/v1"VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatadriverName (string), requiredName of the CSI driver This field is immutable.parameters (map[string]string)parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an "Infeasible" state in the modifyVolumeStatus field.VolumeAttributesClassListVolumeAttributesClassList is a collection of VolumeAttributesClass objects.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassListmetadata (ListMeta)Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataitems ([]VolumeAttributesClass), requireditems is the list of VolumeAttributesClass objects.Operationsget read the specified VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclasses/{name}Parametersname (in path): string, requiredname of the VolumeAttributesClasspretty (in query): stringprettyResponse200 (VolumeAttributesClass): OK401: Unauthorizedlist list or watch objects of kind VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclassesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (VolumeAttributesClassList): OK401: Unauthorizedcreate create a VolumeAttributesClassHTTP RequestPOST /apis/storage.k8s.io/v1/


Question: When would you use VolumeAttributesClass?

Answer: VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.apiVersion: storage.k8s.io/v1import "k8s.io/api/storage/v1"VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatadriverName (string), requiredName of the CSI driver This field is immutable.parameters (map[string]string)parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an "Infeasible" state in the modifyVolumeStatus field.VolumeAttributesClassListVolumeAttributesClassList is a collection of VolumeAttributesClass objects.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassListmetadata (ListMeta)Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataitems ([]VolumeAttributesClass), requireditems is the list of VolumeAttributesClass objects.Operationsget read the specified VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclasses/{name}Parametersname (in path): string, requiredname of the VolumeAttributesClasspretty (in query): stringprettyResponse200 (VolumeAttributesClass): OK401: Unauthorizedlist list or watch objects of kind VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclassesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (VolumeAttributesClassList): OK401: Unauthorizedcreate create a VolumeAttributesClassHTTP RequestPOST /apis/storage.k8s.io/v1/


Question: What are the benefits of VolumeAttributesClass?

Answer: VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.apiVersion: storage.k8s.io/v1import "k8s.io/api/storage/v1"VolumeAttributesClassVolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatadriverName (string), requiredName of the CSI driver This field is immutable.parameters (map[string]string)parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an "Infeasible" state in the modifyVolumeStatus field.VolumeAttributesClassListVolumeAttributesClassList is a collection of VolumeAttributesClass objects.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassListmetadata (ListMeta)Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataitems ([]VolumeAttributesClass), requireditems is the list of VolumeAttributesClass objects.Operationsget read the specified VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclasses/{name}Parametersname (in path): string, requiredname of the VolumeAttributesClasspretty (in query): stringprettyResponse200 (VolumeAttributesClass): OK401: Unauthorizedlist list or watch objects of kind VolumeAttributesClassHTTP RequestGET /apis/storage.k8s.io/v1/volumeattributesclassesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (VolumeAttributesClassList): OK401: Unauthorizedcreate create a VolumeAttributesClassHTTP RequestPOST /apis/storage.k8s.io/v1/


Question: What is VolumeAttributesClass?

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


Question: What is VolumeAttributesClass?

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


Question: What is VolumeAttributesClassList?

Answer: V o l u m e A t t r i b u t e s C l a s s L i s t   i s   a   c o l l e c t i o n   o f   V o l u m e A t t r i b u t e s C l a s s   o b j e c t s .   a p i V e r s i o n :   s t o r a g e . k 8 s . i o / v 1 k i n d :   V o l u m e A t t r i b u t e s C l a s s 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 # m e t a d a t a i t e m s   ( [ ] V o l u m e A t t r i b u t e s C l a s s ) ,   r e q u i r e d i t e m s   i s   t h e   l i s t   o f   V o l u m e A t t r i b u t e s C l a s s   o b j e c t s .   a p i V e r s i o n :   s t o r a g e . k 8 s . i o / v 1   k i n d :   V o l u m e A t t r i b u t e s C l a s s 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 # m e t a d a t a   i t e m s   ( [ ] V o l u m e A t t r i b u t e s C l a s s ) ,   r e q u i r e d   i t e m s   i s   t h e   l i s t   o f   V o l u m e A t t r i b u t e s C l a s s   o b j e c t s .


Question: What is HTTP Request?

Answer: G E T   / a p i s / s t o r a g e . k 8 s . i o / v 1 / v o l u m e a t t r i b u t e s c l a s s e s / { n a m e }


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   V o l u m e A t t r i b u t e s C l a s s 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   V o l u m e A t t r i b u t e s C l a s s   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   ( V o l u m e A t t r i b u t e s C l a s s ) :   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 s / s t o r a g e . k 8 s . i o / v 1 / v o l u m e a t t r i b u t e s c l a s s e s


Question: What is Parameters?

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


Question: What is Response?

Answer: 2 0 0   ( V o l u m e A t t r i b u t e s C l a s s 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 s / s t o r a g e . k 8 s . i o / v 1 / v o l u m e a t t r i b u t e s c l a s s e s


Question: What is Parameters?

Answer: b o d y :   V o l u m e A t t r i b u t e s C l a s s ,   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   b o d y :   V o l u m e A t t r i b u t e s C l a s s ,   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   ( V o l u m e A t t r i b u t e s C l a s s ) :   O K   2 0 1   ( V o l u m e A t t r i b u t e s C l a s s ) :   C r e a t e d   2 0 2   ( V o l u m e A t t r i b u t e s C l a s s ) :   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 s / s t o r a g e . k 8 s . i o / v 1 / v o l u m e a t t r i b u t e s c l a s s e s / { n a m e }


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   V o l u m e A t t r i b u t e s C l a s s b o d y :   V o l u m e A t t r i b u t e s C l a s s ,   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   V o l u m e A t t r i b u t e s C l a s s   b o d y :   V o l u m e A t t r i b u t e s C l a s s ,   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   ( V o l u m e A t t r i b u t e s C l a s s ) :   O K   2 0 1   ( V o l u m e A t t r i b u t e s C l a s s ) :   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 s / s t o r a g e . k 8 s . i o / v 1 / v o l u m e a t t r i b u t e s c l a s s e s / { n a m e }


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   V o l u m e A t t r i b u t e s C l a s s 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   V o l u m e A t t r i b u t e s C l a s s   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   ( V o l u m e A t t r i b u t e s C l a s s ) :   O K   2 0 1   ( V o l u m e A t t r i b u t e s C l a s s ) :   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 s / s t o r a g e . k 8 s . i o / v 1 / v o l u m e a t t r i b u t e s c l a s s e s / { n a m e }


Question: What is Parameters?

Answer: n a m e   ( i n   p a t h ) :   s t r i n g ,   r e q u i r e d n a m e   o f   t h e   V o l u m e A t t r i b u t e s C l a s s 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   V o l u m e A t t r i b u t e s C l a s s   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   ( V o l u m e A t t r i b u t e s C l a s s ) :   O K   2 0 2   ( V o l u m e A t t r i b u t e s C l a s s ) :   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 s / s t o r a g e . k 8 s . i o / v 1 / v o l u m e a t t r i b u t e s c l a s s e s


Question: What is Parameters?

Answer: 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   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   (


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 Declarative API Validation?

Answer: Declarative API ValidationFEATURE STATE: Kubernetes v1.33 [beta]Kubernetes 1.34 includes optional declarative validation for APIs. When enabled, the Kubernetes API server can use this mechanism rather than the legacy approach that relies on hand-written Go code (validation.go files) to ensure that requests against the API are valid. Kubernetes developers, and people extending the Kubernetes API, can define validation rules directly alongside the API type definitions (types.go files). Code authors define pecial comment tags (e.g., +k8s:minimum=0). A code generator (validation-gen) then uses these tags to produce optimized Go code for API validation.While primarily a feature impacting Kubernetes contributors and potentially developers of extension API servers, cluster administrators should understand its behavior, especially during its rollout phases.Declarative validation is being rolled out gradually. In Kubernetes 1.34, the APIs that use declarative validation include:ReplicationControllerNote:For the beta of this feature, Kubernetes is intentionally using a superseded API as a test bed for the change. Future Kubernetes releases may roll this out to more APIs.DeclarativeValidation: (Beta, Default: true) When enabled, the API server runs both the new declarative validation and the old hand-written validation for migrated types/fields. The results are compared internally.DeclarativeValidationTakeover: (Beta, Default: false) This gate determines which validation result is authoritative (i.e., returned to the user and used for admission decisions).Default Behavior (Kubernetes 1.34):With DeclarativeValidation=true and DeclarativeValidationTakeover=false (the default values for the gates), both validation systems run.The results of the hand-written validation are used. The declarative validation runs in a mismatch mode for comparison.Mismatches between the two validation systems are logged by the API server and increment the declarative_validation_mismatch_total metric. This helps developers identify and fix discrepancies during the Beta phase.Cluster upgrades should be safe regarding this feature, as the authoritative validation logic doesn't change by default.Administrators can choose to explicitly enable DeclarativeValidationTakeover=true to make the declarative validation authoritative for migrated fields, typically after verifying stability in their environment (e.g., by monitoring the mismatch metric).Disabling declarative validationAs a cluster administrator, you might consider disabling declarative validation whilst it is still beta, under specific circumstances:Unexpected Validation Behavior: If enabling DeclarativeValidationTakeover leads to unexpected validation errors or allows objects that were previously invalid.Performance Regressions: If monitoring indicates significant latency increases (e.g., in apiserver_request_duration_seconds) correlated with the feature's enablement.High Mismatch Rate: If the declarative_validation_mismatch_tota


Question: How does Declarative API Validation work?

Answer: Declarative API ValidationFEATURE STATE: Kubernetes v1.33 [beta]Kubernetes 1.34 includes optional declarative validation for APIs. When enabled, the Kubernetes API server can use this mechanism rather than the legacy approach that relies on hand-written Go code (validation.go files) to ensure that requests against the API are valid. Kubernetes developers, and people extending the Kubernetes API, can define validation rules directly alongside the API type definitions (types.go files). Code authors define pecial comment tags (e.g., +k8s:minimum=0). A code generator (validation-gen) then uses these tags to produce optimized Go code for API validation.While primarily a feature impacting Kubernetes contributors and potentially developers of extension API servers, cluster administrators should understand its behavior, especially during its rollout phases.Declarative validation is being rolled out gradually. In Kubernetes 1.34, the APIs that use declarative validation include:ReplicationControllerNote:For the beta of this feature, Kubernetes is intentionally using a superseded API as a test bed for the change. Future Kubernetes releases may roll this out to more APIs.DeclarativeValidation: (Beta, Default: true) When enabled, the API server runs both the new declarative validation and the old hand-written validation for migrated types/fields. The results are compared internally.DeclarativeValidationTakeover: (Beta, Default: false) This gate determines which validation result is authoritative (i.e., returned to the user and used for admission decisions).Default Behavior (Kubernetes 1.34):With DeclarativeValidation=true and DeclarativeValidationTakeover=false (the default values for the gates), both validation systems run.The results of the hand-written validation are used. The declarative validation runs in a mismatch mode for comparison.Mismatches between the two validation systems are logged by the API server and increment the declarative_validation_mismatch_total metric. This helps developers identify and fix discrepancies during the Beta phase.Cluster upgrades should be safe regarding this feature, as the authoritative validation logic doesn't change by default.Administrators can choose to explicitly enable DeclarativeValidationTakeover=true to make the declarative validation authoritative for migrated fields, typically after verifying stability in their environment (e.g., by monitoring the mismatch metric).Disabling declarative validationAs a cluster administrator, you might consider disabling declarative validation whilst it is still beta, under specific circumstances:Unexpected Validation Behavior: If enabling DeclarativeValidationTakeover leads to unexpected validation errors or allows objects that were previously invalid.Performance Regressions: If monitoring indicates significant latency increases (e.g., in apiserver_request_duration_seconds) correlated with the feature's enablement.High Mismatch Rate: If the declarative_validation_mismatch_tota


Question: When would you use Declarative API Validation?

Answer: Declarative API ValidationFEATURE STATE: Kubernetes v1.33 [beta]Kubernetes 1.34 includes optional declarative validation for APIs. When enabled, the Kubernetes API server can use this mechanism rather than the legacy approach that relies on hand-written Go code (validation.go files) to ensure that requests against the API are valid. Kubernetes developers, and people extending the Kubernetes API, can define validation rules directly alongside the API type definitions (types.go files). Code authors define pecial comment tags (e.g., +k8s:minimum=0). A code generator (validation-gen) then uses these tags to produce optimized Go code for API validation.While primarily a feature impacting Kubernetes contributors and potentially developers of extension API servers, cluster administrators should understand its behavior, especially during its rollout phases.Declarative validation is being rolled out gradually. In Kubernetes 1.34, the APIs that use declarative validation include:ReplicationControllerNote:For the beta of this feature, Kubernetes is intentionally using a superseded API as a test bed for the change. Future Kubernetes releases may roll this out to more APIs.DeclarativeValidation: (Beta, Default: true) When enabled, the API server runs both the new declarative validation and the old hand-written validation for migrated types/fields. The results are compared internally.DeclarativeValidationTakeover: (Beta, Default: false) This gate determines which validation result is authoritative (i.e., returned to the user and used for admission decisions).Default Behavior (Kubernetes 1.34):With DeclarativeValidation=true and DeclarativeValidationTakeover=false (the default values for the gates), both validation systems run.The results of the hand-written validation are used. The declarative validation runs in a mismatch mode for comparison.Mismatches between the two validation systems are logged by the API server and increment the declarative_validation_mismatch_total metric. This helps developers identify and fix discrepancies during the Beta phase.Cluster upgrades should be safe regarding this feature, as the authoritative validation logic doesn't change by default.Administrators can choose to explicitly enable DeclarativeValidationTakeover=true to make the declarative validation authoritative for migrated fields, typically after verifying stability in their environment (e.g., by monitoring the mismatch metric).Disabling declarative validationAs a cluster administrator, you might consider disabling declarative validation whilst it is still beta, under specific circumstances:Unexpected Validation Behavior: If enabling DeclarativeValidationTakeover leads to unexpected validation errors or allows objects that were previously invalid.Performance Regressions: If monitoring indicates significant latency increases (e.g., in apiserver_request_duration_seconds) correlated with the feature's enablement.High Mismatch Rate: If the declarative_validation_mismatch_tota


Question: What are the benefits of Declarative API Validation?

Answer: Declarative API ValidationFEATURE STATE: Kubernetes v1.33 [beta]Kubernetes 1.34 includes optional declarative validation for APIs. When enabled, the Kubernetes API server can use this mechanism rather than the legacy approach that relies on hand-written Go code (validation.go files) to ensure that requests against the API are valid. Kubernetes developers, and people extending the Kubernetes API, can define validation rules directly alongside the API type definitions (types.go files). Code authors define pecial comment tags (e.g., +k8s:minimum=0). A code generator (validation-gen) then uses these tags to produce optimized Go code for API validation.While primarily a feature impacting Kubernetes contributors and potentially developers of extension API servers, cluster administrators should understand its behavior, especially during its rollout phases.Declarative validation is being rolled out gradually. In Kubernetes 1.34, the APIs that use declarative validation include:ReplicationControllerNote:For the beta of this feature, Kubernetes is intentionally using a superseded API as a test bed for the change. Future Kubernetes releases may roll this out to more APIs.DeclarativeValidation: (Beta, Default: true) When enabled, the API server runs both the new declarative validation and the old hand-written validation for migrated types/fields. The results are compared internally.DeclarativeValidationTakeover: (Beta, Default: false) This gate determines which validation result is authoritative (i.e., returned to the user and used for admission decisions).Default Behavior (Kubernetes 1.34):With DeclarativeValidation=true and DeclarativeValidationTakeover=false (the default values for the gates), both validation systems run.The results of the hand-written validation are used. The declarative validation runs in a mismatch mode for comparison.Mismatches between the two validation systems are logged by the API server and increment the declarative_validation_mismatch_total metric. This helps developers identify and fix discrepancies during the Beta phase.Cluster upgrades should be safe regarding this feature, as the authoritative validation logic doesn't change by default.Administrators can choose to explicitly enable DeclarativeValidationTakeover=true to make the declarative validation authoritative for migrated fields, typically after verifying stability in their environment (e.g., by monitoring the mismatch metric).Disabling declarative validationAs a cluster administrator, you might consider disabling declarative validation whilst it is still beta, under specific circumstances:Unexpected Validation Behavior: If enabling DeclarativeValidationTakeover leads to unexpected validation errors or allows objects that were previously invalid.Performance Regressions: If monitoring indicates significant latency increases (e.g., in apiserver_request_duration_seconds) correlated with the feature's enablement.High Mismatch Rate: If the declarative_validation_mismatch_tota


Question: What is Declarative API Validation?

Answer: K u b e r n e t e s   1 . 3 4   i n c l u d e s   o p t i o n a l   d e c l a r a t i v e   v a l i d a t i o n   f o r   A P I s .   W h e n   e n a b l e d ,   t h e   K u b e r n e t e s   A P I   s e r v e r   c a n   u s e   t h i s   m e c h a n i s m   r a t h e r   t h a n   t h e   l e g a c y   a p p r o a c h   t h a t   r e l i e s   o n   h a n d - w r i t t e n   G o   c o d e   ( v a l i d a t i o n . g o   f i l e s )   t o   e n s u r e   t h a t   r e q u e s t s   a g a i n s t   t h e   A P I   a r e   v a l i d .   K u b e r n e t e s   d e v e l o p e r s ,   a n d   p e o p l e   e x t e n d i n g   t h e   K u b e r n e t e s   A P I ,   c a n   d e f i n e   v a l i d a t i o n   r u l e s   d i r e c t l y   a l o n g s i d e   t h e   A P I   t y p e   d e f i n i t i o n s   ( t y p e s . g o   f i l e s ) .   C o d e   a u t h o r s   d e f i n e   p e c i a l   c o m m e n t   t a g s   ( e . g . ,   + k 8 s : m i n i m u m = 0 ) .   A   c o d e   g e n e r a t o r   ( v a l i d a t i o n - g e n )   t h e n   u s e s   t h e s e   t a g s   t o   p r o d u c e   o p t i m i z e d   G o   c o d e   f o r   A P I   v a l i d a t i o n .   W h i l e   p r i m a r i l y   a   f e a t u r e   i m p a c t i n g   K u b e r n e t e s   c o n t r i b u t o r s   a n d   p o t e n t i a l l y   d e v e l o p e r s   o f   e x t e n s i o n   A P I   s e r v e r s ,   c l u s t e r   a d m i n i s t r a t o r s   s h o u l d   u n d e r s t a n d   i t s   b e h a v i o r ,   e s p e c i a l l y   d u r i n g   i t s   r o l l o u t   p h a s e s .   D e c l a r a t i v e   v a l i d a t i o n   i s   b e i n g   r o l l e d   o u t   g r a d u a l l y .   I n   K u b e r n e t e s   1 . 3 4 ,   t h e   A P I s   t h a t   u s e   d e c l a r a t i v e   v a l i d a t i o n   i n c l u d 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 Note:?

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


Question: What is Disabling declarative validation?

Answer: A s   a   c l u s t e r   a d m i n i s t r a t o r ,   y o u   m i g h t   c o n s i d e r   d i s a b l i n g   d e c l a r a t i v e   v a l i d a t i o n   w h i l s t   i t   i s   s t i l l   b e t a ,   u n d e r   s p e c i f i c   c i r c u m s t a n c e s :   U n e x p e c t e d   V a l i d a t i o n   B e h a v i o r :   I f   e n a b l i n g   D e c l a r a t i v e V a l i d a t i o n T a k e o v e r   l e a d s   t o   u n e x p e c t e d   v a l i d a t i o n   e r r o r s   o r   a l l o w s   o b j e c t s   t h a t   w e r e   p r e v i o u s l y   i n v a l i d . P e r f o r m a n c e   R e g r e s s i o n s :   I f   m o n i t o r i n g   i n d i c a t e s   s i g n i f i c a n t   l a t e n c y   i n c r e a s e s   ( e . g . ,   i n   a p i s e r v e r _ r e q u e s t _ d u r a t i o n _ s e c o n d s )   c o r r e l a t e d   w i t h   t h e   f e a t u r e ' s   e n a b l e m e n t . H i g h   M i s m a t c h   R a t e :   I f   t h e   d e c l a r a t i v e _ v a l i d a t i o n _ m i s m a t c h _ t o t a l   m e t r i c   s h o w s   f r e q u e n t   m i s m a t c h e s ,   s u g g e s t i n g   p o t e n t i a l   b u g s   i n   t h e   d e c l a r a t i v e   r u l e s   a f f e c t i n g   t h e   c l u s t e r ' s   w o r k l o a d s ,   e v e n   i f   D e c l a r a t i v e V a l i d a t i o n T a k e o v e r   i s   f a l s e .   T o   r e v e r t   t o   o n l y   u s i n g   h a n d - w r i t t e n   v a l i d a t i o n   ( a s   u s e d   b e f o r e   K u b e r n e t e s   v 1 . 3 3 ) ,   d i s a b l e   t h e   D e c l a r a t i v e V a l i d a t i o n   f e a t u r e   g a t e ,   f o r   e x a m p l e   v i a   c o m m a n d - l i n e   a r g u m e n t s :   ( - - f e a t u r e - g a t e s = D e c l a r a t i v e V a l i d a t i o n = f a l s e ) .   T h i s   a l s o   i m p l i c i t l y   d i s a b l e s   t h e   e f f e c t   o f   D e c l a r a t i v e V a l i d a t i o n T a k e o v e r .


Question: What is Considerations for downgrade and rollback?

Answer: D i s a b l i n g   t h e   f e a t u r e   a c t s   a s   a   s a f e t y   m e c h a n i s m .   H o w e v e r ,   b e   a w a r e   o f   a   p o t e n t i a l   e d g e   c a s e   ( c o n s i d e r e d   u n l i k e l y   d u e   t o   e x t e n s i v e   t e s t i n g ) :   I f   a   b u g   i n   d e c l a r a t i v e   v a l i d a t i o n   ( w h e n   D e c l a r a t i v e V a l i d a t i o n T a k e o v e r = t r u e )   i n c o r r e c t l y   a l l o w e d   a n   i n v a l i d   o b j e c t   t o   b e   p e r s i s t e d ,   d i s a b l i n g   t h e   f e a t u r e   g a t e s   m i g h t   t h e n   c a u s e   s u b s e q u e n t   u p d a t e s   t o   t h a t   s p e c i f i c   o b j e c t   t o   b e   b l o c k e d   b y   t h e   n o w - a u t h o r i t a t i v e   ( a n d   c o r r e c t )   h a n d - w r i t t e n   v a l i d a t i o n .   R e s o l v i n g   t h i s   m i g h t   r e q u i r e   m a n u a l   c o r r e c t i o n   o f   t h e   s t o r e d   o b j e c t ,   p o t e n t i a l l y   v i a   d i r e c t   e t c d   m o d i f i c a t i o n   i n   r a r e   c a s e s .   F o r   d e t a i l s   o n   m a n a g i n g   f e a t u r e   g a t e s ,   s e e   F e a t u r e   G a t e s .


Question: What is Declarative validation tag reference?

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


Question: What is +k8s:eachKey?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   v a l i d a t i o n   f o r   e a c h   k e y   i n   a   m a p .   P a y l o a d :   < v a l i d a t i o n - t a g > :   T h e   t a g   t o   e v a l u a t e   f o r   e a c h   k e y .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : e a c h K e y = + k 8 s : m i n i m u m = 1   M y M a p   m a p [ i n t ] s t r i n g   ` j s o n : " m y M a p " `   }   I n   t h i s   e x a m p l e ,   e a c h K e y   i s   u s e d   t o   s p e c i f y   t h a t   t h e   + k 8 s : m i n i m u m   t a g   s h o u l d   b e   a p p l i e d   t o   e a c h   i n t   k e y   i n   M y M a p .   T h i s   m e a n s   t h a t   a l l   k e y s   i n   t h e   m a p   m u s t   b e   > =   1 .


Question: What is +k8s:eachVal?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   v a l i d a t i o n   f o r   e a c h   v a l u e   i n   a   m a p   o r   l i s t .   P a y l o a d :   < v a l i d a t i o n - t a g > :   T h e   t a g   t o   e v a l u a t e   f o r   e a c h   v a l u e .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : e a c h V a l = + k 8 s : m i n i m u m = 1   M y M a p   m a p [ s t r i n g ] i n t   ` j s o n : " m y M a p " `   }   I n   t h i s   e x a m p l e ,   e a c h V a l   i s   u s e d   t o   s p e c i f y   t h a t   t h e   + k 8 s : m i n i m u m   t a g   s h o u l d   b e   a p p l i e d   t o   e a c h   e l e m e n t   i n   M y L i s t .   T h i s   m e a n s   t h a t   a l l   f i e l d s   i n   M y S t r u c t   m u s t   b e   > =   1 .


Question: What is +k8s:enum?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   s t r i n g   t y p e   i s   a n   e n u m .   A l l   c o n s t   v a l u e s   o f   t h i s   t y p e   a r e   c o n s i d e r e d   v a l u e s   i n   t h e   e n u m .   U s a g e   E x a m p l e :   F i r s t ,   d e f i n e   a   n e w   s t r i n g   t y p e   a n d   s o m e   c o n s t a n t s   o f   t h a t   t y p e :   / /   + k 8 s : e n u m   t y p e   M y E n u m   s t r i n g   c o n s t   (   M y E n u m A   M y E n u m   =   " A "   M y E n u m B   M y E n u m   =   " B "   )   T h e n ,   u s e   t h i s   t y p e   i n   a n o t h e r   s t r u c t :   t y p e   M y S t r u c t   s t r u c t   {   M y F i e l d   M y E n u m   ` j s o n : " m y F i e l d " `   }   T h e   v a l i d a t i o n   l o g i c   w i l l   e n s u r e   t h a t   M y F i e l d   i s   o n e   o f   t h e   d e f i n e d   e n u m   v a l u e s   ( " A "   o r   " B " ) .


Question: What is +k8s:forbidden?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   f i e l d   m a y   n o t   b e   s p e c i f i e d .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : f o r b i d d e n   M y F i e l d   s t r i n g   ` j s o n : " m y F i e l d " `   }   I n   t h i s   e x a m p l e ,   M y F i e l d   c a n n o t   b e   p r o v i d e d   ( i t   i s   f o r b i d d e n )   w h e n   c r e a t i n g   o r   u p d a t i n g   M y S t r u c t .


Question: What is +k8s:format?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   s t r i n g   f i e l d   h a s   a   p a r t i c u l a r   f o r m a t .   P a y l o a d s :   k 8 s - i p :   T h i s   f i e l d   h o l d s   a n   I P v 4   o r   I P v 6   a d d r e s s   v a l u e .   I P v 4   o c t e t s   m a y   h a v e   l e a d i n g   z e r o s . k 8 s - l o n g - n a m e :   T h i s   f i e l d   h o l d s   a   K u b e r n e t e s   " l o n g   n a m e " ,   a k a   a   " D N S   s u b d o m a i n "   v a l u e . k 8 s - s h o r t - n a m e :   T h i s   f i e l d   h o l d s   a   K u b e r n e t e s   " s h o r t   n a m e " ,   a k a   a   " D N S   l a b e l "   v a l u e .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : f o r m a t = k 8 s - i p   I P A d d r e s s   s t r i n g   ` j s o n : " i p A d d r e s s " `   / /   + k 8 s : f o r m a t = k 8 s - l o n g - n a m e   S u b d o m a i n   s t r i n g   ` j s o n : " s u b d o m a i n " `   / /   + k 8 s : f o r m a t = k 8 s - s h o r t - n a m e   L a b e l   s t r i n g   ` j s o n : " l a b e l " `   }   I n   t h i s   e x a m p l e :   I P A d d r e s s   m u s t   b e   a   v a l i d   I P   a d d r e s s . S u b d o m a i n   m u s t   b e   a   v a l i d   D N S   s u b d o m a i n . L a b e l   m u s t   b e   a   v a l i d   D N S   l a b e l .


Question: What is +k8s:ifDisabled?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   v a l i d a t i o n   t h a t   o n l y   a p p l i e s   w h e n   a n   o p t i o n   i s   d i s a b l e d .   A r g u m e n t s :   < o p t i o n >   ( s t r i n g ,   r e q u i r e d ) :   T h e   n a m e   o f   t h e   o p t i o n .   P a y l o a d :   < v a l i d a t i o n - t a g > :   T h i s   v a l i d a t i o n   t a g   w i l l   b e   e v a l u a t e d   o n l y   i f   t h e   v a l i d a t i o n   o p t i o n   i s   d i s a b l e d .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : i f D i s a b l e d ( " m y - f e a t u r e " ) = + k 8 s : r e q u i r e d   M y F i e l d   s t r i n g   ` j s o n : " m y F i e l d " `   }   I n   t h i s   e x a m p l e ,   M y F i e l d   i s   r e q u i r e d   o n l y   i f   t h e   " m y - f e a t u r e "   o p t i o n   i s   d i s a b l e d .


Question: What is +k8s:ifEnabled?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   v a l i d a t i o n   t h a t   o n l y   a p p l i e s   w h e n   a n   o p t i o n   i s   e n a b l e d .   A r g u m e n t s :   < o p t i o n >   ( s t r i n g ,   r e q u i r e d ) :   T h e   n a m e   o f   t h e   o p t i o n .   P a y l o a d :   < v a l i d a t i o n - t a g > :   T h i s   v a l i d a t i o n   t a g   w i l l   b e   e v a l u a t e d   o n l y   i f   t h e   v a l i d a t i o n   o p t i o n   i s   e n a b l e d .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : i f E n a b l e d ( " m y - f e a t u r e " ) = + k 8 s : r e q u i r e d   M y F i e l d   s t r i n g   ` j s o n : " m y F i e l d " `   }   I n   t h i s   e x a m p l e ,   M y F i e l d   i s   r e q u i r e d   o n l y   i f   t h e   " m y - f e a t u r e "   o p t i o n   i s   e n a b l e d .


Question: What is +k8s:isSubresource?

Answer: D e s c r i p t i o n :   T h e   + k 8 s : i s S u b r e s o u r c e   t a g   i s   a   p a c k a g e - l e v e l   c o m m e n t   t h a t   s c o p e s   t h e   v a l i d a t i o n   r u l e s   w i t h i n   t h a t   p a c k a g e   t o   a   s p e c i f i c   s u b r e s o u r c e .   I t   e s s e n t i a l l y   t e l l s   t h e   c o d e   g e n e r a t o r ,   " T h e   v a l i d a t i o n   l o g i c   d e f i n e d   h e r e   i s   t h e   s p e c i f i c   i m p l e m e n t a t i o n   f o r   t h i s   s u b r e s o u r c e   a n d   s h o u l d   n o t   b e   a p p l i e d   t o   t h e   r o o t   o b j e c t   o r   a n y   o t h e r   s u b r e s o u r c e . "   C R I T I C A L   D E P E N D E N C Y :   T h i s   t a g   i s   d e p e n d e n t   o n   a   c o r r e s p o n d i n g   + k 8 s : s u p p o r t s S u b r e s o u r c e   t a g   b e i n g   p r e s e n t   i n   t h e   p a c k a g e   w h e r e   t h e   m a i n   A P I   t y p e   i s   d e f i n e d .   + k 8 s : s u p p o r t s S u b r e s o u r c e   o p e n s   t h e   d o o r   b y   t e l l i n g   t h e   d i s p a t c h e r   t h a t   a   s u b r e s o u r c e   i s   v a l i d . + k 8 s : i s S u b r e s o u r c e   p r o v i d e s   t h e   s p e c i a l i z e d   v a l i d a t i o n   l o g i c   t h a t   r u n s   w h e n   a   r e q u e s t   c o m e s   t h r o u g h   t h a t   d o o r .   I f   y o u   u s e   + k 8 s : i s S u b r e s o u r c e   w i t h o u t   t h e   c o r r e s p o n d i n g   + k 8 s : s u p p o r t s S u b r e s o u r c e   d e c l a r a t i o n   o n   t h e   m a i n   t y p e ,   t h e   s p e c i a l i z e d   v a l i d a t i o n   c o d e   w i l l   b e   g e n e r a t e d   b u t   w i l l   b e   u n r e a c h a b l e .   T h e   m a i n   d i s p a t c h e r   w i l l   n o t   r e c o g n i z e   t h e   s u b r e s o u r c e   p a t h   a n d   w i l l   r e j e c t   t h e   r e q u e s t   b e f o r e   i t   c a n   b e   r


Question: What is +k8s:item?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   v a l i d a t i o n   f o r   a n   i t e m   o f   a   s l i c e   d e c l a r e d   a s   a   + k 8 s : l i s t T y p e = m a p .   T h e   i t e m   t o   m a t c h   i s   d e c l a r e d   b y   p r o v i d i n g   f i e l d - v a l u e   p a i r   a r g u m e n t s   w h e r e   t h e   f i e l d   i s   a   l i s t M a p K e y .   A l l   l i s t M a p K e y   k e y   f i e l d s   m u s t   b e   s p e c i f i e d .   U s a g e :   + k 8 s : i t e m ( < l i s t M a p K e y - J S O N - f i e l d - n a m e > :   < v a l u e > , . . . ) = < v a l i d a t i o n - t a g >   + k 8 s : i t e m ( s t r i n g K e y :   " v a l u e " ,   i n t K e y :   4 2 ,   b o o l K e y :   t r u e ) = < v a l i d a t i o n - t a g >   A r g u m e n t s   m u s t   b e   n a m e d   w i t h   t h e   J S O N   n a m e s   o f   t h e   l i s t - m a p   k e y   f i e l d s .   V a l u e s   c a n   b e   s t r i n g s ,   i n t e g e r s ,   o r   b o o l e a n s .   P a y l o a d :   < v a l i d a t i o n - t a g > :   T h e   t a g   t o   e v a l u a t e   f o r   t h e   m a t c h i n g   l i s t   i t e m .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : l i s t T y p e = m a p   / /   + k 8 s : l i s t M a p K e y = t y p e   / /   + k 8 s : i t e m ( t y p e :   " A p p r o v e d " ) = + k 8 s : z e r o O r O n e O f M e m b e r   / /   + k 8 s : i t e m ( t y p e :   " D e n i e d " ) = + k 8 s : z e r o O r O n e O f M e m b e r   M y C o n d i t i o n s   [ ] M y C o n d i t i o n   ` j s o n : " c o n d i t i o n s " `   }   t y p e   M y C o n d i t i o n   s t r u c t   {   T y p e   s t r i n g   ` j s o n : " t y p e " `   S t a t u s   s t r i n g   ` j s o n : " s t a t u s " `   }   I n   t h i s   e x a m p l e :   T h e   c o n d i t i o n   w i t h   t y p e   " A p p r o v e d "   i s   p a r t   o f   a   z e r o - o r - o n e - o f   g r o u p . T h e   c o n d i


Question: What is +k8s:listMapKey?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   n a m e d   s u b - f i e l d   o f   a   l i s t ' s   v a l u e - t y p e   t o   b e   p a r t   o f   t h e   l i s t - m a p   k e y .   T h i s   t a g   i s   r e q u i r e d   w h e n   + k 8 s : l i s t T y p e = m a p   i s   u s e d .   M u l t i p l e   + k 8 s : l i s t M a p K e y   t a g s   c a n   b e   u s e d   o n   a   l i s t - m a p   t o   s p e c i f y   t h a t   i t   i s   k e y e d   o f f   o f   m u l t i p l e   f i e l d s .   P a y l o a d :   < f i e l d - j s o n - n a m e > :   T h e   J S O N   n a m e   o f   t h e   f i e l d   t o   b e   u s e d   a s   t h e   k e y .   U s a g e   E x a m p l e :   / /   + k 8 s : l i s t T y p e = m a p   / /   + k 8 s : l i s t M a p K e y = k e y F i e l d O n e   / /   + k 8 s : l i s t M a p K e y = k e y F i e l d T w o   t y p e   M y L i s t   [ ] M y S t r u c t   t y p e   M y S t r u c t   s t r u c t   {   k e y F i e l d O n e   s t r i n g   ` j s o n : " k e y F i e l d O n e " `   k e y F i e l d T w o   s t r i n g   ` j s o n : " k e y F i e l d T w o " `   v a l u e F i e l d   s t r i n g   ` j s o n : " v a l u e F i e l d " `   }   I n   t h i s   e x a m p l e ,   l i s t M a p K e y   i s   u s e d   t o   s p e c i f y   t h a t   t h e   k e y F i e l d   o f   M y S t r u c t   s h o u l d   b e   u s e d   a s   t h e   k e y   f o r   t h e   l i s t - m a p .


Question: What is +k8s:listType?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   l i s t   f i e l d ' s   s e m a n t i c   t y p e .   T h i s   t a g   i s   u s e d   t o   s p e c i f y   h o w   a   l i s t   s h o u l d   b e   t r e a t e d ,   f o r   e x a m p l e ,   a s   a   m a p   o r   a   s e t .   P a y l o a d :   a t o m i c :   T h e   l i s t   i s   t r e a t e d   a s   a   s i n g l e   a t o m i c   v a l u e . m a p :   T h e   l i s t   i s   t r e a t e d   a s   a   m a p ,   w h e r e   e a c h   e l e m e n t   h a s   a   u n i q u e   k e y .   R e q u i r e s   t h e   u s e   o f   + k 8 s : l i s t M a p K e y . s e t :   T h e   l i s t   i s   t r e a t e d   a s   a   s e t ,   w h e r e   e a c h   e l e m e n t   i s   u n i q u e .   U s a g e   E x a m p l e :   / /   + k 8 s : l i s t T y p e = m a p   / /   + k 8 s : l i s t M a p K e y = k e y F i e l d   t y p e   M y L i s t   [ ] M y S t r u c t   t y p e   M y S t r u c t   s t r u c t   {   k e y F i e l d   s t r i n g   ` j s o n : " k e y F i e l d " `   v a l u e F i e l d   s t r i n g   ` j s o n : " v a l u e F i e l d " `   }   I n   t h i s   e x a m p l e ,   M y L i s t   i s   d e c l a r e d   a s   a   l i s t   o f   t y p e   m a p ,   w i t h   k e y F i e l d   a s   t h e   k e y .   T h i s   m e a n s   t h a t   t h e   v a l i d a t i o n   l o g i c   w i l l   e n s u r e   t h a t   e a c h   e l e m e n t   i n   t h e   l i s t   h a s   a   u n i q u e   k e y F i e l d .


Question: What is +k8s:maxItems?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   l i s t   f i e l d   h a s   a   l i m i t   o n   i t s   s i z e .   P a y l o a d :   < n o n - n e g a t i v e   i n t e g e r > :   T h i s   f i e l d   m u s t   b e   n o   m o r e   t h a n   X   i t e m s   l o n g .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : m a x I t e m s = 5   M y L i s t   [ ] s t r i n g   ` j s o n : " m y L i s t " `   }   I n   t h i s   e x a m p l e ,   M y L i s t   c a n n o t   c o n t a i n   m o r e   t h a n   5   i t e m s .


Question: What is +k8s:maxLength?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   s t r i n g   f i e l d   h a s   a   l i m i t   o n   i t s   l e n g t h .   P a y l o a d :   < n o n - n e g a t i v e   i n t e g e r > :   T h i s   f i e l d   m u s t   b e   n o   m o r e   t h a n   X   c h a r a c t e r s   l o n g .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : m a x L e n g t h = 1 0   M y S t r i n g   s t r i n g   ` j s o n : " m y S t r i n g " `   }   I n   t h i s   e x a m p l e ,   M y S t r i n g   c a n n o t   b e   l o n g e r   t h a n   1 0   c h a r a c t e r s .


Question: What is +k8s:minimum?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   n u m e r i c   f i e l d   h a s   a   m i n i m u m   v a l u e .   P a y l o a d :   < i n t e g e r > :   T h i s   f i e l d   m u s t   b e   g r e a t e r   t h a n   o r   e q u a l   t o   x .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : m i n i m u m = 0   M y I n t   i n t   ` j s o n : " m y I n t " `   }   I n   t h i s   e x a m p l e ,   M y I n t   m u s t   b e   g r e a t e r   t h a n   o r   e q u a l   t o   0 .


Question: What is +k8s:neq?

Answer: D e s c r i p t i o n :   V e r i f i e s   t h e   f i e l d ' s   v a l u e   i s   n o t   e q u a l   t o   a   s p e c i f i c   d i s a l l o w e d   v a l u e .   S u p p o r t s   s t r i n g ,   i n t e g e r ,   a n d   b o o l e a n   t y p e s .   P a y l o a d :   < v a l u e > :   T h e   d i s a l l o w e d   v a l u e .   T h e   p a r s e r   w i l l   i n f e r   t h e   t y p e   ( s t r i n g ,   i n t ,   b o o l ) .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : n e q = " d i s a l l o w e d "   M y S t r i n g   s t r i n g   ` j s o n : " m y S t r i n g " `   / /   + k 8 s : n e q = 0   M y I n t   i n t   ` j s o n : " m y I n t " `   / /   + k 8 s : n e q = t r u e   M y B o o l   b o o l   ` j s o n : " m y B o o l " `   }   I n   t h i s   e x a m p l e :   M y S t r i n g   c a n n o t   b e   e q u a l   t o   " d i s a l l o w e d " . M y I n t   c a n n o t   b e   e q u a l   t o   0 . M y B o o l   c a n n o t   b e   e q u a l   t o   t r u e .


Question: What is +k8s:opaqueType?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a n y   v a l i d a t i o n s   d e c l a r e d   o n   t h e   r e f e r e n c e d   t y p e   w i l l   b e   i g n o r e d .   I f   a   r e f e r e n c e d   t y p e ' s   p a c k a g e   i s   n o t   i n c l u d e d   i n   t h e   g e n e r a t o r ' s   c u r r e n t   f l a g s ,   t h i s   t a g   m u s t   b e   s e t ,   o r   c o d e   g e n e r a t i o n   w i l l   f a i l   ( p r e v e n t i n g   s i l e n t   m i s t a k e s ) .   I f   t h e   v a l i d a t i o n s   s h o u l d   n o t   b e   i g n o r e d ,   a d d   t h e   t y p e ' s   p a c k a g e   t o   t h e   g e n e r a t o r   u s i n g   t h e   - - r e a d o n l y - p k g   f l a g .   U s a g e   E x a m p l e :   i m p o r t   " s o m e / e x t e r n a l / p a c k a g e "   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : o p a q u e T y p e   E x t e r n a l F i e l d   p a c k a g e . E x t e r n a l T y p e   ` j s o n : " e x t e r n a l F i e l d " `   }   I n   t h i s   e x a m p l e ,   a n y   v a l i d a t i o n   t a g s   o n   p a c k a g e . E x t e r n a l T y p e   w i l l   b e   i g n o r e d .


Question: What is +k8s:optional?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   f i e l d   i s   o p t i o n a l   t o   c l i e n t s .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : o p t i o n a l   M y F i e l d   s t r i n g   ` j s o n : " m y F i e l d " `   }   I n   t h i s   e x a m p l e ,   M y F i e l d   i s   n o t   r e q u i r e d   t o   b e   p r o v i d e d   w h e n   c r e a t i n g   o r   u p d a t i n g   M y S t r u c t .


Question: What is +k8s:required?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   a   f i e l d   m u s t   b e   s p e c i f i e d   b y   c l i e n t s .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : r e q u i r e d   M y F i e l d   s t r i n g   ` j s o n : " m y F i e l d " `   }   I n   t h i s   e x a m p l e ,   M y F i e l d   m u s t   b e   p r o v i d e d   w h e n   c r e a t i n g   o r   u p d a t i n g   M y S t r u c t .


Question: What is +k8s:subfield?

Answer: D e s c r i p t i o n :   D e c l a r e s   a   v a l i d a t i o n   f o r   a   s u b f i e l d   o f   a   s t r u c t .   A r g u m e n t s :   < f i e l d - j s o n - n a m e >   ( s t r i n g ,   r e q u i r e d ) :   T h e   J S O N   n a m e   o f   t h e   s u b f i e l d .   P a y l o a d :   < v a l i d a t i o n - t a g > :   T h e   t a g   t o   e v a l u a t e   f o r   t h e   s u b f i e l d .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : s u b f i e l d ( " m y S u b f i e l d " ) = + k 8 s : r e q u i r e d   M y S t r u c t   M y S t r u c t   ` j s o n : " M y S t r u c t " `   }   t y p e   M y S t r u c t   s t r u c t   {   M y S u b f i e l d   s t r i n g   ` j s o n : " m y S u b f i e l d " `   }   I n   t h i s   e x a m p l e ,   M y S u b f i e l d   w i t h i n   M y S t r u c t   i s   r e q u i r e d .


Question: What is +k8s:supportsSubresource?

Answer: D e s c r i p t i o n :   T h e   + k 8 s : s u p p o r t s S u b r e s o u r c e   t a g   i s   a   p a c k a g e - l e v e l   c o m m e n t   t a g   t h a t   d e c l a r e s   w h i c h   s u b r e s o u r c e s   a r e   v a l i d   t a r g e t s   f o r   v a l i d a t i o n   f o r   t h e   t y p e s   w i t h i n   t h a t   p a c k a g e .   T h i n k   o f   t h i s   t a g   a s   r e g i s t e r i n g   a n   e n d p o i n t ;   i t   t e l l s   t h e   v a l i d a t i o n   f r a m e w o r k   t h a t   a   s p e c i f i c   s u b r e s o u r c e   p a t h   i s   r e c o g n i z e d   a n d   s h o u l d   n o t   b e   i m m e d i a t e l y   r e j e c t e d .   W h e n   t h e   v a l i d a t i o n   c o d e   i s   g e n e r a t e d ,   t h i s   t a g   a d d s   t h e   s p e c i f i e d   s u b r e s o u r c e   p a t h   t o   t h e   m a i n   d i s p a t c h   f u n c t i o n   f o r   a   t y p e .   T h i s   a l l o w s   i n c o m i n g   r e q u e s t s   f o r   t h a t   s u b r e s o u r c e   t o   b e   r o u t e d   t o   a   v a l i d a t i o n   i m p l e m e n t a t i o n .   M u l t i p l e   t a g s   c a n   b e   u s e d   t o   d e c l a r e   s u p p o r t   f o r   s e v e r a l   s u b r e s o u r c e s .   I f   n o   + k 8 s : s u p p o r t s S u b r e s o u r c e   t a g s   a r e   p r e s e n t   i n   a   p a c k a g e ,   v a l i d a t i o n   i s   o n l y   e n a b l e d   f o r   t h e   r o o t   r e s o u r c e   ( e . g . ,   . . . / m y r e s o u r c e s / m y o b j e c t ) ,   a n d   a n y   r e q u e s t s   t o   s u b r e s o u r c e s   w i l l   f a i l   w i t h   a   " n o   v a l i d a t i o n   f o u n d "   e r r o r .   S t a n d a l o n e   U s a g e :   I f   y o u   u s e   + k 8 s : s u p p o r t s S u b r e s o u r c e   w i t h o u t   a   c o r r e s p o n d i n g   + k 8 s : i s S u b r e s o u r c e   t a g   f o r   a   s p e c i f i c   v a l i d a t i o n ,   t h e   v a l i d a


Question: What is +k8s:unionDiscriminator?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   t h i s   f i e l d   i s   t h e   d i s c r i m i n a t o r   f o r   a   u n i o n .   A r g u m e n t s :   u n i o n   ( s t r i n g ,   o p t i o n a l ) :   T h e   n a m e   o f   t h e   u n i o n ,   i f   m o r e   t h a n   o n e   e x i s t s .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   T y p e M e t a   i n t   / /   + k 8 s : u n i o n D i s c r i m i n a t o r   D   D   ` j s o n : " d " `   / /   + k 8 s : u n i o n M e m b e r   / /   + k 8 s : o p t i o n a l   M 1   * M 1   ` j s o n : " m 1 " `   / /   + k 8 s : u n i o n M e m b e r   / /   + k 8 s : o p t i o n a l   M 2   * M 2   ` j s o n : " m 2 " `   }   t y p e   D   s t r i n g   c o n s t   (   D M 1   D   =   " M 1 "   D M 2   D   =   " M 2 "   )   t y p e   M 1   s t r u c t { }   t y p e   M 2   s t r u c t { }   I n   t h i s   e x a m p l e ,   t h e   T y p e   f i e l d   i s   t h e   d i s c r i m i n a t o r   f o r   t h e   u n i o n .   T h e   v a l u e   o f   T y p e   w i l l   d e t e r m i n e   w h i c h   o f   t h e   u n i o n   m e m b e r s   ( M 1   o r   M 2 )   i s   e x p e c t e d   t o   b e   p r e s e n t .


Question: What is +k8s:unionMember?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   t h i s   f i e l d   i s   a   m e m b e r   o f   a   u n i o n .   A r g u m e n t s :   u n i o n   ( s t r i n g ,   o p t i o n a l ) :   T h e   n a m e   o f   t h e   u n i o n ,   i f   m o r e   t h a n   o n e   e x i s t s . m e m b e r N a m e   ( s t r i n g ,   o p t i o n a l ) :   T h e   d i s c r i m i n a t o r   v a l u e   f o r   t h i s   m e m b e r .   D e f a u l t s   t o   t h e   f i e l d ' s   n a m e .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : u n i o n M e m b e r ( u n i o n :   " u n i o n 1 " )   / /   + k 8 s : o p t i o n a l   M 1   * M 1   ` j s o n : " u 1 m 1 " `   / /   + k 8 s : u n i o n M e m b e r ( u n i o n :   " u n i o n 1 " )   / /   + k 8 s : o p t i o n a l   M 2   * M 2   ` j s o n : " u 1 m 2 " `   }   t y p e   M 1   s t r u c t { }   t y p e   M 2   s t r u c t { }   I n   t h i s   e x a m p l e ,   M 1   a n d   M 2   a r e   m e m b e r s   o f   t h e   n a m e d   u n i o n   u n i o n 1 .


Question: What is +k8s:zeroOrOneOfMember?

Answer: D e s c r i p t i o n :   I n d i c a t e s   t h a t   t h i s   f i e l d   i s   a   m e m b e r   o f   a   z e r o - o r - o n e - o f   u n i o n .   A   z e r o - o r - o n e - o f   u n i o n   a l l o w s   a t   m o s t   o n e   m e m b e r   t o   b e   s e t .   U n l i k e   r e g u l a r   u n i o n s ,   h a v i n g   n o   m e m b e r s   s e t   i s   v a l i d .   A r g u m e n t s :   u n i o n   ( s t r i n g ,   o p t i o n a l ) :   T h e   n a m e   o f   t h e   u n i o n ,   i f   m o r e   t h a n   o n e   e x i s t s . m e m b e r N a m e   ( s t r i n g ,   o p t i o n a l ) :   T h e   c u s t o m   m e m b e r   n a m e   f o r   t h i s   m e m b e r .   D e f a u l t s   t o   t h e   f i e l d ' s   n a m e .   U s a g e   E x a m p l e :   t y p e   M y S t r u c t   s t r u c t   {   / /   + k 8 s : z e r o O r O n e O f M e m b e r   / /   + k 8 s : o p t i o n a l   M 1   * M 1   ` j s o n : " m 1 " `   / /   + k 8 s : z e r o O r O n e O f M e m b e r   / /   + k 8 s : o p t i o n a l   M 2   * M 2   ` j s o n : " m 2 " `   }   t y p e   M 1   s t r u c t { }   t y p e   M 2   s t r u c t { }   I n   t h i s   e x a m p l e ,   a t   m o s t   o n e   o f   A   o r   B   c a n   b e   s e t .   I t   i s   a l s o   v a l i d   f o r   n e i t h e r   t o   b e   s e t .


Question: What is Ingress?

Answer: IngressMake your HTTP (or HTTPS) network service available using a protocol-aware configuration mechanism, that understands web concepts like URIs, hostnames, paths, and more. The Ingress concept lets you map traffic to different backends based on rules you define via the Kubernetes API.FEATURE STATE: Kubernetes v1.19 [stable]An API object that manages external access to the services in a cluster, typically HTTP.Ingress may provide load balancing, SSL termination and name-based virtual hosting.Note:Ingress is frozen. New features are being added to the Gateway API.TerminologyFor clarity, this guide defines the following terms:Node: A worker machine in Kubernetes, part of a cluster.Cluster: A set of Nodes that run containerized applications managed by Kubernetes. For this example, and in most common Kubernetes deployments, nodes in the cluster are not part of the public internet.Edge router: A router that enforces the firewall policy for your cluster. This could be a gateway managed by a cloud provider or a physical piece of hardware.Cluster network: A set of links, logical or physical, that facilitate communication within a cluster according to the Kubernetes networking model.Service: A Kubernetes Service that identifies a set of Pods using label selectors. Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.What is Ingress?Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.Here is a simple example where an Ingress sends all its traffic to one Service:Figure. IngressAn Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An Ingress controller is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic.An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of type Service.Type=NodePort or Service.Type=LoadBalancer.PrerequisitesYou must have an Ingress controller to satisfy an Ingress. Only creating an Ingress resource has no effect.You may need to deploy an Ingress controller such as ingress-nginx. You can choose from a number of Ingress controllers.Ideally, all Ingress controllers should fit the reference specification. In reality, the various Ingress controllers operate slightly differently.Note:Make sure you review your Ingress controller's documentation to understand the caveats of choosing it.The Ingress resourceA minimal Ingress resource example:service/networking/minimal-ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minimal-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx-example rules: - http: paths: - p


Question: How does Ingress work?

Answer: IngressMake your HTTP (or HTTPS) network service available using a protocol-aware configuration mechanism, that understands web concepts like URIs, hostnames, paths, and more. The Ingress concept lets you map traffic to different backends based on rules you define via the Kubernetes API.FEATURE STATE: Kubernetes v1.19 [stable]An API object that manages external access to the services in a cluster, typically HTTP.Ingress may provide load balancing, SSL termination and name-based virtual hosting.Note:Ingress is frozen. New features are being added to the Gateway API.TerminologyFor clarity, this guide defines the following terms:Node: A worker machine in Kubernetes, part of a cluster.Cluster: A set of Nodes that run containerized applications managed by Kubernetes. For this example, and in most common Kubernetes deployments, nodes in the cluster are not part of the public internet.Edge router: A router that enforces the firewall policy for your cluster. This could be a gateway managed by a cloud provider or a physical piece of hardware.Cluster network: A set of links, logical or physical, that facilitate communication within a cluster according to the Kubernetes networking model.Service: A Kubernetes Service that identifies a set of Pods using label selectors. Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.What is Ingress?Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.Here is a simple example where an Ingress sends all its traffic to one Service:Figure. IngressAn Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An Ingress controller is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic.An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of type Service.Type=NodePort or Service.Type=LoadBalancer.PrerequisitesYou must have an Ingress controller to satisfy an Ingress. Only creating an Ingress resource has no effect.You may need to deploy an Ingress controller such as ingress-nginx. You can choose from a number of Ingress controllers.Ideally, all Ingress controllers should fit the reference specification. In reality, the various Ingress controllers operate slightly differently.Note:Make sure you review your Ingress controller's documentation to understand the caveats of choosing it.The Ingress resourceA minimal Ingress resource example:service/networking/minimal-ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minimal-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx-example rules: - http: paths: - p


Question: When would you use Ingress?

Answer: IngressMake your HTTP (or HTTPS) network service available using a protocol-aware configuration mechanism, that understands web concepts like URIs, hostnames, paths, and more. The Ingress concept lets you map traffic to different backends based on rules you define via the Kubernetes API.FEATURE STATE: Kubernetes v1.19 [stable]An API object that manages external access to the services in a cluster, typically HTTP.Ingress may provide load balancing, SSL termination and name-based virtual hosting.Note:Ingress is frozen. New features are being added to the Gateway API.TerminologyFor clarity, this guide defines the following terms:Node: A worker machine in Kubernetes, part of a cluster.Cluster: A set of Nodes that run containerized applications managed by Kubernetes. For this example, and in most common Kubernetes deployments, nodes in the cluster are not part of the public internet.Edge router: A router that enforces the firewall policy for your cluster. This could be a gateway managed by a cloud provider or a physical piece of hardware.Cluster network: A set of links, logical or physical, that facilitate communication within a cluster according to the Kubernetes networking model.Service: A Kubernetes Service that identifies a set of Pods using label selectors. Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.What is Ingress?Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.Here is a simple example where an Ingress sends all its traffic to one Service:Figure. IngressAn Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An Ingress controller is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic.An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of type Service.Type=NodePort or Service.Type=LoadBalancer.PrerequisitesYou must have an Ingress controller to satisfy an Ingress. Only creating an Ingress resource has no effect.You may need to deploy an Ingress controller such as ingress-nginx. You can choose from a number of Ingress controllers.Ideally, all Ingress controllers should fit the reference specification. In reality, the various Ingress controllers operate slightly differently.Note:Make sure you review your Ingress controller's documentation to understand the caveats of choosing it.The Ingress resourceA minimal Ingress resource example:service/networking/minimal-ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minimal-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx-example rules: - http: paths: - p


Question: What are the benefits of Ingress?

Answer: IngressMake your HTTP (or HTTPS) network service available using a protocol-aware configuration mechanism, that understands web concepts like URIs, hostnames, paths, and more. The Ingress concept lets you map traffic to different backends based on rules you define via the Kubernetes API.FEATURE STATE: Kubernetes v1.19 [stable]An API object that manages external access to the services in a cluster, typically HTTP.Ingress may provide load balancing, SSL termination and name-based virtual hosting.Note:Ingress is frozen. New features are being added to the Gateway API.TerminologyFor clarity, this guide defines the following terms:Node: A worker machine in Kubernetes, part of a cluster.Cluster: A set of Nodes that run containerized applications managed by Kubernetes. For this example, and in most common Kubernetes deployments, nodes in the cluster are not part of the public internet.Edge router: A router that enforces the firewall policy for your cluster. This could be a gateway managed by a cloud provider or a physical piece of hardware.Cluster network: A set of links, logical or physical, that facilitate communication within a cluster according to the Kubernetes networking model.Service: A Kubernetes Service that identifies a set of Pods using label selectors. Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.What is Ingress?Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.Here is a simple example where an Ingress sends all its traffic to one Service:Figure. IngressAn Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An Ingress controller is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic.An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of type Service.Type=NodePort or Service.Type=LoadBalancer.PrerequisitesYou must have an Ingress controller to satisfy an Ingress. Only creating an Ingress resource has no effect.You may need to deploy an Ingress controller such as ingress-nginx. You can choose from a number of Ingress controllers.Ideally, all Ingress controllers should fit the reference specification. In reality, the various Ingress controllers operate slightly differently.Note:Make sure you review your Ingress controller's documentation to understand the caveats of choosing it.The Ingress resourceA minimal Ingress resource example:service/networking/minimal-ingress.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minimal-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx-example rules: - http: paths: - p


Question: What is Ingress?

Answer: F E A T U R E   S T A T E :   K u b e r n e t e s   v 1 . 1 9   [ s t a b l e ] A n   A P I   o b j e c t   t h a t   m a n a g e s   e x t e r n a l   a c c e s s   t o   t h e   s e r v i c e s   i n   a   c l u s t e r ,   t y p i c a l l y   H T T P . I n g r e s s   m a y   p r o v i d e   l o a d   b a l a n c i n g ,   S S L   t e r m i n a t i o n   a n d   n a m e - b a s e d   v i r t u a l   h o s t i n g .   A n   A P I   o b j e c t   t h a t   m a n a g e s   e x t e r n a l   a c c e s s   t o   t h e   s e r v i c e s   i n   a   c l u s t e r ,   t y p i c a l l y   H T T P .   I n g r e s s   m a y   p r o v i d e   l o a d   b a l a n c i n g ,   S S L   t e r m i n a t i o n   a n d   n a m e - b a s e d   v i r t u a l   h o s t i n g .


Question: What is Terminology?

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


Question: What is What is Ingress??

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


Question: What is Prerequisites?

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


Question: What is The Ingress resource?

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


Question: What is Ingress rules?

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


Question: What is DefaultBackend?

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


Question: What is Resource backends?

Answer: A   R e s o u r c e   b a c k e n d   i s   a n   O b j e c t R e f   t o   a n o t h e r   K u b e r n e t e s   r e s o u r c e   w i t h i n   t h e   s a m e   n a m e s p a c e   a s   t h e   I n g r e s s   o b j e c t .   A   R e s o u r c e   i s   a   m u t u a l l y   e x c l u s i v e   s e t t i n g   w i t h   S e r v i c e ,   a n d   w i l l   f a i l   v a l i d a t i o n   i f   b o t h   a r e   s p e c i f i e d .   A   c o m m o n   u s a g e   f o r   a   R e s o u r c e   b a c k e n d   i s   t o   i n g r e s s   d a t a   t o   a n   o b j e c t   s t o r a g e   b a c k e n d   w i t h   s t a t i c   a s s e t s .   a p i V e r s i o n :   n e t w o r k i n g . k 8 s . i o / v 1   k i n d :   I n g r e s s   m e t a d a t a :   n a m e :   i n g r e s s - r e s o u r c e - b a c k e n d   s p e c :   d e f a u l t B a c k e n d :   r e s o u r c e :   a p i G r o u p :   k 8 s . e x a m p l e . c o m   k i n d :   S t o r a g e B u c k e t   n a m e :   s t a t i c - a s s e t s   r u l e s :   -   h t t p :   p a t h s :   -   p a t h :   / i c o n s   p a t h T y p e :   I m p l e m e n t a t i o n S p e c i f i c   b a c k e n d :   r e s o u r c e :   a p i G r o u p :   k 8 s . e x a m p l e . c o m   k i n d :   S t o r a g e B u c k e t   n a m e :   i c o n - a s s e t s   A f t e r   c r e a t i n g   t h e   I n g r e s s   a b o v e ,   y o u   c a n   v i e w   i t   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   i n g r e s s   i n g r e s s - r e s o u r c e - b a c k e n d   N a m e :   i n g r e s s - r e s o u r c e - b a c k e n d   N a m e s p a c e :   d e f a u l t   A d d r e s s :   D e f a u l t   b a c k e n d :   A P I G r o u p :   k 8 s . e x a m p l e . c o m ,   K i n d :   S t o r a g e B u c k e t ,   N a m e :   s t a t i c - a s s e t s   R u l e s :   H o s t   P a t h   B a c k e n d s   - - - -   - - - -   - - - - - - - -   *   / i c o n s   A P I G r o u p :


Question: What is Path types?

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