Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Uninstall Flannel #2063

Open
RMadsenG opened this issue Sep 20, 2024 · 1 comment
Open

Can't Uninstall Flannel #2063

RMadsenG opened this issue Sep 20, 2024 · 1 comment

Comments

@RMadsenG
Copy link

RMadsenG commented Sep 20, 2024

Expected Behavior

kubectl delete -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
Should cleanly uninstall flannel

Current Behavior

After rebooting a Node pods are stuck in container creating with this error

Warning  FailedCreatePodSandBox  1s    kubelet  (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_coredns-7c65d6cfc9-prlbd_kube-system_335070f1-cc11-4569-bf97-e2ba7d480ee2_0(a1e1f9e2930f82a9d88d50b6245a88310d610bd04229384a24b354d172c2030e): error adding pod kube-system_coredns-7c65d6cfc9-prlbd to CNI network "cbr0": plugin type="flannel" failed (add): loadFlannelSubnetEnv failed: open /run/flannel/subnet.env: no such file or directory

Possible Solution

Is there Documentation on how to properly remove flannel from a cluster?

Steps to Reproduce (for bugs)

  1. kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
  2. Create A Deployment. Pod comes up fine
  3. kubectl delete -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
  4. Reboot Node
  5. kubectl describe pod
    1. ContainerCreating with error above

Context

I am trying to uninstall flannel and install a CNI that supports NetworkPolicies (kube-router)
Do to the wording of the error, it looks like flannel was not completely uninstalled with the kubectl command.
plugin type="flannel" failed (add): loadFlannelSubnetEnv failed: open /run/flannel/subnet.env: no such file or directory

Your Environment

kubeadm version: &version.Info{Major:"1", Minor:"31", GitVersion:"v1.31.1", GitCommit:"948afe5ca072329a73c8e79ed5938717a5cb3d21", GitTreeState:"clean", BuildDate:"2024-09-11T21:26:49Z", GoVersion:"go1.22.6", Compiler:"gc", Platform:"linux/amd64"}

Launched with kubeadm init --pod-network-cidr=10.244.0.0/16

@RMadsenG RMadsenG closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2024
@RMadsenG RMadsenG reopened this Sep 20, 2024
@rbrtbnfgl
Copy link
Contributor

rbrtbnfgl commented Oct 14, 2024

you should delete also the CNI config /etc/cni/net.d/10-flannel.conflist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants