Use the pod and container labels
- K8s 1.14 introduced the pod and container labels and deprecated the pod_name and container_name labels. K8s 1.16 removes the pod_name and container_name labels. - Metrics from K8s versions before 1.14 contain pod_name and container_name labels. Metrics from K8s 1.14/1.15 contain pod, pod_name, container and container_name labels. Metrics from K8s 1.16 onwards contain pod and container labels. - According to our docs, we need to support K8s 1.12 to 1.16. - This commit changes existing queries to use pod instead of pod_name and container instead of container_name. These changed queries should work on K8s 1.14 onwards. - This commit also adds a second query using `OR`. The second query uses pod_name instead of pod, and container_name instead of container. This second query should work on K8s 1.12 to 1.15.
Showing
Please register or sign in to comment