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

custom cni (disable flannel) #22

Open
mkmik opened this issue Dec 14, 2022 · 4 comments
Open

custom cni (disable flannel) #22

mkmik opened this issue Dec 14, 2022 · 4 comments

Comments

@mkmik
Copy link
Contributor

mkmik commented Dec 14, 2022

According to https://docs.k3s.io/installation/network-options#custom-cni if we want to install a custom CNI, we need to pass --flannel-backend=none.

In order to do that, we need to surface the config in K3sServerConfig and in the relevant CRDs

type K3sServerConfig struct {
	DisableCloudController    bool     `json:"disable-cloud-controller,omitempty"`
	KubeAPIServerArgs         []string `json:"kube-apiserver-arg,omitempty"`
	KubeControllerManagerArgs []string `json:"kube-controller-manager-arg,omitempty"`
	TLSSan                    []string `json:"tls-san,omitempty"`
....
}
@zawachte
Copy link
Collaborator

sgtm

@ekarlso
Copy link
Contributor

ekarlso commented Aug 14, 2023

You can do this via the files section pretty easily:

    files:
    - content: |
        flannel-backend: none
      owner: root:root
      path: /etc/rancher/k3s/config.yaml.d/disable-flannel.yaml

@ekarlso
Copy link
Contributor

ekarlso commented Aug 17, 2023

I think we could probably simplify this though with a property so that we can drive these things a bit easier then having to hack it together via the files section.

flannelBackend: None
disableNetworkPolicy: true
disableKubeProxy: true

@dberardo-com
Copy link

is it possible to disable flannel on an already existing k3s cluster ? and then install another plugin, like calico ?

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

4 participants