Kubernetes is an open-source container-orchestration system for automating computer application deployment, scaling, and management. Initially designed by Google and currently maintained by the Cloud Native Computing Foundation.

 

 

Though there are many ways to show your Kubernetes cluster’s app, we need to choose the perfect one for our needs. NodePort, Ingress, LoadBalancer, and ClusterIP are the four key choices.

 

 

Here we will go through the ingress controller. The Kubernetes Ingress API enables you to share your Kubernetes cluster’s apps to the internet by connecting routing guidelines into a single source. To handle Ingress, you must set up an Ingress controller in your cluster, which is in charge of processing ingress resource information and enabling traffic based on ingress rules. 

 

 

Let’s instantly review what a Kubernetes Ingress is and what an Ingress controller allows before digging into the numerous Ingress controllers. Kubernetes provides three service forms to present certain framework features:

 

 

ClusterIP: The standard Kubernetes service is ClusterIP. This functionality is created within a cluster and is only accessible through pods within that cluster. So, whenever we want to disclose a courtesy to other pods in the very same group, we use this sort of service. The Kubernetes proxy is used to manage this service.

 

 

NodePort: Each node in your cluster has an open port called a NodePort. Even if your program is installed on a different node, Kubernetes straightforwardly routes traffic from the NodePort to the application.

 

 

LoadBalancer: In Kubernetes, the far more basic form of load balancing is load distribution which is straightforward to fix at the dispatcher stage. Kubernetes has two load distribution channels, both of which are regulated by a function called Kube-proxy, which handles the virtual IP addresses used by applications.

 

Kubernetes Ingress is a Kubernetes API entity that offers routing rules for managing outside users’ accessibility to Kubernetes cluster services, usually via HTTPS/HTTP. You can easily create guidelines for traffic propagation with Ingress without making a series of Load Balancers or exposing each operation on the node. As a result, it is the right option for use in production settings.

 

 

In this guide, we will embellish a method to enable the Ingress controller to use minikube easily.

 

Pre-requisites

 

To enable the Ingress controller in your system, you must have installed a minikube cluster. Also, you must have sudo rights to access your system.

 

Note: We are working on Ubuntu 20.04 LTS while writing this guide. You can use your favourite operating system for implementation.

 

 

Create a Minikube Cluster

 

Initially, you have to create a minikube cluster to enable the Ingress controller in Kubernetes. For this particular purpose, we have to launch the command line terminal in Ubuntu 20.04 LTS. You can throw the terminal window with the help of two simple methods. One of them is to open it using the Application bar of your operating system. The other option is to use the most straightforward shortcut key of “Ctrl+Alt+T”.

 

 

As soon as you follow either of these methods, the command line terminal shall open. First of all, you have to start the already installed minikube cluster in your Ubuntu 20.04 LTS operating system. To start minikube, write down the below-mentioned command in the command-line shell.

$ minikube start

 

 

During the execution of this command, you have to wait for a few moments to get started with minikube. Upon the successful implementation of the command, you can check out the minikube version displayed as well. After performing this step, you can check the minikube status by executing the cited command in the terminal.

$ minikube status

 

You can check that the host, kubelet, and apiserver are all running from the above-displayed image.

 

 

Enable the Ingress Controller Using Minikube

 

 

As soon as you start the minikube, you are ready to enable the Ingress controller. If you want to check the addon list of the minikube, you have to run the following command in the terminal:

$ minikube addons list

 

After the execution of this command, you will see the status against every addon of minikube. Some of them are enabled, and some are disabled. Now, this is the right time to allow the Ingress controller using minikube. So for this specific purpose, you have to write the below-written command in your terminal window.

$ minikube addons enable ingress

 

 

This command has the keyword “enable”, enabling the Ingress controller in Kubernetes.

 

 

After executing this command, you can now view that the “The ingress addon is enabled”. If you want to verify this, you can run the below-mentioned command in the terminal with the –n flag.

 

 

You can view that now the status is running.

 

 

We have explained the concept of the Ingress controller in Kubernetes. Also, we have elaborated the steps on how to enable Ingress using minikube.

 

 

That's it!!

 

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)