what is an ingress controller and how do I create it?

6/8/2019

Good morning guys, so I took down a staging environment for a product on GCP and ran the deployment scripts again, the backend and frontend service have been setup. I have an ingress resource and a load balancer up, however, the service is not running. A look at the production app revealed there was something like an nginx-ingress-controller. I really don't understand all these and how it was created. Can someone help me understand because I have not seen anything online that makes it clear for me. Am I missing something?

loadBalancer: https://gist.github.com/davidshare/5a571e56febe7dacd580282b373f3095 Ingress Resource: https://gist.github.com/davidshare/d0f53912bc7da8310ec3d64f1c8a44f1

-- David Essien
devops
kubernetes
kubernetes-ingress
nginx-ingress

2 Answers

6/10/2019

First, you have to implement Ingress Controller in order to apply Ingress resource, as described in @Shubhu answer. Ingress controller, as an edge router, applies specific logical structure with aim to route external traffic to your Kubernetes cluster underlying services via basic pattern routing rules defined in Ingress resource.

If you select Nginx Ingress Controller then it might be useful to proceed with installation guide approaching some specific prerequisites based on cloud provider environment. In order to simplify Nginx Ingress controller installation procedure it is also possible to use Helm package manager and install appropriate stable/nginx-ingress Helm chart.

-- mk_sta
Source: StackOverflow

6/8/2019

Ingress allows access to your Kubernetes services from outside the Kubernetes cluster. There are different kubernetes aka K8 resources alternatively you can use like (Node Port / Loadbalancer) which you can use to expose.

Ingress is independent resource to your service , you can specify routing rules declaratively, so each url with some context can be mapped to different services. This makes it decoupled and isolated from the services you want to expose.

So to work ingress it needs an Ingress Controller for your cluster.

Like deployment resource in K8, ingress can be created simply by

kubectl create -f ingress.yaml
-- Shubhu
Source: StackOverflow