<!--startmeta
custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/cgroups.plugin/integrations/kubernetes_containers.md"
meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/cgroups.plugin/metadata.yaml"
sidebar_label: "Kubernetes Containers"
learn_status: "Published"
learn_rel_path: "Collecting Metrics/Collectors/Containers and VMs"
keywords: ['k8s', 'kubernetes', 'pods', 'containers', 'openshift', 'rancher', 'rke', 'rke2', 'k3s', 'microk8s', 'eks', 'gke', 'aks', 'tanzu', 'minikube', 'kind', 'containerd', 'cri-o', 'kubelet', 'kubepods']
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->

# Kubernetes Containers


<img src="https://netdata.cloud/img/kubernetes.svg" width="150"/>


Plugin: cgroups.plugin
Module: /sys/fs/cgroup

<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />

## Overview

Monitor containers and virtual machines resource utilization — CPU, memory, disk I/O, network, and page cache activity — via Linux cgroups.



This collector is only supported on the following platforms:

- Linux

This collector supports collecting metrics from multiple instances of this integration, including remote instances.


Kubernetes Containers can be monitored further using the following other integrations:

- [Kubernetes Cluster State](/src/go/plugin/go.d/collector/k8s_state/integrations/kubernetes_cluster_state.md)
- [Kubernetes API Server](/src/go/plugin/go.d/collector/k8s_apiserver/integrations/kubernetes_api_server.md)
- [Kubelet](/src/go/plugin/go.d/collector/k8s_kubelet/integrations/kubelet.md)
- [Kubeproxy](/src/go/plugin/go.d/collector/k8s_kubeproxy/integrations/kubeproxy.md)
- [CoreDNS](/src/go/plugin/go.d/collector/coredns/integrations/coredns.md)

### Default Behavior

#### Auto-Detection

This integration doesn't support auto-detection.

#### Limits

The default configuration for this integration does not impose any limits on data collection.

#### Performance Impact

The default configuration for this integration is not expected to impose a significant performance impact on the system.

## Setup


### Prerequisites

No action required.

### Configuration

#### Options



There are no configuration options.



#### via File

There is no configuration file.

##### Examples
There are no configuration examples.



## Alerts


The following alerts are available:

