Chapter 5

Deploy with the Generic Helm Chart

Load the static image into Minikube and deploy it through IVIA generic chart 4.8.0.

Just started Saved in this browser.

A generic chart separates platform mechanics from application choices. The chart owns reusable Kubernetes templates; your stage snapshot provides only values for the enabled component.

Step by step

Download this chapter's files

Use your browser to download either ivia-chapter-05.tar.gz or ivia-chapter-05.zip. The archive is self-contained; you do not need this tutorial repository.

Open a terminal after the browser download:

cd ~/Downloads
tar -xzf ivia-chapter-05.tar.gz
cd ivia-chapter-05

All remaining relative paths in this chapter start from that extracted directory.

Do this

The challenge

Challenge: deploy the static nginx image as a Helm release in Minikube and fetch it through a Kubernetes Service.

Prepare

Prerequisites

  • A running, Ready Minikube cluster from Chapter 3.
  • Helm 3 and kubectl.
  • simple-static:local built in Chapter 4, or source available to build it now.
  • The Minikube node labeled ivia.ch/nodetype=app.
Outcome

Learning goals

  • Load a local image into Minikube
  • Render and install chart version 4.8.0
  • Inspect the chart-created resources
  • Validate the Service through port forwarding
Step by step

Prepare the image and cluster

minikube image build -t simple-static:local static-app
kubectl label node minikube ivia.ch/nodetype=app --overwrite
kubectl create namespace tutorial --dry-run=client -o yaml | kubectl apply -f -
minikube image ls | grep simple-static
Step by step

Render before installing

mkdir -p work
helm template simple-app \
  oci://harbor.ivia.ch/ivia-generic-helm-chart/ivia-generic-helm-chart \
  --version 4.8.0 --namespace tutorial \
  -f static-app/values.yaml \
  > work/simple-app.yaml
kubectl apply --dry-run=client -f work/simple-app.yaml

Rendering is local and catches missing values. Client dry-run catches malformed Kubernetes resources without changing the cluster.

Step by step

Install the release

helm upgrade --install simple-app \
  oci://harbor.ivia.ch/ivia-generic-helm-chart/ivia-generic-helm-chart \
  --version 4.8.0 --namespace tutorial --create-namespace \
  --atomic --timeout 5m \
  -f static-app/values.yaml
helm status simple-app -n tutorial
kubectl get deployment,pod,service -n tutorial
kubectl rollout status deployment/simple-app-frontend -n tutorial --timeout=120s

The chart names the Service and Deployment simple-app-frontend: release name plus component name.

Step by step

Reach the Service

Keep this command running:

kubectl port-forward service/simple-app-frontend 8080:8080 -n tutorial

From a second terminal:

curl --fail http://localhost:8080/
curl --fail http://localhost:8080/healthz

Stop forwarding with Ctrl+C. Keep the release for later chapters. Remove it only when intended with helm uninstall simple-app -n tutorial.

Verify

Expected validation

helm status reports STATUS: deployed. One frontend Pod is 1/1 Running, the Service exposes 8080, the page includes Hello from Kubernetes!, and /healthz returns ok.

Troubleshoot

Troubleshooting and common pitfalls

  • ErrImagePull: confirm minikube image ls contains simple-static:local and values use pullPolicy: IfNotPresent.
  • Pod stays Pending: describe it and verify ivia.ch/nodetype=app appears in kubectl get node minikube --show-labels.
  • Atomic upgrade times out: inspect kubectl get events -n tutorial --sort-by=.lastTimestamp; Helm may already have rolled back.
  • Port is in use: stop the Chapter 4 container or forward 8081:8080.
  • OCI chart not found: copy the registry path and version exactly.
  • Manual object edits disappear: Helm owns these objects; change values and upgrade instead.

You just used a production-shaped declarative workflow on a cluster you control. That is meaningful progress.

Reference

Official references

Just started Saved in this browser.