Monitoring Kubernetes using Newrelic

The kube guy
DevOps.dev
Published in
3 min readMar 8, 2024

--

This article is part of Kubernetes monitoring series, if you wish you receive such articles do follow The kube guy

Welcome to kubernetes monitoring series, As we’ve seen how to setup Kubernetes monitoring using Promotheus and Grafana. In this article, we are going to explore another tool for the same usecase but with different pro’s and cons

Kubernetes monitoring using newrelic

Why Choose New Relic for Kubernetes Monitoring?

New Relic offers an integrated observability platform that provides real-time insights into your Kubernetes clusters. It allows you to monitor metrics, logs, and traces from your clusters in one place. With New Relic, you can:

  • Visualize the health and performance of your clusters
  • Track deployments and understand their impact
  • Identify and troubleshoot issues quickly
  • Optimize resource usage and performance

Prerequisites

Before you start, ensure you have:

  • A New Relic account. If you don’t have one, sign up for a free account.
  • A Kubernetes cluster where you have administrative access.
  • kubectl installed and configured to communicate with your cluster.

Step 1: Install the New Relic Kubernetes Integration

New Relic’s Kubernetes integration is packaged as a Helm chart, making it easy to install and configure. Helm is a package manager for Kubernetes that simplifies deploying applications and services.

  1. Add the New Relic Helm chart repository:
helm repo add newrelic https://helm-charts.newrelic.com

2. Update your Helm chart repository to ensure you have the latest charts:

helm repo update

3. Install the New Relic Kubernetes integration. Replace YOUR_CLUSTER_NAME with your cluster's name and YOUR_LICENSE_KEY with your New Relic license key:

helm install newrelic-bundle newrelic/nri-bundle \   
--set global.cluster=YOUR_CLUSTER_NAME \
--set global.licenseKey=YOUR_LICENSE_KEY \
--namespace=newrelic --create-namespace

This command installs the New Relic integration, including the infrastructure agent, logging, and other monitoring features, into the newrelic namespace.

Step 2: Configure Your Integration

After installing the integration, you might want to customize the configuration to meet your specific monitoring needs.

  1. Edit the configuration. You can modify the Helm chart values to adjust the integration’s settings. For example, to enable detailed logging, you can set logging.enabled to true in the values file.
  2. Apply your changes by upgrading your Helm release with the new configuration:
helm upgrade newrelic-bundle newrelic/nri-bundle -f your_values.yaml

Step 3: Explore Your Data in New Relic

Once the integration is installed and configured, New Relic will start collecting data from your Kubernetes cluster. To view this data:

  1. Log in to your New Relic account.
  2. Navigate to the Kubernetes cluster explorer. This dashboard provides a high-level view of your cluster’s health, including node usage, pod status, and deployment health.
  3. Drill down into specific metrics. You can click on nodes, pods, or deployments to view detailed metrics and logs.

Troubleshooting Common Issues

If you encounter issues during setup, check the following:

  • Ensure your New Relic license key is correct.
  • Verify that kubectl is properly configured to communicate with your cluster.
  • Check the logs of the New Relic pods in the newrelic namespace for errors.

Setting up Kubernetes monitoring with New Relic provides you with deep insights into your cluster’s performance and health. By following the steps outlined in this guide, you can quickly get started with monitoring your Kubernetes environment, allowing you to proactively manage and optimize your applications. Remember, monitoring is an ongoing process — regularly check your New Relic dashboard to stay informed about your cluster’s state and make data-driven decisions.

--

--

I'll help you sail through the ocean of Kubernetes with minimal efforts