How to integrate and monitor Kubernetes with New Relic

Cloud-based performance management tool New Relic is best known for its role in DevOps and security, but it can also perform full-stack monitoring for various workload types. These features make New Relic ideal for organizations running Kubernetes, as it simplifies monitoring and helps IT teams identify issues in their containerized environments.

In this tutorial, you will learn how to integrate New Relic with Kubernetes to improve observability in your Kubernetes clusters.

New Relic Kubernetes integration

New Relic can be integrated into Kubernetes manually or through a guided installation process. In this tutorial, we will demonstrate guided installation, which tends to be faster and easier. It also eliminates the need to worry about deploying agents on each individual node like some monitoring tools do.

To integrate New Relic with Kubernetes, log in to the New Relic console and then click the Add more data button at top right. The next screen will ask you what type of data you want to add. Those using New Relic for the first time will be automatically redirected to the Guided installation Screen; otherwise click the Guided installation Button.

On the Guided installation On the screen, select the environment you are running Kubernetes in: Linux, Windows, Docker, or Kubernetes. After making your selection, the console displays a CLI command that is used to download the New Relic CLI from GitHub.

New Relic automatically performs several tasks after installing the CLI: it discovers the system, installs the recommended infrastructure integrations, and installs and configures the New Relic protocols. If you don’t want to perform these tasks, skip them by clicking Customize your installation and clearing the appropriate checkboxes.

Next, copy the CLI command and paste it into your system. New Relic automatically detects all running Kubernetes-related services. Disable any of the items detected by selecting the item and pressing the spacebar, although it is usually advisable to install everything.

After running the CLI command, the following instructions are displayed:

Welcome to New Relic. Let’s install some instruments.

Questions? Read more about our installation process at https://docs.newrelic.com/

The guided installation begins by installing the New Relic Infrastructure agent, which is required for additional instrumentation.

? Please select from the recommended additional instruments to be installed: [Use arrows to move, space to select, <right> to all, <left> to none, type to filter]
> [x] protocol integration
[x] JMX open source integration
[x] MySQL open source integration
[x] Redis open source integration

The installer then installs the New Relic Infrastructure Agent and gives you the option to include different log sources. At this point, the installer may prompt you for credentials that give the installer permission to complete the installation process.

Once the installation is complete, navigate back to Guided installation Screen in New Relic and click See your data to close the guided installation process and return to the screen showing the data for your monitored systems.

Monitoring Kubernetes clusters with New Relic

After deploying the New Relic Infrastructure Agent, you can start monitoring your Kubernetes environment.

In the New Relic console, select the On host integrations tab and click Kubernetes dashboard. This dashboard shows some basic information—like the number of containers, namespaces, and pods being monitored—as well as diagnostic information. For example, the dashboard can show the number of container restarts over the last hour and compare container CPU usage to any specified thresholds. Similar metrics are available for memory and volume consumption.

To view information beyond what is shown on the dashboard, navigate to New Relic’s Kubernetes Cluster Explorer by selecting the Kubernetes tab at the top of the screen. This screen displays a circular graph with individual nodes shown outside the circle.

Each node icon contains a color-coded indicator that reflects the node’s CPU, memory, and storage resource availability. The inner part of the circular diagram shows a hexagonal icon corresponding to each pod. Usually these icons are blue; Yellow indicates a warning and red indicates that the pod is in a critical state. Click on a pod or node to access additional details about its status.

Leave a Reply

Your email address will not be published. Required fields are marked *