bash yaml 161 lines · 4 tabs

Kubernetes Helm charts for package management

Ryan Nakamura Feb 2026
4 tabs
#!/bin/bash
# Helm commands

# Add repositories
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

# Install chart
helm install web-app ./charts/web-app   --namespace production   --create-namespace   --values values-production.yaml

# Upgrade
helm upgrade web-app ./charts/web-app   --namespace production   --values values-production.yaml   --set image.tag=1.3.0

# Rollback
helm rollback web-app 1 --namespace production

# List releases
helm list --namespace production

# Show values
helm get values web-app --namespace production

# Template (render without installing)
helm template web-app ./charts/web-app --values values-production.yaml

# Uninstall
helm uninstall web-app --namespace production

# Package chart
helm package ./charts/web-app
helm push web-app-0.3.0.tgz oci://registry.example.com/charts

# Update dependencies
helm dependency update ./charts/web-app
4 files · bash, yaml Explain with highlit

Helm is the package manager for Kubernetes, bundling manifests into reusable charts. A Chart.yaml defines chart metadata and dependencies. values.yaml provides default configuration that users can override. Templates in the templates/ directory use Go template syntax with {{ .Values.key }}. _helpers.tpl defines reusable template functions. helm install deploys a chart, helm upgrade updates it. helm rollback reverts to a previous release. helm repo add registers chart repositories. The --set flag overrides values at install time. Subcharts in charts/ manage dependencies. Hooks run jobs at lifecycle events like pre-install and post-upgrade. Helm simplifies deploying complex applications with configurable, versioned packages.


Related snips

ruby
require "timeout"

module HealthCheck
  class Probe
    Result = Struct.new(:name, :status, :latency_ms, :critical, :error, keyword_init: true) do
      def healthy?

Health Check Endpoint with Dependency Probes

rails reliability health-check
by codesnips 3 tabs
javascript
// Express app with health checks and graceful shutdown
const express = require('express');
const { createServer } = require('http');

const app = express();
const server = createServer(app);

Container health checks and graceful shutdown patterns

docker kubernetes health-checks
by Ryan Nakamura 1 tab
yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: metrics-reader
  namespace: production
---

Kubernetes RBAC roles with least privilege service accounts

kubernetes rbac least-privilege
by Kai Nakamura 1 tab
yaml
# Headless Service for stable DNS
apiVersion: v1
kind: Service
metadata:
  name: postgres
  namespace: production

Kubernetes StatefulSets for stateful workloads

kubernetes k8s statefulsets
by Ryan Nakamura 1 tab
javascript
// k6 Load Test Configuration
// Run: k6 run load-test.js --env BASE_URL=https://api.example.com

import http from 'k6/http';
import { check, sleep, group } from 'k6';
import { Rate, Trend, Counter } from 'k6/metrics';

Load testing APIs with k6 for performance validation

k6 load-testing performance
by Ryan Nakamura 1 tab
hcl
# Using the module

module "api_service" {
  source = "./modules/ecs_service"

  service_name       = "api"

Terraform modules for reusable infrastructure

terraform modules iac
by Ryan Nakamura 2 tabs

Share this code

Here's the card — post it anywhere.

Kubernetes Helm charts for package management — share card
Link copied