Experience of LFX Mentorship for CNCF: Antrea

Kanha gupta
4 min readMay 20, 2024

--

Hi, I am Kanha Gupta and I’ve been selected for LFX Mentorship 2024 Term-1 for CNCF- Antrea project.

I was very excited to start this journey! and now here I am, writing this blog describing my experience, outputs and learning throughout the journey of these 3 months.

Connect with me on Linkedin, Github and Email :)

What is LFX Mentorship ?

It is a Mentorship program hosted by The Linux Foundation and it provides opportunities for mentees to work on an open source project. It helps to connect mentees with mentors of the project who are basically experienced project contributors and maintainers of the project and each open source project participating in this mentorship program is responsible for developing the structure and guidelines and also identifying mentors and mentees and outlining tasks for mentees.

Note: Most projects have a duration of 12 weeks and You can apply for a maximum of 3 organizations at a time. It is a one time opportunity and cannot be selected again

My acceptance into the program

I was already an open source contributor with experience in GSoC 2023 and I was studying in depth about Kubernetes. I found the field of Kubernetes and DevOps fascinating and found this program as the best way to accelerate my growth.

When the Project list was announced, I started to look for projects which were related to Kubernetes and I found Antrea which is a kubernetes-native project that implements the Container Network Interface (CNI) and Kubernetes NetworkPolicy thereby providing network connectivity and security for pod workloads.

There were some Pre-tasks which were informed to us by the respective mentors and based on that along with cover letter and resume, I was selected. That feeling was amazing and I was very excited to interact with my honourable mentors — Antonin Bas, Quan Tian and Lan Luo and begin the journey. Thanks to them for providing me the opportunity.

About the Work done

Antrea operates as a CNI Plugin and It is installed directly within a Kubernetes cluster. Like any other software, Antrea requires a specific environment to be installed correctly and to run properly.

The user typically refers to its documentation in order to set it up without any errors and In order to streamline the process of installation, I under the guidance of my honourable Mentors began the work on the Antrea’s command line tool known as antctl which shares the same codebase as Antrea.

The installation process is divided into 3 steps:

  1. Pre-installation : We check the state of the cluster before we begin installing Antrea so that we can avoid any potential errors and to ensure it runs correctly.
  2. Installation step : We install Antrea in the cluster through ways described in the official documentation.
  3. Post-installation : We validate the installation of Antrea by checking connectivity of various components such as Pods, Services etc and identify any possible problems with the cluster.

To quickly perform pre-installation cluster checks and post-installation checks and to reduce manual checking, We have written 2 Testing frameworks. One for pre-installation checks and one for post-installation checks. They are written with future aspect in mind so that more tests can be added to it without any problems.

To put the framework to use, We have introduced 2 antctl commands for it.

They are :

antctl check cluster : This command performs pre-installation checks on the cluster. This framework utilises 1 deployment which uses volume mounts to store some host filepaths to perform tests and uses the antrea ubuntu image.

This command conducts 4 tests on the cluster. They are :

  1. Check kubernetes version
  2. Check Existence of any other CNI
  3. Check Open vSwitch kernel module’s loadability and if it is already built-in
  4. Check if control plane nodes are existent in the cluster or not

antctl check installation : This command performs post-installation checks on the cluster. This command currently conducts 5 tests. These tests are basically connectivity checks to ensure seamless same Node connectivity and different Nodes connectivity in a cluster. These include simple checks and checks involving Kubernetes NetworkPolicies.

This framework utilises 3 deployments to conduct the test. 1 client deployment and 1 echo same node deployment which are on the same node and 1 echo other node deployment which is on another node to test inter-node and intra-node connectivity.

They are :

  1. Pod to Pod Connectivity in same Node
  2. Pod to Pod Connectivity in different Node
  3. Pod to Internet Connectivity
  4. Pod to Service Connectivity in same Node
  5. Pod to Service Connectivity in different Node
  6. Ingress Deny All policy
  7. Egress Deny All policy

Links to Pull Requests :

  1. Pre-installation testing framework: click here
  2. Post-installation testing framework: click here
  3. Adding service connectivity tests in post-installation: click here
  4. updating github workflow to use Dual stack IP cluster: click here
  5. Refactoring Deployment labels in post-installation framework: click here
  6. Added Tests which applies NetworkPolicies and check connectivity: click here
  7. Added information about new features in Antrea’s documentation: click here

Conclusion

I would like to conclude this article by mentioning that my experience in this Mentorship have been absolutely fantastic and My mentors were really very helpful and patient with me throughout and I got to learn a lot through this program. I now possess an Indepth knowledge of Kubernetes, Its related tools, CNIs and the related tech stacks such as Golang and shell scripting. I am happy to be a part of this project and I believe this would greatly streamline the installation process of Antrea and would provide convenience to the user community.

Thank you !

--

--

Kanha gupta
0 Followers

Hey Everyone ! I post my Tech blogs here. Thanks for visiting :)