Skip to content

Move podman CNI config to different directory #11194

Open
@afbjorklund

Description

@afbjorklund

Kubernetes has a problem to handle third-party packages using CNI:

kubernetes/kubernetes#100309

Any installed config files will be used if present, in alphabetical order...
There is no way to select a specific config, especially one appearing later.

Since containers/podman#2370

Podman now has a configuration option to select a different directory:

/etc/containers/containers.conf

# The network table contains settings pertaining to the management of
# CNI plugins.

[network]

# Path to directory where CNI plugin binaries are located.
#
# cni_plugin_dirs = ["/usr/libexec/cni"]

# The network name of the default CNI network to attach pods to.
# default_network = "podman"

# Path to the directory where CNI configuration files are located.
#
# network_config_dir = "/etc/cni/net.d/"

network.network_config_dir

Changing this to a different directory, is the easiest way to fix kubeadm.

/etc/cni/net.d/87-podman-bridge.conflist

Another option would be to delete the file, and use --network=host.
But that would require any podman users to change, breaking some.

Error: error configuring network namespace for container f56bea2ef5b840309583da9c1b18b416f94c750d9b30a0036e02a49622b653e6: CNI network "podman" not found

Podman has the opposite side, they don't normally install Kubernetes.
So there is no incentive to change the podman default cni packaging.

# Path to the directory where CNI configuration files are located.
#
# network_config_dir = "/etc/cni/net.d/"
network_config_dir = "/etc/containers/net.d/"

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions