Elasticsearch operator managed cluster version upgrade

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.

kubectl exec -it services/elasticsearch --context <CONTEXT> --namespace <NAMESPACE> -- bashcurl -s localhost:9200
curl -s localhost:9200/_cluster/health?pretty
curl -s localhost:9200/_cat/indices?v
kubectl get elasticsearch --context <CONTEXT> -n <NAMESPACE>kubectl describe --context <CONTEXT> elasticsearch <ELASTICSEARCH_CLUSTER_NAME> -n <NAMESPACE>
ANNOTATION='eck.k8s.elastic.co/managed=false' 

# Exclude Elasticsearch resources
kubectl annotate --overwrite elasticsearch <ELASTICSEARCH_CLUSTER_NAME> --context <CONTEXT> -n <NAMESPACE> $ANNOTATION

# Exclude all resources in the current namespace
kubectl annotate --overwrite elastic --context <CONTEXT> -n <NAMESPACE> --all $ANNOTATION

# Exclude all resources in all of the namespaces:
for NS in $(kubectl get ns -o=custom-columns='NAME:.metadata.name' --no-headers); do kubectl annotate --overwrite elastic --all $ANNOTATION -n $NS; done
kubectl describe --context <CONTEXT> elasticsearch <ELASTICSEARCH_CLUSTER_NAME> -n <NAMESPACE>
Name:         elasticsearch-cluster
Namespace: e2e
Labels: app.kubernetes.io/managed-by=Helm
Annotations: common.k8s.elastic.co/controller-version: 1.2.1
common.k8s.elastic.co/pause: true
eck.k8s.elastic.co/managed: false
elasticsearch.k8s.elastic.co/cluster-uuid: XXXXXXXXXX
meta.helm.sh/release-name: elasticsearch
meta.helm.sh/release-namespace: <NAMESPACE>
helm upgrade <ELASTICSEARCH_CLUSTER_NAME> -f values.yaml --kube-context <CONTEXT> -n <NAMESPACE>
RM_ANNOTATION='eck.k8s.elastic.co/managed-' 

kubectl annotate elasticsearch <ELASTICSEARCH_CLUSTER_NAME> --context <CONTEXT> -n <NAMESPACE> $RM_ANNOTATION
curl -s localhost:9200
curl -s localhost:9200/_cluster/health?pretty

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store