How can I configure NetworkManager to ignore Kubernetes Interfaces?

This document (000019959) is provided subject to the disclaimer at the end of this document.

Situation

Question

How can I configure NetworkManager to ignore Kubernetes interfaces managed by a CNI like Calico?

Pre-requisites

  • A Kubernetes cluster with nodes using NetworkManager

Answer

NetworkManager is a tool in some operating systems distributions to make the management of network interfaces easier. Kubernetes will typically take the provisioned interfaces and create other virtual interfaces via the Container Network Interface (CNI). While NetworkManager may make the operation and configuration of the default interfaces easier, it can interfere with the Kubernetes management, and create problems when troubleshooting.

Because many modern Linux and other Unix systems have NetworkManager enabled by default, there is a configuration available to have it avoid or ignore the Kubernetes interfaces.

This example assumes the Calico CNI is used.

  1. Create the following file, if it does not already exist.
/etc/NetworkManager/conf.d/calico.conf
  1. Give it the following content:
[keyfile]
unmanaged-devices=interface-name:cali*;interface-name:tunl*;interface-name:vxlan.calico
  1. Restart the NetworkManager service, if necessary.
sudo systemctl restart NetworkManager

Other options are available, for example, completely disabling NetworkManager, but this may not be viable in all use-cases. If other CNI interfaces are required, create another file or add to the list above, for example flannel*.

Add the configuration to any automation or images used in node provisioning wherever NetworkManager may be used.

Further Reading

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019959
  • Creation Date: 06-May-2021
  • Modified Date:06-May-2021
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center