Description
Kubernetes has a problem to handle third-party packages using CNI:
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/"