root@minikube:~# minikube start --vm-driver=none
😄 minikube v1.3.0 on Ubuntu 18.04
🤹 Running on localhost (CPUs=1, Memory=3693MB, Disk=9749MB) ...
ℹ️ OS release is Ubuntu 18.04.3 LTS
🐳 Preparing Kubernetes v1.15.2 on Docker 19.03.1 ...
▪ kubelet.resolv-conf=/run/systemd/resolve/resolv.conf
💾 Downloading kubeadm v1.15.2
💾 Downloading kubelet v1.15.2
🚜 Pulling images ...
🚀 Launching Kubernetes ...
💣 Error starting cluster: cmd failed: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--data-minikube,FileAvailable--etc-kubernetes-manifests-kube-s
cheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap
: running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--data-minikube,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAva
ilable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap
output: [init] Using Kubernetes version: v1.15.2
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING FileExisting-socat]: socat not found in system path
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.1. Latest validated version: 18.09
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
: running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--data-minikube,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAva
ilable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap
.: exit status 1
[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
Thats worked for me ... Thanks
We already know the CPU count, so it would be nice if we detected this condition earlier and output an easier to understand error message. One suggestion would be to implement it here:
Help wanted!
@tstromberg I can take this
FYI, if anyone is running into this, you can bypass the CPU checks (as of v1.5.2) by using:
minikube start --extra-config=kubeadm.ignore-preflight-errors=NumCPU --force --cpus 1
I can confirm that it functions correctly, though you may of course have trouble scheduling a job that requests more than 1 CPU.
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 755m (75%) 0 (0%)
memory 190Mi (9%) 340Mi (17%)
ephemeral-storage 0 (0%) 0 (0%)
If none of the solutions worked you can use this command:
sudo minikube start --driver=podman --extra-config=kubeadm.ignore-preflight-errors=NumCPU
It worked well for my 1 CPU core 1 GB memory server
@max-nderitu:
The requirements are from kubeadm, not something that minikube sets.
A 1 CPU and 1 GB _will_ have issues when running and _will_ start swapping...
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
- 2 GB or more of RAM per machine (any less will leave little room for your apps)
- 2 CPUs or more
There are other installations of Kubernetes, that work better in a constrained environment.
Update Machine type : "n1-standard-2 (2 vCPUs, 7.5 GB memory)" in GCP instance.
Most helpful comment
FYI, if anyone is running into this, you can bypass the CPU checks (as of v1.5.2) by using:
minikube start --extra-config=kubeadm.ignore-preflight-errors=NumCPU --force --cpus 1I can confirm that it functions correctly, though you may of course have trouble scheduling a job that requests more than 1 CPU.