What is Helm in Kubernetes ?

Introduction

Hi Guys !! Let’s have some discussion on the helm in Kubernetes. I know, you all be thinking what’s new in that there are lots of blogs which exists right. But let’s try to understand this not in boring terms but through some of  funny scenarios and examples.

LET’s GET STARTED !!!

First we would understand some basics about Kubernetes and twist some boring definitions in fun way.

Kubernetes !!

( I remember a meme “Brother eww what’s that” But let me tell you there is nothing Eww in this )

First Some boring Definition 💤 Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It helps you manage clusters of containers, ensuring they run efficiently and reliably.

Now the funny way 😂 Kubernetes is like world’s most overqualified nanny for your container. She make sure that they deployed on time , fed right amount of Resources, and don’t throw tantrums. Think of it as a skilled cowboy who is keeping all your containers in line and ensuring they don’t run wild.

Here comes the HELM 💤

Helm is a package manager for Kubernetes, similar to how apt works for Ubuntu or yum for CentOS. It helps you manage Kubernetes applications by packaging them into a format called Helm Charts.

Helm 😂😂

Helm is like the “grocery delivery service” for your Kubernetes cluster. Just like how you can use an app to get all your favorite snacks delivered to your door, Helm packages up all the bits and pieces your Kubernetes apps need and delivers them neatly in a Helm Chart. No more running around the YAML aisles — Helm brings everything to you in one tidy package, so you can focus on the fun stuff, like actually running your apps!

[Also Read: What are Helm Charts?]

History of HELM, Why it came ?✏️

Once upon a time in the Wild West of Kubernetes, developers were drowning in a sea of YAML files, desperately trying to lasso their scattered containers into some semblance of order. Every update was like trying to herd cats — chaotic and full of surprises. Then along came Helm, the “Kubernetes Sheriff,” with a shiny badge and a magical bag of Helm Charts. Helm rounded up all those unruly YAML files, tamed the chaos, and brought peace to the Kubernetes town. Now, with Helm in charge, developers can finally sit back, relax, and enjoy a cup of coffee without worrying that their apps are about to stage a jailbreak!

HELM Architecture

Helm Architecture Work Flow

Let’s break down the Helm architecture workflow in a more structured (but still lighthearted) way:

1. Chart Creation: — A developer creates a Helm chart, which is like a recipe book for a Kubernetes application. — This chart contains all the ingredients (Kubernetes manifests) and cooking instructions (templates).

2. Chart Storage: — The chart is then stored in a chart repository, which is like a giant cookbook library in the cloud.

3. Installation Prep: — A user decides they want to deploy an application using Helm. — They fetch the desired chart from the repository.

4. Value Customization: — The user can customize the chart by modifying the values.yaml file. — This is like adjusting the recipe to taste — more salt, less pepper, gluten-free options, etc.

5. Template Rendering: — Helm takes the chart and the custom values and runs them through its templating engine. — This process is like having a robot chef interpret your customized recipe.

6. Kubernetes Manifest Generation: — The templating process produces the final Kubernetes manifests. — These are the exact instructions Kubernetes needs, like a detailed shopping list and cooking plan.

7. Installation: — Helm sends these manifests to Kubernetes. —Kubernetes then creates all the necessary resources (pods, services, etc).

8. Release Creation: — Helm creates a release, which is a snapshot of what was installed. — This is like taking a photo of your perfectly plated meal for posterity.

9. Release Storage: — Helm stores information about the release in its release history. — This history is typically kept in Kubernetes secrets.

10. Upgrade/Rollback: — If changes are needed, Helm can upgrade the release with new values or chart versions. — If something goes wrong, Helm can roll back to a previous version. — It’s like being able to magically revert your overcooked soufflé back to its perfect, fluffy state!

11. Uninstallation: — When no longer needed, Helm can uninstall the release, cleaning up all associated Kubernetes resources. — It’s like having a magical kitchen that cleans itself up after the meal is over

Components of Helm

1. Helm Client 2. Helm Chart 3. Helm Repository 4. Release 5. Tiller (deprecated) 6. Values.yaml 7. Templates 8. Charts Directory 9. Notes.txt 10. Helm Hooks

1. Helm Client

Boring Version: The Helm Client is the command-line interface (CLI) that developers interact with. It is responsible for sending instructions to the Kubernetes API server via Helm commands like `helm install`, `helm upgrade`, and `helm rollback`. The client handles the packaging, unpackaging, and management of Helm charts.

Funny Version: The Helm Client is like the remote control for your Kubernetes TV. With just a few button presses, you can change the channel (deploy an app), adjust the volume (scale your app), or even rewind if you missed something (rollback).

2. Helm Chart

Boring Version: A Helm Chart is a collection of files that describe a set of Kubernetes resources. It’s like a blueprint for deploying an application, containing everything needed to install and configure the app within a Kubernetes cluster.

Funny Version: Think of a Helm Chart as your grandma’s secret recipe for Kubernetes pie. It’s got all the instructions and ingredients to bake the perfect app, without you having to figure out how much Kubernetes flour or YAML sugar to use.

3. Helm Repository

Boring Version: A Helm Repository is a collection of Helm Charts, much like a package repository in other software ecosystems. You can store your charts in public or private repositories, making it easy to share and distribute your applications.

Funny Version: The Helm Repository is like the app store for Kubernetes chefs. It’s stocked with all kinds of charts, from the basic Nginx salad to the complex Redis soufflé. Just browse, pick, and deploy — no need to cook from scratch!

4. Release

Boring Version: A Release is a specific instance of a Helm Chart running in your Kubernetes cluster. Each time you install a chart, Helm creates a release, allowing you to manage and upgrade each deployment individually.

Funny Version: A Release is like the dish you’ve just served using grandma’s Kubernetes recipe (Helm Chart). If it tastes great, you can keep serving it. If it flops, well, there’s always room for a do-over (rollback)!

5. Tiller (Deprecated)

Boring Version: Tiller was the server-side component of Helm that handled releases and interacted with the Kubernetes API server on behalf of the Helm Client. However, Tiller was removed in Helm 3 due to security concerns, and now Helm directly interacts with Kubernetes.

Funny Version: Tiller was like the kitchen helper who used to run around making sure all your recipes got cooked correctly. But now, with Helm 3, the kitchen is self-serve, and you get to be the master chef directly.

6. Values.yaml

Boring Version: The `Values.yaml` file is where you define the default configuration values for your Helm Chart. These values can be overridden during installation or upgrade, allowing for flexible customization.

Funny Version: ‘values.yaml’ is like the shopping list for your Kubernetes recipe. It tells you how much of each ingredient (resources, settings) you need to get the flavor just right. If you’re feeling adventurous, you can tweak the list before cooking!

7. Templates

Boring Version: The `templates` directory in a Helm Chart contains the Kubernetes resource definitions in the form of Go templates. These templates are filled in with the values from `values.yaml` to create the final YAML files that Kubernetes will use.

Funny Version: Templates are like the cookie cutters in your Kubernetes bakery. They shape your ingredients (values) into perfectly formed cookies (YAML files) that are ready to be baked (deployed) in your cluster.

8. Charts Directory

Boring Version: The `charts` directory within a Helm Chart is where you can include other Helm Charts as dependencies. This allows you to bundle multiple charts together, creating complex applications with many components.

Funny Version: The ‘charts’ directory is like a nesting doll of recipes. Inside your Kubernetes cookbook, you find other mini-cookbooks that each contain their own recipes, so you can whip up a complete multi-course meal with ease.

9. Notes.txt

Boring Version: The ‘NOTES.txt’ file in a Helm Chart provides end-user instructions on how to interact with the application once it’s been deployed. It’s a way to communicate important information, such as how to access the application or monitor its status.

Funny Version: ‘NOTES.txt’ is like the little note your grandma leaves on her secret recipe, telling you how to serve the dish and what wine pairs best. Without it, you might have a great app but no idea how to enjoy it!

10. Helm Hooks

Boring Version: Helm Hooks allow you to run certain tasks at specific points in a release lifecycle, such as before or after installing, upgrading, or deleting a release. This is useful for tasks like database migrations or backups.

Funny Version: Helm Hooks are like the secret sauce that grandma adds at just the right moment in her recipe. It’s the finishing touch that takes your Kubernetes meal from good to gourmet, without you having to lift a finger!

Advantage and Disadvantage of Helm

Advantages: Helm simplifies application management, promotes reuse and customization, supports dependency management, and ensures consistent deployments.

Disadvantages: Helm can introduce complexity, requires a learning curve, and may have issues with chart quality and security. Helm 2’s Tiller had concerns that Helm 3 addressed, but using Helm still involves some overhead and potential versioning issues.

Explore how a million-user auto-commerce platform re-engineered its core systems for scale and speed.

HELM Chart ☸️

Definition 💤

A Helm Chart is a package of pre-configured Kubernetes resources. It contains all the YAML files and templates needed to deploy and manage an application in a Kubernetes cluster, making it easy to install, upgrade, and maintain complex applications.

Fun Version 😂

A Helm Chart is like a recipe card for your Kubernetes kitchen. It’s got all the ingredients and step-by-step instructions you need to whip up a deliciously functional app. Just follow the chart, and voilà! Your Kubernetes cluster serves up a perfect application, without you having to scramble around like a stressed-out chef trying to remember if you added the salt.

Components of Helm Chart

A Helm Chart is a package that contains all the necessary Kubernetes resource configurations to deploy an application. It includes several key components that work together to define and manage the application’s deployment. Here’s a detailed look at each component:

1. Chart.yaml

– Description: This file contains metadata about the Helm Chart, including its name, version, and description.

  • Key Fields: — name: The name of the chart. — version: The version of the chart. — description: A brief description of the chart. — maintainers: List of maintainers of the chart. — dependencies: List of other charts that this chart depends on.

2. values.yaml

– Description: This file contains default configuration values for the chart. Users can override these values during installation or upgrades. – Purpose: To provide a way to customize the deployment without modifying the chart’s templates directly. – Usage: Commonly includes settings for environment variables, resource limits, and replica counts.

3. templates/

– Description: This directory contains Kubernetes resource templates in the form of Go templates. These templates define the actual resources to be deployed.

— Key Components:

— Deployment.yaml: Defines how the application is deployed. — Service.yaml: Defines how the application is exposed within the cluster. — Ingress.yaml:Defines how external traffic is routed to the application. — ConfigMap.yaml: Defines configuration data that the application can use. — Secret.yaml: Defines sensitive data such as passwords or tokens. – Purpose: Templates use values from `values.yaml` to render the final Kubernetes resource YAML files.

4. charts/

– Description: This directory can include other Helm Charts as dependencies. These sub-charts are packaged together with the main chart. – Purpose: To manage dependencies between charts, allowing complex applications to be split into smaller, manageable components.

5. NOTES.txt

– Description: This file provides instructions or information to users after the chart is deployed. It often includes tips on how to access or interact with the deployed application. – Purpose: To provide post-deployment information or instructions, such as URLs, credentials, or commands to access the application.

6. .helmignore

– Description: This file contains patterns for files and directories to ignore when packaging the chart. – Purpose: To exclude unnecessary files from the chart package, keeping it clean and lightweight. – Usage: Similar to `.gitignore`, it helps prevent files like local development artifacts or logs from being included in the chart.

7. Chart.lock

– Description: This file is generated automatically by Helm and contains a locked version of the chart’s dependencies. – Purpose: To ensure that the exact versions of dependencies are used when the chart is installed or upgraded. – Usage: Helps maintain consistency and stability across different deployments by locking dependency versions.

8. values.schema.json

– Description: (Optional) This file provides a JSON schema for validating the `values.yaml` file. – Purpose: To enforce validation rules on the configuration values provided by users. – Usage: Helps catch errors or misconfigurations in the `values.yaml` file by validating it against the schema.

9. README.md

– Description: (Optional) A Markdown file that provides documentation for the Helm Chart. – Purpose: To explain how to use the chart, including installation instructions, configuration options, and any other relevant details. – Usage: Acts as a guide for users to understand how to deploy and configure the application using the Helm Chart.

10. Test Files

  • Description: (Optional) Files or scripts used to test the Helm Chart’s deployment. – Purpose: To ensure that the chart works as expected and meets the defined requirements. – Usage: Includes test configurations or scripts that can be run to verify the chart’s functionality

Advantage and Disadvantage of Helm Chart

Advantages: Helm Charts simplify deployment, provide configuration management, support reuse and versioning, handle dependencies, and ensure consistent deployments. They also offer extensibility through plugins.

Disadvantages: Helm Charts can be complex, have a learning curve, and may suffer from varying quality and security. They also introduce overhead, compatibility issues, and require ongoing maintenance.

Examples of HELM

1. Helm: The “App Store” for Your Kubernetes Cluster

Daily Example: Imagine you just bought a new smartphone. The first thing you do is head to the app store to download your favorite apps. You type “Nginx” (because you’re cool like that) into the search bar, hit install, and within seconds, you’ve got a shiny new web server running on your phone.

