Replication Controller V/S Ingress Controller in Kubernetes

12/7/2018

What is the difference between the replication controller and ingress controller in Kubernetes?

-- Karan Kotabagi
kubernetes

1 Answer

12/8/2018

The Replication Controller is the original form of replication in Kubernetes. It’s being replaced by Replica Sets, but it’s still in wide use. A Replication Controller is a structure that enables you to easily create multiple pods, then make sure that that number of pods always exists. If a pod does crash, the Replication Controller replaces it.

Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the ingress resource. An ingress can be configured to give services externally-reachable URLs, load balance traffic, terminate SSL, and offer name based virtual hosting. An ingress controller is responsible for fulfilling the ingress, usually with a loadbalancer, though it may also configure your edge router or additional frontends to help handle the traffic.

In order for ingress resource to work, the cluster must have an ingress controller running. This is unlike other types of controllers, which run as part of the kube-controller-manager binary, and are typically started automatically with a cluster. Ingress Controllers can technically be any system capable of reverse proxying, but the most common is Nginx.

In a nutshell, replication controller is a controller which handles the pod replication in your cluster and makes sure you're running the desired number of replicas of pods. This controller comes as a part of kube-controller-manager by default. While Ingress controller is reverse proxy controller which is used to route the HTTP/HTTPS traffic from outside the cluster to services withing the kubernetes cluster.

-- Prafull Ladha
Source: StackOverflow