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:
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:
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:
Enable MetalLB as described in Enable the MetalLB support.
Open your Reclass model Git project repository on the cluster level.
In /kubernetes/control.yml
, enable the NGINX Ingress controller:
parameters:
kubernetes:
common:
addons:
...
ingress-nginx:
enabled: true
Note
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
.
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:
Log in to the Salt Master node.
Refresh your Reclass storage data:
salt-call state.sls reclass.storage
Apply the kube-addons
state:
salt -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons