elastic / cloudbeat

Analyzing Cloud Security Posture
Other
38 stars 43 forks source link

Cloudbeat failed to get cluster name when using Karpenter #2226

Closed therealdwright closed 1 month ago

therealdwright commented 1 month ago

Describe the bug When using Cloudbeat and the KSPM integration to scan our cluster that deploys workers using Karpenter, the agent logs the error:

failed to get cluster name: failed to get cluster name from the Auto-scaling group: cluster name not found from autoscaling groups

This is because the cluster tag is aws:eks:cluster-name for Karpenter managed nodes. The check performed in the cluster name provider is a little too strict and could benefit from being a substring check.

Preconditions EKS Cluster using Karpenter Node Provisioner