首页 > 解决方案 > AKS 在 PowerShell 中启动/停止群集

问题描述

是否可以将这两个命令作为 PowerShell cmdlet 运行?

az aks stop --name myAKSCluster --resource-group myResourceGroup

az aks start --name myAKSCluster --resource-group myResourceGroup

我在这里找不到等效的 PowerShell:https ://docs.microsoft.com/en-us/powershell/module/az.aks/?view=azps-6.2.1

我问这个的原因:

谢谢你的帮助

标签: powershellazure-powershellazure-aksazure-cliazure-automation

解决方案


使用 Powershell cmdlet,您可以在Azure 自动化 runbook 中运行以在此处启动/停止 AKS 群集

az aks stop --name myAKSCluster --resource-group myResourceGroup

az aks start --name myAKSCluster --resource-group myResourceGroup

您可以在 Azure CLI 中使用上述命令来停止和启动 Kubernetes 服务集群

使用Powershell启动和停止 AKS 集群 您需要使用以下示例代码:

Start-AzAksCluster -ResourceGroupName group -Name myCluster
Stop-AzAksCluster -ResourceGroupName group -Name myCluster

有关详细信息,请参阅此链接。


推荐阅读