﻿---
title: Configure data tiers for self-managed and Elastic Cloud on Kubernetes deployments
description: Assign Elasticsearch data tier roles on self-managed hosts (elasticsearch.yml) or on Elastic Cloud on Kubernetes (ECK node set config).
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6076/manage-data/lifecycle/data-tiers/manage-data-tiers-self-managed-eck
products:
  - Elastic Cloud on Kubernetes
  - Elasticsearch
applies_to:
  - Elastic Cloud on Kubernetes: Generally available
  - Self-managed Elastic deployments: Generally available
---

# Configure data tiers for self-managed and Elastic Cloud on Kubernetes deployments
Whether you operate Elasticsearch on your own infrastructure or on Kubernetes with Elastic Cloud on Kubernetes, data tiers are expressed through each node’s [data role](/elastic/docs-content/pull/6076/deploy-manage/distributed-architecture/clusters-nodes-shards/node-roles#data-node-role). You choose which tiers the cluster offers by assigning the corresponding `data_*` roles to nodes or to ECK node sets.

## Before you begin

- Review [Elasticsearch data tiers](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6076/manage-data/lifecycle/data-tiers) so you match tiers to your workload.
- Understand how [node roles](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6076/deploy-manage/distributed-architecture/clusters-nodes-shards/node-roles) map to hardware and allocation for each tier.


## Assign data tier roles on self-managed hosts

<applies-to>
  - Self-managed Elastic deployments: Generally available
</applies-to>

1. For each node, decide which data tier or tiers it should participate in (for example `data_hot`, `data_warm`, `data_cold`, `data_frozen`, or `data_content`).
2. Set `node.roles` in that node’s [`elasticsearch.yml`](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6076/deploy-manage/stack-settings) to include the corresponding `data_*` roles (and any other roles the node should have, such as `ingest` or `master`).
3. Restart the node or apply your configuration rollout process so the new roles take effect.

For example, the highest-performance nodes in a cluster might be assigned to both the hot and content tiers:
```yaml
node.roles: ["data_hot", "data_content"]
```

<note>
  We recommend you use [dedicated nodes](/elastic/docs-content/pull/6076/deploy-manage/distributed-architecture/clusters-nodes-shards/node-roles#data-frozen-node) in the frozen tier.
</note>


## Assign data tier roles in Elastic Cloud on Kubernetes

<applies-to>
  - Elastic Cloud on Kubernetes: Generally available
</applies-to>

Elasticsearch settings that you would normally put in `elasticsearch.yml` are set per node set under `spec.nodeSets[?].config` in the Elasticsearch resource manifest. Assign `node.roles` there to define each group of pods’ tiers. For example, you can assign the following tiers:
```yaml
spec:
  nodeSets:
  - name: hot-content
    count: 3
    config:
      node.roles: ["data_hot", "data_content", "ingest"]
```

Some settings are [managed by Elastic Cloud on Kubernetes](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6076/deploy-manage/deploy/cloud-on-k8s/settings-managed-by-eck); avoid overriding those. For the full mapping between manifest structure and Elasticsearch configuration, see [Node configuration](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6076/deploy-manage/deploy/cloud-on-k8s/node-configuration).

## Related pages

- [Configure data tiers](/elastic/docs-content/pull/6076/manage-data/lifecycle/data-tiers#configure-data-tiers)
- [Data tier index allocation](/elastic/docs-content/pull/6076/manage-data/lifecycle/data-tiers#data-tier-allocation)
- [Add or remove Elasticsearch nodes](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6076/deploy-manage/maintenance/add-and-remove-elasticsearch-nodes)