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

4 REPLIES 4

devpc
Tera Contributor

Anyone who can help me?

Pugedo
Tera Contributor

We had the same issue and running pattern debug from discovery status log we could see credential error. This log about credential only appears during pattern debug. Something like this:

May 28, 2025 6:03:55 PM:: Finished step: 5.1 'get namespaces' with Error: Custom operation Kubernetes Get Call failed to execute script due to Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Not able to generate the temporary credentials for AWS Service account =XXXXXXXXXXX. Please check the mid server logs for exact error (script_include:EKSTokenGenerator; line 98). Check the discovery logs for more details.

I would like to know if you managed to solve the problem?

Terry McDonald1
Tera Contributor

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