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.
The following command can test your connectivity:
kubectl cluster-info
Copy
If you see no errors, you’re connected to the cluster. If you access multiple clusters with kubectl, be sure to verify that you’ve selected the correct cluster context:
kubectl config get-contexts
Copy
Your output should look like:
CURRENT NAME CLUSTER AUTHINFO
* do-nyc1-k8s-example do-nyc1-k8s-exam do-nyc1-k8s-example-admin
docker-for-desktop docker-for-desktop-cluster docker-for-desktop
Copy
In this example the asterisk (*) indicates that we are connected to the do-nyc1-k8s-example cluster.
First, we’re going to install the Helm command-line utility on our local host. Helm provides a script that will handle the MacOS, Windows, or Linux installation process.
Change to a writable directory, and download the GitHub repository script from Helm:
cd /tmp
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > install-helm.sh
Copy
Make the script executable with chmod:
chmod u+x install-helm.sh
Copy
You can use your favorite text editor at this point to open the script, and inspect it to make sure it’s safe.
If you’re satisfied with it, run the following:
./install-helm.sh
Copy
Next, you’ll be prompted to provide your password.
Packages of Helm software are called charts. Helm comes pre-configured with a collection of curated charts called a stable. In their GitHub repos, you can search all of the available charts. Next, as an example, we’ll be installing the Kubernetes Dashboard.
Use Helm to install kubernetes-dashboard from the stable repo package:
helm install stable/kubernetes-dashboard --name dashboard-demo
Copy
Output
NAME: dashboard-demo
LAST DEPLOYED: Wed Aug 8 20:11:07 2018
NAMESPACE: default
STATUS: DEPLOYED
. . .
Copy
Note the line NAME, highlighted in the output of the above example. In this case the name dashboard-demo was specified. That is our release name - a Helm release is a single one-chart deployment, with a specific configuration. With that map you can deploy several releases, each with its own configuration.
If you don’t use the —name to specify your own release name, Helm will create a random name for you.
#devops #kubernetes #helm