How do modify the cni-metrics-helper CLUSTER_ID? Right now, it seems to be fixed at eks-cluster. This is also the only id mentioned in the cni-metrics-helper blog post.
This isn't very useful if I have multiple EKS clusters and wish to monitor different clusters for available ENI and IP address capacity.
cni-metrics-helper-xxxx's logs output Failed to obtain cluster-id and default to eks-cluster?
e.g:
$ kubectl -n kube-system logs cni-metrics-helper-xxxx
...
publisher.go:76] Failed to obtain cluster-id and default to eks-cluster
If yes, cni-metrics-helper is using same code with https://github.com/aws/amazon-vpc-cni-k8s/pull/88/files
You can configure CLUSTER_ID by following steps:
{
"Effect": "Allow",
"Action": [
"ec2:DescribeTags"
],
"Resource": [
"*"
]
}
CLUSTER_ID for EC2 instance by the creating tag:CLUSTER_IDcni-metrics-helper-xxxx pod:Failed to obtain cluster-id and default to eks-cluster error was stopped. $ kubectl -n kube-system delete cni-metrics-helper-xxxx
$ kubectl -n kube-system logs cni-metrics-helper-xxxx
Now, you should be able to see the metrics dimension which is configured by CLUSTER_ID's value instead of eks-cluster.
@nak3 Looks like you are right. I see this in the logs:
E0207 12:22:48.352171 7 publisher.go:76] Failed to obtain cluster-id and default to eks-cluster
I'll try the tags as you suggest and report back.
That worked like a charm. Thanks @nak3
I'll close this issue.