gpt4 book ai didi

kubernetes - Minikube driver=podman,有没有人能够让它工作?

转载 作者:行者123 更新时间:2023-12-04 19:30:54 36 4
gpt4 key购买 nike

有没有人能让 minikube 与 --driver=podman 一起工作?

我试过 Fedora 30,31, CentOS7,8, RHEL7,8,结果都一样。

# # minikube start --driver=podman --container-runtime=cri-o --cri-socket=/var/run/crio/crio.sock
😄 minikube v1.9.2 on Fedora 30 (vbox/amd64)
✨ Using the podman (experimental) driver based on user configuration
👍 Starting control plane node m01 in cluster minikube
🚜 Pulling base image ...
E0409 16:50:17.654306 30363 cache.go:114] Error downloading kic artifacts: error loading image: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
🤦 StartHost failed, but will try again: creating host: create host timed out in 120.000000 seconds
🔄 Restarting existing podman container for "minikube" ...

💣 Failed to start podman container. "minikube start" may fix it.: driver start: get kic state: "podman inspect -f {{.State.Status}} minikube" failed: exit status 125: Error: error getting image "minikube": unable to find a name and tag match for minikube in repotags: no such image


😿 minikube is exiting due to an error. If the above message is not useful, open an issue:
👉 https://github.com/kubernetes/minikube/issues/new/choose

感觉好像需要安装并运行 cri-o。我已经这样做了,但仍然得到相同的结果。

更新1:
# minikube start --driver=podman --container-runtime=cri-o --cri-socket=/var/run/crio/crio.sock --network-plugin=cni --enable-default-cni --v=1
😄 minikube v1.9.2 on Fedora 30
✨ Using the podman (experimental) driver based on user configuration
👍 Starting control plane node m01 in cluster minikube
🚜 Pulling base image ...
E0415 12:38:49.764297 24903 cache.go:114] Error downloading kic artifacts: error loading image: Error response from daemon: 404 page not found
🤦 StartHost failed, but will try again: creating host: create: creating: create kic node: create container: failed args: [run --cgroup-manager cgroupfs -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume /root/.minikube/machines/minikube/var:/var:exec --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8] output: Error: invalid option type "exec"
: exit status 125
🔄 Restarting existing podman container for "minikube" ...

💣 Failed to start podman container. "minikube start" may fix it.: driver start: get kic state: "podman inspect -f {{.State.Status}} minikube" failed: exit status 125: Error: error getting image "minikube": unable to find a name and tag match for minikube in repotags: no such image


😿 minikube is exiting due to an error. If the above message is not useful, open an issue:
👉 https://github.com/kubernetes/minikube/issues/new/choose

如果需要,我很乐意切换到 Fedora 31 或 CentOS。

更新 2:将 selinux 设置为 permissive 相同的失败。

更新 3:根据@vbatts 的建议,minikube start cmd 非常接近工作。似乎 crio sock 位于/var/run/crio/中,因此我更新了该路径。现在我得到以下...
[root@test ~]# minikube start     --network-plugin=cni     --enable-default-cni     --extra-config=kubelet.container-runtime=remote     --extra-config=kubelet.container-runtime-endpoint=/var/run/crio/crio.sock     --extra-config=kubelet.image-service-endpoint=/var/run/crio/crio.sock     --driver=podman
😄 minikube v1.9.2 on Fedora 30
✨ Using the podman (experimental) driver based on user configuration
👍 Starting control plane node m01 in cluster minikube
🚜 Pulling base image ...
💾 Downloading Kubernetes v1.18.0 preload ...
> preloaded-images-k8s-v2-v1.18.0-docker-overlay2-amd64.tar.lz4: 542.91 MiB
E0416 09:25:47.539842 1632 cache.go:114] Error downloading kic artifacts: error loading image: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
🐳 Preparing Kubernetes v1.18.0 on Docker 19.03.2 ...
▪ kubelet.container-runtime=remote
▪ kubelet.container-runtime-endpoint=/var/run/crio/crio.sock
▪ kubelet.image-service-endpoint=/var/run/crio/crio.sock
🌟 Enabling addons: default-storageclass, storage-provisioner
🏄 Done! kubectl is now configured to use "minikube"


现在这些 cmds 挂起....
[root@test ~]# kubectl get nodes
^C

[root@test ~]# minikube status
E0416 09:30:30.741722 10795 api_server.go:169] unable to get freezer state: cat: /sys/fs/cgroup/freezer/libpod_parent/libpod-16c8b830eb8e4cb0baa576e98d8343fdab1dacea8db4a6a6d84bbb8fbc7c0f92/kubepods/burstable/pod7dd7509c8b924aaaebd697cbbc2aff89/aa2abeea32b056907d33590baf5fc0c213b718cc8b16b548f251326675f32337/freezer.state: No such file or directory
Error: non zero exit code: 1: OCI runtime error
^C

最佳答案

首先确保你配置了Minikube正确:minikube-configuration .

您必须指定网络插件并启用它,添加运行时的图像服务端点也很重要:/var/run/crio/crio.sock :

$ sudo minikube start \
--network-plugin=cni \
--enable-default-cni \
--extra-config=kubelet.container-runtime=remote \
--extra-config=kubelet.container-runtime-endpoint=/var/run/crio.sock \
--extra-config=kubelet.image-service-endpoint=/var/run/crio.sock \
--driver=podman

请看: minikube-crio-podman , crio-minikube .

关于kubernetes - Minikube driver=podman,有没有人能够让它工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61144060/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com