Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement] Add directions for instrumenting a mixed Windows/Linux Kubernetes cluster #16646

Merged
merged 9 commits into from
Apr 5, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
title: Installation on a hybrid cluster with Windows and Linux nodes
tags:
- Kubernetes
- Windows
- Linux
- Installation
metaDescription: "Learn how to install New Relic to a hybrid Windows and Linux Kubernetes cluster."
freshnessValidatedDate: 2024-04-05
---


This document clarifies the installation of the Kubernetes integration for a mixed Windows and Linux cluster.

## Prerequisites [#prerequisites]

Make sure you've completed the following before going further:

* A cluster with Windows and Linux nodes, including the ability to pull container images to the Windows nodes.

* Set up the Helm repo and create a namespace:

```shell
helm repo add newrelic https://helm-charts.newrelic.com
helm repo update
kubectl create namespace newrelic
```

## Install the current chart bundle [#install-chart-bundle]

The `newrelic/nri-bundle` chart is the regular one with all the latest updates for everything on Linux nodes. You can configure the `newrelic-logging` chart to install to Windows. This feature is reliable and supported in the logging chart.

You can use other charts, but you must configure a `NodeSelector` to avoid scheduling to Windows. If an installation fails on a mixed cluster using default values from guided install, add the `nodeSelector` values.

Create the values file with your favorite text editor, let's call it `values.yaml`. You can download a starter `values.yaml` file from the New Relic UI. Add the Kubernetes integration and choose **Helm** as the instrumentation method.


```yaml
global:
licenseKey: mykey
cluster: mycluster
lowDataMode: true

newrelic-infrastructure:
enabled: true
nodeSelector:
kubernetes.io/os: linux

kube-state-metrics:
enabled: true
image:
tag: v2.10.0
nodeSelector:
kubernetes.io/os: linux

nri-kube-events:
enabled: true
nodeSelector:
kubernetes.io/os: linux

newrelic-logging:
enabled: true
enableWindows: true

nri-metadata-injection:
enabled: true
nodeSelector:
kubernetes.io/os: linux

newrelic-prometheus-agent:
enabled: true
verboseLog: true
config:
kubernetes:
integrations_filter:
enabled: false
nodeSelector:
kubernetes.io/os: linux
```

## Install the bundle [#install-bundle]

Run this command to install the bundle:


```shell
helm upgrade --install newrelic-bundle newrelic/nri-bundle --namespace newrelic -f values-newrelic.yaml

```

When Helm returns, all pods should start, including a logging pod on each Windows node. No other New Relic pods on Windows nodes yet.


## Installing newrelic-infrastructure preview for Windows nodes [#newrelic-infra]

Create the values file for the `newrelic-infrastructure` v2 chart. For example, `windows-values.yaml`. The example below is for a cluster with Windows 2022 nodegroup or node pool. Adjust the `windowsOsList` section with the correct values following [these instructions](/docs/kubernetes-pixie/kubernetes-integration/installation/kubernetes-integration-install-configure/#windows-install). This applies if you're running 2019 or 2022.


```yaml
global:
licenseKey: mykey
cluster: mycluster

enableLinux: false
enableWindows: true
windowsOsList:
- version: 2022
imageTag: 2-windows-ltsc2022-alpha
buildNumber: 10.0.20348
windowsNodeSelector:
kubernetes.io/os: windows
```

Install the v2.7.2 version of the `newrelic-infrastructure` chart. Run this command:

```shell
helm upgrade --install newrelic-windows newrelic/newrelic-infrastructure --namespace newrelic --version 2.7.2 -f windows-values.yaml
```

When Helm returns, you should see `newrelic-windows-newrelic-infrastructure` pods on each Windows node.

## Expected results [#expected-results]

Once everything has been set, the New Relic UI should show your Windows nodes in the Kubernetes cluster. You'll see the infrastructure metrics, running pods, and all the related information.

2 changes: 2 additions & 0 deletions src/nav/kubernetes-pixie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pages:
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/data-governance
- title: Configure logging
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/get-logs-version
- title: Installation on a hybrid cluster
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/windows-linux-hybrid-cluster
- title: New Relic Metrics Adapter
path: /docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/newrelic-metrics-adapter
- title: Monitor services on Kubernetes
Expand Down
Loading