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

Possibility to override NumCPU with force, for running in killercoda #15609

Closed
afbjorklund opened this issue Jan 8, 2023 · 2 comments · Fixed by #15610
Closed

Possibility to override NumCPU with force, for running in killercoda #15609

afbjorklund opened this issue Jan 8, 2023 · 2 comments · Fixed by #15610
Labels
co/none-driver kind/feature Categorizes issue or PR as related to a new feature. os/linux

Comments

@afbjorklund
Copy link
Collaborator

afbjorklund commented Jan 8, 2023

The virtual machines in killercoda only have 1 vCPU, which makes minikube fail.

https://killercoda.com/examples/scenario/ubuntu-simple

ubuntu $ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 26.1M  100 26.1M    0     0  86.9M      0 --:--:-- --:--:-- --:--:-- 86.9M
ubuntu $ sudo dpkg -i minikube_latest_amd64.deb
Selecting previously unselected package minikube.
(Reading database ... 72785 files and directories currently installed.)
Preparing to unpack minikube_latest_amd64.deb ...
Unpacking minikube (1.28.0-0) ...
Setting up minikube (1.28.0-0) ...
ubuntu $ minikube start
😄  minikube v1.28.0 on Ubuntu 20.04 (amd64)
✨  Automatically selected the docker driver. Other choices: podman, ssh, none

⛔  Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1

ubuntu $ minikube start --driver=none
😄  minikube v1.28.0 on Ubuntu 20.04 (amd64)
✨  Using the none driver based on user configuration

⛔  Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1

But they are running kubeadm , so it should be possible to override this check...

https://killercoda.com/examples/scenario/kubernetes-1node

controlplane $ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.3", GitCommit:"434bfd82814af038ad94d62ebe59b133fcb50506", GitTreeState:"clean", BuildDate:"2022-10-12T10:57:26Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.3", GitCommit:"434bfd82814af038ad94d62ebe59b133fcb50506", GitTreeState:"clean", BuildDate:"2022-10-12T10:49:09Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}
controlplane $ kubectl describe node | grep -A5 Capacity
Capacity:
  cpu:                1
  ephemeral-storage:  20134592Ki
  hugepages-2Mi:      0
  memory:             2030940Ki
  pods:               110

It needs --ignore-preflight-errors=NumCPU, or kubeadm will fail...

Actually only on the control plane, so workers might be more relaxed.

@afbjorklund afbjorklund added os/linux kind/feature Categorizes issue or PR as related to a new feature. labels Jan 8, 2023
@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Jan 8, 2023

They changed the default PS1, to not scare people. That's why the colors are off...

~/.bashrc

export PS1="\h $ "
controlplane $ kubectl version

It is supposed to read: root@controlplane #, if using the normal Debian shell prompt.

root@controlplane # kubectl version
root@ubuntu:~# whoami
root
root@ubuntu:~# pwd
/root

@afbjorklund
Copy link
Collaborator Author

Workaround:

minikube start --driver=none --force --extra-config=kubeadm.skip-phases=preflight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver kind/feature Categorizes issue or PR as related to a new feature. os/linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant