Futuregen Skill | Best Big Data and Java Blogs and Websites To Follow in 2023 | No.1 Online IT Training in Haldwani, Uttrakhand

OVERVIEW OF ALL BLOGS

12.jpg <

Helm Blue-Green Deployment

Description

OVERVIEW OF HELM BLUE-GREEN DEPLOYMENT

Overview

Helm is a package manager for Kubernete. It is the apt, yum, or homebrew equivalent for Kubernete. The fundamental unit of Helm is a Helm chart. A set of Helm chart together form a packaged application that can be deployed as one unit.Helm chart are the way we can define an application as a collection of related Kubernetes resource.Helm also supports versioning since deployment needs are guaranteed to change with time.Helm serves two main functions:

Package Manager: Helm works as a package manager with in-built version and dependencies management.

Templating Engine: By creating application templates using Helm charts, DevOps personnel can deploy the same application across different Kubernetes clusters such as development, staging, and production with the same set of Kubernetes YAML files.

Setting up and deploying a Kubernetes application involves creating multiple Kubernetes resources such as secrets, config maps, services, deployments, etc. Each of these resources requires a YAML file with hard-coded values. For example, if we want to just deploy an instance of MySQL database, it requires 3 resources to be created in Kubernetes: Service, Secrets & Deployment.

Now, consider the case of a web application to be deployed in Kubernetes. It will require several resources to be created . Now, this is just one instance of the application with eight YAML files with specific hard-coded values. If the same application has to be deployed in another cluster, location, or cloud – it will require another set of eight YAML files with a few modifications. But, the majority of the content in the YAML files remain the same. Over time, if these application instances were upgraded then the number of YAML files will double. Helm charts simplify the process of creating and deploying an application by combining the YAML files into a single package that can be advertised to a Kubernetes cluster. From there on, installing an application is as simple as executing the helm install command.Helm charts simplify the process of creating and deploying an application by combining the YAML files into a single package that can be advertised to a Kubernetes cluster. Installing an application is as simple as executing the helm install command.

This pipeline demonstrate the definition of a simple pipeline that builds a Docker Image and a Helm Chart and deploys it to a Kubernetes cluster using the Blue/Green strategy. Helm is a package manager for Kubernetes applications. Kubernetes has grown tremendously over the past few years, and so has the ecosystem to support it. Recently, Cloud Native Computing Foundation (CNCF) has announced Helm as an incubating project that demonstrates its growing popularity among Kubernetes users. It uses a YAML file form called Charts. Charts are used to describe, install, and update Kubernetes. They are a prototype sort and they support even the most complex Kubernetes applications. Charts are built to be easy to produce and maintain, and can be exchanged and used for Kubernetes publishing.

We'll explain the basics of Helm and show what a powerful tool it can be for working with Kubernetes resources.Helm helps us to build a framework for clearly defined microservices, and manages our scalability needs (up or down), and assists in adding more Kubernetes nodes and pods to the cluster as needed. Instead of working with a holistic image, and increasing resources, you are running only a necessary set of images, and independently scaling them up.A Helm map can quickly be deployed into a Kubernetes cluster. Either pull down a GitHub project with the Helm chart that you are planning to deploy, or give the Chart name from the desired Helm repository. The Consul-Helm repository can be pulled from GitHub

Create a Helm chart
Start by confirming we have the prerequisites installed: 

$ which helm ## this can be in any folder as long as it returns in the path
/usr/local/bin/helm
$ minikube status ## if it shows Stopped, run `minikube start`
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

Starting a new Helm chart requires one simple command:

$ helm create mychartname

Firstly, take a look at the file structure for our chart higlighted in above snapshot. In the main folder, we have Chart.yaml which keeps chart metadata, requirements.yaml with which we can specify dependencies or values.yaml which serves default configuration values. In the templates folder, we can find all Kubernetes objects that will be created along with chart deployment. Then we have nested charts folder, which is a collection of charts added as a dependency in requirements.yaml. All of them will have the same file structure.

  • Share

    Category

  • Admissions
  • News
  • Event
  • Tutorials
  • Tech Trends

Recent Posts

s1.jpg
Kubernetes Vs. Openshift vs Docker Swarm
16 March
s1.jpg
Cybersecurity Mesh
16 March
s1.jpg
Data Fabric-Future of Technology
19 February
s1.jpg
Microservice Architecture
14 January