Archiving the v2.6/v2.7 zh docs. Updating the zh sidebar version JSON files to reflect archived messaging in navigation dropdown.

Signed-off-by: Sunil Singh <sunil.singh@suse.com>
This commit is contained in:
Sunil Singh
2025-06-11 16:10:14 -07:00
parent 5069378133
commit af77fc8954
1047 changed files with 28 additions and 1572 deletions
@@ -0,0 +1,81 @@
---
title: Rancher Azure 快速入门指南
description: 阅读此分步 Rancher Azure 指南,以快速部署带有单节点下游 Kubernetes 集群的 Rancher Server。
---
你可以参考以下步骤,在 Azure 的单节点 K3s Kubernetes 集群中快速部署 Rancher Server,并附加一个单节点下游 Kubernetes 集群。
:::caution
本章节中提供的指南,旨在帮助你快速启动一个用于 Rancher 的沙盒,以评估 Rancher 是否能满足你的使用需求。快速入门指南不适用于生产环境。如果你需要获取生产环境的操作指导,请参见[安装](../../installation-and-upgrade/installation-and-upgrade.md)。
:::
## 先决条件
:::caution
部署到 Microsoft Azure 会产生费用。
:::
- [Microsoft Azure 账号](https://azure.microsoft.com/en-us/free/):用于创建部署 Rancher 和 Kubernetes 的资源。
- [Microsoft Azure 订阅](https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/create-subscription#create-a-subscription-in-the-azure-portal):如果你没有的话,请访问此链接查看如何创建 Microsoft Azure 订阅。
- [Micsoroft Azure 租户](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant):访问此链接并参考教程以创建 Microsoft Azure 租户。
- [Microsoft Azure 客户端 ID/密文](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal):访问此链接并参考教程以创建 Microsoft Azure 客户端和密文。
- [Terraform](https://www.terraform.io/downloads.html):用于在 Microsoft Azure 中配置服务器和集群。
## 开始使用
1. 使用命令行工具,执行 `git clone https://github.com/rancher/quickstart` 把 [Rancher Quickstart](https://github.com/rancher/quickstart) 克隆到本地。
2. 执行 `cd quickstart/rancher/azure` 命令,进入包含 Terraform 文件的 Azure 文件夹。
3. 把 `terraform.tfvars.example` 文件重命名为 `terraform.tfvars`。
4. 编辑 `terraform.tfvars` 文件,并替换以下变量:
- `azure_subscription_id` - 替换为 Microsoft Azure 订阅 ID。
- `azure_client_id` - 替换为 Microsoft Azure 客户端 ID。
- `azure_client_secret` - 替换为 Microsoft Azure 客户端密文。
- `azure_tenant_id` - 替换为 Microsoft Azure 租户 ID。
- `rancher_server_admin_password` - 替换为创建 Rancher Server 的 admin 账号的密码(最少 12 字符)
5. **可选**:修改 `terraform.tfvars` 中的可选参数。
参见 [Quickstart Readme](https://github.com/rancher/quickstart) 以及 [Azure Quickstart Readme](https://github.com/rancher/quickstart/tree/master/rancher/azure) 了解更多信息。建议包括:
- `azure_location` - Microsoft Azure 区域。Azure 的默认区域 (`East US`) 不一定是距离你最近的区域。建议修改为距离你最近的区域。
- `prefix` - 所有创建资源的前缀
- `instance_type` - 使用的计算实例大小,最小规格为 `Standard_DS2_v2`。如果在预算范围内,可以使用 `Standard_DS2_v3` 或 `Standard_DS3_v2`。
- `add_windows_node` - 如果设为 true,一个额外的 Windows worker 节点会添加到工作负载集群中。
- `windows_admin_password` - Windows worker 节点管理员的密码
6. 执行 `terraform init`。
7. 执行 `terraform apply --auto-approve` 以初始化环境。然后,等待命令行工具返回以下信息:
```
Apply complete! Resources: 16 added, 0 changed, 0 destroyed.
Outputs:
rancher_node_ip = xx.xx.xx.xx
rancher_server_url = https://rancher.xx.xx.xx.xx.sslip.io
workload_node_ip = yy.yy.yy.yy
```
8. 将以上输出中的 `rancher_server_url` 粘贴到浏览器中。在登录页面中登录(默认用户名为 `admin`,密码为在 `rancher_server_admin_password` 中设置的密码)。
9. 使用 `quickstart/rancher/azure` 中生成的 `id_rsa` 密钥 SSH 到 Rancher Server。
#### 结果
两个 Kubernetes 集群已部署到你的 Azure 账户中,一个运行 Rancher Server,另一个为实验部署做好准备。请注意,虽然这种设置是探索 Rancher 功能的好方法,但在生产环境中,应遵循我们的高可用设置指南。用于虚拟机的 SSH 密钥是自动生成的,存储在模块目录中。
### 后续操作
使用 Rancher 创建 deployment。详情请参见[创建 Deployment](../deploy-workloads/deploy-workloads.md)。
## 销毁环境
1. 进入 `quickstart/rancher/azure` 文件夹,然后执行 `terraform destroy --auto-approve`。
2. 等待命令行界面显示资源已删除的消息。