Unable to find example to use filters https://docs.aws.amazon.com/cli/latest/reference/autoscaling/describe-auto-scaling-groups.html#options
Try with the following command:
aws autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[?contains(Tags[?Key==`eks:nodegroup-name`].Value, `cassandra`)]' --region [AWS_REGION]
Or if you only want the ASG name you can filter it using:
aws autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[?contains(Tags[?Key==`eks:nodegroup-name`].Value, `cassandra`)].[AutoScalingGroupName]' --region [AWS_REGION]
Reference:
Try something like:
aws ec2 describe-instances --filters "Name=tag:Name,Values=xxx" "Name=tag:env,Values=dev"
I tried the same without double quotes with the filters, and it worked.
aws autoscaling describe-auto-scaling-groups --filters Name=tag:\eks:nodegroup-name\,Values=cassandra
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.