diff --git a/pkg/minikube/cni/flannel.go b/pkg/minikube/cni/flannel.go index fea691e6facd..c5b29ce7d83a 100644 --- a/pkg/minikube/cni/flannel.go +++ b/pkg/minikube/cni/flannel.go @@ -18,9 +18,12 @@ package cni import ( "os/exec" + "path/filepath" + "github.com/golang/glog" "github.com/pkg/errors" "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/driver" ) // From https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml @@ -646,6 +649,14 @@ func (c Flannel) Apply(r Runner) error { return errors.Wrap(err, "required 'portmap' CNI plug-in not found") } + if driver.IsKIC(c.cc.Driver) { + conflict := "/etc/cni/net.d/100-crio-bridge.conf" + _, err := r.RunCmd(exec.Command("sudo", "mv", conflict, filepath.Join(filepath.Dir(conflict), "DISABLED-"+filepath.Base(conflict)))) + if err != nil { + glog.Errorf("unable to disable %s: %v", conflict, err) + } + } + return applyManifest(c.cc, r, manifestAsset([]byte(flannelTmpl))) }