powershell - 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
我问这个的原因:
- 我想在 Azure 自动化运行手册中运行这些命令,因此我需要 PowerShell cmdlet。或者有没有其他方法可以从 Runbook 运行 azure cli?
谢谢你的帮助
解决方案
使用 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
有关详细信息,请参阅此链接。
推荐阅读
- snowflake-cloud-data-platform - 雪花 - 使用舞台区域失败。原因:[您提供的 AWS 访问密钥 ID 无效。]
- javascript - 根据字母后出现的数字拆分字符串
- r - 遍历 purrr:map 时随机值重复
- vue.js - 如何仅使用完整日历和 Vue js 为 LoggedIn 用户显示事件?
- nearprotocol - 你如何为 Prometheus 设置配置文件?
- python - pandas groupby 数据帧 2 基于数据帧 1
- android - 使用 ANDROIDX_TEST_ORCHESTRATOR 时未找到测试
- sql - EF - 在 DevArt EntityDeveloper 和 Syncfusion WinForm 网格之间映射外键
- python - 在 keras 损失函数中拆分数据类型(相当于损失函数中的 if 语句?)
- tensorflow - 使用 Keras model.fit,如何设置它以保存每 x 个步骤?