Ingress-Nginx in Kubernetes
Configuring Ingress-Nginx in Kubernetes
Prerequisites
kubectl
should be installed in the local environment or the machine that will be used for the deployment.Helm should be installed in the local environment or the machine that will be used for deployment.
Install Ingress-Nginx using a Helm chart (recommended)
Configure the Helm Chart
Clone the GitHub repository containing the Helm charts from the GitHub URL or the command provided below:
git clone git@github.com:e6x-labs/helm-charts.git
Customize Chart Values: Navigate to the cloned Helm chart directory (
./charts/ingress/
) and modify the values in thevalues.yaml
file or create a custom value file.This file contains configuration options that customize the behavior of the chart during deployment. You can adjust parameters such as the image version, service type, ingress settings, etc., based on your requirements.
It is mandatory to edit the following values in the
values.yaml
file:
Deploy the Helm Chart
Use the helm install
command to deploy the Helm chart. Provide a release name for the deployment and specify the path to the chart directory. For example:
helm install <RELEASE_NAME> ./charts/ingress/
The above command deploys the Helm chart with <RELEASE_NAME>
using the configuration from the ./charts/ingress/
directory.
<RELEASE_NAME>
can be set to any value.
Verify Deployment
Use the following kubectl
commands to verify that the Kubernetes resources (services & ingresses) have been created and are running as expected:
If the Ingress resource has been set up correctly and the e6data engine is exposed externally, external tools & services can now connect to it using the configured hostname or IP address.
A Personal Access Token is required for authentication.
Install Ingress-Nginx using kubectl
Create Service
Create a service file, following the example below:
A separate Service should be created for each e6data cluster (if external access is required for multiple clusters).
To create the Service, apply the manifest to the cluster by running this command:
kubectl apply -f e6data-ext-access-service.yaml
To enable access to multiple clusters, please repeat the steps above to create a separate service file for each cluster.
Create Ingress
To expose a single cluster; one service file & one ingress file is required.
To expose multiple clusters; multiple service files (for each cluster) & one ingress file with multiple paths are required.
Create the ingress file following the examples below:
Expose a Single Cluster
Expose Multiple Clusters
To create the Ingress resource, apply the manifest to the cluster:
kubectl apply -f e6data-ingress.yaml
Expose Ports Externally
There are three steps required to externally expose a TCP port:
Create a ConfigMap.
If TCP proxy support is used, then those ports need to be exposed in the Service defined for the Ingress.
Add the ConfigMap to the Ingress Controller's deployment arguments.
Please refer to the official Ingress-Nginx documentation for detailed instructions to externally expose a TCP port according to your requirements.
A sample ConfigMap is provided below:
After the required port is externally exposed, the process is complete.
Ingress has now been created and external tools will be able to access the e6data cluster using the configured port/s (9000 in this example).
Last updated