Networking/v1 Ingress Support


AKO partially supports networking/v1 ingress, released for general availability starting with Kubernetes version 1.19.

The following networking/v1 ingress specific features are supported in AKO:

  1. IngressClass
  2. Default IngressClass

AKO automatically detects whether ingress-class api is enabled/available in the cluster it is operating in. If the ingress-class api is enabled, AKO switches to use the IngressClass objects, instead of the previously available alternative of using annotations in Ingress objects.

Avi IngressClass object

IngressClass corresponding to AKO as the ingress Controller gets deployed as part of helm install/upgrade. Helm autodetects the presence of IngressClass api enabled on the cluster, and if it does, creates the IngressClass object. The IngressClass object should look something like this:

kind: IngressClass
  name: avi-lb
    kind: IngressParameters
    name: external-lb

The IngressClass can be defined using other names. However, it is important that the .spec.controller value specified matches

As part of the helm install/upgrade, if the defaultIngController is set to true, AKO’s helm chart would apply the as follows:

  name: avi-lb
  annotations: "true"

Setting the to true enables AKO to implement all Ingresses, even if the ingressClassName is not explicitly specified/the value is None in the Ingress objects. The annotation comes in handy when upgrading to an IngressClass enabled cluster. This is because while upgrading Ingresses from the ingress class annotation approach to the IngressClass object approach, the upgraded Ingresses would result in having ingressClassName set to None.

Ingress and Avi IngressClass

To provide a Controller to implement a given ingress, in addition to creating the IngressClass object, the ingressClassName should be specified, that matches the IngressClass name. The ingress looks as shown below:

kind: Ingress
  name: my-ingress
  ingressClassName: avi-lb
    - host: myinsecurehost.avi.internal
        - path: /foo
            serviceName: service1
            servicePort: 80

Alternatively, if the ingressClassName is empty, AKO checks for to be set to true on an IngressClass belonging to AKO (with .spec.controller:

Note: Removing an Avi IngressClass from the cluster would delete all Ingress associated objects from Avi, therefore it is suggested to handle IngressClass with caution.

Document Revision History

Date Change Summary
December 18, 2020 Published the article for Networking/v1 Ingress Support