Helm is a package manager on top of Kubernetes. It facilitates installation, upgrades, or revision tracking, and it manages dependencies for the services that you install in Kubernetes.
To install the integration using Helm, we recommend our Kubernetes automated installer, which will prompt for almost all configuration options and autopopulate secrets and values for you. Additionally, our automated installer also allows to install our integration as plain manifests rather than a Helm release. See Kubernetes integration: install and configure for more details about how to use our automated installer.
This page describes in more depth how to install and configure the New Relic integration without using the automated installer.
Make sure Helm is installed on your machine. We strongly recommend using Helm 3 to manage the Kubernetes integration. Our charts are also compatible with Helm 2, but support for it might be removed in the future.
To install the Kubernetes integration using Helm, you will need your New Relic account license key and your Kubernetes cluster's name:
- Find and copy your New Relic license key.
- Find the name of your cluster with this command:
kubectl config current-context
Note this values somewhere safe as you will need them later during the installation process.
New Relic has several charts for the different components which offer different features for the platform:
newrelic-infrastructure: Contains the main Kubernetes integration and the infrastructure agent. This is the core component for the New Relic Kubernetes experience, responsible of reporting most of the data that is surfaced in dashboard and the Kubernetes Cluster Explorer.
newrelic-logging: Provides a DaemonSet with New Relic's Fluent Bit output plugin to easily forward your logs to New Relic.
nri-kube-events: Collects and reports cluster events (such as
kubectl get events) to New Relic.
nri-prometheus: New Relic's Prometheus OpenMetrics Integration, automatically scrapes Prometheus endpoints present in the cluser and reports metrics to New Relic.
nri-metadata-injection: Sets up a minimal
MutatingAdmissionWebhookthat injects a couple of environment to containers. These contain metadata about the cluster and New Relic installation and will be later picked up by applications instrumented using APM, allowing to correlate APM and infrastructure data.
nri-statsd: New Relic StatsD integration.
Additionally, New Relic provides
nri-bundle, a chart which pulls a selectable set of the charts mentioned above.
nri-bundle can also install Kube State Metrics and Pixie for you if needed.
While it is possible to install those charts separately, we strongly recommend using the
nri-bundle chart for Kubernetes deployments, as it ensures that values across all the charts are consistent and provides full control over which components are installed, as well as the possibility to configure all of them as Helm dependencies. This is the same chart that is used and referenced by our automated installer.
- Ensure you are using the appropriate context in the machine where you will run Helm and
You can check the available contexts with:
kubectl config get-contexts
And switch to the desired context using:
kubectl config use-context CONTEXT_NAME
- Add the New Relic Helm charts repo:
helm repo add newrelic https://helm-charts.newrelic.com
- Make sure everything is configured properly in the chart by running the following command. Notice that we are specifying
--debug, so nothing will be installed in this step:
helm upgrade --install newrelic newrelic/nri-bundle \ --dry-run \ --debug \ --namespace newrelic --create-namespace \ --set global.licenseKey=YOUR_NEW_RELIC_LICENSE_KEY \ --set global.cluster=K8S_CLUSTER_NAME \ --set ksm.enabled=true \ --set newrelic-infrastructure.privileged=true \ --set infrastructure.enabled=true \ --set prometheus.enabled=true \ --set webhook.enabled=true \ --set kubeEvents.enabled=true \ --set logging.enabled=true
Please notice and adjust the following flags:
global.licenseKey=<var>YOUR_NEW_RELIC_LICENSE_KEY</var>: Must be set to a valid License Key for your account.
global.cluster=<var>K8S_CLUSTER_NAME</var>: Is used to identify the cluster in the New Relic UI, so should be a descriptive value not used by any other Kubernetes cluster configured in your New Relic account.
ksm.enabled=<mark>true</mark>: Setting this to
truewill automatically install Kube State Metrics (KSM) for you, which is required for our integration to run. You can set this to false if KSM is already present in your cluster, even if it is on a different namespace.
newrelic-infrastructure.privileged=<mark>true</mark>: Can be set to
falseto install a trimmed down version of our integration that does not require extra privileges, such as
hostPathmounts or running containers as root.
- Please note that this will disable detailed process collection from the host.
- For performance reasons, our logging solution still requires
hostPathmounts, regardless of the value of this flag. If this is not allowedin your cluster, you will need to disable the logging solution by specifying
prometheus.enabled=true: Will deploy our Prometheus OpenMetrics integration, which automatically collects data from prometheus endpoints present in the cluster.
webhook.enabled=true: Will install our minimal webhook, which adds environment variables that, in turn, allows linking applications instrumented with APM with infrastructure data.
Our chart has a comprehensive set of flags and tunables that can be edited to configure our solution to your particular needs. For a full list of all the flags that can be configured, please check the chart's README and the default
- Install the Kubernetes integration by running the customized command without
helm upgrade --install newrelic newrelic/nri-bundle \ --namespace newrelic --create-namespace \ --set global.licenseKey=YOUR_NEW_RELIC_LICENSE_KEY \ --set global.cluster=K8S_CLUSTER_NAME \ --set ksm.enabled=true \ --set newrelic-infrastructure.privileged=true \ --set infrastructure.enabled=true \ --set prometheus.enabled=true \ --set webhook.enabled=true \ --set kubeEvents.enabled=true \ --set logging.enabled=true
- Wait a few seconds, then check that the
DaemonSetand pods have been created:
kubectl -n newrelic get daemonsets,pods
- Make sure you see a
DaemonSet, and one pod per node for
newrelic-infrastructure, as well as one
Deploymentand one pod for any other component that you have enabled.
To update your Kubernetes integration installed via Helm:
- Update the local chart repository:
helm repo update
- Update the release by running again the appropriate
helm upgrade --install ...command in the section above.
After having installed our Kubernetes integration, you can start instrumenting the services than run in your cluster. To learn more about how to do this, please check our Monitor services running on Kubernetes page.
To learn more about how to use your Kubernetes data, please head to our detailed Find and use your Kubernetes data pages.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.