About Calico
I’m going to talk about my comprehension about Calico.
In addition, I’m only talking about cases upon Kubernetes
.
First of all,
Clico
is a project, not a single software.Calico has variety of options for networking implementing. Whether in public cloud or on-prem. Whether L2 network or L3 network or even your environment doesn’t allow either L3 peering or L2 connectivity.
For detailed list of Calico networking options, please refer to this page.
Standardized Glossary
- Networking Option: An option is a combination of
networking backend
,CNI
,network policy
. - network backend: The bottom implementation of network. Which are: IPIP, VXLAN, BGP. IPIP and VXLAN are overlay networking, which is under encapsulation. BGP is based on IP routing.
- network policy: Rules that enforce which network traffic that is allowed or denied in the network.
The three things above are all logical concept, not specific software.
So, if you see something described as “using Flannel as networking backend, Calico as network policy”, don’t get confused. Every option is listed on Calico’s official site.
- workload: A workload is a container or VM that Calico handles the virtual networking for. In Kubernetes, workloads are pods.
- workload endpoint: A workload endpoint is the virtual network interface a workload uses to connect to the Calico network.
Quick Glance of Architecture
Calico is a modularized
system which is made up of the following independent components:
- Felix
- The Orchestrator plugin
- etcd
- BIRD
- BGP Router Reflector
Let’s take a look at official architecture diagram.:arrow_down:
To take a look of detail, please refer to this official document – Calico architecture
Core Concept
- Assigns IP addresses to pods using Calico’s IP address management (IPAM)
- Programs the local node’s routing table
- Distributes routes to other nodes and network devices
As we can see at the About Calico page, Calico is a SDN, which allows system and network administrators to use their familiar tools for troubleshooting.
So, I’m going to give it a try to my first goal – to let microservice endpoint communicating directly with other endpoint which is in a Kubernetes cluster.