現在、このページは英語版のみです。

New Relic's Complexity in Context video series is designed to give you a clear, hands-on understanding of how to use New Relic to cut through the complexity of distributed technologies in modern software environments. In this second episode, we’ll walk you through how to monitor Kubernetes with New Relic, so you can quickly troubleshoot and explore the different layers of your Kubernetes clusters.

To fully track and understand the performance of your Kubernetes environment, you have to rethink your monitoring strategies to account for new layers introduced in such complex, distributed environments. Among other things, you need to proactively monitor data and metadata for nodes, deployments, pods, containers, as well as frontend and backend applications and distributed traces, and hosts running in your Kubernetes clusters.


There are plenty of layers to monitor in a Kubernetes environment.

You can read through the steps here, and then watch the entire 4:47 video embedded at the end of the post.

Deploy the New Relic Infrastructure agent

To get started monitoring Kubernetes with New Relic, you'll need to deploy and configure the New Relic Infrastructure agent for your Kubernetes cluster. As of April 2019, we support Kubernetes 1.6 and higher, as well as managed services like Amazon Elastic Container Service for Kubernetes (EKS), Google Kubernetes Engine (GKE), Azure Kubernetes Service (AKS), and Openshift. Within minutes of deploying the agent, you'll have access to key metrics like container CPU usage, memory usage, container restarts, and a lot more.

(Follow the instructions in the New Relic user interface or refer our Kubernetes integration documentation for more information on installation and configuration.)

Operational views with the Kubernetes integration dashboard

Immediately after deploying the agent, you'll be able to access the Kubernetes integration dashboard:


The default Kubernetes integration dashboard

In addition to giving visibility into operational data like number of resources used, name spaces per cluster, name spaces per pod, and container restarts, the dashboard displays the relationship between objects in the cluster:


The default Kubernetes integration dashboard allows deep views into your clusters.

The default dashboard is a good starting point for monitoring your cluster, but to understand what’s really happening in your cluster, you'll want to delve deeper using the Kubernetes cluster explorer.

Troubleshoot with the Kubernetes cluster explorer

With the cluster explorer, you can observe performance and dependencies across your entire Kubernetes environment. This sample of the default view shows a cluster of nine nodes with concentric circles:


The default view in Kubernetes cluster explorer.

Each circle in the explorer represents an area of interest. The outer ring shows nodes in the cluster. Each node representation has an indicator for CPU and memory usage and storage. As you move inward, hexagons represent the distribution and status of pods associated with a selected node. For example, if a pod is red, an alerting threshold has been breached; even if it’s running, the pod likely has a health issue. Finally, pods in the center require critical attention; these pods either aren’t running or Kubernetes is unable to schedule them.

Click into a pod to access detailed information about any dependencies in the pod, as well as to view specific performance metrics for the containers and applications running in the pod.

In the example shown below, the pod details show the pod is pending, and the container is waiting, due to an invalid image name:


The Kubernetes cluster explorer can give you detailed information and performance metrics for any pod in a cluster.

Finally, use the cluster explorer’s advanced filtering to divide and view your cluster in multiple ways. Select the namespaces, deployments, or labels you care about for a more accurate view—based on what's important to you and your role. You can also view a complete list of all nodes, pods, and containers in a cluster, and filter the list by status as you troubleshoot.


Use filtering options in the Kubernetes cluster explorer for advanced troubleshooting.

Monitor performance metrics from apps hosted in Kubernetes

From within the Kubernetes cluster explorer, you can also see important details about any applications your cluster is hosting, including access to metrics that track response time, throughput, error rate, and violations. Any pods running an application instrumented with New Relic APM will have links in the pod details pane to the APM overview page and the distributed tracing page.


See important APM or distributed tracing data in the pod-details pane of the Kubernetes cluster explorer.

These links help you correlate your infrastructure and applications, so you can troubleshoot issues regardless of which side you approach the problem from.

Watch the video and get started

With the Kubernetes integration and cluster explorer, New Relic provides a proactive approach to monitoring your Kubernetes environment. The integration is available to all New Relic Infrastructure customers at the Pro level.

 

Additional Resources: