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, or follow the instructions in this document to complete a basic Kubernetes installation with Helm. To install the integration using manifests, see Kubernetes integration: install and configure.
To use Kubernetes integrations and infrastructure monitoring, as well as the rest of our observability platform, join the New Relic family! Sign up to create your free account in only a few seconds. Then ingest up to 100GB of data for free each month. Forever.
Compatibility and requirements
Our Helm chart is compatible with both Helm 2 and 3. Make sure Helm is installed on your machine.
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
-
Make sure that
kube-state-metrics
is installed on your machine:kubectl get deployment --all-namespaces | grep kube-state-metrics
If it's not installed, follow the instructions in the kube-state-metrics GitHub repo to install it.
Install Kubernetes integration with Helm
Follow the instructions for your version of Helm:
- Helm 3
-
To install using Helm 3:
-
Set the cluster where you want to install the agent:
kubectl config set-cluster DESIRED_CLUSTER
To see the available clusters, run
kubectl config get-clusters
. -
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. (This step uses the
--dry-run
and--debug
switches and therefore the agent is not installed.)helm install newrelic/newrelic-infrastructure \ --dry-run \ --debug \ --set licenseKey=YOUR_NEW_RELIC_LICENSE_KEY \ --set cluster=K8S_CLUSTER_NAME \ --set config.custom_attributes.cluster=K8S_CLUSTER_NAME \ --generate-name
-
Install the Kubernetes integration:
helm install newrelic/newrelic-infrastructure \ --set licenseKey=yYOUR_NEW_RELIC_LICENSE_KEY \ --set cluster=K8S_CLUSTER_NAME \ --set config.custom_attributes.cluster=K8S_CLUSTER_NAME \ --generate-name
-
Wait a few seconds, then check that the
DaemonSet
and pods have been created:kubectl get daemonsets,pods
-
Make sure you see a
DaemonSet
, and one pod per node.
-
- Helm 2
-
To install using Helm 2:
-
Set the cluster where you want to install the agent:
kubectl config set-cluster DESIRED_CLUSTER
To see the available clusters, run
kubectl config get-clusters
-
If your cluster uses role-based access, create a service account for
tiller
(Helm's service which runs inside the Kubernetes cluster) using a Kubernetes manifest file:-
Paste the following in a manifest file
rbac-config.yaml
:apiVersion: v1 kind: ServiceAccount metadata: name: tiller namespace: kube-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: tiller roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: tiller namespace: kube-system
-
Create the service account and role by running:
kubectl create -f rbac-config.yaml
-
-
Initialize Helm so that
tiller
is installed in the cluster:helm init --history-max 200
-
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. (This step uses the
--dry-run
and--debug
switches and therefore the agent is not installed.)helm install newrelic/newrelic-infrastructure \ --dry-run \ --debug \ --set licenseKey=YOUR_NEW_RELIC_LICENSE_KEY \ --set cluster=K8S_CLUSTER_NAME \ --set config.custom_attributes.cluster=K8S_CLUSTER_NAME
-
Install the New Relic Kubernetes integration:
Note that the test switches have been removed.
helm install newrelic/newrelic-infrastructure \ --set licenseKey=your_new_relic_license_key \ --set cluster=K8S_CLUSTER_NAME \ --set config.custom_attributes.cluster=K8S_CLUSTER_NAME
-
Wait a few seconds, then check that the
DaemonSet
and pods have been created:kubectl get daemonsets,pods
-
Make sure you see a
DaemonSet
, and one pod per node.
-
Helm configuration options
When you install or upgrade the Kubernetes integration with Helm using the command line, you can pass your configuration variables with the --set
flag.
helm install newrelic/newrelic-infrastructure \ --set licenseKey=YOUR_NEW_RELIC_LICENSE_KEY \ --set cluster=YOUR_CLUSTER_NAME
Helm config parameters include:
Parameter | Description |
---|---|
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 you're using both |
global.customSecretName - customSecretName |
The name of the Secret object where the license key is stored. |
global.customSecretLicenseKey - customSecretLicenseKey |
The key in the Secret object where the license key is stored. |
config |
A |
enableLinux |
Deploys the Default is |
enableWindows |
Deploys the Default is |
integrations_config |
The list of integrations configured to monitor services running on Kubernetes. For more information, see Monitor services running on Kubernetes. |
disableKubeStateMetrics |
Disables Default is |
kubeStateMetricsUrl |
If provided, the discovery process for the |
kubeStateMetricsPodLabel |
If provided, we'll use this label to discover the |
kubeStateMetricsTimeout |
The timeout for accessing |
kubeStateMetricsScheme |
If Default is |
kubeStateMetricsPort |
If Default is |
rbac.create |
Enable role-based authentication./
Default is |
rbac.pspEnabled |
Enable pod security policy support. Default is |
privileged |
Enable privileged mode. Default is |
image.repository |
The container to pull. Default is |
image.pullPolicy |
The pull policy. Default is |
image.pullSecrets |
The image pull secrets. Default is |
image.tag |
The version of the container to pull. Default is |
image.windowsTag |
The version of the Windows container to pull. Default is |
resources |
Any resources you want to assign to the pod. For more information, see the resources documentation on GitHub. |
verboseLog |
Should the agent use a verbose log? (Boolean). Default is |
priorityClassName |
The scheduling priority of the pod. Default is |
nodeSelector |
The node label to use for scheduling. Default is |
windowsNodeSelector |
The Node label to use for scheduling on Windows nodes. Default is |
tolerations |
The list of node taints to tolerate (requires Kubernetes >= 1.6). For more information, see the tolerations documentation on GitHub. |
updateStrategy |
The strategy for DaemonSet updates (requires Kubernetes >= 1.6). Default is |
serviveAccount.create |
If Default is |
serviveAccount.name |
The service account to assign to the deployment. If |
serviveAccount.annotations |
The annotations to add to the service account if |
etcdTlsSecretName |
The name of the secret containing the cacert, cert, and key used for setting the mTLS config for retrieving metrics from ETCD. |
etcdTlsSecretNamespace |
The namespace where the secret specified in Default is |
etcdEndpointUrl |
Explicitly sets the |
apiServerSecurePort |
Set to query the API server over a secure port. |
apiServerEndpointUrl |
Explicitly sets the API server component URL. |
schedulerEndpointUrl |
Explicitly sets the scheduler component URL. |
controllerManagerEndpointUrl |
Explicitly sets the controller manager component URL. |
eventQueueDepth |
Increases the in-memory cache of the agent to accommodate for more samples at a time. |
enableProcessMetrics |
Enables the sending of process metrics to New Relic. Default is |
global.nrStaging - nrStaging |
Send data to staging (requires a staging license key). Default is |
discoveryCacheTTL |
Duration since the discovered endpoints are stored in the cache until they expire. Valid time units: Default is |
Update via Helm
To update your Kubernetes integration installed via Helm:
-
Update the local chart repository:
helm repo update
-
Get the release name of the
newrelic-infrastructure
chart:helm list
-
Update the release:
helm upgrade RELEASE_NAME newrelic/newrelic-infrastructure \ --set licenseKey=YOUR_NEW_RELIC_LICENSE_KEY \ --set cluster=K8S_CLUSTER_NAME \ --set config.custom_attributes.cluster=K8S_CLUSTER_NAME