Kubernetes
Status: Experimental
Useful resources to understand Kubernetes objects and metadata:
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
type: k8s.cluster
Description: A Kubernetes Cluster.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.cluster.name |
string | The name of the cluster. | opentelemetry-cluster |
No |
Node
type: k8s.node
Description: A Kubernetes Node.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.node.name |
string | The name of the Node. | node-1 |
No |
k8s.node.uid |
string | The UID of the Node. | 1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2 |
No |
Namespace
Namespaces provide a scope for names. Names of objects need to be unique within a namespace, but not across namespaces.
type: k8s.namespace
Description: A Kubernetes Namespace.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.namespace.name |
string | The name of the namespace that the pod is running in. | default |
No |
Pod
The smallest and simplest Kubernetes object. A Pod represents a set of running containers on your cluster.
type: k8s.pod
Description: A Kubernetes Pod object.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.pod.uid |
string | The UID of the Pod. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
No |
k8s.pod.name |
string | The name of the Pod. | opentelemetry-pod-autoconf |
No |
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, which corresponds to a running container.
type: k8s.container
Description: A container in a PodTemplate.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.container.name |
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 |
No |
k8s.container.restart_count |
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. | 0 ; 2 |
No |
ReplicaSet
A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time.
type: k8s.replicaset
Description: A Kubernetes ReplicaSet object.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.replicaset.uid |
string | The UID of the ReplicaSet. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
No |
k8s.replicaset.name |
string | The name of the ReplicaSet. | opentelemetry |
No |
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.
type: k8s.deployment
Description: A Kubernetes Deployment object.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.deployment.uid |
string | The UID of the Deployment. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
No |
k8s.deployment.name |
string | The name of the Deployment. | opentelemetry |
No |
StatefulSet
Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods.
type: k8s.statefulset
Description: A Kubernetes StatefulSet object.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.statefulset.uid |
string | The UID of the StatefulSet. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
No |
k8s.statefulset.name |
string | The name of the StatefulSet. | opentelemetry |
No |
DaemonSet
A DaemonSet ensures that all (or some) Nodes run a copy of a Pod.
type: k8s.daemonset
Description: A Kubernetes DaemonSet object.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.daemonset.uid |
string | The UID of the DaemonSet. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
No |
k8s.daemonset.name |
string | The name of the DaemonSet. | opentelemetry |
No |
Job
A Job creates one or more Pods and ensures that a specified number of them successfully terminate.
type: k8s.job
Description: A Kubernetes Job object.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.job.uid |
string | The UID of the Job. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
No |
k8s.job.name |
string | The name of the Job. | opentelemetry |
No |
CronJob
A CronJob creates Jobs on a repeating schedule.
type: k8s.cronjob
Description: A Kubernetes CronJob object.
Attribute | Type | Description | Examples | Required |
---|---|---|---|---|
k8s.cronjob.uid |
string | The UID of the CronJob. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff |
No |
k8s.cronjob.name |
string | The name of the CronJob. | opentelemetry |
No |