Whenever you want to expose any service which is running inside Kubernetes then there are a couple of ways to do it but the easiest one is to have an Ingress. This post will cover about ingresses, ingress definitions, ingress controllers and interaction between them.

So, I am assuming you have a basic understanding of Kubernetes and you are familiar with pods and services. To explain this quickly and in the better way, we will compare it with more traditional ways of exposing websites to the internet using Apache, NGINX or any other API gateway.

Let’s start with the definition of the following:

Ingress

We can think of it as the typical reverse proxy, where we have standard web deployments which are pointing to our app running behind the firewalls, as known as NGINX, HAProxy, Apache, Kong etc. In this proxy, if we configure something in /account/.* it goes into account service, or /address/.* goes to the address service, and so on.

Become a Certified Kubernetes Administrator (CKA)!

Ingress Definition

To call any API, you would need a resource definition which defines things like path, host, port, etc. We can update these with the help of reverse proxy, and these definitions in Kubernetes-land is called, ingress definition here’s an example of it:

Here we are creating a simple ingress definition which when a request comes on the path /foo send that call to the service echo on the port 80. We will modify this a bit more by the end of this post.

#kubernetes-cluster #devops #kubernetes #kubernetes-engine #cloud-development

What is Kubernetes Ingress and How to setup Ingress?
1.35 GEEK