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
Navigating to Helm Management
- From the main menu, click on Kubernetes
- 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
- Click the Upgrade button
- 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.)
- Click Upgrade to apply changes
Rolling Back
- Click History in the release details
- Select a previous revision
- Click Rollback
- Confirm the rollback operation
Uninstalling
- Click the Delete button
- Choose deletion options:
- Keep history for potential rollback
- Purge completely
- Confirm uninstallation
Chart Repositories
Manage Helm chart repositories for installing applications.
Adding a Repository
- Click Add Repository
- Enter repository details:
- Name: Repository identifier
- URL: Repository URL (e.g., https://charts.bitnami.com/bitnami)
- Username/Password: For private repositories
- 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
- Click Install Chart
- Search or browse available charts
- Select a chart to view details:
- Description
- Available versions
- Default values
- Dependencies
Installation Process
- Click Install on selected chart
- Configure installation:
- Release Name: Unique identifier
- Namespace: Target namespace
- Version: Chart version to install
- Values: Customize configuration
- Review with dry-run (recommended)
- 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
- Navigate to Charts > Create
- Choose template or start from scratch
- Edit chart files:
- Chart.yaml - Chart metadata
- values.yaml - Default values
- templates/ - Kubernetes manifests
Testing Charts
- Use Lint to check for errors
- Dry Run to preview generated manifests
- Install in development namespace
- Iterate and update as needed
Packaging Charts
- Select your chart
- Click Package
- Choose version number
- 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
- Deploy a configured release
- Click Save as Template
- Name and categorize your template
- 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:
- View dependency tree
- Update dependency versions
- Override sub-chart values
Multiple Values Files
- Create environment-specific values:
- values-dev.yaml
- values-staging.yaml
- values-prod.yaml
- Select appropriate file during installation
Best Practices
- Version Control: Keep your values files in git
- Dry Run First: Always preview changes before applying
- Resource Limits: Set appropriate CPU and memory limits
- Namespace Isolation: Use separate namespaces for different environments
- Security Scanning: Scan charts for vulnerabilities
- Documentation: Document custom values and configurations
- 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
- Chart Sources: Only use trusted chart repositories
- Image Scanning: Verify container images in charts
- RBAC: Implement least-privilege access
- Secrets Management: Use external secret managers when possible
- Network Policies: Implement network segmentation
- Pod Security: Enable pod security policies/standards