Skip to main content

Loading Helm Chart

Kosko supports loading manifests from Helm charts. You have to install the Helm CLI before using this package.

@kosko/helm uses the helm template command to render Helm chart templates. Most options of helm template command are supported. See API documentation for available options.

Under the hood, @kosko/helm uses @kosko/yaml to load YAML, which means the loadChart function supports all options of the loadString function. See loading Kubernetes YAML for more details.

Installation#

Install @kosko/helm and kubernetes-models.

npm install @kosko/helm kubernetes-models

Load from a Local Chart#

const { loadChart } = require("@kosko/helm");
loadChart({
chart: "./nginx"
});

Load from a Repository#

const { loadChart } = require("@kosko/helm");
loadChart({
chart: "prometheus",
repo: "https://prometheus-community.github.io/helm-charts",
version: "13.6.0"
});

Specify Release Name#

const { loadChart } = require("@kosko/helm");
loadChart({
chart: "./nginx",
name: "http-server"
});

Specify Values#

const { loadChart } = require("@kosko/helm");
loadChart({
chart: "./nginx",
values: {
replicaCount: 5
}
});