In this post, I’m going to explain how a EKS cluster can be imported and properly setup to leverage full ingress support in Rancher. The explained ingress setup is not necessary if the cluster was provisioned with RKE, in that case Rancher will setup and deploy an ingress controller automatically for you on all nodes.

Create AWS EKS cluster

On your Rancher server request:

https://RANCHER_SERVER/g/clusters/add?provider=amazoneks

Add the credentials (Access Key and Secret Key) of a privileged AWS user.

Stick to the Rancher defaults for service roles, VPC & Subnet and Rancher will create a sandboxed EKS environment on your AWS account. The “Maximum ASG Size”, defines how many nodes the cluster will be allowed to spawn. This can later be adjusted in the auto scaling section (EC2).

After a few minutes, your cluster should be ready.

Setup Ingress for EKS

Probably you have noticed the yellow bar on the screenshot saying:

Note: Currently Amazon EKS will not create an ingress controller when launching a new cluster. If you need this functionality you will have to create an ingress controller manually after cluster creation.

For the time being, Rancher won’t setup an ingress controller for us. Means we can’t route traffic within the cluster to specific workloads using a L7 load balancer.

-> Select your cluster -> Default -> Load Balancing -> Add Ingress

Means our Ingressrule will stay in “Initializing” forever, since there is no ingress controller that will ever pick up this Rancher ingress configuration.

Ingress resources are a collection of routing rules which are picked up and fulfilled by an Ingress Controller

Let’s fix this.

Install Nginx Ingress Controller

In order to access your workloads from the Internet, we need to setup a load balancer that routes / forwards the traffic from the Internet to the cluster nodes. Let’s choose a L7 load balancer for the highest flexibility:

Layer 7 load balancers base their routing decisions on various characteristics of the HTTP header and on the actual contents of the message, such as the URL, the type of data (text, video, graphics), or information in a cookie.