Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Issues with Kubernetes discovery

devpc
Tera Contributor

Hi everyone, I'm facing an issue while trying to discover the Cluster Kubernetes on GCP and AWS clouds.
For instance for GCP I'm getting this discovery log: 

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 Press Here

 

in the Pattern log there is:

Exception occurred while executing operation Kubernetes Get Call. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Received null response for GET call of URL: https://xx.xxx.xxxx.xxx/api/v1/namespaces?limit=50 .Please check the mid server logs for exact error. Most probable cause is SSL exceptions /certificate exception/ configured URL. (ad_hoc:EvalClosure-get namespaces--986886108; line 17)

or

Exception occurred while executing operation Kubernetes Get Call. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Received null response for GET call of URL: https://gke-xxxxxxxxxxxxxx.nameofdatacenter.amazonaws.com:port/api/v1/namespaces?limit=50 .Please check the mid server logs for exact error. Most probable cause is SSL exceptions /certificate exception/ configured URL


I can't figure it what am I missing, the MID server associated with the cluster discovery is the right one, there are all the properties configured, we also enabled the role to call specific APIs to the related K8S to have read permissions, both for AWS and GCP.

Thank you

6 REPLIES 6

Terry McDonald1
Tera Contributor

I am running into the same error with our Kubernetes Discovery, were you able to get this issue resolved? 

mohammed_raihan
Tera Contributor

I am running into the same issue i had imported the Kubernetes certificate to midserver and sync the pattern to the midservers still same error, the communication has been established between the midserver and target Kubernetes URL still no luck on the same.