IngressClass resource fields and annotations
The IngressClass
resource is a class of Ingress resources which supports simultaneous use of multiple Ingress controllers, e.g., Application Load Balancer and NGINX. Each IngressClass
resource refers to a different Ingress controller. As a result, you can route traffic through the Ingress
resources of different controllers within the same application in a single Managed Service for Kubernetes cluster.
If you are using multiple Ingress controllers, specify which controller the resource refers to in each Ingress
resource. To do this, specify the IngressClass
name of the controller in the spec.ingressClassName field.
IngressClass
is a standard Kubernetes resource. Its fields and annotations are described below. For more information on using and configuring the IngressClass
resource, see the Kubernetes documentationIngress
resources and route traffic using multiple Ingress controllers.
IngressClass
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata: <ObjectMeta>
spec:
controller: <string>
Field |
Value or type |
Description |
|
|
Required. Kubernetes API version. |
|
|
Resource type. |
|
|
Required. |
|
|
Required. Resource specification. |
|
|
Required. Name of the Ingress controller the
|
Example
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
ObjectMeta
name: <string>
labels:
<string>: <string>
annotations:
ingressclass.kubernetes.io/is-default-class: "<bool>"
Field |
Value or type |
Description |
|
|
Required. Resource name. For more information about the format, please see the Kubernetes documentation This name is also specified in the spec.ingressClassName field in the |
|
|
Kubernetes labels to manage and monitor Kubernetes objects. The recommended value |
|
|
Resource annotations. The available annotation is |