---
schema_version: "1"
id: 1d06618f4c03870471c137c994b495189aa960fb3f0ee22e0e4ac849c09c3b93
title: Configure Omni Gateway as an Ingress Controller in Local Mode
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/latest/gateway-k8-ingress-class.md
canonical_url: https://docs.mulesoft.com/gateway/latest/gateway-k8-ingress-class
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c73136335d4ae9d9c009f04d5905974d4b874ed4320541afa2df85a271f6d523
description: MuleSoft Documentation Site
release: "1.14"
latest: true
---
---
product: Omni Gateway
version: 1.14
is-latest-version: true
---

# Configure Omni Gateway as an Ingress Controller in Local Mode

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

For Kubernetes deployments in Local Mode, Omni Gateway typically acts as an ingress controller that
manages external access to your Kubernetes cluster.

By default, Omni Gateways deployed on Kubernetes in Local Mode are configured as ingress controllers
and can consume `Ingress` resources. The ingress controller configuration is defined in the
`IngressClass` resource parameters in the Omni Gateway Helm chart.

In Kubernetes terminology, `IngressClass` resources configure a gateway as an ingress controller,
and `Ingress` resources configure a routing between the ingress controller and the Kubernetes
services it controls. For a detailed explanation of Kubernetes `IngressClass` resources and
`Ingress` resources, see
[Kubernetes Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/).

In the Helm chart, you can edit the `IngressClass` configuration or disable the ingress controller
functionality.

## Before You Begin

1.  [Download Omni Gateway for Use in a Kubernetes Cluster](https://docs.mulesoft.com/gateway/latest/install#kubernetes).

2.  [Register and Run Omni Gateway in a Kubernetes Cluster in Local Mode](https://docs.mulesoft.com/gateway/latest/local-reg-run).

## Ingress Class Parameters

The Helm chart includes the following default `IngressClass` parameters and values:

```helm
ingressClass.enabled: true
ingressClass.name: "{releaseName}-{namespace}"
ingressClass.setAsDefault: false
```

<table><colgroup><col> <col> <col></colgroup><tbody><tr><td><p>Parameter</p></td><td><p>Description</p></td><td><p>Possible values</p></td></tr><tr><td><p><code>ingressClass.enabled</code></p></td><td><p>Enables Omni Gateway as an <code>IngressClass</code> resource</p></td><td><p><code>true</code> or <code>false</code></p></td></tr><tr><td><p><code>ingressClass.name</code></p></td><td><p>The name of the <code>IngressClass</code></p></td><td><p>Any string</p></td></tr><tr><td><p><code>ingressClass.setAsDefault</code></p></td><td><p>Sets Omni Gateway as the default <code>IngressClass</code></p></td><td><p><code>true</code> or <code>false</code></p></td></tr></tbody></table>

Setting `ingressClass.setAsDefault: true` defines the Omni Gateway instance as the default
`IngressClass` resource for the cluster. The default `IngressClass` is the default ingress
controller for all `Ingress` resources you create in the cluster.

If there is no default `IngressClass`, or if the default `IngressClass` resource shouldn’t be the
ingress controller for a specific resource, you must manually define the ingress controller in the
`Ingress` resource.

You can modify the default `IngressClass` parameters during or after the initial installation of the
Helm chart. For more information about how to modify a Helm chart, see
[Update Pod Settings for an Omni Gateway Deployment Through a Helm Chart](https://docs.mulesoft.com/gateway/latest/gateway-k8-change-helm-settings)

## Creating Ingress Resources

After you [install a Helm chart into a namespace](https://docs.mulesoft.com/gateway/latest/local-reg-run-up#kubernetes), you can verify your
new `IngressClass` resource by running the following command:

```helm
kubectl get ingressclasses
```

To create an ingress routing:

1.  [Publish an API in Local Mode](https://docs.mulesoft.com/gateway/latest/local-publish-simple-api#kubernetes).

2.  Define the new API as a Kubernetes Service.  
    For more information about Kubernetes Service definitions, see
    [Defining a Service](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service).

3.  Using `kubectl apply`, create an `Ingress` resource to define routing rules between the
    `IngressClass` Omni Gateway and the new Kubernetes Service:

    ```ssh
    cat <<EOF | kubectl apply -f -
    ---
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: <metadata-name>
      annotations:
        flex-gateway.ingress.kubernetes.io/api-instance: <api-instance-name>.<namespace>
    spec:
      ingressClassName: <ingress-class-name>
      rules:
      - http: ...
    EOF
    ```

    The `annotations` field value must match the API instance name and namespace specified when the
    API was defined.

    Omit the `ingressClassName` field if the gateway instance is configured as the default ingress
    controller.

    For more information about `Ingress` resources, see
    [Kubernetes Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/).

## See Also

- [Update Pod Settings for an Omni Gateway Deployment Through a Helm Chart](https://docs.mulesoft.com/gateway/latest/gateway-k8-change-helm-settings)

- [Managing Kubernetes Deployments](https://docs.mulesoft.com/gateway/latest/gateway-k8-management)
