K8S installation in Linux VM(Ubuntu)

 -> Create a linux VM (Ubuntu) EC@ instance for host machine

Step 1: -> Install Kubectl using below command 

# Download the latest stable release

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"


# Download specific version (example: v1.28.0) 

# curl -LO https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl   -- NA


# Make the binary executable

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl


# Verify installation

kubectl version --client


Step 2: Install AWS CLI

# Download the AWS CLI installer

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"


# Install unzip if not available

sudo apt update && sudo apt install -y unzip  # Ubuntu/Debian

# sudo yum install -y unzip    # CentOS/RHEL/Amazon Linux


# Extract the installer

unzip awscliv2.zip


# Run the installer

sudo ./aws/install


# Clean up

rm -rf awscliv2.zip aws/


# Verify installation

aws --version


Step 3: Install eksctl

# Download the latest release for your architecture (x86_64)

curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp


# Move to executable path

sudo mv /tmp/eksctl /usr/local/bin


# Verify installation

eksctl version


Step 4: Create IAM Role iwth below polices and attach to EKS Management HOST (EC2 instance->Actions->Security ->Modity IAM role

Step 5: Create EKS Cluster using eksctl

# Create a basic cluster with default settings

eksctl create cluster --name my-cluster --region us-west-2 --version 1.28



Comments

Popular posts from this blog

Monolithic Architecture

Advantages and Disadvantages of Monolithic Architecture

Load Balancers and Load Balancers Algorithms