Errors in the Helm Chart
Learn how to add errors to a Helm chart.
We'll cover the following...
Installing a defective Helm release
The life of a software engineer has its ups and downs. It can suddenly become very stressful when a serious error is spotted in the production environment, especially if this error causes heavy losses to a company.
Everyone has faced such a situation in their career or may face it in the future. That’s why we need to prepare for them.
In this lesson, we’ll learn exactly this. We’ll inject errors into the dashboard.yaml
file on purpose and first see how Helm copes with them, and then we’ll try to come up with a solution.
There is an interactive sandbox placed toward the end of this lesson. So please first read the entire lesson, which will present a scenario, which we’ll then execute.
Inject error into dashboard.yaml
First, let’s try to break things in our dashboard.yaml
file. The easiest way to do this is to override the default image tag of a Dashboard Docker container.
When we’re writing this lesson, the default values from the values.yaml
file are as follows:
image:repository: kubernetesui/dashboardtag: v2.4.0
Now, we need to change an image tag
property to an invalid one, to the Docker image version that does not exist. As a result, we should end up with dashboard.yaml
which looks something like this:
image:tag: not-valid-versionreplicaCount: 2metricsScraper:enabled: truemetrics-server:enabled: trueargs:- --kubelet-preferred-address-types=InternalIP- --kubelet-insecure-tls
We’ve combined the dashboard.yaml
file with default-replicaCount.yaml
from the previous lesson to keep everything in one place.
Now, we can apply those changes with a simple command:
helm upgrade dashboard kubernetes-dashboard/kubernetes-dashboard -n monitoring --values dashboard.yaml
The output will be the ...