---
title: Upgrade your deployment on Elastic Cloud on Kubernetes (ECK)
description: 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...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/deploy-manage/upgrade/deployment-or-cluster/upgrade-on-eck
products:
  - Elastic Cloud on Kubernetes
  - Elasticsearch
  - Kibana
---

# Upgrade your deployment on Elastic Cloud on Kubernetes (ECK)
The ECK orchestrator can safely perform upgrades to newer versions of the Elastic Stack.
Before you start the upgrade, [plan your upgrade](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/deploy-manage/upgrade/plan-upgrade), [take the upgrade preparation steps](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/deploy-manage/upgrade/prepare-to-upgrade), and ensure your ECK version is [compatible](/elastic/docs-content/pull/4236/deploy-manage/deploy/cloud-on-k8s#stack-compatibility) with the Elastic Stack version you’re upgrading to. If it's incompatible, [upgrade your orchestrator](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/deploy-manage/upgrade/orchestrator/upgrade-cloud-on-k8s) first.

## Perform the upgrade

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 modifying the version to 9.2.2.
```yaml
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch-sample
  namespace: production
spec:
  version: 9.2.2
  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=262144']
        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=262144']
        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.2.2
  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
```

ECK will ensure 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 will start only when the associated Elasticsearch cluster has been upgraded.
Check out [Nodes orchestration](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/deploy-manage/deploy/cloud-on-k8s/nodes-orchestration) for more information on how ECK manages upgrades and how to tune its behavior.

## Next steps

Once you've successfully upgraded your deployment, you can [upgrade your ingest components](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/deploy-manage/upgrade/ingest-components), such as Logstash, Elastic Agents, or Beats.