Skip to main content
πŸ“¬ Get weekly Production AI insights Practical notes on Kubernetes, AI infrastructure and platform engineering. No spam. Subscribe free
How to Install Kubernetes on Amazon Linux 2023 with EKS
DevOps

How to Install Kubernetes on Amazon Linux 2023 with EKS

Step-by-step guide to install Kubernetes on Amazon Linux 2023 with EKS. Covers prerequisites, installation, cluster verification, and deploying your first app.

LB
Luca Berton
Β· 1 min read

Prerequisites

Before installing Kubernetes on Amazon Linux 2023 with EKS:

  • Administrative/root access
  • Minimum 2 CPU cores and 2GB RAM per node
  • Internet connectivity
  • Container runtime (containerd recommended)

Installation Steps

Step 1: Prepare the System

# Disable swap (required for kubelet)
sudo swapoff -a

# Load required kernel modules
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
EOF
sudo modprobe overlay && sudo modprobe br_netfilter

# Set sysctl params
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables  = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward                 = 1
EOF
sudo sysctl --system

Step 2: Install Container Runtime

# Install containerd
sudo apt-get update && sudo apt-get install -y containerd
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
sudo systemctl restart containerd

Step 3: Install Kubernetes Components

# Add Kubernetes repo and install
# kubeadm, kubelet, kubectl

Step 4: Initialize the Cluster

# Initialize control plane
sudo kubeadm init --pod-network-cidr=10.244.0.0/16

# Configure kubectl
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Step 5: Install Network Plugin

# Install Calico CNI
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml

# Verify nodes are Ready
kubectl get nodes

Verify Installation

# Check cluster status
kubectl cluster-info
kubectl get nodes -o wide
kubectl get pods -A

# Deploy test application
kubectl create deployment nginx --image=nginx
kubectl expose deployment nginx --port=80 --type=NodePort

Next Steps

  1. Join worker nodes to the cluster
  2. Install an Ingress controller (nginx or traefik)
  3. Set up monitoring with Prometheus and Grafana
  4. Configure storage with a CSI driver
  5. Deploy your applications with Helm or Kustomize

Master Kubernetes with Luca Berton’s courses β€” from cluster setup to production-grade deployments.

Free 30-min Production AI consultation

Book Now