Table of Contents

Calico CNI

Introduced in the mid-2010s, Calico CNI (Container Network Interface) is an open-source networking and network security solution for containers, designed to support a wide range of container orchestration systems such as Kubernetes, Docker, and Rancher. Calico uses a pure IP networking approach for inter-container communications, which simplifies network management and enhances performance. It provides high scalability and efficiency by employing advanced IP routing, as well as fine-grained network policies for security, allowing administrators to control the flow of traffic based on namespaces, labels, and other criteria. Calico is distinguished by its ability to integrate with native cloud networking environments, making it a preferred choice for deploying scalable and secure containerized applications across on-premises data centers and public cloud platforms.

Calico

Calico is an open-source networking and network security solution designed for containers, virtual machines (VMs), and native host-based workloads. It offers a flexible and scalable approach to networking, enabling communication between containers and VMs across various platforms, including Kubernetes, OpenShift, Docker EE, OpenStack, and bare-metal services.

Key Features

Benefits

Code Examples

While Calico's primary configuration is through Kubernetes manifests and network policies, here's a simplified example of a NetworkPolicy definition:

```yaml apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata:

 name: allow-ingress-from-frontend
spec:
 podSelector:
   matchLabels:
     app: backend
 policyTypes:
 - Ingress
 ingress:
 - from:
   - podSelector:
       matchLabels:
         app: frontend
```

This policy allows ingress traffic to pods with the label `app: backend` only from pods with the label `app: frontend`.

Additional Resources