Kubernetes discovery

Richa10
Tera Contributor

Hello,

We are planning to implement Kubernetes discovery. We have the credentials (username and password) with cluster access. 

Could you please share me the steps, how to make to Kubernetes discovery successful?

Any prerequisite for Kubernetes discovery?

How can I create and configure Kubernetes credential?

I have followed the document page - https://docs.servicenow.com/bundle/newyork-it-operations-management/page/product/service-mapping/concept/kubernetes-discovery.html

Thanks,
Richa

1 ACCEPTED SOLUTION

Hi,

Nice that was what i tough as well about the token but anyways you did it nice.


What exactly you want to see for this report?

https://docs.servicenow.com/bundle/orlando-it-operations-management/page/product/service-mapping/con...

If you see this link in which it explains the data collected for this kubernetes with relationships.

So you can create a report in cmdb_rel_ci table and then put conditions as per your need for example start from top and then go to botton.


To create a report go to report module and then click view / run. Then click on create new, select table as relationship table.


OR 

 

Other way is to use the CMDB Query functionality to give you that report.

 

Thanks,
Ashutosh

View solution in original post

12 REPLIES 12

Shubham Bongulw
Giga Guru

Hi Richa,

Currently the doc you are referring is only the best source to acquire your requirement. There are not much documentation and article for this.

Still I am sharing you one more doc if in case it might be helpful-

https://docs.servicenow.com/bundle/orlando-it-operations-management/page/product/service-mapping/con...

Warm Regards,

Shubham Bongulwar

Please mark helpful or correct if it helps!!

Sree32
ServiceNow Employee
ServiceNow Employee

Step 1 : Add kubernetes credential to the credential table. Patter support both basic auth or token auth. Add credential alias.

 

find_real_file.png

 

Step 2 : Create a new discovery schedule and choose serverless discovery

find_real_file.png

 

Create new serverless execution pattern. Configure the credential alias, add the k8s cluster URL to the serverless execution parameter. 

find_real_file.png

 

 

find_real_file.png

 

Trigger the pattern and validate the results.  

Richa10
Tera Contributor

Thanks for the reply.

I followed the steps as given in the screenshots and did kubernet disocvery.

I can see an error in the Horizontal Discovery Log - 

Response has error. Status code is 401 . error code: 3 . error message: Method failed: (/api/v1/namespaces) with code: 401 - Invalid username/password combo

Any idea how to fix this error?