Score:0

What is the equivalent command of "minikube start --memory 5120 --cpus=4" for "Kind"?

pl flag

Here in Cassandra deployment instruction, it says:

Caution:

Minikube defaults to 2048MB of memory and 2 CPU. Running Minikube with the default resource configuration results in insufficient resource errors during this tutorial. To avoid these errors, start Minikube with the following settings:

minikube start --memory 5120 --cpus=4

But I don't know what is the equivalent command if I use Kind instead of minikube?

I also like to know if I want to set these settings permanently for my Kind cluster, how should I do that?

Score:1
qa flag

Kind is a tool designed to create local test and CI environments for kubernetes. This uses docker and kubeadm as a backend. Since its development is still in progress, kind also supports docker and kubectl commands for cluster management and if you are trying to set any memory value or want to change default memory limit for your docker containers it can be done using docker commands and kubectl commands. Kind currently has native controls over networking and load balancing alone(as these are the only details available in official documentation).

Score:1
cn flag

Short answer: There is no equivalent in kind to achieve what you want. However, kind does not enforce any memory/cpu constraint by default, so unless you really want to do that, you can skip below explanation.

There is no equivalent command for kind to enforce cpu/memory limits as it is done by minikube.

This said, minikube enforces resource limits by limiting the amount of resources of the minikube docker container (by default it limits to 25% memory usage, and 2 CPUs).

You can verify this limitation doing the following:

# docker inspect minikube --format="{{ .HostConfig.NanoCpus }}"
2000000000 # means 2 CPUs
# docker inspect minikube --format="{{ .HostConfig.Memory }}"
16672358400 # 16GB of RAM, ran on a host with 64GB of RAM

On the contrary, kind does not enforce any limitation on the deployed docker containers. You can verify it by running above commands on the Docker containers deployed by kind.

With some (overkill) reverse engineering you can figure out the docker run command used by kind to spawn the containers:

# docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro assaflavie/runlike kind-worker
docker run --name=kind-worker --hostname=kind-worker --env=container=docker --env=KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --volume=/lib/modules:/lib/modules:ro --volume=/var --network=kind --privileged --workdir=/ --restart=on-failure:1 --label='io.x-k8s.kind.role=worker' --label='io.x-k8s.kind.cluster=kind' --runtime=runc --detach=true -t kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1

Therefore you can re-run the kind worker container setting up whatever cpu/memory limitation you may want. https://docs.docker.com/config/containers/resource_constraints/

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.