Funny Twist: Now, picture trying to install Nginx without an app store. You’d have to assemble the code by hand like a 1,000-piece puzzle, all while avoiding a meltdown because you lost that one crucial piece under the couch. Helm is your app store for Kubernetes, saving you from Kubernetes-induced headaches!

2. Helm Charts: The Cookbook for Kubernetes Recipes

Daily Example: You’re in the kitchen, craving some homemade pizza. You grab a recipe from your favorite cookbook, which tells you exactly what ingredients you need and how to put them together. That’s your Helm Chart — a recipe that tells Kubernetes how to cook up your application.

Funny Twist: Without a recipe (Helm Chart), you’d be tossing random ingredients into a pot, hoping for the best, and probably ending up with a pizza-flavored smoothie. Not exactly what you were aiming for, right? Helm keeps your Kubernetes meals from turning into kitchen disasters.

3. Helm Repositories: The Supermarket for Kubernetes Recipes

Daily Example: Think of Helm repositories like your local supermarket. You walk in with your shopping list (Nginx, MySQL, Redis) and pick up pre-packaged meals (Helm Charts) for each. It’s like skipping the “from scratch” section and heading straight to the “easy to cook” aisle.

Funny Twist: Imagine walking into a supermarket where all the labels are missing. Is this flour or powdered sugar? Will this package deploy a web server or a rogue AI? Thankfully, with Helm repositories, you don’t have to guess what you’re installing — no surprise AI takeovers here!

4. Helm Releases: The “In-Use” Shopping Cart

Daily Example: You’ve picked up all your ingredients (Helm Charts) and thrown them into your shopping cart (Helm Release). As you push it around the store, you can still decide to add more stuff (upgrade) or remove something (rollback).

Funny Twist: But what if you suddenly realize you don’t actually need 10 pounds of carrots? With Helm, rolling back is as easy as chucking those carrots back onto the shelf, instead of eating carrot soup for the next month.

5. Helm Upgrades: The Software Update for Your Pizza Oven

Daily Example: Your pizza oven just got a firmware update! Now it bakes pizzas 20% faster and with a perfect crust every time. Helm upgrades do the same for your applications, ensuring they’re running the latest and greatest without needing to buy a new oven.

Funny Twist: But what if the update makes your oven burn every pizza? Helm has a rollback feature, so you can undo that disastrous update and save dinner from becoming charcoal. It’s like a time machine for your software!

6. Helm Rollbacks: The “Undo Button” for Your Life

Daily Example: Ever wish life had an undo button? Like when you accidentally send an embarrassing text or over-salt the pasta. Helm rollbacks are the Kubernetes equivalent — one command, and your cluster is back to its pre-disaster state.

Funny Twist: If only Helm could help you rollback that time you tried to impress your date by cooking lobster and ended up setting off the smoke alarm. Alas, Helm rollbacks are just for software — your culinary adventures remain unprotected.

7. Helm Hooks: The “Surprise” Party Planner

Daily Example: You’re throwing a surprise birthday party, but you need to get everything ready before the guest of honor arrives. Helm hooks let you run scripts before, during, or after an event, like setting up the party before the birthday person walks in.

Funny Twist: Imagine if the cake got delivered after the birthday song or the guests showed up after the party ended. Helm hooks keep your surprises on track, so your Kubernetes parties don’t fall flat!

8. Helm Dependencies: The Group Project Partner You Actually Want

Daily Example: Remember those group projects where you had to rely on others to get the work done? Helm dependencies are like choosing the smartest, most reliable classmates to help you ace the project.

Funny Twist: But instead of ending up doing all the work yourself while your partner plays video games, Helm dependencies ensure everyone pulls their weight. It’s like having a dream team that never leaves you hanging.

9. Helm Templates: The Custom-Made Suit

Daily Example: You’re getting a custom-made suit, tailored to fit you perfectly. Helm templates are like that suit, tailored to fit your application’s needs, with all the specific configurations you want.

Funny Twist: Without a template, you’d be stuck wearing an off-the-rack suit that’s two sizes too big, making you look like a kid playing dress-up. Helm ensures your Kubernetes applications are always a perfect fit, no awkward adjustments required.

These funny, relatable examples can help turn your blog into an engaging read while educating your audience on the ins and outs of Helm and Helm Charts in Kubernetes!

Leave a Reply