The Ingress controller facilitates access to services within the Kubernetes environment from outside the cluster.
The Ingress controller is not installed on the servers.com Kubernetes cluster as default. To deploy it, you need to follow the steps listed below.
You will be able to choose which Ingress controller you wish to use, but for the purposes of this guide we will demonstrate using the NGINX controller and the Helm package manager.
Follow these steps to deploy Ingress controller on your servers.com Kubernetes cluster:
1. Install and configure the Helm package manager on your computer. For more information on how to install Helm package manager consult the following Helm documentation.
2. Install or upgrade (if already installed) the ingress-nginx Helm chart in your Kubernetes cluster using one of the following commands:
Option A. If you want to enable the Proxy Protocol, use this command:
helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes.github.io/ingress-nginx \ --namespace ingress-nginx --create-namespace \ --set controller.config.use-proxy-protocol=true \ --set controller.service.annotations."servers\.com\/proxy-protocol"=true
Option B. If you do not need to configure the Proxy Protocol, use this command:
helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes.github.io/ingress-nginx \ --namespace ingress-nginx --create-namespace
After the Ingress controller has been deployed, the load balancer will be created. It's built upon the servers.com L4 (TCP) load balancer and facilitates access to the cluster.
Now, you are ready to configure the Ingress object within Kubernetes.
The Proxy Protocol transfers the real IP address of a user connecting to the Ingress controller. It works in a similar way to Forwarded or X-Forwarded-For HTTP headers. Since the load balancer takes part in this process, the Proxy Protocol has to be configured on both sides: L4 load balancer and Ingress controller.
Once the feature is disabled, you will see the IP address of the balancing node as the user's IP.