Skip to content

Kubernetes - Helm Management

Helm is the package manager for Kubernetes, allowing you to deploy and manage applications using charts. Vapor provides a comprehensive interface for Helm operations.

Prerequisites

  • Active Kubernetes cluster connection
  • Helm 3.x installed on the system
  • Appropriate RBAC permissions for Helm operations
  1. From the main menu, click on Kubernetes
  2. Select the Helm tab

Helm Releases

The Releases section shows all deployed Helm releases in your cluster.

Release List View

Each release displays:

  • Release name
  • Namespace
  • Chart name and version
  • App version
  • Status (Deployed, Failed, Pending, etc.)
  • Last updated time
  • Revision number

Release Actions

Viewing Release Details

Click on a release to view:

  • Overview: Basic release information
  • Values: Current configuration values (YAML)
  • Manifest: Generated Kubernetes manifests
  • Notes: Installation notes from the chart
  • History: Revision history with rollback options

Upgrading a Release

  1. Click the Upgrade button
  2. In the drawer:
    • Select new chart version (optional)
    • Modify values in the YAML editor
    • Preview changes with dry-run
    • Set upgrade options (force, recreate pods, etc.)
  3. Click Upgrade to apply changes

Rolling Back

  1. Click History in the release details
  2. Select a previous revision
  3. Click Rollback
  4. Confirm the rollback operation

Uninstalling

  1. Click the Delete button
  2. Choose deletion options:
    • Keep history for potential rollback
    • Purge completely
  3. Confirm uninstallation

Chart Repositories

Manage Helm chart repositories for installing applications.

Adding a Repository

  1. Click Add Repository
  2. Enter repository details:
  3. Click Add

Repository Operations

  • Update: Refresh repository index
  • Remove: Delete repository
  • Browse: View available charts

Default Repositories

Common repositories you might add:

  • Bitnami: https://charts.bitnami.com/bitnami
  • Stable: https://charts.helm.sh/stable
  • Nginx: https://kubernetes.github.io/ingress-nginx
  • Prometheus: https://prometheus-community.github.io/helm-charts

Installing Charts

Search and Install

  1. Click Install Chart
  2. Search or browse available charts
  3. Select a chart to view details:
    • Description
    • Available versions
    • Default values
    • Dependencies

Installation Process

  1. Click Install on selected chart
  2. Configure installation:
    • Release Name: Unique identifier
    • Namespace: Target namespace
    • Version: Chart version to install
    • Values: Customize configuration
  3. Review with dry-run (recommended)
  4. Click Install to deploy

Values Configuration

Using the Values Editor

The values editor provides:

  • YAML syntax highlighting
  • Schema validation
  • Auto-completion
  • Default values reference

Common Value Overrides

yaml
# Resource limits
resources:
  limits:
    cpu: 500m
    memory: 512Mi
  requests:
    cpu: 250m
    memory: 256Mi

# Service configuration
service:
  type: LoadBalancer
  port: 80

# Persistence
persistence:
  enabled: true
  size: 10Gi
  storageClass: fast-ssd

# Ingress
ingress:
  enabled: true
  hostname: app.example.com
  tls: true

Chart Development

Creating Custom Charts

  1. Navigate to Charts > Create
  2. Choose template or start from scratch
  3. Edit chart files:
    • Chart.yaml - Chart metadata
    • values.yaml - Default values
    • templates/ - Kubernetes manifests

Testing Charts

  1. Use Lint to check for errors
  2. Dry Run to preview generated manifests
  3. Install in development namespace
  4. Iterate and update as needed

Packaging Charts

  1. Select your chart
  2. Click Package
  3. Choose version number
  4. Download packaged .tgz file

Templates and Library Charts

Using Vapor Templates

Vapor provides pre-configured templates for common applications:

  • Web Application: Deployment, Service, Ingress
  • Database: StatefulSet with persistence
  • Microservice: Multiple deployments with service mesh
  • Batch Job: CronJob configuration

Creating Templates

  1. Deploy a configured release
  2. Click Save as Template
  3. Name and categorize your template
  4. Reuse for similar deployments

Advanced Features

Helm Hooks

Manage lifecycle hooks:

  • Pre-install
  • Post-install
  • Pre-upgrade
  • Post-upgrade
  • Pre-rollback
  • Post-rollback
  • Pre-delete
  • Post-delete

Dependencies

Manage chart dependencies:

  1. View dependency tree
  2. Update dependency versions
  3. Override sub-chart values

Multiple Values Files

  1. Create environment-specific values:
    • values-dev.yaml
    • values-staging.yaml
    • values-prod.yaml
  2. Select appropriate file during installation

Best Practices

  1. Version Control: Keep your values files in git
  2. Dry Run First: Always preview changes before applying
  3. Resource Limits: Set appropriate CPU and memory limits
  4. Namespace Isolation: Use separate namespaces for different environments
  5. Security Scanning: Scan charts for vulnerabilities
  6. Documentation: Document custom values and configurations
  7. Backup Values: Export values before upgrades

Troubleshooting

Installation Failed

  • Check namespace exists and has sufficient resources
  • Verify RBAC permissions
  • Review error messages in release status
  • Check pod events and logs

Upgrade Stuck

  • Check for pending pods
  • Verify resource availability
  • Use force upgrade if necessary
  • Consider rollback to previous version

Values Not Applied

  • Verify YAML syntax
  • Check value paths match chart schema
  • Review generated manifests
  • Ensure no typos in value keys

Repository Issues

  • Verify repository URL is accessible
  • Check authentication credentials
  • Update repository index
  • Clear local cache if corrupted

Rollback Failed

  • Check if history was kept during deletion
  • Verify target revision exists
  • Review rollback error messages
  • Manual intervention may be required

Helm CLI Integration

Vapor operations can also be performed via Helm CLI:

bash
# List releases
helm list -A

# Install chart
helm install myapp bitnami/wordpress

# Upgrade release
helm upgrade myapp bitnami/wordpress --values custom-values.yaml

# Rollback
helm rollback myapp 2

# Uninstall
helm uninstall myapp

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

# Search charts
helm search repo wordpress

Security Considerations

  1. Chart Sources: Only use trusted chart repositories
  2. Image Scanning: Verify container images in charts
  3. RBAC: Implement least-privilege access
  4. Secrets Management: Use external secret managers when possible
  5. Network Policies: Implement network segmentation
  6. Pod Security: Enable pod security policies/standards

Dibuat dengan semangat gotong royong demi kemajuan bangsa 🇮🇩