Type to search.

Upgrade your deployment on Elastic Cloud on Kubernetes (ECK)

ECK

Elastic Cloud on Kubernetes extends Kubernetes orchestration capabilities to allow you to deploy and manage components of the Elastic Stack.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

The ECK orchestrator can safely perform upgrades to newer versions of the Elastic Stack.

Before you start the upgrade, plan your upgrade, take the upgrade preparation steps, and ensure your ECK version is compatible with the Elastic Stack version you’re upgrading to. If it's incompatible, upgrade your orchestrator first.

ECK ensures that Elastic Stack components are upgraded in the correct order. Upgrades to dependent resources are delayed until that dependency is upgraded. For example, the Kibana upgrade starts only when the associated Elasticsearch cluster has been upgraded.

Check out Nodes orchestration for more information on how ECK manages upgrades and how to tune its behavior.

The upgrade procedure depends on whether you are deploying the Elastic Stack components using resource manifests or the Elastic Stack Helm chart.

  1. In the resource spec file, modify the version field for the desired Elastic Stack version.
  2. Save your changes. The orchestrator will start the upgrade process automatically.

In this example, we're upgrading Elasticsearch and Kibana to 9.5.6 by changing the spec.version field in each component.

Example manifest
Important

For production use, for Elastic Stack version 8.16 and later, set the vm.max_map_count kernel setting to 1048576; for Elastic Stack version 8.15 and earlier, set vm.max_map_count to 262144. Refer to Virtual memory for more information.

YAML
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch-sample
  namespace: production
spec:
  version: 9.5.6
  monitoring:
    metrics:
      elasticsearchRefs:
        - name: monitoring-cluster
          namespace: observability
    logs:
      elasticsearchRefs:
        - name: monitoring-cluster
          namespace: observability
  http:
    service:
      spec:
        type: LoadBalancer
  nodeSets:
  - name: master
    count: 3
    config:
      node.roles: ["master"]
      xpack.ml.enabled: true
      node.store.allow_mmap: false
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi
        storageClassName: standard
    podTemplate:
      metadata:
        labels:
          key: sample
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=1048576']
        containers:
        - name: elasticsearch
          resources:
            requests:
              memory: 2Gi
              cpu: 0.5
            limits:
              memory: 2Gi
              cpu: 1
  - name: data
    count: 3
    config:
      node.roles: ["data", "ingest", "ml", "transform"]
      node.store.allow_mmap: false
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi
        storageClassName: standard
    podTemplate:
      metadata:
        labels:
          key: sample
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=1048576']
        containers:
        - name: elasticsearch
          resources:
            requests:
              memory: 2Gi
              cpu: 0.5
            limits:
              memory: 2Gi
              cpu: 1
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana-sample
  namespace: production
spec:
  version: 9.5.6
  monitoring:
    metrics:
      elasticsearchRefs:
        - name: monitoring-cluster
          namespace: observability
    logs:
      elasticsearchRefs:
        - name: monitoring-cluster
          namespace: observability
  http:
    service:
      spec:
        type: LoadBalancer
  count: 1
  elasticsearchRef:
    name: elasticsearch-sample

If you deploy your Elastic Stack resources using our Helm chart, refer to managing deployments using Helm chart for details on how to perform upgrades with Helm.

If you upgrade an Elasticsearch cluster that uses deprecated cluster or index settings that are not used in the target version, they are archived. You should remove any archived settings after upgrading. For more information, refer to Archived settings.

Once you've successfully upgraded your deployment, you can upgrade your ingest components, such as Logstash, Elastic Agents, or Beats.