-
Notifications
You must be signed in to change notification settings - Fork 191
/
Copy pathk8s.yaml
179 lines (175 loc) · 6.3 KB
/
k8s.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
groups:
- id: registry.k8s
prefix: k8s
type: attribute_group
brief: >
Kubernetes resource attributes.
attributes:
- id: cluster.name
type: string
stability: experimental
brief: >
The name of the cluster.
examples: ['opentelemetry-cluster']
- id: cluster.uid
type: string
stability: experimental
brief: >
A pseudo-ID for the cluster, set to the UID of the `kube-system`
namespace.
note: |
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.
examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d']
- id: node.name
type: string
stability: experimental
brief: >
The name of the Node.
examples: ['node-1']
- id: node.uid
type: string
stability: experimental
brief: >
The UID of the Node.
examples: ['1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2']
- id: namespace.name
type: string
stability: experimental
brief: >
The name of the namespace that the pod is running in.
examples: ['default']
- id: pod.uid
type: string
stability: experimental
brief: >
The UID of the Pod.
examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff']
- id: pod.name
type: string
stability: experimental
brief: >
The name of the Pod.
examples: ['opentelemetry-pod-autoconf']
- id: pod.label
type: template[string]
stability: experimental
brief: >
The label key-value pairs placed on the Pod, the `<key>` being the label name, the value being the label value.
examples: ['k8s.pod.label.app=my-app', 'k8s.pod.label.mycompany.io/arch=x64', 'k8s.pod.label.data=']
- id: pod.annotation
type: template[string]
stability: experimental
brief: >
The annotation key-value pairs placed on the Pod, the `<key>` being the annotation name, the value being the annotation value.
examples: [ 'k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true', 'k8s.pod.annotation.mycompany.io/arch=x64', 'k8s.pod.annotation.data=' ]
- id: container.name
type: string
stability: experimental
brief: >
The name of the Container from Pod specification, must be unique
within a Pod. Container runtime usually uses different globally unique
name (`container.name`).
examples: ['redis']
- id: container.restart_count
type: int
stability: experimental
brief: >
Number of times the container was restarted. This attribute can be
used to identify a particular container (running or stopped) within a
container spec.
- id: container.status.last_terminated_reason
type: string
stability: experimental
brief: >
Last terminated reason of the Container.
examples: ["Evicted", "Error"]
- id: replicaset.uid
type: string
stability: experimental
brief: >
The UID of the ReplicaSet.
examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff']
- id: replicaset.name
type: string
stability: experimental
brief: >
The name of the ReplicaSet.
examples: ['opentelemetry']
- id: deployment.uid
type: string
stability: experimental
brief: >
The UID of the Deployment.
examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff']
- id: deployment.name
type: string
stability: experimental
brief: >
The name of the Deployment.
examples: ['opentelemetry']
- id: statefulset.uid
type: string
stability: experimental
brief: >
The UID of the StatefulSet.
examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff']
- id: statefulset.name
type: string
stability: experimental
brief: >
The name of the StatefulSet.
examples: ['opentelemetry']
- id: daemonset.uid
type: string
stability: experimental
brief: >
The UID of the DaemonSet.
examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff']
- id: daemonset.name
type: string
stability: experimental
brief: >
The name of the DaemonSet.
examples: ['opentelemetry']
- id: job.uid
type: string
stability: experimental
brief: >
The UID of the Job.
examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff']
- id: job.name
type: string
stability: experimental
brief: >
The name of the Job.
examples: ['opentelemetry']
- id: cronjob.uid
type: string
stability: experimental
brief: >
The UID of the CronJob.
examples: ['275ecb36-5aa8-4c2a-9c47-d8bb681b9aff']
- id: cronjob.name
type: string
stability: experimental
brief: >
The name of the CronJob.
examples: ['opentelemetry']