Kubernetes wont start task due to lack of CPU despite my system having plenty of it?

Viewed 22

As the title says, when I look at kubectl describe pods -n nginx-ingress I am told that the it cannot start up the pods I need due to Insufficient CPU. However, my system has plenty of CPU to offer, as shown in this image: Only 21% Utilization.

Note: I am using kubeadm to self host on a Cloud VM

I also cheked the CPU of the node in kubectl, which may be a hint about the issue:

Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests     Limits
  --------           --------     ------
  cpu                950m (95%)   100m (10%)
  memory             290Mi (15%)  390Mi (20%)
  ephemeral-storage  0 (0%)       0 (0%)
  hugepages-1Gi      0 (0%)       0 (0%)
  hugepages-2Mi      0 (0%)       0 (0%)
Events:              <none>

Thanks for any help, RuboGubo

1 Answers

minikube uses a fixed amount of CPU which is configured when setting up minikube. By default '2' CPUs are allocated for minikube, limiting your maximum requests to 2 (2000m) CPUs.

You can change this when starting minikube with the switch --cpus and specifying either the number of CPUs/cores to allocate or useing max to utilize all CPUs of the host.

More information about possible minikube settings can be obtained by running minikube --help.

Related