Helm - Kustomize Flashcards

1
Q

How do you validate a helm chart?

A

helm lint hello-world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you render the template locally for quick feedback?

A

helm template ./hello-world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you install a helm chart into the Kubernetes cluster:

A

helm install –name hello-world ./hello-world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to find out which charts are installed on a cluster?

A

helm ls –all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to upgrade a release to a specified or current version of the chart or configuration

A

helm upgrade hello-world ./hello-world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to roll back a release to the previous versions?

A

helm rollback hello-world 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to uninstall a release completely from k8s?

A

helm uninstall hello-world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to create a versioned archive file of a helm chart?

A

helm package ./hello-world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to search a helm repo?

A

helm search repo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

show the status of a helm release

A

helm status RELEASE_NAME

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

downloads the charts added as dependencies to a chart

A

helm dependency update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Initialize a helm project

A

helm create hello-world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Configure helm deployment to use a specific image

A

In values.yaml, change the value of image.repository and image.tag.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Add mariadb dependency

A

in Chats.yaml add:

dependencies:

  • name: mariadb
    version: 11.0.13
    repository: https://charts.bitnami.com/bitnami

Then run: helm dependency update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Specify environment variables

A

In values.yaml, add:

env:

  • name: “QUOTES_HOSTNAME”
    value: “famousapp-mariadb”
  • name: “QUOTES_DATABASE”
    value: “quotesdb”
  • name: “QUOTES_USER”
    value: “quotes”
  • name: “QUOTES_PASSWORD”
    value: “quotespwd”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Configure application to acces env variables

A

imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range .Values.env }}
- name: {{ .name }}
value: {{ .value }}
{{- end }}

17
Q

Extract the object definitions from a Helm Chart into deployment.yaml usable by kustomize

A

helm template app-name helm-directory > base/deployment.yaml

18
Q

Kustomize folder structure

A

hello
base
deployment.yaml
kustomization.yaml
overlay
dev
kustomization.yaml
replicat-kustomization.yaml

19
Q

Content of base/kustomization.yaml

A

resources:
- deployment.yaml

20
Q

Content of overlays/dev/kutomization.yaml

A

bases:
- ../../base/
patches:
- replicat_count.yaml

21
Q

Execute kusomize on the original

A

oc apply -k hello-world/base