You are on page 1of 10

[EKS]

EKS Session
Summary 29-04-2023

• To launch a Kubernetes cluster using AWS EKS:

• We have to create a public key because we need to provide it when


creating the Kubernetes cluster.

pg. 1
[EKS]

• After the EKS cluster has been launched successfully, get the cluster:

• To get all the nodes:

• Path-based routing allows you to route traffic to different services based


on the path in the incoming request URL.

• Ingress traffic is the incoming traffic that is routed to a particular


service. An Ingress resource acts as a gateway to your cluster and can be
used to route traffic to different services based on various criteria, such as
the hostname, URL path, or request method.

• To handle incoming traffic through an Ingress resource, you need to have


an Ingress controller running in your Kubernetes cluster. The Ingress
controller is responsible for implementing the rules defined in the Ingress
resource and routing traffic to the appropriate backend services.

pg. 2
[EKS]

• The ALB Ingress Controller is one of several options for implementing


an Ingress controller in Kubernetes. It provides an easy way to route
traffic to services running in a Kubernetes cluster using an AWS
Application Load Balancer, which can scale to handle high-traffic loads
and provide path-based routing.

• Ingress is a Kubernetes resource that defines rules for routing external


traffic to internal services in a Kubernetes cluster.

• So, while Ingress manages the rules for routing external traffic to internal
services in a Kubernetes cluster, the AWS ALB Ingress Controller is
responsible for translating these rules into AWS-specific load balancing
rules and configuring the load balancer accordingly.

pg. 3
[EKS]

• The "--alb-ingress-access" option is used to enable the AWS ALB


Ingress Controller and connect it to the cluster.

• This option creates an IAM policy and role that grants the necessary
permissions to the ALB Ingress Controller to interact with the AWS
resources required for load balancing, and configures the ALB Ingress
Controller to use the AWS Application Load Balancer to route traffic to
services in the cluster based on the rules defined in the Ingress resource.

• To deploy the AWS Load Balancer (ALB) Controller to an Amazon


EKS cluster:

• Create an IAM policy.

• Download an IAM policy for the AWS Load Balancer Controller that
allows it to make calls to AWS APIs on your behalf.

• Create an IAM policy using the policy downloaded in the previous step.

• Attach the above policy to the EKS.

pg. 4
[EKS]

• To enable authentication between the Kubernetes Ingress Controller and


the AWS ALB, you can use OIDC. For this “--with-oidc” is used.

• Install Helm on your local machine

pg. 5
[EKS]

• Add the eks-charts repository and update your local repo to make sure
that you have the most recent charts.

• Install the AWS Load Balancer Controller chart using the helm install
command:

pg. 6
[EKS]

• IngressClass is used to select the appropriate Ingress controller.


# vim ingressclass.yml

• Deploy an application with service.


# vim deploy.yml

pg. 7
[EKS]

# vim service.yml

pg. 8
[EKS]

• Ingress is used to define the routing rules for external traffic.

• When you create an Ingress resource, specify the ingressClassName field


to associate the resource with a specific IngressClass.

• Now if we go to load balancer and copy the DNS name and paste it into
the browser then we can see the application.

pg. 9
[EKS]

pg. 10

You might also like