---
api_metadata:
apiVersion: "networking.k8s.io/v1"
import: "k8s.io/api/networking/v1"
kind: "IngressClass"
content_type: "api_reference"
description: "IngressClass represents the class of the Ingress, referenced by the Ingress Spec."
title: "IngressClass"
weight: 5
---
`apiVersion: networking.k8s.io/v1`
`import "k8s.io/api/networking/v1"`
## IngressClass {#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.
- **apiVersion**: networking.k8s.io/v1
- **kind**: IngressClass
- **metadata** (}}">ObjectMeta)
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- **spec** (}}">IngressClassSpec)
Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
## IngressClassSpec {#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** (}}">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}
IngressClassList is a collection of IngressClasses.
- **apiVersion**: networking.k8s.io/v1
- **kind**: IngressClassList
- **metadata** (}}">ListMeta)
Standard list metadata.
- **items** ([]}}">IngressClass), required
Items is the list of IngressClasses.
## Operations {#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
}}">pretty
#### Response
200 (}}">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
}}">allowWatchBookmarks
- **continue** (*in query*): string
}}">continue
- **fieldSelector** (*in query*): string
}}">fieldSelector
- **labelSelector** (*in query*): string
}}">labelSelector
- **limit** (*in query*): integer
}}">limit
- **pretty** (*in query*): string
}}">pretty
- **resourceVersion** (*in query*): string
}}">resourceVersion
- **resourceVersionMatch** (*in query*): string
}}">resourceVersionMatch
- **timeoutSeconds** (*in query*): integer
}}">timeoutSeconds
- **watch** (*in query*): boolean
}}">watch
#### Response
200 (}}">IngressClassList): OK
401: Unauthorized
### `create` create an IngressClass
#### HTTP Request
POST /apis/networking.k8s.io/v1/ingressclasses
#### Parameters
- **body**: }}">IngressClass, required
- **dryRun** (*in query*): string
}}">dryRun
- **fieldManager** (*in query*): string
}}">fieldManager
- **pretty** (*in query*): string
}}">pretty
#### Response
200 (}}">IngressClass): OK
201 (}}">IngressClass): Created
202 (}}">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**: }}">IngressClass, required
- **dryRun** (*in query*): string
}}">dryRun
- **fieldManager** (*in query*): string
}}">fieldManager
- **pretty** (*in query*): string
}}">pretty
#### Response
200 (}}">IngressClass): OK
201 (}}">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**: }}">Patch, required
- **dryRun** (*in query*): string
}}">dryRun
- **fieldManager** (*in query*): string
}}">fieldManager
- **force** (*in query*): boolean
}}">force
- **pretty** (*in query*): string
}}">pretty
#### Response
200 (}}">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**: }}">DeleteOptions
- **dryRun** (*in query*): string
}}">dryRun
- **gracePeriodSeconds** (*in query*): integer
}}">gracePeriodSeconds
- **pretty** (*in query*): string
}}">pretty
- **propagationPolicy** (*in query*): string
}}">propagationPolicy
#### Response
200 (}}">Status): OK
202 (}}">Status): Accepted
401: Unauthorized
### `deletecollection` delete collection of IngressClass
#### HTTP Request
DELETE /apis/networking.k8s.io/v1/ingressclasses
#### Parameters
- **body**: }}">DeleteOptions
- **continue** (*in query*): string
}}">continue
- **dryRun** (*in query*): string
}}">dryRun
- **fieldSelector** (*in query*): string
}}">fieldSelector
- **gracePeriodSeconds** (*in query*): integer
}}">gracePeriodSeconds
- **labelSelector** (*in query*): string
}}">labelSelector
- **limit** (*in query*): integer
}}">limit
- **pretty** (*in query*): string
}}">pretty
- **propagationPolicy** (*in query*): string
}}">propagationPolicy
- **resourceVersion** (*in query*): string
}}">resourceVersion
- **resourceVersionMatch** (*in query*): string
}}">resourceVersionMatch
- **timeoutSeconds** (*in query*): integer
}}">timeoutSeconds
#### Response
200 (}}">Status): OK
401: Unauthorized