Re-enable the NGINX Ingress Controller

If you are running a patched or custom Ingress controller, you can ensure that your configuration is supported by re-enabling the default NGINX Ingress Controller.

Before taking any specific action, you must first obtain the name of any NGINX Ingress Controller that is present in the current MKE cluster. This information will indicate what is necessary to re-enable that NGINX Ingress Controller.

  1. Download and configure the MKE Client Bundle.

  2. List the available IngressClass resources in the cluster:

    kubectl get ingressclass -o wide
    

    Example output:

    NAME            CONTROLLER             PARAMETERS   AGE
    nginx-default   k8s.io/ingress-nginx   <none>       2s
    
  3. Proceed, based on the list output:

Uninstall the patched Helm-based controller

Note

If to install a patched NGINX Ingress Controller you followed the Mirantis blog post How to Mitigate Risk for NGINX Ingress Controller Vulnerabilities Affecting Mirantis Kubernetes Engine, uninstall the Helm-based controller before re-enabling the NGINX Ingress Controller that is built into MKE.

  1. Determine whether the NGINX Ingress Controller was installed through Helm.

    helm list -A | grep nginx
    
  2. Uninstall the ingress controller.

    • If the ingress controller was installed through Helm, uninstall it with Helm, replacing <release-name> and <namespace> with the values from the helm list -A command:

      helm uninstall <release-name> -n <namespace>
      
    • If the ingress controller was installed without Helm, use kubectl to uninstall it:

      kubectl delete ingressclass nginx --ignore-not-found
      

Re-enable the MKE NGINX Ingress Controller

You can re-enable the default MKE NGINX Ingress Controller using either the MKE web UI or the MKE configuration file.

To re-enable the NGINX Ingress Controller using the MKE web UI:

  1. Log in to the MKE web UI as an administrator.

  2. Navigate to Admin > Admin Settings > Ingress.

  3. Select the Kubernetes tab.

  4. Enable the HTTP Ingress Controller for Kubernetes option.

  5. Click Save.

To re-enable the NGINX Ingress Controller using the MKE configuration file:

Note

For detailed information on the use and content of the MKE configuration file, refer to:

  1. Download and configure the MKE Client Bundle.

  2. Obtain the MKE configuration file.

  3. Enable the cluster_config.ingress_controller parameter.

  4. Apply the updated configuration.

Verify the configuration

  1. Download and configure the MKE Client Bundle.

  2. Obtain the MKE configuration file.

  3. Ensure that the cluster_config.ingress_controller parameter is enabled.