Kubernetes Discovery not working on Yokohama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 06:24 PM
I had Kubernetes discovery working on Xanadu. I made a simple discovery schedule using a bearer token for the Kubernetes (OpenShift) cluster and asked it to traverse all namespaces (*). It worked. The result was ~3700 CIs and ~7900 relationships between them.
The instance was upgraded to Yokohama. I recreated the discovery schedule, run it, and it fails repeatedly.
Step 5.1 "get namespaces" fails with bad response from HTTP GET
It appears the Kubernetes discovery pattern (and shared libraries) were updated in Yokohama. Determining specific changes is challenging.
I wonder if the "limit=50" parameter is causing the failure. There are 100+ namespaces. I'm not able to figure out where that parameter is being set. It's not in the pattern text of the shared library. Gemini suggested a KubernetesCommandMetadata script include, but I didn't find such a file.
Thanks for any suggestions and help.
Alan Prochaska
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 05:37 AM
I suspect the "limit=50" is not the cause here as the Kubernetes API supports batch processesing. See https://kubernetes.io/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks.
1. as this is an OOB pattern I would 100% recommend logging a ticket with Support.
2. What is the exact API call being made, the response of 400 missing required Host Header suggests it is malformed. You could look to run the API call via CURL or Postman to validate the issue outside of ServiceNow. The Input parameters should help you determine the call being made, often these link to a script include...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 09:08 AM
Follow-on question ... does anyone have Kubernetes discovery working?
What version is your instance running?
How long has Kubernetes discovery been running?
How frequently does your discovery schedule run?
Approximately how many clusters, CIs, and relationships?
Thanks for sharing your info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 04:40 AM
If you're not already familiar, you may want to look at the Kubernetes Visibility Agent aka Cloud Native Operator. No permissions are required on the K8s cluster and there is much less maintenance overhead. Near real-time updates and it auto cleans deleted resources!
Demo Walkthrough:
https://mtcoffee.github.io/kubernetes-servicenow-discovery-the-better-way-using-cno-for-visibility/