You can install the New Relic eBPF agent on your Kubernetes cluster to monitor your entire system health. The eBPF agent provides deep visibility into application performance without requiring code changes or deploying language-specific agents.
Install New Relic eBPF agent
Before you begin
You must meet the prerequisites outlined in the eBPF compatibility and requirements documentation for Kubernetes clusters.
Install the eBPF agent
To install the eBPF agent:
Log in to your New Relic account.
Go to left navigation pane > + Integration & Agents > eBPF Agent.
On the Select an account screen, select the account you want to install the eBPF agent on, and click Continue.
On the Select an installation method page, select Kubernetes, and click Continue.
On the Enter your user key screen, select one of the following options, then click Continue:
- Use an existing key: If you already have a user key, provide the user key. For more information, refer to User keys.
- Create a new key: If you don't have a user key, click Create a new key to create one.
On the Configure the Kubernetes integration screen:
- Enter the deployment name for the Kubernetes.
- (Optional) Enter the namespace for the integration. The default namespace is
newrelic. - Click Continue.
Dica
If you choose a custom namespace for your New Relic instrumentation (instead of the default
newrelic), we recommend excluding that namespace from monitoring by adding it to thedropDataForNamespacesconfiguration parameter. This prevents the eBPF agent from monitoring the instrumentation pods themselves. For example, if you usenewrelic-monas your namespace, set:dropDataForNamespaces: ["kube-system", "newrelic-mon"].On the Install the Kubernetes integration screen:
Copy and paste the displayed command to install the eBPF agent on your Kubernetes cluster using Helm.
(Optional) To download the
values.yamlconfiguration file, click Download. For more on the configuration parameters, refer to K8s configuration parameters.(Optional) Update the
values.yamlfile as needed and save it.(Optional) To apply the configuration changes, run the following command:
bash$helm repo update ; helm upgrade --install nr-ebpf-agent newrelic/nr-ebpf-agent -n newrelic --values values.yamlTo verify the installation, run the following command:
bash$kubectl get pods -n newrelic
Access the eBPF data in New Relic
Once the eBPF agent is installed, it automatically starts collecting data from your Linux host. You can access this data in New Relic's OpenTelemetry UI. For more information on New Relic OpenTelemetry UI, refer OpenTelemetry APM UI.
To view the eBPF data in New Relic:
- Go to one.newrelic.com > APM & Services.
- In the search banner, set the search criteria as
instrumentation.name = nr_ebpf:
Upgrade the eBPF agent
To upgrade the eBPF agent in a Kubernetes cluster:
- For a standard upgrade: Use the following Helm command to upgrade to the latest version:
$KSM_IMAGE_VERSION="v2.13.0" && helm repo add newrelic https://helm-charts.newrelic.com && helm repo update && kubectl create namespace "newrelic" ; helm upgrade --install nr-ebpf-agent newrelic/nr-ebpf-agent --set licenseKey=<key> --set cluster="<cluster-name>" --namespace=newrelic- For a specific version upgrade: To upgrade to a specific version, use the
--versionflag:
$KSM_IMAGE_VERSION="v2.13.0" && helm repo add newrelic https://helm-charts.newrelic.com && helm repo update && kubectl create namespace "newrelic" ; helm upgrade --install nr-ebpf-agent newrelic/nr-ebpf-agent --set licenseKey=<key> --set cluster="<cluster-name>" --namespace=newrelic --version=0.2.5Replace <key> with your New Relic license key and <cluster-name> with your cluster name.
Configuration parameters
The values.yaml file contains the following configuration sections:
Uninstall the eBPF agent
To uninstall the eBPF agent from your Kubernetes cluster:
$helm uninstall nr-ebpf-agent -n newrelicDica
This command will remove all eBPF agent components from your cluster. The namespace will remain unless you explicitly delete it.