Auto-discovery of AKS Clusters

jss2
Tera Contributor

Hi all, I am currently having problems with the AKS technology when we are trying to discover all the objects running in the AKS. Diving in the ITOM articles I found an article very well explained about an example of EKS https://www.servicenow.com/community/itom-articles/auto-discovery-of-eks-clusters/ta-p/2320753

 

In my case, I would like to have an article or clear instructions to set up this up containing MID Server & AKS Configuration.

 

Please, don’t answer me with the official documentation because we have read this documentation a lot of times In my opinion it is a documentation with little detail and I think it is necessary to rewrite this point because despite the different versions the content is the same.

Besides, we opened a support ticket to clarify this point and we had no answer about it. So, this is the last chance to know how to handle with this problem.

 


Any help it would be fantastic, 🙂


Take into consideration: we are in the version 1.6.0 D&SM pluging and the discovery schedules are being created automatically, so we meet the prerequisites.

 

 

7 REPLIES 7

srinija_itom
Giga Guru

Hi @jss2 @Venky VA , 

 

We recently encountered a similar issue after installing the Azure CLI. While I was able to execute the az login commands from the command prompt using my account, we faced challenges running the same commands through the MID Server.

To resolve this, we configured the environment variables on our Windows MID Server to include the Azure CLI path. This configuration successfully resolved the issue.

 

Additionally, I was able to run the az login command from the debug mode in the pattern designer without any problems.

 

Regards,

Srinija

 

Pratiksha
Mega Sage
Mega Sage

Venky VA
ServiceNow Employee
ServiceNow Employee

AKS Discovery looks for the bearer token in the kubeconfig file, if its not discovery will use cloud credentials or azure AD credentials for cluster authentication.

In this scenario Authentication with Azure AD to AKS will succeed as long as the identity is valid and token is retrieved.

However, authorization (RBAC) depends on the role bindings defined in the cluster.

So, the Azure AD identity must be mapped to a Kubernetes RoleBinding/ClusterRoleBinding to allow access.

You need to assign one of the following Azure built-in roles on the AKS cluster or resource group scope:

 

Role Name Description
Azure Kubernetes Service RBAC Cluster Admin Full admin access
Azure Kubernetes Service RBAC Cluster User Read-only access to credentials
Contributor or Owner Broad access, including credential fetch