nri-bundle

by Helm

Helm chartv8.0.40

Groups together the individual charts for the New Relic Kubernetes solution for a more comfortable deployment.

About this chart

nri-bundle

Groups together the individual charts for the New Relic Kubernetes solution for a more comfortable deployment.

Homepage: https://github.com/newrelic/helm-charts

Bundled charts

This chart does not deploy anything by itself but has many charts as dependencies. This allows you to easily install and upgrade the New Relic Kubernetes Integration using only one chart.

In case you need more information about each component this chart installs, or you are an advanced user that want to install each component separately, here is a list of components that this chart installs and where you can find more information about them:

ComponentInstalled by default?Description
newrelic-infrastructureYesSends metrics about nodes, cluster objects (e.g. Deployments, Pods), and the control plane to New Relic.
nri-metadata-injectionYesEnriches New Relic-instrumented applications (APM) with Kubernetes information.
kube-state-metricsRequired for newrelic-infrastructure to gather cluster-level metrics.
nri-kube-eventsReports Kubernetes events to New Relic.
newrelic-infra-operator(Beta) Used with Fargate or serverless environments to inject newrelic-infrastructure as a sidecar instead of the usual DaemonSet.
newrelic-k8s-metrics-adapter(Beta) Provides a source of data for Horizontal Pod Autoscalers (HPA) based on a NRQL query from New Relic.
newrelic-loggingSends logs for Kubernetes components and workloads running on the cluster to New Relic.
nri-prometheusSends metrics from applications exposing Prometheus metrics to New Relic.
newrelic-prometheus-configuratorConfigures instances of Prometheus in Agent mode to send metrics to the New Relic Prometheus endpoint.
newrelic-pixieConnects to the Pixie API and enables the New Relic plugin in Pixie. The plugin allows you to export data from Pixie to New Relic for long-term data retention.
PixieIs an open source observability tool for Kubernetes applications that uses eBPF to automatically capture telemetry data without the need for manual instrumentation.
nr-ebpf-agentConfigures instances of the New Relic eBPF agent to automatically capture telemetry data without the need for manual instrumentation.
k8s-agents-operatorStreamlines full-stack observability for Kubernetes environments by automating APM instrumentation alongside Kubernetes agent deployment.

Configure components

It is possible to configure settings for the individual charts this chart groups by specifying values for them under a key using the name of the chart, as specified in helm documentation.

For example, by adding the following to the values.yml file:

# Configuration settings for the newrelic-infrastructure chart
newrelic-infrastructure:
  # Any key defined in the values.yml file for the newrelic-infrastructure chart can be configured here:
  # https://github.com/newrelic/nri-kubernetes/blob/main/charts/newrelic-infrastructure/values.yaml

  verboseLog: false

  resources:
    limits:
      memory: 512M

It is possible to override any entry of the newrelic-infrastructure chart, as defined in their values.yml file.

The same approach can be followed to update any of the subcharts.

After making these changes to the values.yml file, or a custom values file, make sure to apply them using:

$ helm upgrade --reuse-values -f values.yaml [RELEASE] newrelic/nri-bundle

Where [RELEASE] is the name of the helm release, e.g. newrelic-bundle.

Monitor on host integrations

If you wish to monitor services running on Kubernetes you can provide integrations configuration under integrations_config that it will passed down to the newrelic-infrastructure chart.

You just need to create a new entry where the "name" is the filename of the configuration file and the data is the content of the integration configuration. The name must end in ".yaml" as this will be the filename generated and the Infrastructure agent only looks for YAML files.

The data part is the actual integration configuration as described in the spec here: https://docs.newrelic.com/docs/integrations/integrations-sdk/file-specifications/integration-configuration-file-specifications-agent-v180

In the following example you can see how to monitor a Redis integration with autodiscovery

newrelic-infrastructure:
  integrations:
    nri-redis-sampleapp:
      discovery:
        command:
          exec: /var/db/newrelic-infra/nri-discovery-kubernetes --tls --port 10250
          match:
            label.app: sampleapp
      integrations:
        - name: nri-redis
          env:
            # using the discovered IP as the hostname address
            HOSTNAME: ${discovery.ip}
            PORT: 6379
          labels:
            env: test

Bring your own KSM

New Relic Kubernetes Integration requires an instance of kube-state-metrics (KSM) to be running in the cluster, which this chart pulls as a dependency. If you are already running or want to run your own KSM instance, you will need to make some small adjustments as described below.

Bring your own KSM

If you already have one KSM instance running, you can point nri-kubernetes to your instance:

kube-state-metrics:
  # Disable bundled KSM.
  enabled: false
newrelic-infrastructure:
  ksm:
    config:
      # Selector for your pre-installed KSM Service. You may need to adjust this to fit your existing installation.
      selector: "app.kubernetes.io/name=kube-state-metrics"
      # Alternatively, you can specify a fixed URL where KSM is available. Doing so will bypass autodiscovery.
      #staticUrl: http://ksm.ksm.svc.cluster.local:8080/metrics

Run KSM alongside a different version

If you need to run a different instance of KSM in your cluster, you can still run a separate instance for the Kubernetes Integration to work as intended:

kube-state-metrics:
  # Enable bundled KSM.
  enabled: true
  prometheusScrape: false
  customLabels:
    # Label unique to this KSM instance.
    newrelic.com/custom-ksm: "true"
newrelic-infrastructure:
  ksm:
    config:
      # Use label above as a selector.
      selector: "newrelic.com/custom-ksm=true"

For more information on supported KSM version visit the requirements documentation

Values managed globally

Some of the subchart implement the New Relic's common Helm library which means that it honors a wide range of defaults and globals common to most New Relic Helm charts.

Options that can be defined globally include affinity, nodeSelector, tolerations, proxy and others. The full list can be found at user's guide of the common library.

At the time of writing this document, all the charts from nri-bundle except newrelic-logging and synthetics-minion implements this library and honors global options as described below.

Note, the value table below is automatically generated from values.yaml by helm-docs. If you need to add new fields or update existing fields, please update the values.yaml and then run helm-docs to update this value table.

Values

KeyTypeDefaultDescription
globalobjectSee values.yamlchange the behaviour globally to all the supported helm charts. See user's guide of the common library for further information.
global.affinityobject{}Sets pod/node affinities
global.clusterstring""The cluster name for the Kubernetes cluster.
global.containerSecurityContextobject{}Sets security context (at container level)
global.customAttributesobject{}Adds extra attributes to the cluster and all the metrics emitted to the backend
global.customSecretLicenseKeystring""Key in the Secret object where the license key is stored
global.customSecretNamestring""Name of the Secret object where the license key is stored
global.dnsConfigobject{}Sets pod's dnsConfig
global.fargateboolfalseMust be set to true when deploying in an EKS Fargate environment
global.hostNetworkboolfalseSets pod's hostNetwork
global.images.pullSecretslist[]Set secrets to be able to fetch images
global.images.registrystring""Changes the registry where to get the images. Useful when there is an internal image cache/proxy
global.insightsKeystring""The license key for your New Relic Account. This will be preferred configuration option if both insightsKey and customSecret are specified.
global.labelsobject{}Additional labels for chart objects
global.licenseKeystring""The license key for your New Relic Account. This will be preferred configuration option if both licenseKey and customSecret are specified.
global.lowDataModeboolfalseReduces number of metrics sent in order to reduce costs
global.nodeSelectorobject{}Sets pod's node selector
global.nrStagingboolfalseSend the metrics to the staging backend. Requires a valid staging license key
global.podLabelsobject{}Additional labels for chart pods
global.podSecurityContextobject{}Sets security context (at pod level)
global.priorityClassNamestring""Sets pod's priorityClassName
global.privilegedboolfalseIn each integration it has different behavior. See Further information but all aims to send less metrics to the backend to try to save costs
global.providerstringnilThe provider that hosts your cluster. Sub charts may have support for specific providers and will automatically set config constraints for them.
global.proxystring""Configures the integration to send all HTTP/HTTPS request through the proxy in that URL. The URL should have a standard format like https://user:password@hostname:port
global.serviceAccount.annotationsobject{}Add these annotations to the service account we create
global.serviceAccount.createstringnilConfigures if the service account should be created or not
global.serviceAccount.namestringnilChange the name of the service account. This is honored if you disable on this chart the creation of the service account so you can use your own
global.tolerationslist[]Sets pod's tolerations to node taints
global.verboseLogboolfalseSets the debug logs to this integration or all integrations if it is set globally
k8s-agents-operator.enabledboolfalseInstall the k8s-agents-operator chart
kube-state-metrics.enabledboolfalseInstall the kube-state-metrics chart from the stable helm charts repository. This is mandatory if infrastructure.enabled is set to true and the user does not provide its own instance of KSM version >=1.8 and <=2.0. Note, kube-state-metrics v2+ disables labels/annotations metrics by default. You can enable the target labels/annotations metrics to be monitored by using the metricLabelsAllowlist/metricAnnotationsAllowList options described here in your Kubernetes clusters.
kube-state-metrics.metricAnnotationsAllowListlist["pods=[*]", "namespaces=[*]", "deployments=[*]"]List of Kubernetes annotation keys that will be used in the resources' annotations metric. By default, kube-state-metrics v2+ does not expose annotations as metric labels. This option allows you to specify which annotations should be exposed as metric dimensions. Each entry is formatted as "resource=[annotation1,annotation2,...]". Use "*" to include all annotations for a resourc

Deploy nri-bundle with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nri-bundle on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnri-bundle is pinned at v8.0.40 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply