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.
List the available
IngressClassresources in the cluster:kubectl get ingressclass -o wide
Example output:
NAME CONTROLLER PARAMETERS AGE nginx-default k8s.io/ingress-nginx <none> 2s
Proceed, based on the list output:
If the
NAMEfield is notnginx-default:a. Uninstall the patched Helm-based controller.
If the output is
No resources found, re-enable the NGINX Ingress Controller.If the
NAMEfield showsnginx-default, verify the configuration.
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.
Determine whether the NGINX Ingress Controller was installed through Helm.
helm list -A | grep nginx
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:
Log in to the MKE web UI as an administrator.
Navigate to Admin > Admin Settings > Ingress.
Select the Kubernetes tab.
Enable the HTTP Ingress Controller for Kubernetes option.
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:
Obtain the MKE configuration file.
Enable the
cluster_config.ingress_controllerparameter.Apply the updated configuration.
Verify the configuration¶
Obtain the MKE configuration file.
Ensure that the
cluster_config.ingress_controllerparameter is enabled.