# Elasticsearch license downgrade for clusters managed by ECK

**URL:** https://discuss.elastic.co/t/elasticsearch-license-downgrade-for-clusters-managed-by-eck/367070
**Category:** Elastic Cloud on Kubernetes (ECK)
**Tags:** license
**Created:** [September 24, 2024, 5:53pm UTC](https://discuss.elastic.co/t/elasticsearch-license-downgrade-for-clusters-managed-by-eck/367070 "2024-09-24T17:53:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Arnas\_Matiukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arnas_matiukas/32/126907_2.png) [@Arnas\_Matiukas](https://discuss.elastic.co/u/Arnas_Matiukas)
#### Post date: [September 24, 2024, 5:53pm UTC](https://discuss.elastic.co/t/elasticsearch-license-downgrade-for-clusters-managed-by-eck/367070/1 "2024-09-24T17:53:16Z")

</div>

Hi,

Long story short we are running multiple self-managed Elasticsearch in Kubernetes using ECK operator. After upgrading one of the clusters with Enterprise license we have noticed that another cluster was upgraded as well. Apparently as discussed in this Github [issue](https://github.com/elastic/cloud-on-k8s/issues/2032) it's not possible to run more than one cluster managed by ECK with different licenses.

Now we want to downgrade license for one of the clusters to Basic. Right now i am looking what is the best option to achieve this downgrade without any downtime or migrations to new clusters. Do we have any documentation or guides how this could be achieved?

Our setup looks like:

- ECK operator runs in `elastic-system` namespace and manages two Elasticsearch clusters in single Kubernetes cluster
- Elasticsearch clusters run in dedicated namespaces E.g `namespace-1` and `namespace-2`
- Only one Elasticsearch cluster needs Enterprise license

Right now i am considering following **theoretical** action plan:

1. Annotate existing Elasticsearch resources to disable cluster management by the operator using [provided annotator](https://github.com/elastic/cloud-on-k8s/tree/2.14/hack/annotator).
2. Delete existing ECK operator
3. Deploy ECK operator for each of the cluster it will be used to manage
4. Annotate Elasticsearch resources that they are managed by new operators

I have tried to follow this plan but i got to the dead end in step 2. After trying to delete ECK operator i have observed that not all resources have been deleted.

```auto
helm uninstall elastic-operator -n elastic-system
These resources were kept due to the resource policy:
[CustomResourceDefinition] kibanas.kibana.k8s.elastic.co
[CustomResourceDefinition] logstashes.logstash.k8s.elastic.co
[CustomResourceDefinition] stackconfigpolicies.stackconfigpolicy.k8s.elastic.co
[CustomResourceDefinition] agents.agent.k8s.elastic.co
[CustomResourceDefinition] apmservers.apm.k8s.elastic.co
[CustomResourceDefinition] beats.beat.k8s.elastic.co
[CustomResourceDefinition] elasticmapsservers.maps.k8s.elastic.co
[CustomResourceDefinition] elasticsearchautoscalers.autoscaling.k8s.elastic.co
[CustomResourceDefinition] elasticsearches.elasticsearch.k8s.elastic.co
[CustomResourceDefinition] enterprisesearches.enterprisesearch.k8s.elastic.co

release "elastic-operator" uninstalled

```

In the next step i have followed restricted installation guide which requires to install global resources first and than install ECK operators for each of the clusters separately.

During installation of global resources i get an error due to already existing resources which haven't been deleted alongside ECK operator.

```auto
helm upgrade --install elastic-operator-crds elastic/eck-operator-crds
Release "elastic-operator-crds" does not exist. Installing it now.
Error: rendered manifests contain a resource that already exists. Unable to continue with install: CustomResourceDefinition "agents.agent.k8s.elastic.co" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "elastic-operator-crds": current value is "elastic-operator"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "elasticsearch-cluster-1": current value is "elastic-system"

```

Is this a right way to do it? How we should proceed?

Any help is welcome!

---

<div class="post-metadata">

### Author: ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)
#### Post date: [September 24, 2024, 6:54pm UTC](https://discuss.elastic.co/t/elasticsearch-license-downgrade-for-clusters-managed-by-eck/367070/2 "2024-09-24T18:54:11Z")

</div>

From #Elastic Search to #Elastic Cloud on Kubernetes (ECK)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 22, 2024, 6:55pm UTC](https://discuss.elastic.co/t/elasticsearch-license-downgrade-for-clusters-managed-by-eck/367070/3 "2024-10-22T18:55:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
