• EnglishEspañol日本語한국어Português
  • Log inStart now

Create your own manifest file

You can create your own manifest file using Helm to cover all your needs, such as to set the proxy you want to use. To understand all the power of Helm, we recommend you to read how to install Kubernetes integration using Helm before going through this document.

Compatibility and requirements

  • Ensure Helm matches your Kubernetes integration version. For example, version 3 of the Kubernetes integration requires Helm version 3.
  • A New Relic account. Don't have one? Sign up for free! No credit card required.
  • Your New Relic .
  • Your Kubernetes cluster's name.
    • If you need a display name for your cluster, you can use the output of the following command:
      bash
      $
      kubectl config current-context

Templating Kubernetes integration with Helm

Important

Installing and upgrading using a manifest isn't supported and is prone to errors. Be completely sure that this is the approach you need for your environment.

  1. Add the New Relic Helm charts repository by running:

    bash
    $
    helm repo add newrelic https://helm-charts.newrelic.com
  2. Create a file named values-newrelic.yaml, which will be used to define your configuration, that follows this structure:

    Important

    Refer to our Helm installation documentation to know how to configure it.

    global:
    licenseKey: _YOUR_NEW_RELIC_LICENSE_KEY_
    cluster: _K8S_CLUSTER_NAME_
    newrelic-prometheus-agent:
    # Automatically scrape prometheus metrics for annotated services in the cluster
    enabled: true
    nri-metadata-injection:
    # Deploy our webhook to link APM and Kubernetes entities
    enabled: true
    nri-kube-events:
    # Report Kubernetes events
    enabled: true
    newrelic-logging:
    # Report logs for containers running in the cluster
    enabled: true
    kube-state-metrics:
    # Deploy kube-state-metrics in the cluster.
    # Set this to true unless it is already deployed.
    enabled: true
  3. Make sure everything is configured properly in the chart by running the following command. Notice that we're specifying --dry-run and --debug, so nothing is installed in this step:

    bash
    $
    helm upgrade --install newrelic newrelic/nri-bundle \
    >
    --namespace newrelic --create-namespace \
    >
    -f values-newrelic.yaml \
    >
    --dry-run \
    >
    --debug

    Please notice and modify the following values:

    Please notice and adjust the following flags:

    • global.licenseKey=YOUR_NEW_RELIC_LICENSE_KEY: Must be set to a valid for your account.

    • global.cluster=K8S_CLUSTER_NAME: 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.

    • kube-state-metrics.enabled=true: Set this to true to automatically install Kube State Metrics (KSM). This is required for our integration to run. You can set this to false if KSM is already present in your cluster, even if it's on a different namespace.

    • newrelic-prometheus-agent.enabled=true: Set this to deploy our Prometheus Agent, which automatically collects data from Prometheus endpoints present in the cluster.

    • nri-metadata-injection.enabled=true: Set this to install our minimal webhook, which adds environment variables that, in turn, allows linking applications instrumented with New Relic APM to Kubernetes.

    Tip

    Our Kubernetes charts have a comprehensive set of flags and settings that you can edit to better meet your specific needs. Check how to configure the integration below to see what you can modify.

  4. Template the Kubernetes integration by running:

    bash
    $
    helm template newrelic newrelic/nri-bundle \
    >
    --namespace newrelic --create-namespace \
    >
    -f values-newrelic.yaml > templated-nri-bundle.yaml
  5. Apply the manifest generated by running:

    bash
    $
    kubectl -n newrelic apply -f templated-nri-bundle.yaml

Upgrade using Manifest

Important

Installing and upgrading using a manifest isn't supported and is prone to errors. Be completely sure that this is the approach you need for your environment.

  1. Update the local chart repository by running:

    bash
    $
    helm repo update
  2. Template the file by running:

    bash
    $
    helm template newrelic newrelic/nri-bundle \
    >
    --namespace newrelic --create-namespace \
    >
    -f values-newrelic.yaml > new-templated-nri-bundle.yaml
  3. Uninstall the previous version of the Kubernetes integration, which uses the previous manifest, and apply the new one by running:

    bash
    $
    kubectl -n newrelic delete -f templated-nri-bundle.yaml
    $
    kubectl -n newrelic apply -f new-templated-nri-bundle.yaml

Uninstall Kubernetes integration

To uninstall the Kubernetes integration using Helm, run:

bash
$
kubectl -n newrelic delete -f templated-nri-bundle.yaml
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.