[Yandex Cloud documentation](../../index.md) > [Yandex Application Load Balancer](../index.md) > Tools for Managed Service for Kubernetes > Ingress controller > Resource configuration > IngressClass

# IngressClass resource fields and annotations

The `IngressClass` resource is a class of [Ingress](ingress.md) resources supporting simultaneous use of multiple ingress controllers, e.g., Application Load Balancer and NGINX. Each `IngressClass` resource specifies a distinct ingress controller. This enables traffic routing across multiple `Ingress` resources of different controllers within the same application and Managed Service for Kubernetes cluster.

{% note tip %}

We recommend using the new [Yandex Cloud Gwin](../tools/gwin/index.md) controller instead of an ALB Ingress controller and Gateway API.

{% endnote %}

When using multiple ingress controllers, explicitly declare the target controller for each `Ingress` resource. To do this, specify the relevant controller’s `IngressClass` in the [spec.ingressClassName](ingress.md#spec) field.

`IngressClass` is a standard Kubernetes resource. We describe its fields and annotations below. For more information on configuring and using `IngressClass` resources, see [this Kubernetes guide](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class). Check out a GitHub [example](https://github.com/yandex-cloud-examples/yc-mk8s-with-ingress-class) for configuring `Ingress` resources and routing traffic using multiple ingress controllers.

## IngressClass {#ingress-class}

```yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata: <ObjectMeta>
spec:
  controller: <string>
```

#|
|| **Field**          | **Value / Type**   | **Description**                    ||
|| `apiVersion`      | `networking.k8s.io/v1` | **This is a required field**.

Kubernetes API version. ||
|| `kind`            | `IngressClass`         | Resource type                    ||
|| `metadata`        | `ObjectMeta`           | **This is a required field**.

[Resource metadata](#metadata). ||
|| `spec`            | `IngressClassSpec`     | **This is a required field**.

Resource specification. ||
|| `spec.controller` | `string`               | **This is a required field**.

Ingress controller name specified by the `IngressClass` resource. The possible values are:

* `ingress.alb.yc.io/yc-alb-ingress-controller`: Application Load Balancer controller.
* `k8s.io/ingress-nginx`: NGINX controller. ||
|#

{% cut "Example" %}

```yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  labels:
    app.kubernetes.io/component: controller
  name: alb
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
spec:
  controller: ingress.alb.yc.io/yc-alb-ingress-controller
```

{% endcut %}

## ObjectMeta {#metadata}

```yaml
name: <string>
labels:
  <string>: <string>
annotations:
  ingressclass.kubernetes.io/is-default-class: "<bool>"
```

#|
|| **Field**      | **Value / Type** | **Description** ||
|| `name`        | `string`             | **This is a required field**.

Resource name. For more information about the format, see [this Kubernetes guide](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).

This name is also specified in the [spec.ingressClassName](ingress.md#spec) field of the `Ingress` resource. ||
|| `labels`      | `map[string]string`  | Kubernetes metrics for managing and monitoring Kubernetes objects.

[We recommend](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/) specifying `app.kubernetes.io/component: controller` in this field. ||
|| `annotations` | `map[string]string`  | Resource annotations.

The available annotation is `ingressclass.kubernetes.io/is-default-class`. The annotation data type is `bool`. This annotation specifies whether the `IngressClass` resource is used by default. When set to `"true"`, this `IngressClass` is automatically used for `Ingress` resources with no `IngressClass` specified. ||
|#