文章目录
-
- 实验总结
- 实验准备
- 实验过程
-
- ??创建AKS集群
- ??连接AKS集群
- ??删除AKS集群
- 参考链接
实验总结
实验准备
实验过程
??创建AKS集群
1、
2、
3、
-
- 选择订阅
- 选择或创建一个Azure资源组。K8SResourceGroup
-
- 集群预设配置:Standard ($$)
- Kubernetes集群名称:myAKSCluster
- 区域:(Asia Pacific) Korea Central
- 可用性区域保留默认值
- kubernetes版本:保留kubernetes默认值
- API服务器可用性:99.5%(优化成本)
-
- 节点大小:默认
- 收缩方法:默认
- 节点计数范围:默认
- 使用默认值的网络插件集群新建 VNet。
- 使用 网络插件,群集可以使用新的或现有的 VNet 并定制地址。应用程序 Pod 直接连接到 VNet,便于与 VNet 功能本机集成。
??连接AKS集群
若要管理 Kubernetes 群集,使用 Kubernetes 命令行客户端
kubectl
若使用的是 Azure Cloud Shell,则
kubectl
已安装。若要在本地 shell 这些操作在安装过程中执行:
验证是否已安装 Azure CLI。
通过
az login
命令连接到 Azure。
az aks get-credentials --resource-group K8SResourceGroup --name myAKSCluster
PS /home/xu> kubectl get nodes NAME STATUS ROLES AGE VERSION aks-agentpool-90599387-vmss000000 Ready agent 16m v1.22.6 PS /home/xu>
??删除AKS集群
az aks delete --resource-group K8SResourceGroup --name myAKSCluster --yes --no-wait
参考链接
概念 - Azure Kubernetes 服务 (AKS) 的 Kubernetes 基础知识 - Azure Kubernetes Serice | Microsoft Docs
快速入门:使用 Azure 门户部署 AKS 群集 - Azure Kubernetes Service | Microsoft Docs