Introduction and Installation Guide for Minikube on CentOS 7
This guide provides a step‑by‑step tutorial for installing Minikube on a CentOS 7 virtual machine, including prerequisite setup, VirtualBox installation, Kubernetes cluster deployment, Dashboard and kubectl configuration, common commands, and troubleshooting tips for developers.
Minikube Introduction Minikube is the simplest and fastest way to run a local Kubernetes cluster, useful for testing and development. Official site: https://minikube.sigs.k8s.io/ .
Prerequisites Prepare a CentOS 7 virtual machine and enable CPU virtualization.
Install Minikube
rpm -ivh minikube-1.3.1.rpmInstall VirtualBox (5.2+)
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc yum install VirtualBox-5.2 -y
rcvboxdrv setupDeploy Kubernetes Cluster (Linux)
# Install required development tools
yum -y install gcc perl make kernel-develSet up proxy environment variables (required to pull images):
export http_proxy=http://192.168.1.100:1087;
export https_proxy=http://192.168.1.100:1087;
minikube start \
--docker-env http_proxy=http://192.168.1.100:1087 \
--docker-env https_proxy=http://192.168.1.100:1087 \
--docker-env no_proxy=localhost,192.168.1.100,192.168.99.0/24 \
--log_dir=tmp --cpus 2 --memory 2048The command output shows the creation of a VirtualBox VM, proxy settings, image pulling, and Kubernetes startup until the cluster is ready.
Install Dashboard
yum install xdg-utils minikube dashboard
minikube dashboard --urlAfter launching, the dashboard URL (e.g., http://127.0.0.1:39099/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ ) can be accessed. You can stop it with Ctrl+C or run a manual proxy:
kubectl proxy --address='0.0.0.0' --port=39099 --accept-hosts='^*$'
Starting to serve on [::]:39099Install kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl versionSample output shows client version v1.15.3 and server version v1.15.2. Verify the cluster with:
kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready master 8m59s v1.15.2Common Minikube Commands
minikube version – show Minikube version minikube start – start the cluster minikube ssh – SSH into the VM minikube logs – view logs minikube dashboard – open the dashboard UI minikube ip – display VM IP address minikube stop – stop the VM minikube delete – delete the VM
FAQ
1. Install gcc, make, perl packages. 2. Install Linux kernel header files (kernel-devel). 3. "failed to open browser: exit status 3" – this warning does not affect functionality.
DevOps Cloud Academy
Exploring industry DevOps practices and technical expertise.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.