skip to Main Content

Has anyone been able to get minikube to work with –driver=podman?

I have tried Fedora 30,31, CentOS7,8, RHEL7,8 all with the same results.

# # 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

It feels like cri-o needs to be installed and running. I have done that but still get the same results.

Update 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

I’m happy to flip over to Fedora 31 or CentOS if needed.

Update 2: Set selinux to permissive with same failure.

Update 3: Per suggestion from @vbatts the minikube start cmd is pretty close to working. It seems crio sock lives in /var/run/crio/ so I updated that path. Now I’m getting the following…

[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"

And now these cmds hang ….

[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

2

Answers


  1. Firstly make sure that you configured Minikube properly: minikube-configuration.

    You have to specify network plugin and enable it, also it is important to add image-service endpoint for runtime: /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
    

    Please take a look: minikube-crio-podman, crio-minikube.

    Login or Signup to reply.
  2. For the record, it seems to work on Linux Mint 20 (based on Ubuntu 20.04) using the instructions from minikube podman docs:

    ❯ 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search