# Kubernetes

LLMS index: [llms.txt](/llms.txt)

---

**Status**: [Development][DocumentStatus]

Useful resources to understand Kubernetes objects and metadata:

* [Namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/)
* [Names and UIDs](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/).
* [Pods](https://kubernetes.io/docs/concepts/workloads/pods/)
* [Controllers](https://kubernetes.io/docs/concepts/workloads/controllers/)

The "name" of a Kubernetes object is unique for that type of object within a
"namespace" and only at a specific moment of time (names can be reused over
time). The "uid" is unique across your whole cluster, and very likely across
time. Because of this it is recommended to always set the UID for every
Kubernetes object, but "name" is usually more user friendly so can be also set.

## Cluster

<!-- semconv entity.k8s.cluster -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.cluster`

**Description:** A Kubernetes Cluster.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.cluster.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` |
| Description | [`k8s.cluster.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the cluster. | `opentelemetry-cluster` |

**[1] `k8s.cluster.uid`:** K8s doesn't have support for obtaining a cluster ID. If this is ever
added, we will recommend collecting the `k8s.cluster.uid` through the
official APIs. In the meantime, we are able to use the `uid` of the
`kube-system` namespace as a proxy for cluster ID. Read on for the
rationale.

Every object created in a K8s cluster is assigned a distinct UID. The
`kube-system` namespace is used by Kubernetes itself and will exist
for the lifetime of the cluster. Using the `uid` of the `kube-system`
namespace is a reasonable proxy for the K8s ClusterID as it will only
change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
UUIDs as standardized by
[ISO/IEC 9834-8 and ITU-T X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
Which states:

> If generated according to one of the mechanisms defined in Rec.
> ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
> different from all other UUIDs generated before 3603 A.D., or is
> extremely likely to be different (depending on the mechanism chosen).

Therefore, UIDs between clusters should be extremely unlikely to
conflict.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Node

<!-- semconv entity.k8s.node -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.node`

**Description:** A Kubernetes Node object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.node.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the Node. | `1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2` |
| Description | [`k8s.node.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the Node. | `node-1` |
| Description | [`k8s.node.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the Node, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `0`; `` |
| Description | [`k8s.node.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the Node, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `arm64`; `` |

**[1] `k8s.node.annotation.<key>`:** Examples:

- An annotation `node.alpha.kubernetes.io/ttl` with value `0` SHOULD be recorded as
  the `k8s.node.annotation.node.alpha.kubernetes.io/ttl` attribute with value `"0"`.
- An annotation `data` with empty string value SHOULD be recorded as
  the `k8s.node.annotation.data` attribute with value `""`.

**[2] `k8s.node.label.<key>`:** Examples:

- A label `kubernetes.io/arch` with value `arm64` SHOULD be recorded
  as the `k8s.node.label.kubernetes.io/arch` attribute with value `"arm64"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.node.label.data` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Namespace

Namespaces provide a scope for names. Names of objects need to be unique within
a namespace, but not across namespaces.

<!-- semconv entity.k8s.namespace -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.namespace`

**Description:** A Kubernetes Namespace.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.namespace.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the namespace that the pod is running in. | `default` |
| Description | [`k8s.namespace.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the Namespace, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `0`; `` |
| Description | [`k8s.namespace.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the Namespace, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `default`; `` |

**[1] `k8s.namespace.annotation.<key>`:** Examples:

- A label `ttl` with value `0` SHOULD be recorded
  as the `k8s.namespace.annotation.ttl` attribute with value `"0"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.namespace.annotation.data` attribute with value `""`.

**[2] `k8s.namespace.label.<key>`:** Examples:

- A label `kubernetes.io/metadata.name` with value `default` SHOULD be recorded
  as the `k8s.namespace.label.kubernetes.io/metadata.name` attribute with value `"default"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.namespace.label.data` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Pod

The smallest and simplest Kubernetes object. A Pod represents a set of running
containers on your cluster.

<!-- semconv entity.k8s.pod -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.pod`

**Description:** A Kubernetes Pod object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.pod.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.pod.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the Pod. | `opentelemetry-pod-autoconf` |
| Description | [`k8s.pod.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the Pod, the `<key>` being the annotation name, the value being the annotation value. [1] | `true`; `x64`; `` |
| Description | [`k8s.pod.hostname`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | Specifies the hostname of the Pod. [2] | `collector-gateway` |
| Description | [`k8s.pod.ip`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | IP address allocated to the Pod. [3] | `172.18.0.2` |
| Description | [`k8s.pod.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the Pod, the `<key>` being the label name, the value being the label value. [4] | `my-app`; `x64`; `` |
| Description | [`k8s.pod.start_time`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The start timestamp of the Pod. [5] | `2025-12-04T08:41:03Z` |

**[1] `k8s.pod.annotation.<key>`:** Examples:

- An annotation `kubernetes.io/enforce-mountable-secrets` with value `true` SHOULD be recorded as
  the `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets` attribute with value `"true"`.
- An annotation `mycompany.io/arch` with value `x64` SHOULD be recorded as
  the `k8s.pod.annotation.mycompany.io/arch` attribute with value `"x64"`.
- An annotation `data` with empty string value SHOULD be recorded as
  the `k8s.pod.annotation.data` attribute with value `""`.

**[2] `k8s.pod.hostname`:** The K8s Pod spec has an optional hostname field, which can be used to specify a hostname.
Refer to [K8s docs](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field)
for more information about this field.

This attribute aligns with the `hostname` field of the
[K8s PodSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core).

**[3] `k8s.pod.ip`:** This attribute aligns with the `podIP` field of the
[K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core).

**[4] `k8s.pod.label.<key>`:** Examples:

- A label `app` with value `my-app` SHOULD be recorded as
  the `k8s.pod.label.app` attribute with value `"my-app"`.
- A label `mycompany.io/arch` with value `x64` SHOULD be recorded as
  the `k8s.pod.label.mycompany.io/arch` attribute with value `"x64"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.pod.label.data` attribute with value `""`.

**[5] `k8s.pod.start_time`:** Date and time at which the object was acknowledged by the Kubelet.
This is before the Kubelet pulled the container image(s) for the pod.

This attribute aligns with the `startTime` field of the
[K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core),
in ISO 8601 (RFC 3339 compatible) format.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Container

A container specification in a Pod template. This type is intended to be used to
capture information such as name of a container in a Pod template which is different
from the name of the running container.

Note: This type is different from [container](../container.md), which corresponds
to a running container.

<!-- semconv entity.k8s.container -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.container`

**Description:** A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates).

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.container.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). | `redis` |
| Description | [`k8s.container.restart_count`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | int | Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. | |
| Description | [`k8s.container.status.last_terminated_reason`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Last terminated reason of the Container. | `Evicted`; `Error` |
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## ReplicaSet

<!-- semconv entity.k8s.replicaset -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.replicaset`

**Description:** A Kubernetes ReplicaSet object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.replicaset.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the ReplicaSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.replicaset.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the ReplicaSet. | `opentelemetry` |
| Description | [`k8s.replicaset.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the ReplicaSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `0`; `` |
| Description | [`k8s.replicaset.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the ReplicaSet, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `guestbook`; `` |

**[1] `k8s.replicaset.annotation.<key>`:** Examples:

- A label `replicas` with value `0` SHOULD be recorded
  as the `k8s.replicaset.annotation.replicas` attribute with value `"0"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.replicaset.annotation.data` attribute with value `""`.

**[2] `k8s.replicaset.label.<key>`:** Examples:

- A label `app` with value `guestbook` SHOULD be recorded
  as the `k8s.replicaset.label.app` attribute with value `"guestbook"`.
- A label `injected` with empty string value SHOULD be recorded as
  the `k8s.replicaset.label.injected` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Deployment

An API object that manages a replicated application, typically by running Pods
with no local state. Each replica is represented by a Pod, and the Pods are
distributed among the nodes of a cluster.

<!-- semconv entity.k8s.deployment -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.deployment`

**Description:** A Kubernetes Deployment object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.deployment.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.deployment.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the Deployment. | `opentelemetry` |
| Description | [`k8s.deployment.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the Deployment, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `1`; `` |
| Description | [`k8s.deployment.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the Deployment, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `guestbook`; `` |

**[1] `k8s.deployment.annotation.<key>`:** Examples:

- A label `replicas` with value `1` SHOULD be recorded
  as the `k8s.deployment.annotation.replicas` attribute with value `"1"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.deployment.annotation.data` attribute with value `""`.

**[2] `k8s.deployment.label.<key>`:** Examples:

- A label `replicas` with value `0` SHOULD be recorded
  as the `k8s.deployment.label.app` attribute with value `"guestbook"`.
- A label `injected` with empty string value SHOULD be recorded as
  the `k8s.deployment.label.injected` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## StatefulSet

Manages the deployment and scaling of a set of Pods, and provides guarantees
about the ordering and uniqueness of these Pods.

<!-- semconv entity.k8s.statefulset -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.statefulset`

**Description:** A Kubernetes StatefulSet object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.statefulset.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the StatefulSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.statefulset.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the StatefulSet. | `opentelemetry` |
| Description | [`k8s.statefulset.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the StatefulSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `1`; `` |
| Description | [`k8s.statefulset.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the StatefulSet, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `guestbook`; `` |

**[1] `k8s.statefulset.annotation.<key>`:** Examples:

- A label `replicas` with value `1` SHOULD be recorded
  as the `k8s.statefulset.annotation.replicas` attribute with value `"1"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.statefulset.annotation.data` attribute with value `""`.

**[2] `k8s.statefulset.label.<key>`:** Examples:

- A label `replicas` with value `0` SHOULD be recorded
  as the `k8s.statefulset.label.app` attribute with value `"guestbook"`.
- A label `injected` with empty string value SHOULD be recorded as
  the `k8s.statefulset.label.injected` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## DaemonSet

A DaemonSet ensures that all (or some) Nodes run a copy of a Pod.

<!-- semconv entity.k8s.daemonset -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.daemonset`

**Description:** A Kubernetes DaemonSet object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.daemonset.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.daemonset.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the DaemonSet. | `opentelemetry` |
| Description | [`k8s.daemonset.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the DaemonSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `1`; `` |
| Description | [`k8s.daemonset.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the DaemonSet, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `guestbook`; `` |

**[1] `k8s.daemonset.annotation.<key>`:** Examples:

- A label `replicas` with value `1` SHOULD be recorded
  as the `k8s.daemonset.annotation.replicas` attribute with value `"1"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.daemonset.annotation.data` attribute with value `""`.

**[2] `k8s.daemonset.label.<key>`:** Examples:

- A label `app` with value `guestbook` SHOULD be recorded
  as the `k8s.daemonset.label.app` attribute with value `"guestbook"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.daemonset.label.injected` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Job

A Job creates one or more Pods and ensures that a specified number of them
successfully terminate.

<!-- semconv entity.k8s.job -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.job`

**Description:** A Kubernetes Job object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.job.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the Job. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.job.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the Job. | `opentelemetry` |
| Description | [`k8s.job.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The annotation placed on the Job, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `1`; `` |
| Description | [`k8s.job.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the Job, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `ci`; `` |

**[1] `k8s.job.annotation.<key>`:** Examples:

- A label `number` with value `1` SHOULD be recorded
  as the `k8s.job.annotation.number` attribute with value `"1"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.job.annotation.data` attribute with value `""`.

**[2] `k8s.job.label.<key>`:** Examples:

- A label `jobtype` with value `ci` SHOULD be recorded
  as the `k8s.job.label.jobtype` attribute with value `"ci"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.job.label.automated` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## CronJob

A CronJob creates Jobs on a repeating schedule.

<!-- semconv entity.k8s.cronjob -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.cronjob`

**Description:** A Kubernetes CronJob object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.cronjob.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.cronjob.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Recommended` | string | The name of the CronJob. | `opentelemetry` |
| Description | [`k8s.cronjob.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The cronjob annotation placed on the CronJob, the `<key>` being the annotation name, the value being the annotation value. [1] | `4`; `` |
| Description | [`k8s.cronjob.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) | `Opt-In` | string | The label placed on the CronJob, the `<key>` being the label name, the value being the label value. [2] | `weekly`; `` |

**[1] `k8s.cronjob.annotation.<key>`:** Examples:

- An annotation `retries` with value `4` SHOULD be recorded as the
  `k8s.cronjob.annotation.retries` attribute with value `"4"`.
- An annotation `data` with empty string value SHOULD be recorded as
  the `k8s.cronjob.annotation.data` attribute with value `""`.

**[2] `k8s.cronjob.label.<key>`:** Examples:

- A label `type` with value `weekly` SHOULD be recorded as the
  `k8s.cronjob.label.type` attribute with value `"weekly"`.
- A label `automated` with empty string value SHOULD be recorded as
  the `k8s.cronjob.label.automated` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## ReplicationController

A ReplicationController ensures that a specified number of pod replicas are running at any one time.

<!-- semconv entity.k8s.replicationcontroller -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.replicationcontroller`

**Description:** A Kubernetes ReplicationController object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.replicationcontroller.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The UID of the replication controller. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.replicationcontroller.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the replication controller. | `opentelemetry` |
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## HorizontalPodAutoscaler

A HorizontalPodAutoscaler (HPA for short) automatically updates a workload resource
(such as a Deployment or StatefulSet), with the aim of automatically scaling the workload to match demand.

<!-- semconv entity.k8s.hpa -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.hpa`

**Description:** A Kubernetes HorizontalPodAutoscaler object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.hpa.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The UID of the horizontal pod autoscaler. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.hpa.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the horizontal pod autoscaler. | `opentelemetry` |
| Description | [`k8s.hpa.scaletargetref.api_version`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The API version of the target resource to scale for the HorizontalPodAutoscaler. [1] | `apps/v1`; `autoscaling/v2` |
| Description | [`k8s.hpa.scaletargetref.kind`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The kind of the target resource to scale for the HorizontalPodAutoscaler. [2] | `Deployment`; `StatefulSet` |
| Description | [`k8s.hpa.scaletargetref.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the target resource to scale for the HorizontalPodAutoscaler. [3] | `my-deployment`; `my-statefulset` |

**[1] `k8s.hpa.scaletargetref.api_version`:** This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA spec.

**[2] `k8s.hpa.scaletargetref.kind`:** This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.

**[3] `k8s.hpa.scaletargetref.name`:** This maps to the `name` field in the `scaleTargetRef` of the HPA spec.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## ResourceQuota

A ResourceQuota provides constraints that limit aggregate resource consumption per namespace.

<!-- semconv entity.k8s.resourcequota -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.resourcequota`

**Description:** A Kubernetes ResourceQuota object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.resourcequota.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The UID of the resource quota. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.resourcequota.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the resource quota. | `opentelemetry` |
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## PersistentVolume

A PersistentVolume (PV) is a piece of storage in the cluster that has been
provisioned by an administrator or dynamically provisioned using StorageClasses.

<!-- semconv entity.k8s.persistentvolume -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.persistentvolume`

**Description:** A Kubernetes [PersistentVolume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.persistentvolume.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | The UID of the PersistentVolume. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.persistentvolume.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the PersistentVolume. | `pv-data-01` |
| Description | [`k8s.storageclass.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object. | `gold.storageclass.storage.k8s.io` |
| Description | [`k8s.persistentvolume.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The annotation placed on the PersistentVolume, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `kubernetes.io/aws-ebs`; `` |
| Description | [`k8s.persistentvolume.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The label placed on the PersistentVolume, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `ssd`; `` |
| Description | [`k8s.persistentvolume.reclaim_policy`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The reclaim policy of the PersistentVolume. [3] | `Delete`; `Retain`; `Recycle` |

**[1] `k8s.persistentvolume.annotation.<key>`:** Examples:

- An annotation `pv.kubernetes.io/provisioned-by` with value `kubernetes.io/aws-ebs` SHOULD be recorded as
  the `k8s.persistentvolume.annotation.pv.kubernetes.io/provisioned-by` attribute with value `"kubernetes.io/aws-ebs"`.
- An annotation `data` with empty string value SHOULD be recorded as
  the `k8s.persistentvolume.annotation.data` attribute with value `""`.

**[2] `k8s.persistentvolume.label.<key>`:** Examples:

- A label `type` with value `ssd` SHOULD be recorded as
  the `k8s.persistentvolume.label.type` attribute with value `"ssd"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.persistentvolume.label.data` attribute with value `""`.

**[3] `k8s.persistentvolume.reclaim_policy`:** This attribute aligns with the `persistentVolumeReclaimPolicy` field of the
[K8s PersistentVolumeSpec](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeSpec).

---

`k8s.persistentvolume.reclaim_policy` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
| --- | --- | --- |
| `Delete` | The volume will be deleted when released from its claim. | ![Development](https://img.shields.io/badge/-development-blue) |
| `Recycle` | The volume will be recycled (basic scrub) when released from its claim. | ![Development](https://img.shields.io/badge/-development-blue) |
| `Retain` | The volume will be retained when released from its claim. | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## PersistentVolumeClaim

A PersistentVolumeClaim (PVC) is a request for storage by a user. It is similar
to a Pod in that Pods consume node resources and PVCs consume PV resources.

<!-- semconv entity.k8s.persistentvolumeclaim -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `k8s.persistentvolumeclaim`

**Description:** A Kubernetes [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) object.

**Attributes:**

| Role | Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`k8s.persistentvolumeclaim.uid`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | The UID of the PersistentVolumeClaim. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| Description | [`k8s.persistentvolumeclaim.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the PersistentVolumeClaim. | `pvc-data-01` |
| Description | [`k8s.storageclass.name`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object. | `gold.storageclass.storage.k8s.io` |
| Description | [`k8s.persistentvolumeclaim.annotation.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The annotation placed on the PersistentVolumeClaim, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty. [1] | `kubernetes.io/aws-ebs`; `` |
| Description | [`k8s.persistentvolumeclaim.label.<key>`](/docs/specs/semconv/registry/attributes/k8s.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | The label placed on the PersistentVolumeClaim, the `<key>` being the label name, the value being the label value, even if the value is empty. [2] | `my-app`; `` |

**[1] `k8s.persistentvolumeclaim.annotation.<key>`:** Examples:

- An annotation `volume.beta.kubernetes.io/storage-provisioner` with value `kubernetes.io/aws-ebs` SHOULD be recorded as
  the `k8s.persistentvolumeclaim.annotation.volume.beta.kubernetes.io/storage-provisioner` attribute with value `"kubernetes.io/aws-ebs"`.
- An annotation `data` with empty string value SHOULD be recorded as
  the `k8s.persistentvolumeclaim.annotation.data` attribute with value `""`.

**[2] `k8s.persistentvolumeclaim.label.<key>`:** Examples:

- A label `app` with value `my-app` SHOULD be recorded as
  the `k8s.persistentvolumeclaim.label.app` attribute with value `"my-app"`.
- A label `data` with empty string value SHOULD be recorded as
  the `k8s.persistentvolumeclaim.label.data` attribute with value `""`.
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

[DocumentStatus]: /docs/specs/otel/document-status

## Kubernetes specific guidelines

The following guidelines are specific to Kubernetes:

- [Service attributes](../../non-normative/k8s-attributes.md#service-attributes)
- [Naming known exceptions](../../non-normative/naming-known-exceptions.md)

---

Section pages:

- [Openshift](/docs/specs/semconv/resource/k8s/openshift/)
