Install the Kubernetes integration for Windows

LIMITED RELEASE

To run our Kubernetes installation for Windows, follow the steps below to:

Compatibility and requirements

Before you install New Relic's Kubernetes integration, review the compatibility and requirements.

When using containers in Windows, the container host version and the container image version must be the same. Our Kubernetes integration supports Windows versions 1809 and 1909.

To check your Windows version:

  1. Open a command window.
  2. Run the following command:
    Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v 
    ReleaseIdcmd.exe

Example: Get Kubernetes for Windows from a BusyBox container.

$ kubectl exec -it busybox1-766bb4d6cc-rmsnj -- Reg Query 
    "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ReleaseId
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
	ReleaseId	REG_SZ	1809

Install

To install the Kubernetes integration for Windows:

  1. Install kube-state-metrics and run it in your cluster using this snippet:
    curl -L -o kube-state-metrics-1.9.5.zip 
    https://github.com/kubernetes/kube-state-metrics/archive/v1.9.5.zip && 
    unzip kube-state-metrics-1.9.5.zip && kubectl apply -f 
    kube-state-metrics-1.9.5/examples/standard  
  2. Download the manifest file that matches your Windows version:
    • For Windows 1809:
      curl -0 
      http://download.newrelic.com/infrastructure_agent/integrations/kubernetes/newrelic-infrastructure-k8s-linux-windows1809-1.21.0-alpha.yaml
    • For Windows 1909:
      curl -0 
      http://download.newrelic.com/infrastructure_agent/integrations/kubernetes/newrelic-infrastructure-k8s-linux-windows1909-1.21.0-alpha.yaml"
  3. Update the manifest with your cluster name and New Relic license key. Since our manifest provides two DaemonSets (one for Windows and one for Linux), you need to add this information in two places:
    • Line 87:
      - name: "CLUSTER_NAME"
        value: YOUR_CLUSTER_NAME
      - name: "NRIA_LICENSE_KEY"
        value: YOUR_LICENSE_KEY
      
    • Line 187:
      - name: "CLUSTER_NAME"
        value: YOUR_CLUSTER_NAME
      - name: "NRIA_LICENSE_KEY"
        value: YOUR_LICENSE_KEY
      

    We recommend not to change the NRIA_PASSTHROUGH_ENVIRONMENT or NRIA_DISPLAY_NAME value in your manifest.

  4. Review our Configuration docs and adapt the manifest to fit your environment.
  5. Confirm that kube-state-metrics is installed:
    kubectl get pods --all-namespaces | grep kube-state-metrics
  6. Create the DaemonSet:
    • For Windows 1809:
      kubectl apply -f 
      newrelic-infrastructure-k8s-linux-windows1809-1.21.0-alpha.yaml
    • For Windows 1909:
      kubectl apply -f 
      newrelic-infrastructure-k8s-linux-windows1909-1.21.0-alpha.yaml
  7. Confirm that the DaemonSet has been created successfully by looking for newrelic-infra in the results generated by this command:
    kubectl get daemonsets

Limitations

The following limitations apply to the Kubernetes integration for Windows:

  • The Windows agent only sends the Kubernetes samples (K8sNodeSample, K8sPodSample, etc.)
    • SystemSample, StorageSample, NetworkSample, and ProcessSample are not generated.
  • Some Kubernetes metrics are missing because the Windows kubelet doesn’t have them:
    • Node:
      • fsInodes: not sent
      • fsInodesFree: not sent
      • fsInodesUsed: not sent
      • memoryMajorPageFaultsPerSecond: always returns zero as a value
      • memoryPageFaults: always returns zero as a value
      • memoryRssBytes: always returns zero as a value
      • runtimeInodes: not sent
      • runtimeInodesFree: not sent
      • runtimeInodesUsed: not sent
    • Pod:
      • net.errorsPerSecond: not sent
      • net.rxBytesPerSecond: not sent
      • net.txBytesPerSecond: not sent
    • Container:
      • containerID: not sent
      • containerImageID: not sent
      • memoryUsedBytes: in the UI, this is displayed in the pod card that appears when you click on a pod, and will show no data. We will soon fix this by updating our charts to use memoryWorkingSetBytes instead.
    • Volume:
      • fsUsedBytes: zero, so fsUsedPercent is zero

Known issues with the Windows Kubelet

There are a couple of issues with the Windows version of Kubelet that can prevent the integration from fetching data:

  • Issue 90554: This issue makes the Kubelet return 500 errors when the integration makes a request to the /stats/summary endpoint. It will be included in the Kubernetes 1.19 release and has been backported to the releases 1.16.11, 1.17.7, and 1.18.4. There is no solution on the integration side for this problem, we advise you to update to one of the patch versions as soon as possible. You can see if you're being affected by this problem by enabling verbose logs and looking for messages of the type:
    error querying Kubelet. Get "https://<KUBELET_IP>/stats/summary": error calling kubelet endpoint. Got status code: 500
  • Issue 87730: This issue makes the Kubelet metrics very slow when running minimal load. It makes the integration fail with a timeout error. A patch for this issue has been added for Kubernetes 1.18 and backported to 1.15.12, 1.16.9, and 1.17.5. We advise you to update to one of the patch versions as soon as possible. To mitigate this issue you can increase the integration timeout with the TIMEOUT config option. You can see if you're being affected by this problem by enabling verbose logs and looking for messages of the type:
    error querying Kubelet. Get "https://<KUBELET_IP>/stats/summary": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

For more help

Recommendations for learning more: