Skip to main content

Deploy with Helm (Direct)

Direct Helm commands are used for local development, debugging, and first-time namespace setup. For persistent production workloads, use ArgoCD (GitOps) instead.


Prerequisites​

# Logged in to Harbor
helm registry login harbor.local -u admin -p Admin12345

# kubectl pointing to the right cluster
kubectl config current-context

# Target namespace exists
kubectl get namespace myteam-staging

First Install​

helm install myapp-staging \
oci://harbor.local/charts/myapp \
--version 1.2.0 \
--namespace myteam-staging \
--values values-staging.yaml \
--create-namespace \
--wait \
--timeout 5m
FlagPurpose
myapp-stagingRelease name — unique per namespace
--versionExplicit chart version from Harbor
--valuesEnvironment-specific overrides
--waitBlock until all pods are Ready
--timeoutFail if not ready within 5 minutes

Upgrade​

helm upgrade myapp-staging \
oci://harbor.local/charts/myapp \
--version 1.3.0 \
--namespace myteam-staging \
--values values-staging.yaml \
--atomic \
--wait

--atomic automatically rolls back if the upgrade fails — no broken half-states.


Install or Upgrade (idempotent)​

Use in CI pipelines where you don't know if the release exists yet:

helm upgrade --install myapp-staging \
oci://harbor.local/charts/myapp \
--version 1.3.0 \
--namespace myteam-staging \
--values values-staging.yaml \
--atomic \
--wait

Override Individual Values at Deploy Time​

helm upgrade --install myapp-staging \
oci://harbor.local/charts/myapp \
--version 1.3.0 \
--namespace myteam-staging \
--values values-staging.yaml \
--set image.tag=1.3.1-hotfix \
--set replicaCount=1

--set takes priority over --values. Use for one-off overrides only — do not use in production deploys.


Inspect a Release​

# Status
helm status myapp-staging -n myteam-staging

# Full rendered manifest
helm get manifest myapp-staging -n myteam-staging

# Current values
helm get values myapp-staging -n myteam-staging

# History of all deploys
helm history myapp-staging -n myteam-staging

Rollback​

Rollback to the previous release instantly:

# Rollback to previous version
helm rollback myapp-staging -n myteam-staging

# Rollback to a specific revision
helm rollback myapp-staging 3 -n myteam-staging

# Verify
helm history myapp-staging -n myteam-staging

Diff Before Upgrade​

Install the helm-diff plugin to preview changes before applying:

helm plugin install https://github.com/databus23/helm-diff

helm diff upgrade myapp-staging \
oci://harbor.local/charts/myapp \
--version 1.3.0 \
--namespace myteam-staging \
--values values-staging.yaml

Shows a git-diff-style view of what will change in the cluster — very useful before production upgrades.


Uninstall​

helm uninstall myapp-staging -n myteam-staging

This removes all resources created by the release. PVCs are not deleted by default — add --cascade=foreground if you want everything including data removed.


Multi-Environment Deploy Reference​

# Staging
helm upgrade --install myapp-staging \
oci://harbor.local/charts/myapp --version 1.3.0 \
-n myteam-staging -f values-staging.yaml --atomic --wait

# Production (requires explicit version — never latest)
helm upgrade --install myapp-prod \
oci://harbor.local/charts/myapp --version 1.3.0 \
-n myteam-prod -f values-prod.yaml --atomic --wait

Helm Release Naming Convention​

EnvironmentRelease NameNamespace
Stagingmyapp-stagingmyteam-staging
Productionmyapp-prodmyteam-prod
Dev (local)myapp-devmyteam-dev

List all releases across all namespaces:

helm list -A