Setup Environment
Prerequisites
Before installing Minikube, you'll need to set up the following components:
Requirement |
Installation Method |
Docker |
Container runtime |
kubectl |
Kubernetes CLI tool |
Hypervisor |
VirtualBox or KVM |
Install Docker
## Update package index
sudo apt-get update
## Install dependencies
sudo apt-get install -y ca-certificates curl gnupg lsb-release
## Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
## Set up stable repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
## Install Docker Engine
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
## Add current user to docker group
sudo usermod -aG docker $USER
Install kubectl
## Download kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
## Install kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
## Verify installation
kubectl version --client
Install Minikube
## Download Minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
## Install Minikube
sudo install minikube-linux-amd64 /usr/local/bin/minikube
## Verify installation
minikube version
Environment Verification
graph TD
A[Install Docker] --> B[Install kubectl]
B --> C[Install Minikube]
C --> D[Verify Components]
D --> E[Ready to Launch Cluster]
System Configuration Check
## Check virtualization support
grep -E --color 'vmx|svm' /proc/cpuinfo
## Verify Docker is running
sudo systemctl status docker
## Check kubectl configuration
kubectl config view
Tool |
Purpose |
kubectx |
Switch between Kubernetes contexts |
helm |
Kubernetes package manager |
k9s |
Kubernetes CLI dashboard |
LabEx Pro Tip
At LabEx, we recommend creating a consistent development environment by using containerization and virtualization tools to ensure smooth Kubernetes learning and development.