Member-only story

About Kubernetes’ CNI Plugins

Luc Juggery
Better Programming
Published in
10 min readJan 12, 2021

When setting up a Kubernetes cluster, the installation of a network plugin is mandatory for the cluster to be operational. To keep things simple, the role of a network plugin is to set up the network connectivity so Pods running on different nodes in the cluster can communicate with each other. Depending upon the plugin, different network solutions can be provided: overlay (vxlan, IP-in-IP) or non-overlay.

To simplify the usage of a network plugin, Kubernetes exposes the Container Network Interface (aka CNI) so any network plugin that implements this interface can be used.

Kubernetes also allows the usage of kubenet, a non-CNI network plugin. This one is basic and has a limited set of functionalities.

If we use a managed cluster (there are plenty out there: Amazon EKS, Google GKE, DigitalOcean DOKS, OVH Managed Kubernetes, Scaleway Kapsule) the CNI network plugin has already been selected from among the many existing solutions and installed for us. But if we install our own cluster, we need to select and install the plugin manually. Some external tools, like Rancher, make the process really easy, though.

In this article, we will present CNI and see how a network plugin is installed, configured, and used. We will follow the steps below:

  • A quick introduction to Container Network Interface (CNI)
  • Set up a k0s cluster with the Calico plugin
  • Set up a k0s cluster with the Weave Net plugin

CNI — A Quick Introduction

Container Network Interface logo

What is a CNI ?

According to the official definition,

“CNI (Container Network Interface), a Cloud Native Computing Foundation project, consists of a specification and libraries for writing plugins to configure network interfaces in Linux containers, along with a number of supported plugins. CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted.”

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Luc Juggery
Luc Juggery

Written by Luc Juggery

Docker & Kubernetes trainer (CKA / CKAD), 中文学生, Learning&Sharing

Responses (1)

Write a response

Thanks for the mention ;)