minikube安装不成功,一直卡在 minikube start上,pull base images

在路上 发表于: 2022-07-19   最后更新时间: 2022-07-19 16:58:02   3,128 游览

screenshot

screenshot

Pulling base image ...
    > index.docker.io/kicbase/sta...: 0 B [________________________] ?% ? p/s ?^C

这步要卡很久

Preparing Kubernetes v1.24.1 on Docker 20.10.17 ...-

这步也卡

发表于 2022-07-19
添加评论

这个问题解决了吗?最后使用的是那个命令啊啊!!同样的问题,

加上 --image-repository 选项,不然 minikube 会到 k8s.gcr.io 上拖取镜像:

minikube start --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers' --registry-mirror='https://dockerhub.azk8s.cn'
在路上 -> 半兽人 1年前

我也是加了这个的

--registry-mirror=https://kfwkfulq.mirror.aliyuncs.com

我用了你上面这个命令,还是不行,也是卡在那了

半兽人 -> 在路上 1年前

那在换个源试试:

minikube start --image-repository registry.aliyuncs.com/google_containers
在路上 -> 半兽人 1年前

我完整的命令是这样的

minikube start --force --image-mirror-country=cn --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers --iso-url=https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.7.3.iso --registry-mirror=https://kfwkfulq.mirror.aliyuncs.com

用的centos8

半兽人 -> 在路上 1年前
systemctl status kubelet

你应该已经不是镜像拉取的问题了,执行下这个看看,看看报什么错。

在路上 -> 半兽人 1年前
[root@VM-16-11-centos ~]# systemctl status kubelet
Unit kubelet.service could not be found.

我刚换了一个阿里的源,镜像也拉取成功了, 后面还是不行

[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

Unfortunately, an error has occurred:
        timed out waiting for the condition

This error is likely caused by:
        - The kubelet is not running
        - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
        - 'systemctl status kubelet'
        - 'journalctl -xeu kubelet'

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all running Kubernetes containers by using crictl:
        - 'crictl --runtime-endpoint unix:///var/run/cri-dockerd.sock ps -a | grep kube | grep -v pause'
        Once you have found the failing container, you can inspect its logs with:
        - 'crictl --runtime-endpoint unix:///var/run/cri-dockerd.sock logs CONTAINERID'

stderr:
W0719 09:27:36.346179    2674 initconfiguration.go:120] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/cri-dockerd.sock". Please update your configuration!
        [WARNING FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
        [WARNING SystemVerification]: failed to parse kernel config: unable to load kernel module: "configs", output: "modprobe: FATAL: Module configs not found in directory /lib/modules/3.10.0-1160.62.1.el7.x86_64\n", err: exit status 1
        [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher

💡  Suggestion: Check output of 'journalctl -xeu kubelet', try passing --extra-config=kubelet.cgroup-driver=systemd to minikube start
🍿  Related issue: https://github.com/kubernetes/minikube/issues/4172
半兽人 -> 在路上 1年前

你CRI用的是docker吗?如果是,执行下面的命令:

minikube start --driver=docker

设置docker为默认驱动:

minikube config set driver docker

另外,如果以上启动不成功,根据错误提示,你需要在追加一个默认cgroup驱动,如下:

minikube start --extra-config=kubelet.cgroup-driver=systemd
在路上 -> 半兽人 1年前

我这个是腾讯云的轻应用服务器,这个有影响不

半兽人 -> 在路上 1年前

报什么错,解决什么错,一步一步来就行了。

你的答案

查看kubernetes相关的其他问题或提一个您自己的问题