Quick Guide to Installing Minikube on Amazon Linux

Discover how to set up Minikube, a powerful tool for running Kubernetes locally, on Amazon Linux. This guide covers everything you need to know, from understanding Minikube's features to detailed installation steps and troubleshooting tips. Perfect for developers looking to explore Kubernetes in a simplified, resource-efficient environment.

What is Minikube?

Minikube is a lightweight Kubernetes implementation designed for local development and testing. It creates a single-node Kubernetes cluster on your local machine, allowing developers to experiment with Kubernetes without requiring a full-fledged cluster. Minikube is particularly useful for learning Kubernetes, testing applications, and building CI/CD pipelines before deploying to a production environment.

Key Features of Minikube:

  1. Single-Node Kubernetes: Provides a simplified environment for running Kubernetes.

  2. Multi-Platform Support: Works on Linux, macOS, and Windows.

  3. Add-ons Support: Offers built-in add-ons for features like metrics-server, ingress, and dashboard.

  4. Multiple Container Runtime: Supports Docker, containers, and CRI-O.

  5. Resource Efficiency: Optimized for local environments, requiring minimal resources compared to production clusters.

Installing Minikube on Amazon Linux

Prerequisites:

  • Amazon Linux 5.10 : Ensure your system is running

  • System Requirements: A minimum of 2 CPU’s, 2GB RAM, and 20GB disk space.

  • Root or Sudo Access: You need administrative privileges to install dependencies and make system changes.

For Easy Installations use the below SCRIPT

  1. Switch to root user by running sudo -i and run the below script.
#installing docker
sudo yum install docker -y
#starting the docker
sudo systemctl start docker
sudo systemctl status docker
#installing kubectl 
sudo curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
#moving kubectl to default path and adding execting permission
sudo mv kubectl /usr/local/bin/kubectl
sudo chmod +x /usr/local/bin/kubectl
#downloading minikube
sudo curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
#installing minikube
sudo install minikube-linux-amd64 /usr/local/bin/minikube
#installing few dependencies
sudo yum install iptables -y
sudo yum install conntrack -y
#adding the path for kubectl & minikube
sudo sed -i '12a export PATH=$PATH:/usr/local/bin' ./.bashrc

To run the Script

  1. Create a any file using vim file_name.sh and paste the above code in the file

  2. Save the above file.

  3. Execute the script by sh file_name.sh then MINIKUBE will be Successfully Installed in your Node.

After running the script, run the following command manually

  • source .bashrc

  • minikube start --driver=docker --force

  • minikube status

Conclusion

Minikube simplifies learning and experimenting with Kubernetes by offering a local single-node cluster. Installing Minikube on Amazon Linux involves setting up Docker, downloading the Minikube binary, and starting the cluster. Once set up, developers can deploy and manage Kubernetes workloads locally.