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

how to set the container memory which launched by kind ? #3341

Closed
researchlab opened this issue Aug 31, 2023 · 5 comments
Closed

how to set the container memory which launched by kind ? #3341

researchlab opened this issue Aug 31, 2023 · 5 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@researchlab
Copy link

Hello, I need help, can someone help me ? thx so much

My CASE
Macbook M2 with 64GB of memory,

on this laptop, deployed a k8s cluster by the kind tool , using the following cmd,

kind create cluster --image=kindest/node:v1.27.2 --name=httpd

then, I obtained a k8s cluster named httpd which running in a docker container httpd-control-plane

then, execute the following command inside the httpd-control-plane container,

cat /proc/meminfo |grep MemTotal
MemTotal: 8039756 kB

As shown above, the default container memory size is 8039756 kB, this will limit the maximum memory size of k8s node memory capacity to this size ( using the cmd kubectl describe node, k8s node memory capcity info )

MY PROBLEM
How to set MemTotal size of the container httpd-control-plane ? which can make the k8s node memory capacity to be large, such as 32g of memory capacity, in some experimental scenarios.

is there have a yaml of config examples or solutions ? thx so much

@researchlab researchlab added the kind/support Categorizes issue or PR as a support question. label Aug 31, 2023
@aojea
Copy link
Contributor

aojea commented Aug 31, 2023

This is a dup of #2805 and #877 (comment)

@researchlab
Copy link
Author

@aojea okay, thank you for your answer and solutions .

but the #2805 and #877 (comment) , this topics are all about how to limiting the host resources,

in my scenario , need more capcity, not to limit it.

actually, the docker container launched by kind , just have 8Gi default Memory size , far away less than 64G of the host memory size,

@researchlab
Copy link
Author

/close

@BenTheElder
Copy link
Member

The amount of resources available to the docker desktop VM is controlled by the settings for that application, not kind.

@researchlab
Copy link
Author

@BenTheElder thank you for your pretty answer and solutions, which is really pretty useful to me.

Yes, It is indeed using Docker Desktop as the container engine on my mbp, Now, I found all I need to do is adjust the settings of the Docker Desktop

Actually , I found the kinds docs (https://kind.sigs.k8s.io/docs/user/quick-start/, chapter Settings for Docker Desktop ) has already metioned it.

thx so much again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

3 participants