You can build your own charts and query all your Kubernetes integration data using the query builder and the NerdGraph API. Our integration collects Kubernetes data by instrumenting the container orchestration layer. For a simpler and more visual experience, use the cluster explorer .
one.newrelic.com > All capabilities > Dashboards : Using the query builder you can query your Kubernetes data and create clear visualizations.
Query Kubernetes data The simplest way to query your Kubernetes data is using the query builder , which accepts NRQL queries . Alternatively, you can use the NerdGraph API to retrieve Kubernetes data.
Events and attributes Kubernetes data is attached to the following events . You can learn more about this data in our data dictionary .
Event name
Type of Kubernetes data
Available since
K8sNodeSample
Node data
v1.0.0
K8sNamespaceSample
Namespace data
v1.0.0
K8sDeploymentSample
Deployment data
v1.0.0
K8sReplicasetSample
ReplicaSet data
v1.0.0
K8sDaemonsetSample
DaemonSet data
v1.13.0
K8sStatefulsetSample
StatefulSet data
v1.13.0
K8sPodSample
Pod data
v1.0.0
K8sClusterSample
Cluster data
v1.0.0
K8sContainerSample
Container data
v1.0.0
K8sVolumeSample
Volume data
v1.0.0
K8sApiServerSample
API server data
v1.11.0
K8sControllerManagerSample
Controller manager data
v1.11.0
K8sSchedulerSample
Scheduler data
v1.11.0
K8sEtcdSample
etcd data
v1.11.0
K8sEndpointSample
Endpoint data
v1.13.0
K8sServiceSample
Service data
v1.13.0
K8sHpaSample
Horizontal Pod Autoscaler data
v2.3.0
K8sCronjobSample
CronJob data
v3.10.0
K8sJobSample
Job data
v3.10.0
To learn more about these events and their attributes, see our data dictionary .
Kubernetes metadata in APM-monitored applications By linking your applications with Kubernetes , the following attributes are added to application trace and distributed trace:
nodeName
containerName
podName
clusterName
deploymentName
namespaceName
Manage alerts You can be notified about alerts and incidents for your Kubernetes data:
Create an alert condition To create an alert condition for the Kubernetes integration:
Go to one.newrelic.com > All capabilities > Infrastructure > Settings > Alerts > Kubernetes , then select Create alert condition .
To filter the alert to Kubernetes entities that only have the chosen attributes, select Filter .
Select the threshold settings. For more on the Trigger an alert when... options, see Alert types .
Select an existing alert policy , or create a new one.
Select Create .
When an alert condition's threshold is triggered, New Relic sends a notification to the policy's notification channels.
Use the predefined alert types and thresholds The Kubernetes integration comes with its own alert policy and alert conditions. To see what the predefined alert conditions are, see Kubernetes integration: Predefined alert policy .
In addition, you can create an alert condition for any metric collected by any New Relic integration you use, including the Kubernetes integration:
Select the alert type Integrations . From the Select a data source dropdown, select a Kubernetes (K8s) data source. Select alert notifications When an alert condition's threshold is triggered, New Relic sends a message to the notification channel(s) chosen in the alert policy. Depending on the type of notification, you may have the following options:
View the incident .
Acknowledge the incident .
Go to a chart of the incident data by selecting the identifier name.
The entity identifier that triggered the alert appears near the top of the notification message. The format of the identifier depends on the alert type:
Available pods are less than desired pods alerts:
K8s:CLUSTER_NAME:PARENT_NAMESPACE:replicaset:REPLICASET_NAME
CPU or memory usage alerts:
K8s:CLUSTER_NAME:PARENT_NAMESPACE:POD_NAME:container:CONTAINER_NAME
Here are some examples.
Pod alert notification example For Available pods are less than desired pods alerts, the ID of the ReplicaSet
triggering the issue might look like this:
k8s:beam-production:default:replicaset:nginx-deployment-1623441481
This identifier contains the following information:
Cluster name: beam-production
Parent namespace: default
ReplicaSet
name: nginx-deployment-1623441481
Container resource notification example For container CPU or memory usage alerts, the entity might look like this:
k8s:beam-production:kube-system:kube-state-metrics-797bb87c75-zncwn:container:kube-state-metrics
This identifier contains the following information:
Cluster name: beam-production
Parent namespace: kube-system
Pod namespace: kube-state-metrics-797bb87c75-zncwn
Container name: kube-state-metrics
Create alert conditions using NRQL