My LFX Mentorship With Kyverno
Tags: cloudnative, kubernetes, cloud, devops
Published: 2022-06-20 08:03:36

_“In open-source, we feel strongly that to really do something well, you have to get a lot of people involved.”_ - Linus Torvalds

This is one of my favourite quotes from Linus Torvalds which motivates me to contribute to open-source. 
Hello everyone, My name is Oshi Gupta, I have recently graduated from the [Linux Foundation(LFX) mentorship program](https://lfx.linuxfoundation.org/tools/mentorship/) with [Kyverno ](https://kyverno.io/)and will be going to complete my engineering in the next two months.

And in this blog, I will be sharing my experiences of contributing to Kyverno as how I started, my LFX application process, and my mentorship journey.

### :pencil: Table Of Contents
As this blog is covering my whole journey ,so to help you navigate it through easily this can help you.

- [About LFX Mentorship](#about-lfx-mentorship)

- [About Kyverno](#about-kyverno)

- [How did I start with Kyverno?](#how-did-i-start-with-kyverno)

- [Applying For LFX Mentorship](#applying-for-lfx-mentorship)

- [My 12 Weeks Mentorship Journey](#my-12-weeks-mentorship-journey)

- [Graduation From LFX Mentorship](#graduation-from-lfx-mentorship)

    - [My Pull Requests](#my-pull-requests)

- [In the End](#in-the-end)


 
## About LFX Mentorship
The LFX mentorship is a **remote learning opportunity** for the open-source contributors who will be working for **12 weeks** under the guidance of mentors who are maintainers and developers of the particular project and they help the mentees to contribute to the community and project.
_This mentorship program is organized thrice a year i.e. Spring, Summer, and Fall months._ 
There are many organizations like [CNCF](https://github.com/cncf/mentoring), [Hyperledger](https://wiki.hyperledger.org/display/INTERN), and so on which provide mentorships in different projects of it under the umbrella of LFX.

## About Kyverno
[Kyverno ](https://kyverno.io/)is a **policy engine specially designed for Kubernetes**. Kyverno helps to manage policies as Kubernetes resources and is written in **YAML format**. Not only this, but It also helps in validating, mutating, and generating resources and as well as helping in verifying container images which are very important for software supply chain security.

## How did I start with Kyverno?
This all started a few months back with my internship as a technical writer at [CloudYuga Technologies](https://cloudyuga.guru/) where I was exploring admission webhook in Kubernetes, and different policy engines such as _Open Policy Agent(OPA) and Kyverno_ for preparing a hands-on lab on them. And while going through both policy engines, Kyverno fascinates me a lot and I decided to learn more about it by contributing to it. 

First, I decided to take a [Kyverno certification issued by Nirmata](https://learn.nirmata.com/explore) to get more understanding of it. Then, I started attending the **Kyverno contributors meeting**, and honestly, as a beginner, I was not able to understand much in the first few meetings as it takes time to know about such a vast project.

But I keep attending it, went through the documentation of the project for better understanding, kept asking questions on the communication channels, and learnt how to set up the project locally. And soon I made a [Pull Request](https://github.com/kyverno/website/pull/461) to fix a minor documentation issue. Along with this I also got a chance to take a [Kyverno 101 session](https://community.cncf.io/events/details/cncf-chennai-presents-kyverno-101/).

If you haven’t checked out the **Kyverno hands-on lab** before which I prepared, you can go to that lab from [here](https://cloudyuga.guru/hands_on_lab/kyverno-introduction) but make sure to read the complete blog first :smiley:

## Applying For LFX Mentorship

_I decided to apply for LFX mentorship for the spring 2022 cohort for Kyverno._ The [CNCF mentoring repository](https://github.com/cncf/mentoring) helped me a lot to know about the projects participating in LFX mentorship for a particular cohort along with the respective mentors. I applied through the [LFX mentorship portal](https://lfx.linuxfoundation.org/tools/mentorship/) where for a particular cohort you can apply to a **max of three projects** where first you have to create your profile, tell a bit about your background and then apply to the projects you want.

_After a few days, I got my selection email for being selected as a mentee for CNCF-Kyverno_:partying_face:
{% twitter 1498179098568708098 %}

## My 12 Weeks Mentorship Journey
My mentorship period was from 1st March 2022 to 31st May 2022. During this period I have to work with [Kyverno policies](https://github.com/kyverno/policies) where I have to write test cases for it using Kyverno CLI.More specifically I have to write test cases along with other required manifests for 
validate and mutate policies and check them using `kyverno apply `and `kyverno test` CLI commands.

With the help of my mentors, I first went through the various Kyverno policies and run them locally to get a better understanding of them. Then I learned about how Kyverno CLI works and how one can write the test cases to validate and mutate policies along with the variables manifests.
Then I listed out the policies for both validate and mutate for which test cases need to be written. There were about **40+ policies** which have to work.:woman_technologist:	

Every week I used to have a daily stand-up meeting with my mentors other than having discussions on the communication channel where we discussed policies and the respective **positive and negative cases** related to it and the working of the policies.
I used to get stuck most of the time while creating variables manifests which is required for test cases, but I am grateful to my mentors and maintainers of the project who always guided me whenever I get stuck.

_The most important suggestion I used to get is to check the working of the policies on the Kubernetes cluster as a user to get a better understanding of it._

And finally after writing test cases for all the validate and mutate policies I made the respective Pull Requests to get them reviewed and merged. I am grateful to the reviewers of my Pull Requests who helped me in getting it merged by giving valuable suggestions.

## Graduation From LFX Mentorship 
And **31st May 2022** was the last day of my LFX mentorship and after being getting evaluated by mentors, I successfully graduated from it.:mortar_board:	

![My LFX graduation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a51rd8hq3i938w0u8tkb.JPG)

### My Pull Requests
- [Validate Test Cases](https://github.com/kyverno/policies/pull/330)

- [Mutate Test Cases
](https://github.com/kyverno/policies/pull/327)

## In the End
At last, I am grateful to the Kyverno community and everyone who helped me in completing the LFX mentorship and gave me the most wonderful learning experience.:pray:	

Thank you for reading the blog. Hope this will help you to get started. You can connect with me on [Twitter ](https://twitter.com/oshi1136)and [LinkedIn](https://www.linkedin.com/in/oshi-gupta-512716178/):blush:	

**All the very best and take care!**