文件 AWS SDK AWS 範例 SDK 儲存庫中有更多可用的
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
DescribeNodegroup
搭配 CLI 使用
下列程式碼範例示範如何使用 DescribeNodegroup
。
- CLI
-
- AWS CLI
-
描述 Amazon EKS 叢集的受管節點群組
下列
describe-nodegroup
範例說明 Amazon EKS 叢集的受管節點群組。aws eks describe-nodegroup \ --cluster-name
my-eks-cluster
\ --nodegroup-namemy-eks-nodegroup
輸出:
{ "nodegroup": { "nodegroupName": "my-eks-nodegroup", "nodegroupArn": "arn:aws:eks:us-east-2:111122223333:nodegroup/my-eks-cluster/my-eks-nodegroup/a8c75f2f-df78-a72f-4063-4b69af3de5b1", "clusterName": "my-eks-cluster", "version": "1.26", "releaseVersion": "1.26.12-20240329", "createdAt": "2024-04-08T11:42:10.555000-04:00", "modifiedAt": "2024-04-08T11:44:12.402000-04:00", "status": "ACTIVE", "capacityType": "ON_DEMAND", "scalingConfig": { "minSize": 1, "maxSize": 3, "desiredSize": 1 }, "instanceTypes": [ "t3.medium" ], "subnets": [ "subnet-0e2907431c9988b72", "subnet-04ad87f71c6e5ab4d", "subnet-09d912bb63ef21b9a" ], "amiType": "AL2_x86_64", "nodeRole": "arn:aws:iam::111122223333:role/role-name", "labels": {}, "resources": { "autoScalingGroups": [ { "name": "eks-my-eks-nodegroup-a8c75f2f-df78-a72f-4063-4b69af3de5b1" } ] }, "diskSize": 20, "health": { "issues": [] }, "updateConfig": { "maxUnavailable": 1 }, "tags": {} } }
-
如需 API 詳細資訊,請參閱 AWS CLI 命令參考中的 DescribeNodegroup
。
-
- PowerShell
-
- for PowerShell 工具
-
範例 1:此 cmdlet 會傳回有關 Amazon EKS 節點群組的描述性資訊。
Get-EKSNodegroup -NodegroupName "ProdEKSNodeGroup" -ClusterName "PROD"
輸出:
AmiType : AL2_x86_64 ClusterName : PROD CreatedAt : 12/25/2019 10:16:45 AM DiskSize : 40 Health : Amazon.EKS.Model.NodegroupHealth InstanceTypes : {t3.large} Labels : {} ModifiedAt : 12/25/2019 10:16:45 AM NodegroupArn : arn:aws:eks:us-west-2:012345678912:nodegroup/PROD/ProdEKSNodeGroup/7eb79e47-82b6-04d9-e984-95110db6fa85 NodegroupName : ProdEKSNodeGroup NodeRole : arn:aws:iam::012345678912:role/NodeInstanceRole ReleaseVersion : 1.14.7-20190927 RemoteAccess : Resources : ScalingConfig : Amazon.EKS.Model.NodegroupScalingConfig Status : CREATING Subnets : {subnet-0d1a9fff35efa7691, subnet-0a3f4928edbc224d4} Tags : {} Version : 1.14
-
如需 API 詳細資訊,請參閱 AWS Tools for PowerShell Cmdlet 參考中的 DescribeNodegroup。
-
DescribeFargateProfile
DescribeUpdate