Posts

Kubernetes Cluster Setup on Amazon (EKS)

 https://medium.com/@subhasmitadas696/kubernetes-cluster-setup-on-amazon-eks-11506e462929 Agenda: Setup an EC2 Instance to create a cluster Setup kubectl Setup eksctl Create an IAM Role and attach it to the EC2 instance Create your cluster and nodes Create a Pod using Kubectl to Validate the Cluster Deploying Nginx Container Delete the EKS cluster Click on the above link

EC2 and S3

Image
  Amazon EC2 and Amazon S3 are the two foundational building blocks of AWS.  The simplest way to understand the difference is: EC2 is the computer, and S3 is the hard drive. How They Work Together In a real-world application, companies almost never choose one over the other; they combine them :   EC2 runs the application logic (e.g., a photo-sharing app's code). When a user uploads a photo, the EC2 instance processes it and sends it to S3 to be stored safely. When another user views the photo, it is loaded directly from S3 , keeping the EC2 server free from doing heavy lifting. How the Architecture Works Step-by-Step User Interaction: A user visits a website or app hosted on the Amazon EC2 instance. If they upload a profile picture, that file travels directly to the EC2 server. Security & Permissions: The EC2 server doesn't use hardcoded passwords to talk to storage. Instead, it securely assumes a temporary AWS IAM Role (Identity and Access Management) that ...

How does Amazon EKS work?

  Create an Amazon EKS cluster in the AWS Management Console or with the AWS CLI or one of the AWS SDKs. Launch managed or self-managed Amazon EC2 nodes, or deploy your workloads to AWS Fargate. When your cluster is ready, you can configure your favorite Kubernetes tools, such as kubectl , to communicate with your cluster. Deploy and manage workloads on your Amazon EKS cluster the same way that you would with any other Kubernetes environment. You can also view information about your workloads using the AWS Management Console.

Steps to Setup

Source:  https://medium.com/@subhasmitadas696/deploying-a-simple-application-using-eks-step-by-step-db2aca1a93d7 Step 1: Setting Up Your AWS Environment 1.1 Install AWS CLI First, you need the AWS CLI installed on your machine. If you haven’t installed it yet, you can do so by following the instructions here .  curl -fsSL https://awscli.amazonaws.com/v2/install.sh | bash 1.2 Configure AWS CLI After installing, configure the AWS CLI with your credentials: aws configure You’ll be prompted to enter your AWS Access Key ID, Secret Access Key, region, and output format. 1.3 Install kubectl Next, you need to install kubectl, the Kubernetes command-line tool. You can find installation instructions here . 1.4 Install eksctl Finally, install eksctl, a simple CLI tool for creating and managing EKS clusters. Instructions can be found here . Step 2: Create an EKS Cluster 2.1 Create a Cluster Use eksctl to create a new EKS cluster. This command creates a cluster named simple-cluster with tw...

Differences Between EKS and Traditional Kubernetes Clusters

  1. Managed Control Plane : • EKS : AWS manages the Kubernetes control plane (including the API server and etcd). • Traditional Kubernetes : You are responsible for setting up and managing the control plane. 2. Scalability : • EKS : Easily scales across multiple AWS Availability Zones for high availability. • Traditional Kubernetes : Scaling and managing the high availability setup is your responsibility. 3. Security : • EKS : Integrates with AWS IAM for fine-grained permissions and integrates with other AWS security services. • Traditional Kubernetes : Requires manual setup and management of security configurations. 4. Maintenance : • EKS : AWS handles the maintenance of the control plane, including updates and patching. • Traditional Kubernetes : You are responsible for maintaining and updating the entire Kubernetes infrastructure.

What is EKS?

Amazon EKS (Elastic Kubernetes Service) is a managed service that makes it easy to run Kubernetes on AWS without needing to install and operate your own Kubernetes control plane or nodes. EKS runs the Kubernetes management infrastructure across multiple AWS Availability Zones, automatically detects and replaces unhealthy control plane nodes, and provides on-demand, scalable, and secure Kubernetes clusters.

Q48 & 49

Question 48. What Is A Placement Group In Ec2 ? Answer : AWS provides an option of creating a Placement Group in EC2 to logically group the instances within as single Availability Zone. We get the benefits of low network latency and high network throughput by using a Placement Group. Placement Group is a free option as of now. When we stop an instance, it will run in same Placement Group in restart at a later point of time. The biggest limitation of Placement Group is that we cannot add Instances from multiple availability zones to one Placement Group. Question 49. What Types Of Issues Do You Face While Connecting To An Ec2 Instance ? Answer : Some of the possible connection issues with EC2 instance are: Connection time out Permission denied due to host key not found Unprotected private key file Permission denied due to user key not recognized by server No supported authentication method available Server refused the key AWS Video Training