我已经在NixOS 22.05上安装了Kubernetes和Minikube。但我无法启动Kubernetes:
minikube start --driver=docker
字符串
输出量:
😄 minikube v1.25.2 on Nixos 22.05 (Quokka)
▪ MINIKUBE_WANTUPDATENOTIFICATION=false
✨ Using the docker driver based on user configuration
💣 Exiting due to PROVIDER_DOCKER_NEWGRP: "docker version --format -" exit status 1: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version": dial unix /var/run/docker.sock: connect: permission denied
💡 Suggestion: Add your user to the 'docker' group: 'sudo usermod -aG docker $USER && newgrp docker'
📘 Documentation: https://docs.docker.com/engine/install/linux-postinstall/
型
我按照建议将我添加到组docker:
sudo groupadd docker
型
输出量:
[sudo] password for t:
groupadd: group 'docker' already exists
型
还有:
sudo gpasswd -a $USER docker
型
输出量:
Adding user t to group docker
型
还有:
newgrp docker
型
但它仍然不起作用:
minikube start --driver=docker
型
输出量:
😄 minikube v1.25.2 on Nixos 22.05 (Quokka)
▪ MINIKUBE_WANTUPDATENOTIFICATION=false
✨ Using the docker driver based on user configuration
💣 Exiting due to PROVIDER_DOCKER_NEWGRP: "docker version --format -" exit status 1: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version": dial unix /var/run/docker.sock: connect: permission denied
💡 Suggestion: Add your user to the 'docker' group: 'sudo usermod -aG docker $USER && newgrp docker'
📘 Documentation: https://docs.docker.com/engine/install/linux-postinstall/
型
我该怎么办?
1条答案
按热度按时间vqlkdk9b1#
我试着在很多方面都一样。
个字符
什么都不管用。。但最后,运行下面的命令工作.
型
这解决了我的问题。