有没有人能让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
如果需要,我很乐意改用Fedora31或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"
现在这些cmd挂起了.
[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
发布于 2020-04-16 18:22:11
首先,确保您正确地配置了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
发布于 2020-12-18 01:20:41
根据记录,使用来自minikube podman docs的指令,它似乎可以在Linux Mint20(基于Ubuntu20.04)上工作
❯ minikube version
minikube version: v1.15.1
commit: 23f40a012abb52eff365ff99a709501a61ac5876
❯ minikube config view
- container-runtime: cri-o
- driver: podman
❯ minikube start
? minikube v1.15.1 on Linuxmint 20
❗ Using podman 2 is not supported yet. your version is "2.2.1". minikube might not work. use at your own risk.
✨ Using the podman (experimental) driver based on user configuration
? Starting control plane node minikube in cluster minikube
? Creating podman container (CPUs=2, Memory=4000MB) ...
❗ Unable to create dedicated network, this might result in cluster IP change after restart: podman network not implemented yet
? Preparing Kubernetes v1.19.4 on CRI-O 1.18.4 ...
? Configuring CNI (Container Networking Interface) ...
? Verifying Kubernetes components...
? Enabled addons: storage-provisioner, default-storageclass
? Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
❯ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
❯ kubectl run httpd --image=httpd
pod/httpd created
❯ kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready master 8m46s v1.19.4
❯ kubectl get pods
NAME READY STATUS RESTARTS AGE
httpd 1/1 Running 0 2m5s
https://stackoverflow.com/questions/61144060
复制相似问题