Kubernetes applications can consist of many deployments, services, pods, and more. Managing so many different resources individually can be overwhelming, especially if you are not the application developer. This is where the operator comes in.
Kubernetes operators help manage these complex applications by abstracting those Kubernetes resources into a set of custom configurations, or custom resources. This reduces the burden on you as a user, as you would only need to interface with the custom resources to manage the application. You can then rely on the operator to deploy, upgrade, and manage the application for you.
New Relic’s Kubernetes integration is packed with many different modules to help you monitor your cluster. From Prometheus, to logging, to Pixie, and more, it can be difficult to manage and configure all of these moving parts. Whether you are trying to update a configuration for one of these modules or upgrade to the latest versions, the operator can do it all for you.
To install the New Relic Kubernetes operator, first add the operator:
$helm repo add nr-operator https://newrelic.github.io/newrelic-k8s-operator && helm repo update
Then, follow the directions for the Kubernetes guided install. When presented with options to deploy via
Helm 3, or
Helm 3. Currently, you need to replace one line in the generated command. Replace line 5 with the following, replacing [YOUR_NAMESPACE] with the name of your namespace:
$kubectl create namespace [YOUR_NAMESPACE] ; helm upgrade --install newrelic-bundle nr-operator/newrelic-k8s-operator \
Running the Helm command should then deploy New Relic’s operator to your cluster, which will then help deploy the rest of the Kubernetes integration.
The operator manages two custom resources that you can edit and configure:
Changes to these custom resources will automatically be updated and applied to your Kubernetes cluster. When installing the operator via Helm 3, you should use Helm to modify the configuration.
To upgrade to the latest version of New Relic’s bundle, run:
$helm upgrade newrelic-k8s-operator newrelic/newrelic-k8s-operator --set version=<version>
Other configuration options that can be set mirror the configuration options of
nri-bundle, which can be found here.