Skip to main content

Installing applications

There are two ways to add applications to your cluster: using your own manifests or via Helm charts. Manifests are suitable for your own applications, whilst Helm is suitable for ready-made software packages with a wide range of configuration options.

Prerequisites

Installation via manifest

You describe your own applications in YAML files and apply them as follows:

# Einzelne Datei
kubectl apply -f deployment.yaml

# Alle Dateien eines Verzeichnisses
kubectl apply -f ./manifeste/

You can find a complete example under Deploying the first image.

Installation via Helm

Helm is the package manager for Kubernetes. A chart bundles all of an application’s manifests; you can customise the installation using configuration values without having to edit the manifests themselves.

Installing the helmet

curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version

Add a repository

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

Browse available charts:

helm search repo wordpress

Install the chart

helm install meine-app bitnami/wordpress \
--namespace web \
--create-namespace

meine-app is the name you can choose for the installation (Release). You will manage the application under this name later on.

Customise the installation

You can list the configurable values for a chart using:

helm show values bitnami/wordpress

You can set individual values directly:

helm install meine-app bitnami/wordpress \
--namespace web \
--create-namespace \
--set service.type=ClusterIP \
--set persistence.enabled=false

For more extensive adjustments, create a separate values file:

# werte.yaml
service:
type: ClusterIP

persistence:
enabled: false

resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
helm install meine-app bitnami/wordpress \
--namespace web \
--create-namespace \
--values werte.yaml
Tipp

Keep your values file under version control. This ensures that it is clear which configuration was used to install an application – and that the installation can be reproduced.

Manage installations

# Installationen auflisten
helm list --all-namespaces

# Verwendete Werte einer Installation anzeigen
helm get values meine-app -n web

# Status einer Installation
helm status meine-app -n web

Refresh

helm repo update
helm upgrade meine-app bitnami/wordpress \
--namespace web \
--values werte.yaml
Warnung

helm upgrade (without --values) resets previously set values to the chart’s default values. Specify your value file again with every upgrade – or use --reuse-values.

Rewind

# Verlauf der Installation
helm history meine-app -n web

# Auf die vorherige Version zurückrollen
helm rollback meine-app -n web

# Auf eine bestimmte Revision zurückrollen
helm rollback meine-app 3 -n web

Remove

helm uninstall meine-app -n web
Hinweis

Data stored by an application outside the cluster – for example, in S3 Object Storage or on a database VM – remains in place when the installation is removed and must be cleaned up separately.

Check before installation

With --dry-run, you can view the manifests that have been generated without making any changes to the cluster:

helm install meine-app bitnami/wordpress \
--namespace web \
--values werte.yaml \
--dry-run --debug

Guidelines for production use

  • Set resources: Set requests and limits to ensure that an application does not fully utilise a node.
  • Check persistence: Many charts request a persistent volume by default. This works in the cluster – just check that the storage class and the requested size match your needs.
  • Consider the service type: Charts often set service.type=LoadBalancer by default. A service of this type does not receive an external address; switch to NodePort or ClusterIP with Ingress.
  • Separate namespaces: Install applications in their own namespaces to clearly demarcate permissions and resources.
  • Specify the chart version: Use --version to pin the chart version and avoid unintended version jumps.