Skip to main content

Kubernetes Helm

Helm

Helm is a package manager for deploying applicatons.

Adding stable repository

helm repo add <alias> <helm repo>
helm repo add stable https://charts.helm.sh/stable

Search chart in a repo

helm search repo stable/mysql

Deploy application using helm

helm install <Name of the application> <repo/chart-name>
Eg: helm install mysql testing/mysql

Confirm current context

kubectl config current-context

Chart definition

helm show chart <repo/chartname>
helm show readme <repo/chartname>
helm show values <chart-name>

dry run

helm install <name-of -the-application> <chart name>  --dry-run --debug

Confirm deployment

helm list

List pods, services, deployments and replica sets

kubectl get all 

status of the release

helm status <app-deployed>
eg: helm status mysql
helm get manifest <chart-deployed>

View release hhistory

helm history mysql

Unistall a release

helm uninstall mysql --keep-history
helm delete mysql

Show all the version of a helm chart

helm search repo mysql --versions

Install specific version of the chart

helm install mysql daya/mysql --version <version>
eg: helm install mysql testing/mysql --version 1.16.3


Search all the versions for a specific chart

helm search repo "daya/mysql" --versions



Rolling upgrade

helm upgrade mysql daya/mysql --version <version>


helm history mysql
REVISION        UPDATED                         STATUS          CHART           APP VERSION     DESCRIPTION
1               Fri Jan  7 12:42:53 2022        superseded      mysql-1.6.3     5.7.28          Install complete
2               Fri Jan  7 17:50:08 2022        deployed        mysql-1.6.4     5.7.30          Upgrade complete


Rollback 

helm rollback mysql <revision number>

Pull down a chart 

helm pull stable/mysql --untar

Helm Chart Structure

Helm Repository:

Helm repo is any http server which stores tar files.

  1. https://artifacthub.io/
  2. https://hub.helm.sh

Creating helm chart

helm create <chart-name>

Create a simple deployment spec

helm create deployment nginx --image=nginx --dry-run=client --output=yaml

Package the chart

helm package <local location> --destination C:/Charts
















































Happy Learning😀

Comments

Popular posts from this blog

Kubernetes ETCDCTL

ETCD is a key-value data store for storing kubernetes state and objects. ETCDCTL is the tool used to back up with snapshot. ETCDCTL a command line tool for interacting with the etcd server  Key Features:  Keep the event history until compaction. access to old version of keys. user controlled key compaction. Support range query. pagination support with limit argument. support consistency guarantee across multiple queries. Replace TTL key with lease. Support watch feature. ETCDTOOL Installation: Build binary from source code  Download tool directly  Build binary from source code: Checkout the code repository git clone -b v3.4.16 https://github.com/etcd-io/etcd.git Change directory to etcd cd etcd Run build script ./build The binaries are under the bin directory. exportPATH="$PATH:`pwd`/bin" Check etcd version etcd --version Download ETCD tool directly: kubectl exec -it etcd-docker-desktop -n kube-system -- /bin/bash -c 'ETCDCTL_API=3 /usr/local/bin/etcd --version' | ...

Selenium Basic Commands.

Selenium Commands, Packages and Exceptions. Here I have selected few most frequently asked commands in the interview. Recommended way of Importing webdriver from selenium package. from selenium import webdriver. Once webdriver is imported then you are able to access the classes like this webdriver.Firefox webdriver.FirefoxProfile webdriver.Chrome webdriver.ChromeOptions webdriver.Ie webdriver.Opera webdriver.PhantomJS webdriver.Remote webdriver.DesiredCapabilities webdriver.ActionChains webdriver.TouchActions webdriver.Proxy To launch the application URL: driver = webdriver.Chrome driver.get('http://youtube.com') To get URL of the currently loaded page: driver.current_url To close the current window: driver.close() Exceptions in Selenium: Base Exception class: Selenium.common.exceptions selenium.common.exceptions.WebDriverException selenium.common.exceptions.InvalidElementStateException selenium.common.exceptions...

Selenium - Basics

Selenium: Selenium is an open source automated testing Suite for web applications across different browsers and platforms. Selenium has 4 major components: Selenium Integrated Development Environment(IDE) Selenium Remote Control(RC) Web Driver Selenium Grid 1. Selenium Integrated Development Environment: Selenium IDE is the simplest framework in the Selenium Suite and very easiest to learn. It has got record playback and saving tests and inbuilt reporting tool.  2. Selenium Remote Control: Selenium RC was the flagship testing framework of the whole Selenium project for a long time. This is the first automated web testing tool where it allows users to use their programming language they prefer. RC comes in 2 forms: 2.1 Selenium Server:      Selenium Server receives selenium commands from your program, interprets them and reports  back the results of those running tests. Selenium Core is a Java Script program which execute...