
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 10-10-2020 08:31 PM
Just thought of putting all necessary information on Kubernetes at One place for consumption.
Kubernetes And Its Components:-Kubernetes is a cluster and container management tool. It lets you deploy containers to clusters, meaning a network of virtual machines. It works with different containers, not just Docker.
Below are the components / Resources used in in terms of K8 Deployment.
API Server, POD, Container, Service, Node , Cluster , Volume , Image , Control Plane Node , Docker , Docker Image .
I will not go into Details of all These Keywords here. Refer this URL for details-https://kubernetes.io/docs/reference/glossary/?fundamental=true
CMDB Data Model Class For Kubernetes Components:-
cmdb_ci_kubernetes_cluster
cmdb_ci_kubernetes_node
cmdb_ci_docker_image
cmdb_ci_kubernetes_service
cmdb_ci_kubernetes_pod
cmdb_ci_docker_container
cmdb_ci_kubernetes_volume
Pre- Requisite for Kubernetes Discovery -
You Must have Discovery and Service Mapping Patterns application. Once You have this then you will be able to See the Kubernetes Option In Discovery--> Credentials Application.
Creating a Kubernetes Credentials:- We can create using Above Kubernetes Credentials option. It uses basic Authentication or Bear Token.
Create a Credential ALIAS and Connect this Credential Record created previously.
Creating Discovery Schedule for Kubernetes:- It uses Server-less option in the discovery schedule. Configure Discovery Parameters for Kubernetes discovery into Server Less execution pattern Related List.
Configure SERVERLESS EXECUTION PATTERN for Kubernetes Discovery.
From Discovery Schedule You can Run the discovery of Kubernetes Discovery. You Can check the Discovery Logs and if all is ok the Debug Logs will look green as below. It refers to all the steps used in the K8 Patterns which is used for Kubernetes Discovery. It will create CI entries in Corresponding K8 CI tables.
List of Kubernetes Patterns is at below URL.
https://<YourInstance>.service-now.com/nav_to.do?uri=%2Fsn_discovery_patterns_list.do
Hope This is helpful .
Ref Used:- https://docs.servicenow.com/bundle/paris-it-operations-management/page/product/service-mapping/concept/kubernetes-discovery.html
Regards
RP
- 14,397 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Wondeful contents
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Wonderful contents. Very helpful.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very nicely written understood in one go ......
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very Good content and help full for developers/Beginner who started working on Discovery
Thank you for the Article!!!!!

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I was going through the docs to learn about Kubernetes and it's components discovery, and found this very informative and helpful article is already published here on community. For me, this article is so worthy.
Thanks for posting the same !!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for creating this KB article.. Could you please share configuration steps on Kubernetes side as well (screen shots).

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
steps are there . also refer this for more details.
https://docs.servicenow.com/bundle/orlando-it-operations-management/page/product/service-mapping/concept/kubernetes-discovery.html
Regards
RP
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I am following above link. I am getting error 401 error. Not sure why it doesnt like my credentials. can you please review below and confirm where its going wrong.
401 error
Kubectl config view output
kubectl describe secret
serverless pattern definition.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
See if it helps you.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0832864
Regards
RP
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
nope already tried it...
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
"Kubernetes Namespace API call failed or there are no Namespaces in the query. Please verify the configuration data and/or user permissions., Pattern name: Kubernetes, To Check Pattern Log Navigate to:..."
you can take a look at my post- https://community.servicenow.com/community?id=community_question&sys_id=e48357af1b5c4d10ada243f6fe4b...
Thank You

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
In Name space can you try using - actual namespace you found on the Kubernetes platform.
Remove * and Try with above Namespace Please.
Regards
RP
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Supporting and informative article to learn about components discovery using kubernetes Platform for servicenow in one go
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank you Rahul. I have situation that, we are discovering docker Images by Image ID. Every deployment docker image is updated with new number but same name. by the way all our docker images we are discovering from GCP. Is there any way we can bring additional information like GCP project name as Docker Image attribute? so that we can reduce duplicates and assign changes to right Ci's?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
As per CMDB Structure
[cmdb_ci_docker_image]- Stores information on the globally unique representation of Docker images.
[cmdb_ci_docker_local_image]- Stores local instances of Docker images.
This is connected using relationship- Instantiates::Instantiated By
cmdb_ci_docker_local_image | Instantiates::Instantiated By | cmdb_ci_docker_image |
cmdb_ci_docker_local_image |
Instantiates::InstantiatedBy |
cmdb_ci_docker_container |
Now Let me Know what are you looking for more as both entities are connected . is Your requirement is from Report Perspective>
Regards
RP
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
hello @Rahul Priyadars, thank you for sharing all this good information!, i have one question perhaps you can help me to know. there is a pattern called Kubernetes Event, is this only updating relationship information from the clusters? i see in the documentation what it does and it seems to be only working to update some relationships that may be used if you have implemented ACC for kubernetes events. Am i correct? or what should i expect from this patter?
thank you!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@FLP1 Kubernetes Event is intended to be run more frequently than the standard pattern in order to poll the Kubernetes event queue and update the CMDB with the most recent changes since the last time it was run. Generally those are only relationships and net new components. It doesn't do a full cluster scan.
However, if you're looking for more frequently updating your CMDB with Kubernetes components, I actually recommend using the newer ACC-V for Kubernetes. It's lovingly called CNO 2.0 after the older Cloud Native Operations set for real time updating of Kubernetes components into your CMDB.
Will Hallam and I did a session on it during Beers with Engineers in November: https://www.youtube.com/watch?v=O-aExiA9TvY&list=PLkGSnjw5y2U5s0r-QCb5xDN3pdRq_4UWs&index=19
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank you for your help @mgallagher , in the same line for kubernetes discovery, i have an issue with the discovery schedules where i can see the ECCQ with all the messages processed, the CI's updated but it does not finishes, the scan remains active... has anybody run into something like that?
Thank you!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi everyone,
I understand this post I somewhat old, however, I have a query about the Kubernetes Discovery in ServiceNow as we have multiple ways to authenticate, and I still cannot get my head around how to set it up correctly.
I'm trying to follow instructions provided in these 3 links:
AKS Cluster Discovery Configuration Details - Support and Troubleshooting (servicenow.com)
and the product documentation: Kubernetes discovery (servicenow.com)
Following the first KB I was able to get the pattern to automatically create serverless schedules for each cluster we have. Then, following the second link, I've installed Azure CLI on mid server, and this is where I've stopped as I couldn't understand how to setup Azure CLI.
So, the log says I need to run 'az login', which I did on mid server, but apparently it doesn't remember, and it asks every time.
And what makes this even more confusing to me, is that in the documentation they mention we don't need create credentials if running the automatic serverless schedules.
Has anyone configured this before, could you please share any insights?
Cheers!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @Rahul Priyadars Thanks for your detail steps. I have a question about 'No Source in Discovery Log' after I configure all information refer to your steps above and click 'Discovery Now'. Could you please check the detail screenshot below and provide same suggestion for me. Thanks in advance.
1. Kubernetes Credentials
2. Discovery Schedule
3. Serverless Execution Pattern
4. Discovery Status as below after I click Discovery Now
5. There is no Source in Discovery pattern Log
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi,
Which username and Password to enter in credentials? Is it the Kubernetes cluster credentials?