Elasticsearch operator managed cluster version upgrade

Upgrade elasticsearch cluster to 7.10.2

Elasticsearch (ECK) Operator

Elastic Cloud on Kubernetes (ECK) is the official operator by Elastic for automating the deployment, provisioning, management, and orchestration of Elasticsearch, Kibana, APM Server, Beats, Enterprise Search, Beats, Elastic Agent, and Elastic Maps Server on Kubernetes.

Follow the below link to install the elasticsearch operator

https://github.com/elastic/helm-charts/tree/master/elasticsearch

Here on this page, I am sharing some inputs to upgrade the elasticsearch version which is managed by elasticsearch operator. Follow the below instructions for a smooth elasticsearch version upgrade.

Adjust the elasticsearch version in values.yaml files

Check cluster version, health, and indices status on the cluster before performing the version upgrade.

Also, verify the elasticsearch annotations

You can control rolling restarts during the upgrade:

Upgrading the elasticsearch version in operator results in a one-time update to existing managed resources in the cluster. This triggers a rolling restart of pods by Kubernetes to apply those changes. If you have a very large Elasticsearch cluster or multiple Elastic Stack deployments, this rolling restart might be disruptive or inconvenient. To have more control over when the pods belonging to a particular deployment should be restarted, you can add an annotation to the corresponding Elasticsearch, Kibana, or APM Server resources to temporarily exclude them from being managed by the operator. When the time is convenient, you can remove the annotation and let the rolling restart go through.

Add annotations to the elasticsearch cluster

Reverify the ANNOTATIONS on the elasticsearch operator.

How it looks:

Annotations are applied on the elasticseach operator now
Upgrade elasticsearch

Now you can remove the Annotations to let the pod restart. It affects the cluster version to the latest.

Resume Elastic resource management by the operator.

Now all elasticsearch cluster nodes undergo restart.

Once all the pods are restarted and UP/Running, verify the cluster version and health.

Useful docs:
https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-install-helm.html
https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-upgrading-eck.html#k8s-ga-upgrade