Enable the NGINX Ingress controller

Enable the NGINX Ingress controller

The NGINX Ingress controller provides load balancing, SSL termination, and name-based virtual hosting. You can enable the NGINX Ingress controller if you use MetalLB in your MCP Kubernetes-based cluster.

To enable the NGINX Ingress controller on a Kubernetes cluster:

  1. While generating a deployment metadata model for your new MCP Kubernetes cluster as described in Create a deployment metadata model, select the following options in the Infrastructure parameters section of the Model Designer UI:

    • Kubernetes ingressnginx enabled

    • Kubernetes metallb enabled as the Kubernetes network engine

  2. If you have already generated a deployment metadata model without the NGINX Ingress controller parameter or to enable this feature on an existing Kubernetes cluster:

    1. Enable MetalLB as described in Enable the MetalLB support.

    2. Open your Reclass model Git project repository on the cluster level.

    3. In /kubernetes/control.yml, enable the NGINX Ingress controller:

                enabled: true


      If required, you can change the default number of replicas for the NGINX Ingress controller by adding the kubernetes_ingressnginx_controller_replicas parameter to /kubernetes/control.yml. The default value is 1.

  3. Select from the following options:

    • If you are performing an initial deployment of your cluster, proceed with further configuration as required. The NGINX Ingress controller will be installed during your Kubernetes cluster deployment.

    • If you are making changes to an existing cluster:

      1. Log in to the Salt Master node.

      2. Refresh your Reclass storage data:

        salt-call state.sls reclass.storage
      3. Apply the kube-addons state:

        salt -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons