Skip to content

Fail to obtain resources via EKS detector in EKS cluster #1856

Open
@XSAM

Description

@XSAM

I got an error when trying to obtain resources from the EKS detector in an EKS cluster.

detecting resources: [isEks() error retrieving auth configmap: failed to retrieve ConfigMap kube-system/aws-auth: configmaps "aws-auth" is forbidden: User "system:serviceaccount:foo:default" cannot get resource "configmaps" in API group "" in the namespace "kube-system"]

With this codes:

res, err = resource.New(ctx,
	resource.WithDetectors(eks.NewResourceDetector()),
)

It looks like the default service account in the foo namespace does not have the authentication to access aws-auth configmap in kube-system namespace.

Also, I found EKS detector needs a namespace called amazon-cloudwatch, which is not found in my EKS cluster. Am I missing something?

cwConfigmapNS = "amazon-cloudwatch"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Needs triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions