Install ECK using the Helm chartedit

The Helm chart is experimental and should be considered as a beta-level feature.

Starting from version 1.3.0, an experimental Helm chart is available to install ECK. It is available from the Elastic Helm repository and can be added to your Helm repository list by running the following command:

helm repo add elastic
helm repo update

Cluster-wide (global) installationedit

This is the default mode of installation and is equivalent to installing ECK using the all-in-one.yaml file.

helm install elastic-operator elastic/eck-operator -n elastic-system --create-namespace

Restricted installationedit

This mode avoids installing any cluster-scoped resources and restricts the operator to manage only a set of pre-defined namespaces.

Since CRDs are global resources, they still need to be installed by an administrator. This can be achieved by:

helm install elastic-operator-crds elastic/eck-operator-crds

The operator can be installed by any user who has full access to the set of namespaces they wish to manage. The following example installs the operator to elastic-system namespace and configures it to manage only namespace-a and namespace-b:

helm install elastic-operator elastic/eck-operator -n elastic-system --create-namespace \
  --set=installCRDs=false \
  --set=managedNamespaces='{namespace-a, namespace-b}' \
  --set=createClusterScopedResources=false \
  --set=webhook.enabled=false \

The eck-operator chart contains several pre-defined profiles to help you install the operator in different configurations. These profiles can be found in the root of the chart directory, prefixed with profile-. For example, the restricted configuration shown above is defined in the profile-restricted.yaml file, and can be used as follows:

helm install elastic-operator elastic/eck-operator -n elastic-system --create-namespace \
  --values="${CHART_DIR}/profile-restricted.yaml" \
  --set=managedNamespaces='{namespace-a, namespace-b}'

You can find the profile files in the Helm cache directory or from the ECK source repository.

View available configuration optionsedit

You can view all configurable values by running the following:

helm show values elastic/eck-operator

Migrate an existing installation to Helmedit

Migrating an existing installation to Helm is essentially an upgrade operation and any caveats associated with normal operator upgrades are applicable. Read the upgrade documentation before proceeding.

You can migrate an existing operator installation to Helm by adding the, annotations and the label to all the resources you want to be adopted by Helm. You must do this for the Elastic Custom Resource Definitions (CRD) because deleting them would trigger the deletion of all deployed Elastic applications as well. All other resources are optional and can be deleted.

For example, an ECK 1.2.1 installation deployed using the quickstart guide can be migrated to Helm as follows:

  1. Annotate and label all the ECK CRDs with the appropriate Helm annotations and labels. CRDs need to be preserved to retain any existing Elastic applications deployed using the operator.

    for CRD in $(kubectl get crds --no-headers -o | grep; do
        kubectl annotate crd "$CRD""$RELEASE_NAME"
        kubectl annotate crd "$CRD""$RELEASE_NAMESPACE"
        kubectl label crd "$CRD"
  2. Uninstall the current ECK operator. You can do this by taking the all-in-one.yaml file you used to install the operator, deleting the CRD definitions from it and then running kubectl delete -f all-in-one-without-crds.yaml. Alternatively, you could delete each resource individually.

    kubectl delete -n elastic-system \
        serviceaccount/elastic-operator \
        secret/elastic-webhook-server-cert \ \ \ \ \ \
        service/elastic-webhook-server \
        statefulset.apps/elastic-operator \
  3. Install the ECK operator using the Helm chart as described in Install ECK using the Helm chart.

A shell script is available in the ECK source repository to demonstrate how to migrate from version 1.2.1 to Helm. You can modify it to suit your own environment.