devspace init will automatically add the DevSpace Helm Chart to the folder
chart/ within your project. The chart contains the information how to deploy the application to a kubernetes cluster. This chart is highly customizable and provides very powerful features out-of-the-box (e.g. horizontal auto-scaling).
Configure the DevSpace Helm Chart
chart/values.yaml is the most important place for configuring your Helm chart. See the following guides to learn how to use the
- Configure persistent volumes
- Configure environment variables
- Configure networking (e.g. define services)
- Add a predefined component (e.g. database)
- Add a custom component
- Add a sidecar container
- Add custom Kubernetes files
- Add helm packages
It is recommended to change the
description of your chart by editing the
Chart.yaml and to update the
version whenever you edit anything within your chart as described below.
Show an example of the
components: - name: default replicas: 1 containers: - name: default image: dscr.io/username/image command: - "sleep" args: - "999999999" resources: limits: cpu: "200m" memory: "300Mi" ephemeralStorage: "1Gi" requests: cpu: "100m" memory: "100Mi" ephemeralStorage: "500Mi" env: - name: MY_ENV_VAR value: "test123" volumeMounts: - containerPath: /usr/share/nginx/html volume: name: nginx path: /nginx/html readOnly: false service: name: external type: ClusterIP ports: - externalPort: 80 containerPort: 3000 autoScaling: horizontal: maxReplicas: 4 averageCPU: 80 averageMemory: "200Mi" volumes: - name: nginx size: "1Gi" pullSecrets: - custom-pull-secret
devspace init will create a minimal
values.yaml containing the most important configuration options.
Add dependencies in
Generally, it is recommended to use
devspace add package [CHART_NAME] to add a dependency and
devspace remove package [CHART_NAME] to remove a dependency instead of manually editing the
requirements.yaml. However, it can be useful to edit the
requirements.yaml to change the version of a dependency.
Learn more about adding and removing packages.
It is highly recommended NOT to edit any files within the
template/folder of the DevSpace Helm Chart.
You can add custom templates or Kubernetes manifests if needed. It is, however, recommended that you store them instide
templates/custom/ to allow you to run
devspace update chart to update the DevSpace Helm Chart without breaking anything.
Update the DevSpace Helm Chart
The DevSpace Helm Chart is constantly being improved. To get the newest version of it, you can run
devspace update chart.
Updating the DevSpace Helm Chart will only add or modify files in
templates/which are not placed into
If you want to add custom template files in
templates/, you should store them in
templates/custom/ to make sure that they will not be removed or replaced when running
devspace update chart.
Why should I use the DevSpace Helm Chart?
The DevSpace Helm Chart is optimized for developer productivity and provides the following benefits:
- Follows the best practices for Helm charts
- Easy configuration for horizontal auto-scaling
- Out-of-the-box ingress connectivity via service
- Simple service configuration for your deployments
- Automatic provisioning of pods as StatefulSets if volumes are attached
- Automatic provisioning of pods as Deployments if they are stateless
- Optimized for easy rollbacks if chart deployment fails
- Easy updates via
devspace update chart