Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

none: the number of available CPUs 1 is less than the required 2 #5010

Closed
vinothbuj85 opened this issue Aug 7, 2019 · 8 comments Β· Fixed by #5086
Closed

none: the number of available CPUs 1 is less than the required 2 #5010

vinothbuj85 opened this issue Aug 7, 2019 · 8 comments Β· Fixed by #5086
Labels
co/none-driver good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@vinothbuj85
Copy link

vinothbuj85 commented Aug 7, 2019

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
@afbjorklund
Copy link
Collaborator

[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2

@vinothbuj85
Copy link
Author

Thats worked for me ... Thanks

@afbjorklund afbjorklund added the kind/support Categorizes issue or PR as a support question. label Aug 7, 2019
@tstromberg tstromberg changed the title Minikube start issue none: the number of available CPUs 1 is less than the required 2 Aug 8, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Aug 8, 2019

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:

func validateConfig() {

Help wanted!

@tstromberg tstromberg added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed kind/support Categorizes issue or PR as a support question. labels Aug 8, 2019
@MaxKam
Copy link
Contributor

MaxKam commented Aug 10, 2019

@tstromberg I can take this

@tstromberg
Copy link
Contributor

tstromberg commented Nov 12, 2019

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%)

@max-nderitu
Copy link

max-nderitu commented Mar 27, 2020

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

@afbjorklund
Copy link
Collaborator

@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.

@gncchand
Copy link

gncchand commented Jun 3, 2020

Update Machine type : "n1-standard-2 (2 vCPUs, 7.5 GB memory)" in GCP instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants