Install Minikube on GCP CentosOS 7

Install Minikube on GCP CentosOS 7

Enable nested virtualization on an instance

Create a boot disk.

gcloud compute disks create disk1 --image-project centos-cloud --image-family centos-7 --zone us-central1-a

Create image with License.

Note: This may take a minute.

gcloud compute images create nested-vm-image --source-disk=disk1 --source-disk-zone=us-central1-a --licenses=

Delete source disk, as it is no longer needed.

gcloud compute disks delete disk1 --zone us-central1-a

Create Instance

Before you create your instance, you need to check if your zone currently has the minimum CPU platform (Intel Haswell or newer) requirement.

gcloud compute zones describe [ZONE]


gcloud compute zones describe us-central1-a
- Intel Cascade Lake
- Intel Skylake
- Intel Broadwell
- Intel Haswell
- Intel Sandy Bridge

Create instance.

gcloud compute instances create example-nested-vm --zone us-central1-a \
   --min-cpu-platform "Intel Haswell" \
   --machine-type n1-standard-4 \
   --image nested-vm-image

SSH into vm.

gcloud compute ssh example-nested-vm --zone us-central1-a

Confirm nested virtualization is enabled (should return 1).

grep -cw vmx /proc/cpuinfo


grep -cw vmx /proc/cpuinfo

Install kubectl

  curl -LO -s
  chmod +x ./kubectl
  sudo mv ./kubectl /usr/local/bin/kubectl

Install VirtualBox

  sudo yum install kernel-devel kernel-headers make patch gcc wget
  sudo wget -P /etc/yum.repos.d
  sudo yum install VirtualBox-6.0

Verify VirtualBox is installed.

systemctl status vboxdrv

Install Minikube

  curl -Lo minikube && chmod +x minikube
  sudo cp minikube /usr/bin/

Install docker

sudo yum install docker

Start Minikube

minikube start


minikube start
😄  minikube v1.3.1 on Centos 7.6.1810
🔥  Creating virtualbox VM (CPUs=2, Memory=2000MB, Disk=20000MB) …
🐳  Preparing Kubernetes v1.15.2 on Docker 18.09.8 …
💾  Downloading kubelet v1.15.2
💾  Downloading kubeadm v1.15.2
🚜  Pulling images …
🚀  Launching Kubernetes …
⌛  Waiting for: apiserver proxy etcd scheduler controller dns
🏄  Done! kubectl is now configured to use "minikube"

Verify Cluster.

kubectl cluster-info


kubectl cluster-info
Kubernetes master is running at
KubeDNS is running at

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
, , ,