Member-only story
What is Ingress in Kubernetes
First thing to discuss is whats is the difference between Service and Ingress? What is the difference between two?
Lets start with a simple scenario.
We are working on an application and that has an online store selling products. It is available at my-online-store.com. It s built into a Docker image and deployed on a Kubernetes cluster as POD in a deployment. We need a database and we deployed MySQL database as a POD and created a service of type cluster IP called MySQL service to make it accessible to the application.
Application is now up and running. We need to make it accessible to outside world. We create an another service and its type of Node Port and make the application available on a high port on the node. For example it can be port 38080. User can now access the application using the URL http://<node IP>:38080.
User can able to access the application and whenever traffic increases the number of replicas of the POD to handle the additional traffic. The service takes care of splitting the traffic in between PODs.
However this is not the way we deploy production grade applications. As you know there are many more things involved in addition to splitting the traffic.
We do not need users to type in the IP address. You need to configure the url my-online-store.com. You dont need user to type the port number too. What we can do is we bring in an additional layer between DNS and cluster.