Helm and Charts in Kubernetes.
What are Charts ?
A chart is a collection of files that describe a related set of Kubernetes resources. A single chart might be used to deploy something simple, like a memcached pod, or something complex, like a full web app stack with HTTP servers, databases, caches, and so on.
Charts are created as files laid out in a particular directory tree. They can be packaged into versioned archives to be deployed.
What is Helm ?
Helm is a package manager for Kubernetes. Helm is the K8s equivalent of yum or apt. Helm deploys charts, which you can think of as a packaged application. It is a collection of all your versioned, pre-configured application resources which can be deployed as one unit. You can then deploy another version of the chart with a different set of configuration.
Helm helps in three key ways:
- Improves productivity
- Reduces the complexity of deployments of microservices
- Enables the adaptation of cloud native applications
Let’s create a chart and deploy it with HELM
Step 1> create a folder with same name as your package name
Create a file Chart.yaml inside the /app folder and write this inside it
Write a description and give proper version to it
Now create a templates folder. This is the folder where we have to store our yaml files
Step 2> Create a yaml file inside the templates folder
Yaml file ->
apiVersion: v1
kind: Pod
metadata:
name: "new-pod1"
spec:
containers:
- name: "new-con1"
image: "yashindane/keras-flask:v1"
stdin: True
tty: True
keras-flask:v1 is a image that contains the python environment and the libraries required for machine learning and web development
View the dockerfile here ->
Step 3 > Downloading and installing HELM
use wget command
untar by tar command
copy the helm to /usr/bin folder
now lets install our package by helm install command
Now let’s use kubectl get pods to see our pod
Thanks for Reading.