View a markdown version of this page

Use ListNodegroups with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use ListNodegroups with a CLI

The following code examples show how to use ListNodegroups.

Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:

CLI
AWS CLI

List all the node groups in an Amazon EKS cluster

The following list-nodegroups example list all the node groups in an Amazon EKS cluster.

aws eks list-nodegroups \ --cluster-name my-eks-cluster

Output:

{ "nodegroups": [ "my-eks-managed-node-group", "my-eks-nodegroup" ] }
PowerShell
Tools for PowerShell V4

Example 1: This cmdlet lists the Amazon EKS node groups associated with the specified cluster in your AWS account in the specified Region.

Get-EKSNodegroupList -ClusterName PROD

Output:

ProdEKSNodeGroup
  • For API details, see ListNodegroups in AWS Tools for PowerShell Cmdlet Reference (V4).

Tools for PowerShell V5

Example 1: This cmdlet lists the Amazon EKS node groups associated with the specified cluster in your AWS account in the specified Region.

Get-EKSNodegroupList -ClusterName PROD

Output:

ProdEKSNodeGroup
  • For API details, see ListNodegroups in AWS Tools for PowerShell Cmdlet Reference (V5).