AWS EKS 101

EKS? without needing to install and operate your own Kubernetes control plane or worker nodes.

1. Certified Kubernetes Conformant: Compatible with all existing K8s plugins and applications.No code modifications required.

2. Provision and Scale The cluster (HA): Across multi AWS Availability Zones for high availability and fault tolerance.

3. Self-Healing: Automatically detects and replaces unhealthy worker nodes. Patching for the control plane.

Server option vs Serverless option

EC2 Instance

  • Managed clusters of EC2 instances
  • Control plane and nodes
  • Managed node groups running the latest EKS-optimized Linux AMI
  • Automated provisioning and life cycle management
  • A great choice if you have a stateful application or a long-running application like a web server.

Fargate

  • Run applications as serverless containers
  • No need to provision or manage servers
  • Specify and pay for resources per application
  • Great for short-lived, stateless processes
  • Not suitable for applications that require persistent volumes or file systems

Store your container image in a repository

  • Elastic Container Registry (ECR)
  • Artifactory
  • Docker Hub

Create image and make them available in Kubernetes.

DockerHub is good for deploying public image from the docker public repository which is a really quick start tool. Also, It is a good way playground.

Exposes the service externally (e.g., using Elastic Load Balancer).

EKS and Kubernetes Tools?

  • eksctl: a simple tool to create, delete, and get information about the cluster for creating work nodes
  • kubectl: kubectl The K8s command line utility used to control Kubernetes clusters.

Advantages:

  • Deeply integrated (other AWS Services)
    • CloudTail – Logging of all user and API activity.
    • Cloud Watch – Monitoring and control plane logs
    • IAM – Authentication, authorization, and permissions.
    • VPC – Networkiisolation, security groups, network ACLs.
    • Auto Scaling Groups – Scale the infrastructure are needed.
    • Elastic Load Balancing – Expose the applications to the internet.
  • EKS Control Plan Scalable
    • Secure: Latest security patches automatically applied.
    • Single Tenant: Control plan infrastructure is not shared with any other EKS cluster or AWS account.
  • Get up and running
    • Create a multi-node, multi-AZ, highly available Kubernetes cluster in a single command.
    • AWS installs operates and maintains the Kubernetes control plane so you do not have to. You are just FORCUSEING on developing software.
  • No vendor lock-in Any applications that run on EKS are fully compatible with any standard Kubernetes environment.

Working with EKS

  • Kubernetes supports a Declarative Model
    • we can use configuration files to define a desired state and Kubernetes will do everything to maintain the desired state.
  • Configuration files
    • Manage Kubernetes objects using configuration files.
  • Instead of complex commands

EKS Lab Architecture

  • Create Admin user
    • K8-admin
  • EC2 Instance
    • AWS CLI v2 (Install or update): AWS CLI will configure the CLI with the credential of the Kubernetes K8-admin user.
    • eksctl – create eks clusters, so it is going to configure the control plane and three work nodes as well.
    • kubectl – create deployment and service (LoadBalancer) In order to access our application from the outside world, we are going to NEED LoadBalancer service as well.

TEST High Availablity Shot down work node. Feature of EKS and see EKS response.

Prerequisites

  • AWS Management Console
  • An EC2 Instance

Services – IAM

  • Add user -k8s-admin and give access type: programmatic access.
  • Attach existing policies directly – AdministratorAccess

This user is going to need an admin privilege because this user can create e2c instances and security group etc, so this is actually needed an admin level. so we have Access Key ID & Secret access key.

EC2 – Launch Instance

Amazon Linux 2 AMI (HVM), SSD Volume Type * t2.micro
Auto-assign Public IP: EnableCreate instance
This EC2 is going to be like an admin workstation

Leave a Reply

Your email address will not be published.

ANOTE.DEV