| Alert name  | On metric | Description |
|:------------|:----------|:------------|
| [ k8s_cgroup_10min_cpu_usage ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.cpu_limit | average cgroup CPU utilization over the last 10 minutes |
| [ k8s_cgroup_ram_in_use ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.mem_usage | cgroup memory utilization |
| [ k8s_cgroup_1m_received_packets_rate ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.net_packets | average number of packets received by the network interface ${label:device} over the last minute |
| [ k8s_cgroup_10s_received_packets_storm ](https://github.com/netdata/netdata/blob/master/src/health/health.d/cgroups.conf) | k8s.cgroup.net_packets | ratio of average number of received packets for the network interface ${label:device} over the last 10 seconds, compared to the rate over the last minute |



## Metrics

Metrics grouped by *scope*.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.




### Per k8s cgroup

These metrics refer to the Pod container.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| k8s_node_name | Node name. The value of _pod.spec.nodeName_. |
| k8s_namespace | Namespace name. The value of _pod.metadata.namespace_. |
| k8s_controller_kind | Controller kind (ReplicaSet, DaemonSet, StatefulSet, Job, etc.). The value of _pod.OwnerReferences.Controller.Kind_. |
| k8s_controller_name | Controller name.The value of _pod.OwnerReferences.Controller.Name_. |
| k8s_pod_name | Pod name. The value of _pod.metadata.name_. |
| k8s_container_name | Container name. The value of _pod.spec.containers.name_. |
| k8s_kind | Instance kind: "pod" or "container". |
| k8s_qos_class | QoS class (guaranteed, burstable, besteffort). |
| k8s_cluster_id | Cluster ID. The value of kube-system namespace _namespace.metadata.uid_. |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| k8s.cgroup.cpu_limit | CPU Usage within the limits | used | percentage |
| k8s.cgroup.cpu | CPU Usage (100% = 1000 mCPU) | user, system | percentage |
| k8s.cgroup.cpu_per_core | CPU Usage (100% = 1000 mCPU) Per Core | a dimension per core | percentage |
| k8s.cgroup.throttled | CPU Throttled Runnable Periods | throttled | percentage |
| k8s.cgroup.throttled_duration | CPU Throttled Time Duration | duration | ms |
| k8s.cgroup.cpu_shares | CPU Time Relative Share | shares | shares |
| k8s.cgroup.mem | Memory Usage | cache, rss, swap, rss_huge, mapped_file | MiB |
| k8s.cgroup.writeback | Writeback Memory | dirty, writeback | MiB |
| k8s.cgroup.mem_activity | Memory Activity | in, out | MiB/s |
| k8s.cgroup.pgfaults | Memory Page Faults | pgfault, swap | MiB/s |
| k8s.cgroup.mem_usage | Used Memory | ram, swap | MiB |
| k8s.cgroup.mem_usage_limit | Used RAM within the limits | available, used | MiB |
| k8s.cgroup.mem_utilization | Memory Utilization | utilization | percentage |
| k8s.cgroup.mem_failcnt | Memory Limit Failures | failures | count |
| k8s.cgroup.io | I/O Bandwidth (all disks) | read, write | KiB/s |
| k8s.cgroup.serviced_ops | Serviced I/O Operations (all disks) | read, write | operations/s |
| k8s.cgroup.throttle_io | Throttle I/O Bandwidth (all disks) | read, write | KiB/s |
| k8s.cgroup.throttle_serviced_ops | Throttle Serviced I/O Operations (all disks) | read, write | operations/s |
| k8s.cgroup.queued_ops | Queued I/O Operations (all disks) | read, write | operations |
| k8s.cgroup.merged_ops | Merged I/O Operations (all disks) | read, write | operations/s |
| k8s.cgroup.cpu_some_pressure | CPU some pressure | some10, some60, some300 | percentage |
| k8s.cgroup.cpu_some_pressure_stall_time | CPU some pressure stall time | time | ms |
| k8s.cgroup.cpu_full_pressure | CPU full pressure | some10, some60, some300 | percentage |
| k8s.cgroup.cpu_full_pressure_stall_time | CPU full pressure stall time | time | ms |
| k8s.cgroup.memory_some_pressure | Memory some pressure | some10, some60, some300 | percentage |
| k8s.cgroup.memory_some_pressure_stall_time | Memory some pressure stall time | time | ms |
| k8s.cgroup.memory_full_pressure | Memory full pressure | some10, some60, some300 | percentage |
| k8s.cgroup.memory_full_pressure_stall_time | Memory full pressure stall time | time | ms |
| k8s.cgroup.io_some_pressure | I/O some pressure | some10, some60, some300 | percentage |
| k8s.cgroup.io_some_pressure_stall_time | I/O some pressure stall time | time | ms |
| k8s.cgroup.io_full_pressure | I/O some pressure | some10, some60, some300 | percentage |
| k8s.cgroup.io_full_pressure_stall_time | I/O some pressure stall time | time | ms |
| k8s.cgroup.pids_current | Number of processes | pids | pids |


### Per k8s cgroup network device

These metrics refer to the Pod container network interface.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| device | The name of the host network interface linked to the container's network interface. |
| container_device | Container network interface name. |
| interface_type | Network interface type. Always "virtual" for the containers. |
| k8s_node_name | Node name. The value of _pod.spec.nodeName_. |
| k8s_namespace | Namespace name. The value of _pod.metadata.namespace_. |
| k8s_controller_kind | Controller kind (ReplicaSet, DaemonSet, StatefulSet, Job, etc.). The value of _pod.OwnerReferences.Controller.Kind_. |
| k8s_controller_name | Controller name.The value of _pod.OwnerReferences.Controller.Name_. |
| k8s_pod_name | Pod name. The value of _pod.metadata.name_. |
| k8s_container_name | Container name. The value of _pod.spec.containers.name_. |
| k8s_kind | Instance kind: "pod" or "container". |
| k8s_qos_class | QoS class (guaranteed, burstable, besteffort). |
| k8s_cluster_id | Cluster ID. The value of kube-system namespace _namespace.metadata.uid_. |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| k8s.cgroup.net_net | Bandwidth | received, sent | kilobits/s |
| k8s.cgroup.net_packets | Packets | received, sent, multicast | pps |
| k8s.cgroup.net_errors | Interface Errors | inbound, outbound | errors/s |
| k8s.cgroup.net_drops | Interface Drops | inbound, outbound | errors/s |
| k8s.cgroup.net_fifo | Interface FIFO Buffer Errors | receive, transmit | errors/s |
| k8s.cgroup.net_compressed | Interface FIFO Buffer Errors | receive, sent | pps |
| k8s.cgroup.net_events | Network Interface Events | frames, collisions, carrier | events/s |
| k8s.cgroup.net_operstate | Interface Operational State | up, down, notpresent, lowerlayerdown, testing, dormant, unknown | state |
| k8s.cgroup.net_carrier | Interface Physical Link State | up, down | state |
| k8s.cgroup.net_mtu | Interface MTU | mtu | octets |


### Per cgroups plugin IPC

cgroups.plugin netipc lookup-server and discovery signal health.

This scope has no labels.

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| netdata.collector.ipc.cgroups_lookup.server.requests | CGROUPS_LOOKUP server request outcomes | requests_responded, requests_error, lookup_miss_signals_sent, lookup_miss_signals_coalesced | requests/s |
| netdata.collector.ipc.cgroups_lookup.server.request_duration_ms | CGROUPS_LOOKUP server request duration buckets | le_1ms, le_5ms, le_10ms, le_50ms, le_100ms, le_500ms, le_1000ms, gt_1000ms | requests/s |
| netdata.collector.cgroups.discovery.scans | cgroups discovery scans by trigger source | discovery_scans_natural, discovery_scans_opportunistic | scans/s |
