After #22189 we attach node metadata on pod metadata by default (without add_resource_metadata required to enabled) for both events coming from autodiscovered pods but also for events enriched by add_kubernetes_metadata. This is tries to create an api watcher under the hood which can lead in failures when users do not have access to k8s nodes api like at elastic/cloud-on-k8s#3966. We need to ignore these errors and just log an error about this instead of totally failing.
After #22189 we attach node metadata on pod metadata by default (without add_resource_metadata required to enabled) for both events coming from autodiscovered pods but also for events enriched by add_kubernetes_metadata. This is tries to create an api watcher under the hood which can lead in failures when users do not have access to k8s nodes api like at elastic/cloud-on-k8s#3966. We need to ignore these errors and just log an error about this instead of totally failing.