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

Allow running docker driver with force on 1 CPU #15611

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Jan 8, 2023

For running on killercoda

Closes #15608


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

minikube start --driver=docker

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 8, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2023
@medyagh
Copy link
Member

medyagh commented Jan 11, 2023

@spowelljr
Copy link
Member

@afbjorklund does this replace the other PR ? https://github.com/kubernetes/minikube/pull/15610/files

One is for none driver and one is for docker driver

@afbjorklund
Copy link
Collaborator Author

I'm not sure why it was checked in two (or three?) different places

@spowelljr
Copy link
Member

This doesn't seem to be working for me

$ ./out/minikube start --driver docker --force
😄  minikube v1.28.0 on Darwin 13.1 (arm64)
❗  minikube skips various validations when --force is supplied; this may lead to unexpected behavior
✨  Using the docker driver based on user configuration
- Ensure your docker daemon has access to enough CPU/memory resources.
- Docs https://docs.docker.com/docker-for-mac/#resources

⛔  Requested cpu count 2 is greater than the available cpus of 1


⛔  Docker Desktop has less than 2 CPUs configured, but Kubernetes requires at least 2 to be available
💡  Suggestion: 

    1. Click on "Docker for Desktop" menu icon
    2. Click "Preferences"
    3. Click "Resources"
    4. Increase "CPUs" slider bar to 2 or higher
    5. Click "Apply & Restart"
📘  Documentation: https://docs.docker.com/docker-for-mac/#resources

📌  Using Docker Desktop driver with root privileges
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🔥  Creating docker container (CPUs=2, Memory=4000MB) ...

⛔  Exiting due to RSRC_DOCKER_CORES: Docker Desktop has less than 2 CPUs configured, but Kubernetes requires at least 2 to be available
💡  Suggestion: 

    1. Click on "Docker for Desktop" menu icon
    2. Click "Preferences"
    3. Click "Resources"
    4. Increase "CPUs" slider bar to 2 or higher
    5. Click "Apply & Restart"
📘  Documentation: https://docs.docker.com/docker-for-mac/#resources

@spowelljr
Copy link
Member

Oh, this is only for Linux specifically?

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Jan 12, 2023

It was only meant for killercoda "ubuntu"

But Docker Desktop has 2 vCPU by default, right ?

CPUs. By default, Docker Desktop is set to use half the number of processors available on the host machine.

It does need the other patch (#15610), for kubeadm

@afbjorklund
Copy link
Collaborator Author

It can run kind today, since they disable the "preflight" phase

@spowelljr
Copy link
Member

It was only meant for killercoda "ubuntu"

But Docker Desktop has 2 vCPU by default, right ?

CPUs. By default, Docker Desktop is set to use half the number of processors available on the host machine.

It does need the other patch, for kubeadm

I just tried setting it to one core for testing purposes

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund, medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [afbjorklund,medyagh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@medyagh medyagh merged commit 1b12446 into kubernetes:master Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to override NumCPU with --force for docker (engine) driver
4 participants