Problems
You have completed the installation procedure for New Relic's Kubernetes integration, you are seeing Kubernetes data in your New Relic account but there is no data from any of the control plane components.
In case the control plane data is missing, for example K8sSchedulerSample
, the first thing to do is to check verbose logs of the control plane components. Read how to enable verbose logging
A possibility is that the autodiscovery tries to find in the cluster the control plane pods leveraging the most common labels, in case no pod is found for a single component it does not fail to avoid missing more data. In this scenario you will see logs similar to the following:
time="2022-06-21T12:21:25Z" level=debug msg="Autodiscovering pods for \"scheduler\""time="2022-06-21T12:21:25Z" level=debug msg="0 pods found with labels \"tier=control-plane,component=kube-scheduler\""time="2022-06-21T12:21:25Z" level=debug msg="No pod found for \"scheduler\" with labels \"tier=control-plane,component=kube-scheduler\""time="2022-06-21T12:21:25Z" level=debug msg="0 pods found with labels \"k8s-app=kube-scheduler\""time="2022-06-21T12:21:25Z" level=debug msg="No pod found for \"scheduler\" with labels \"k8s-app=kube-scheduler\""time="2022-06-21T12:21:25Z" level=debug msg="0 pods found with labels \"app=openshift-kube-scheduler,scheduler=true\""time="2022-06-21T12:21:25Z" level=debug msg="No pod found for \"scheduler\" with labels \"app=openshift-kube-scheduler,scheduler=true\""time="2022-06-21T12:21:25Z" level=debug msg="No \"scheduler\" pod has been discovered"In this case you can change the discovery behavior with the
controlplane.config.[component].autodiscover[].selector
config of the helm chart values. Read more about control plane components.It is also possible that the controlplane component is found, but the authentication with the endpoint fails. In this scenario you will see logs similar to the following:
time="2022-06-21T15:54:52Z" level=debug msg="Endpoint \"https://localhost:10257\" probe failed, skipping: http request failed with status: 403 Forbidden"In this case you can change the authentication behavior for each endpoints with the
controlplane.config.[component].autodiscover[].endpoints[].auth
config of the helm chart values.It is also possible that the controlplane component of the integration is not running on all master nodes.
You can doublecheck that running:
kubectl get pod -n <NEWRELIC_NAMESPACE> -l app.kubernetes.io/component=controlplane -o wideIf there is any controlplane pod you want to monitor running on a node whithout a Newrelic monitoring instance then you can change as needed
controlplane.affinity
,controlplane.nodeSelector
andcontrolplane.tolerations
of the helm chart values.
In case the controlplane components does not autodiscover or scrape succesfully any controlplane pod it enters in CrashLoopBackOff.
As described in the previous section you can change the behaviour of autodiscovery and the authentication methods to meet your needs.
On the other hand if you are not interested in that data you can simply disable the controlplane compoenent by setting controlplane.enabled=false
in the the helm chart values.