Sunday, April 28, 2024

Set Kubelet Parameters Via A Configuration File | Kubernetes

The Future of Dockershim is cri-dockerd | Mirantis

https://www.mirantis.com/blog/the-future-of-dockershim-is-cri-dockerd/


Then start the service (systemd unit files are included), and add `--container-runtime=remote --container-runtime-endpoint=/var/run/cri-docker.sock` to your kubelet arguments, and you're ready to go.

The Future of Dockershim is cri-dockerd | Mirantis

Use cri-dockerd instead of dockershim where needed by afbjorklund

Support docker container runtime in Kubernetes 1.24 · Issue #13545 · kubernetes/minikube · GitHub

Connecting via unix-socket to the docker-daemon - Docker Desktop for Mac. Z CLi

Container Runtimes | Kubernetes

Debugging Kubernetes nodes with crictl | Kubernetes

Support docker container runtime in Kubernetes 1.24 · Issue #13545 · kubernetes/minikube · systemctl cat cri-docker.socket

https://github.com/kubernetes/minikube/issues/13545


stat: cannot stat '/var/run/cri-dockerd.sock': No such file or directory

docker@minikube:~$ systemctl cat cri-docker.socket 

# /lib/systemd/system/cri-docker.socket



Integration Test Flake Rates | minikube.... docker, kvm, crio, containerd...

crictl. Upgrade cri-dockerd to fix the socket path by afbjorklund · Pull Request #13563 · kubernetes/minikube

https://github.com/kubernetes/minikube/pull/13563



$ minikube ssh -- sudo crictl version  Version:  0.1.0  RuntimeName:  docker  RuntimeVersion:  20.10.12  RuntimeApiVersion:  1.41.0  $ minikube ssh -- sudo crictl --version  crictl version v1.21.0
$ minikube ssh -- sudo cri-dockerd --version  cri-dockerd 0.2.0 (a4d1895)



Support docker container runtime in Kubernetes 1.24 · Issue #13545 · kubernetes/minikube $DOCKER_HOST

https://github.com/kubernetes/minikube/issues/13545


For some reason, after updating the macOS docker version, it doesn't create the /var/run/docker.sock file anymore. Creating a symlink is a hacky way and not recommended.

My solution is to set the $DOCKER_HOST environment variable:

export DOCKER_HOST=unix:///Users/<USER>/.docker/run/docker.sock  

or add it to .zshrc:

echo "export DOCKER_HOST=unix:///Users/<USER>/.docker/run/docker.sock" >> ~/.zshrc  

or add it in the IntelliJ run configuration.


Docker socket is not found. :: docker context ls

https://stackoverflow.com/questions/74173489/docker-socket-is-not-found-while-using-intellij-idea-and-docker-desktop-on-macos


You can see the current contexts in your machine by running 


docker context ls


which should produce an output like:

NAME                TYPE    DESCRIPTION                               DOCKER ENDPOINT                                KUBERNETES ENDPOINT                                 ORCHESTRATOR  default             moby    Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                    https://kubernetes.docker.internal:6443 (default)   swarm  desktop-linux *     moby                                              unix:///Users/<USER>/.docker/run/docker.sock    

As a workaround that will allow IntelliJ to connect to Docker you can use the TCP Socket checkbox and put in the Engine API URL the value that appears under DOCKER ENDPOINT in the active context.

The case for this example will be: 


unix:///Users/<USER>/.docker/run/docker.sock


 

Docker socket is not found while using Intellij IDEA and Docker desktop on MacOS - Stack Overflow

[BUG] docker endpoint for "default" not found · Issue #9956 · docker/compose · GitHub

https://github.com/docker/compose/issues/9956#issuecomment-1294483086




"docker endpoint for default not found"
"--container-runtime-endpoint=unix:///var/run/cri-dockerd.sock"
Kubelet how to fix problem 
"run docker-compose on minikube"