Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
Kubernetes

Kubernetes: Use Helm Charts for Package Management

- 07.07.26 - ErcanOPAK

📦 Helm = Kubernetes Package Manager

Kubernetes YAML is repetitive. Helm packages Kubernetes apps. Templates, versioning, sharing — like apt/yum for K8s.

📝 Helm Commands

# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

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

# Search charts
helm search repo nginx
helm search hub nginx

# Install chart
helm install my-nginx bitnami/nginx
helm install my-postgres bitnami/postgresql

# List releases
helm list
helm list -n namespace

# Upgrade
helm upgrade my-nginx bitnami/nginx --set replicaCount=3

# Rollback
helm rollback my-nginx 1

# Uninstall
helm uninstall my-nginx

# View values
helm show values bitnami/nginx

# Create chart
helm create my-chart

🎯 Creating a Helm Chart

# Chart structure
my-chart/
├── Chart.yaml          # Chart metadata
├── values.yaml         # Default values
├── templates/          # Kubernetes templates
│   ├── deployment.yaml
│   ├── service.yaml
│   ├── configmap.yaml
│   └── _helpers.tpl    # Helper functions

# Chart.yaml
apiVersion: v2
name: my-app
description: My application
type: application
version: 0.1.0
appVersion: 1.16.0

# values.yaml
replicaCount: 1
image:
    repository: myapp
    tag: latest
    pullPolicy: IfNotPresent
service:
    type: ClusterIP
    port: 80
ingress:
    enabled: false
resources:
    limits:
        cpu: 100m
        memory: 128Mi

# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
    name: {{ include "my-app.fullname" . }}
    labels:
        app: {{ include "my-app.name" . }}
spec:
    replicas: {{ .Values.replicaCount }}
    selector:
        matchLabels:
            app: {{ include "my-app.name" . }}
    template:
        metadata:
            labels:
                app: {{ include "my-app.name" . }}
        spec:
            containers:
                - name: {{ .Chart.Name }}
                  image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
                  imagePullPolicy: {{ .Values.image.pullPolicy }}
                  ports:
                    - containerPort: 80
                  resources:
                    {{- toYaml .Values.resources | nindent 12 }}

💡 Best Practices

  • Use official repositories when possible
  • Version your charts
  • Use values.yaml for customization
  • Test charts with helm test
  • Store charts in Helm repo (ChartMuseum)

“Helm simplifies Kubernetes deployment. Templates, versioning, sharing. Essential for K8s package management.”

— DevOps Engineer

Related posts:

Kubernetes: Avoiding the 'OOMKilled' Error with Proper Resource Limits

Readiness vs Liveness — One Mistake Takes Down Clusters

Kubernetes: Use Topology Spread Constraints for Even Pod Distribution

Post Views: 1

Post navigation

WordPress: Create Custom Gutenberg Blocks
Docker: Manage Networks with Docker Compose

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

July 2026
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Jun    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (960)
  • How to add default value for Entity Framework migrations for DateTime and Bool (898)
  • How to make theater mode the default for Youtube (857)
  • Get the First and Last Word from a String or Sentence in SQL (840)
  • How to select distinct rows in a datatable in C# (814)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (597)
  • Add Constraint to SQL Table to ensure email contains @ (582)
  • Average of all values in a column that are not zero in SQL (545)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (512)
  • Find numbers with more than two decimal places in SQL (460)

Recent Posts

  • C#: Use Using Statements for Resource Management
  • C#: Use Lambda Expressions for Concise Code
  • SQL: Use GROUP BY for Data Aggregation
  • .NET Core: Master Routing for Clean URLs
  • Git: Use Reset to Undo Local Changes
  • Ajax: Use Axios for HTTP Requests
  • JavaScript: Understand Hoisting
  • HTML: Use Web Storage for Client-Side Data
  • CSS: Use Filter Effects for Visual Magic
  • Windows 11: Unlock God Mode for All Settings

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (960)
  • How to add default value for Entity Framework migrations for DateTime and Bool (898)
  • How to make theater mode the default for Youtube (857)
  • Get the First and Last Word from a String or Sentence in SQL (840)
  • How to select distinct rows in a datatable in C# (814)

Recent Posts

  • C#: Use Using Statements for Resource Management
  • C#: Use Lambda Expressions for Concise Code
  • SQL: Use GROUP BY for Data Aggregation
  • .NET Core: Master Routing for Clean URLs
  • Git: Use Reset to Undo Local Changes

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com