newrelic-logging
by Helm
A Helm chart to deploy New Relic Kubernetes Logging as a DaemonSet, supporting both Linux and Windows nodes and containers
About this chart
newrelic-logging
Chart Details
New Relic offers a Fluent Bit output plugin to easily forward your logs to New Relic Logs. This plugin is also provided in a standalone Docker image that can be installed in a Kubernetes cluster in the form of a DaemonSet, which we refer as the Kubernetes plugin.
This document explains how to install it in your cluster using our Helm chart.
Install / Upgrade / Uninstall instructions
Despite the newrelic-logging chart being able to work standalone, we recommend installing it as part of the nri-bundle chart. The best way of doing so is through the guided installation process documented here. This guided install can generate the Helm 3 commands required to install it (select "Helm 3" in Step 3 from the previous documentation link). You can also opt to install it manually using Helm by following these steps. To uninstall it, refer to the steps outlined in this page.
Installing or updating the helm New Relic repository
To install the repo you can run:
helm repo add newrelic https://helm-charts.newrelic.com
To update the repo you can run:
helm repo update newrelic
Configuration
How to configure the chart
The newrelic-logging chart can be installed either alone or as part of the nri-bundle chart (recommended). The chart default settings should be suitable for most users. Nevertheless, you may be interested in overriding the defaults, either by passing them through a values-newrelic.yaml file or via the command line when installing the chart. Depending on how you installed it, you'll need to specify the newrelic-logging-specific configuration values using the chart name (newrelic-logging) as a prefix. In the table below, you can find a quick reference of how to configure the chart in these scenarios. The example depicts how you'd specify the mandatory licenseKey and cluster settings and how you'd override the fluentBit.retryLimit setting to 10.
# values-newrelic.yaml configuration contents
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_
fluentBit:
retryLimit: 10
# Install / upgrade command
helm upgrade --install newrelic-logging newrelic/newrelic-logging \
--namespace newrelic \
--create-namespace \
-f values-newrelic.yaml
# Install / upgrade command
helm upgrade --install newrelic-logging newrelic/newrelic-logging \
--namespace=newrelic \
--set licenseKey=_YOUR_NEW_RELIC_LICENSE_KEY_ \
--set cluster=_K8S_CLUSTER_NAME_ \
--set fluentBit.retryLimit=10
# values-newrelic.yaml configuration contents
# General settings that apply to all the child charts
global:
licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
cluster: _K8S_CLUSTER_NAME_
# Specific configuration for the newrelic-logging child chart
newrelic-logging:
fluentBit:
retryLimit: 10
# Install / upgrade command
helm upgrade --install newrelic-bundle newrelic/nri-bundle \
--namespace newrelic \
--create-namespace \
-f values-newrelic.yaml \
# Install / upgrade command
helm upgrade --install newrelic-bundle newrelic/nri-bundle \
--namespace=newrelic \
--set global.licenseKey=_YOUR_NEW_RELIC_LICENSE_KEY_ \
--set global.cluster=_K8S_CLUSTER_NAME_ \
--set newrelic-logging.fluentBit.retryLimit=10
Supported configuration parameters
See values.yaml for the default values
| Parameter | Description | Default |
|---|---|---|
global.cluster - cluster | The cluster name for the Kubernetes cluster. | |
global.licenseKey - licenseKey | The license key for your New Relic Account. This will be the preferred configuration option if both licenseKey and customSecret* values are specified. | |
global.customSecretName - customSecretName | Name of the Secret object where the license key is stored | |
global.customSecretLicenseKey - customSecretLicenseKey | Key in the Secret object where the license key is stored. | |
global.region - region | New Relic region of your account: US, EU, JP, STG or GOV. Detected automatically from the license key prefix when the key is set with licenseKey. Required when the license key is provided through customSecretName/customSecretLicenseKey, because the region cannot be inferred from a secret; otherwise the chart fails to render. Not needed with nrStaging or fedramp.enabled, which select their own endpoints. | detected from licenseKey |
endpoint | Overrides the New Relic Logs API endpoint (for example https://log-api.eu.newrelic.com/log/v1). Advanced override; most users should set region instead. When the license is in a custom secret, endpoint and metricsEndpoint must both be set, otherwise the chart fails to render. | derived from the region |
metricsEndpoint | Overrides the New Relic Metrics API host, without scheme (for example metric-api.eu.newrelic.com). Advanced override; most users should set region instead. When the license is in a custom secret, endpoint and metricsEndpoint must both be set, otherwise the chart fails to render. | derived from the region |
global.fargate | Must be set to true when deploying in an EKS Fargate environment. Prevents DaemonSet pods from being scheduled in Fargate nodes. | |
global.lowDataMode - lowDataMode | If true, send minimal attributes on Kubernetes logs. Labels and annotations are not sent when lowDataMode is enabled. | false |
global.fedramp.enabled - fedramp.enabled | If true, sends logs and metrics to New Relic's FedRAMP-compliant endpoints (gov-log-api.newrelic.com and gov-metric-api.newrelic.com). Requires a FedRAMP-authorized New Relic account. See Enable FedRAMP-compliant endpoints. | false |
rbac.create | Enable Role-based authentication | true |
rbac.pspEnabled | Enable pod security policy support | false |
image.repository | The container to pull. | newrelic/newrelic-fluentbit-output |
image.pullPolicy | The pull policy. | IfNotPresent |
image.pullSecrets | Image pull secrets. | nil |
image.tag | The version of the container to pull. | See value in [values.yaml]` |
exposedPorts | Any ports you wish to expose from the pod. Ex. 2020 for metrics |
Deploy newrelic-logging with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has newrelic-logging 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnewrelic-logging is pinned at v1.44.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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