website/content/en/docs/reference/kubernetes-api/services-resources/ingress-class-v1.md

10 KiB

api_metadata content_type description title weight
apiVersion import kind
networking.k8s.io/v1 k8s.io/api/networking/v1 IngressClass
api_reference IngressClass represents the class of the Ingress, referenced by the Ingress Spec. IngressClass 5

apiVersion: networking.k8s.io/v1

import "k8s.io/api/networking/v1"

IngressClass

IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The ingressclass.kubernetes.io/is-default-class annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.


IngressClassSpec

IngressClassSpec provides information about the class of an Ingress.


  • controller (string)

    Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable.

  • parameters (<a href="{{< ref "../common-definitions/typed-local-object-reference#TypedLocalObjectReference" >}}">TypedLocalObjectReference)

    Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.

IngressClassList

IngressClassList is a collection of IngressClasses.


  • apiVersion: networking.k8s.io/v1

  • kind: IngressClassList

  • metadata (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta)

    Standard list metadata.

  • items ([]<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass), required

    Items is the list of IngressClasses.

Operations


get read the specified IngressClass

HTTP Request

GET /apis/networking.k8s.io/v1/ingressclasses/{name}

Parameters

  • name (in path): string, required

    name of the IngressClass

  • pretty (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

Response

200 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass): OK

401: Unauthorized

list list or watch objects of kind IngressClass

HTTP Request

GET /apis/networking.k8s.io/v1/ingressclasses

Parameters

  • allowWatchBookmarks (in query): boolean

    <a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks

  • continue (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue

  • fieldSelector (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector

  • labelSelector (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector

  • limit (in query): integer

    <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit

  • pretty (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

  • resourceVersion (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion

  • resourceVersionMatch (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch

  • timeoutSeconds (in query): integer

    <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds

  • watch (in query): boolean

    <a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch

Response

200 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClassList" >}}">IngressClassList): OK

401: Unauthorized

create create an IngressClass

HTTP Request

POST /apis/networking.k8s.io/v1/ingressclasses

Parameters

  • body: <a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass, required

  • dryRun (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldManager (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager

  • pretty (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

Response

200 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass): OK

201 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass): Created

202 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass): Accepted

401: Unauthorized

update replace the specified IngressClass

HTTP Request

PUT /apis/networking.k8s.io/v1/ingressclasses/{name}

Parameters

  • name (in path): string, required

    name of the IngressClass

  • body: <a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass, required

  • dryRun (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldManager (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager

  • pretty (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

Response

200 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass): OK

201 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass): Created

401: Unauthorized

patch partially update the specified IngressClass

HTTP Request

PATCH /apis/networking.k8s.io/v1/ingressclasses/{name}

Parameters

  • name (in path): string, required

    name of the IngressClass

  • body: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch, required

  • dryRun (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldManager (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager

  • force (in query): boolean

    <a href="{{< ref "../common-parameters/common-parameters#force" >}}">force

  • pretty (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

Response

200 (<a href="{{< ref "../services-resources/ingress-class-v1#IngressClass" >}}">IngressClass): OK

401: Unauthorized

delete delete an IngressClass

HTTP Request

DELETE /apis/networking.k8s.io/v1/ingressclasses/{name}

Parameters

  • name (in path): string, required

    name of the IngressClass

  • body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions

  • dryRun (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • gracePeriodSeconds (in query): integer

    <a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds

  • pretty (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

  • propagationPolicy (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy

Response

200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK

202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): Accepted

401: Unauthorized

deletecollection delete collection of IngressClass

HTTP Request

DELETE /apis/networking.k8s.io/v1/ingressclasses

Parameters

  • body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions

  • continue (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue

  • dryRun (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun

  • fieldSelector (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector

  • gracePeriodSeconds (in query): integer

    <a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds

  • labelSelector (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector

  • limit (in query): integer

    <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit

  • pretty (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty

  • propagationPolicy (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy

  • resourceVersion (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion

  • resourceVersionMatch (in query): string

    <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch

  • timeoutSeconds (in query): integer

    <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds

Response

200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK

401: Unauthorized