In this lesson, you’ll learn how to bundle multiple .NET microservices and their infrastructure dependencies into a single, versionable Helm chart to simplify complex deployments.
As your architecture grows, maintaining individual Kubernetes manifests for dozens of microservices becomes error-prone. Helm acts as a package manager for Kubernetes, allowing you to template your .yaml files. Instead of hardcoding values, you use a values.yaml file to inject configurations, making your deployments consistent across environments.
Orchestrating Multiple Services
For a complex .NET ecosystem, you should utilize Helm Umbrella Charts. An umbrella chart serves as a parent that declares other microservices as dependencies. By defining them in your Chart.yaml, you can deploy an entire solution—such as an API, a background worker, and a Redis cache—with one command: helm install my-solution ./my-umbrella-chart.
Here is how you define dependencies in your parent Chart.yaml:
dependencies:
- name: order-api
version: 1.2.0
repository: file://../order-api
- name: inventory-worker
version: 1.0.5
repository: file://../inventory-worker
Global Configuration and templating
The real power lies in the values.yaml file, which allows you to pass shared configurations—like connection strings or resource limits—to all services simultaneously. Within your child charts, you can reference these global values using template syntax:
# In your child chart deployment template
resources:
requests:
cpu: {{ .Values.global.cpuRequest | default "100m" }}
memory: {{ .Values.global.memoryRequest | default "128Mi" }}
By templating your manifests, you treat your deployment logic as code. This allows you to maintain strict versioning of your entire service suite. When it comes time to release a new version of your .NET application, you simply update the chart version, ensuring that all dependent services and their specific infrastructure requirements (like Secrets or ConfigMaps) are deployed in the correct state.
Key Takeaway: Helm Umbrella Charts allow you to treat a suite of microservices as a single, versioned unit, enforcing consistency and simplifying the deployment of complex .NET architectures.