There are more AWS SDK examples available in the AWS Doc SDK Examples
Use ListNodegroups
with an AWS SDK or CLI
The following code examples show how to use ListNodegroups
.
- 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" ] }
-
For API details, see ListNodegroups
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
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.
-