mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-15 21:44:24 +00:00
Update Chinese translation for v2.6 and v2.7
This commit is contained in:
@@ -392,5 +392,13 @@
|
||||
"theme.tags.tagsPageTitle": {
|
||||
"message": "标签",
|
||||
"description": "The title of the tag list page"
|
||||
},
|
||||
"theme.NavBar.navAriaLabel": {
|
||||
"message": "主导航",
|
||||
"description": "The ARIA label for the main navigation"
|
||||
},
|
||||
"theme.docs.sidebar.navAriaLabel": {
|
||||
"message": "文档侧边栏",
|
||||
"description": "The ARIA label for the sidebar navigation"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ title: 部署带有 Ingress 的工作负载
|
||||
1. 单击**创建**。
|
||||
1. 点击 **Deployment**。
|
||||
1. 为工作负载设置**名称**。
|
||||
1. 在 **Docker 镜像**字段中,输入 `rancher/hello-world`。注意区分大小写。
|
||||
1. 在**容器镜像**字段中,输入 `rancher/hello-world`。注意区分大小写。
|
||||
1. 点击**添加端口**并在**私有容器端口**字段中输入`80`。通过添加端口,你可以访问集群内外的应用。详情请参见 [Service](../../../pages-for-subheaders/workloads-and-pods.md#services)。
|
||||
1. 单击**创建**。
|
||||
|
||||
|
||||
+6
-5
@@ -10,10 +10,11 @@ title: 启用 Monitoring
|
||||
|
||||
## 要求
|
||||
|
||||
- 确保在每个节点上允许端口 9796 上的流量,因为 Prometheus 将从这里抓取指标。
|
||||
- 确保你的集群满足资源要求。集群应至少有 1950Mi 可用内存、2700m CPU 和 50Gi 存储。要查看资源限制和请求的明细,请查看[此处](../../../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。
|
||||
- 在使用 RancherOS 或 Flatcar Linux 节点的 RKE 集群上安装 monitoring 时,请将 etcd 节点证书目录更改为 `/opt/rke/etc/kubernetes/ssl`。
|
||||
- 如果集群是使用 RKE CLI 配置的,而且地址设置为主机名而不是 IP 地址,请在安装的 Values 配置步骤中将 `rkeEtcd.clients.useLocalhost` 设置为 `true`。YAML 片段如下所示:
|
||||
- 在每个节点上允许端口 9796 上的流量。Prometheus 将从这些端口抓取指标。
|
||||
- 如果 [PushProx](../../../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md#pushprox) 被禁用(`ingressNginx.enabled` 设置为 `false`),或者你已经升级了安装了 Monitoring V1 的 Rancher 版本,你可能还需要为每个节点允许端口 10254 上的流量。
|
||||
- 确保你的集群满足资源要求。集群应至少有 1950Mi 可用内存、2700m CPU 和 50Gi 存储。有关资源限制和请求的详细信息,请参阅[配置资源限制和请求](../../../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。
|
||||
- 在使用 RancherOS 或 Flatcar Linux 节点的 RKE 集群上安装 Monitoring 时,请将 etcd 节点证书目录更改为 `/opt/rke/etc/kubernetes/ssl`。
|
||||
- 如果集群是使用 RKE CLI 配置的,而且地址设置为主机名而不是 IP 地址,请在安装的 Values 配置步骤中将 `rkeEtcd.clients.useLocalhost` 设置为 `true`。例如:
|
||||
|
||||
```yaml
|
||||
rkeEtcd:
|
||||
@@ -27,7 +28,7 @@ rkeEtcd:
|
||||
|
||||
:::
|
||||
|
||||
# 设置资源限制和请求
|
||||
## 设置资源限制和请求
|
||||
|
||||
安装 `rancher-monitoring` 时可以配置资源请求和限制。要从 Rancher UI 配置 Prometheus 资源,请单击左上角的 **Apps > Monitoring**。
|
||||
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ Rancher 不会验证你授予 Azure 应用程序的权限。我们仅支持使
|
||||
|
||||
:::
|
||||
|
||||
1. 按照[此处](#3-设置-rancher-所需的权限)所述更新 Azure AD 应用注册的权限。这很关键。
|
||||
1. 按照[此处](#3-设置-rancher-所需的权限)所述更新 Azure AD 应用注册的权限。这个步骤非常关键。
|
||||
|
||||
1. 登录到 Rancher。
|
||||
|
||||
|
||||
+49
-26
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 在 RKE2 集群上安装 Istio 的其他步骤
|
||||
title: 在 RKE2 和 K3s 集群上安装 Istio 的其他步骤
|
||||
---
|
||||
|
||||
通过 **Apps** 页面安装或升级 Istio Helm Chart 时:
|
||||
@@ -8,30 +8,53 @@ title: 在 RKE2 集群上安装 Istio 的其他步骤
|
||||
1. 你将看到配置 Istio Helm Chart 的选项。在**组件**选项卡上,选中**启用 CNI** 旁边的框。
|
||||
1. 添加一个自定义覆盖文件,该文件指定 `cniBinDir` 和 `cniConfDir`。有关这些选项的更多信息,请参阅 [Istio 文档](https://istio.io/latest/docs/setup/additional-setup/cni/#helm-chart-parameters)。下方是一个示例:
|
||||
|
||||
```yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
components:
|
||||
cni:
|
||||
enabled: true
|
||||
k8s:
|
||||
overlays:
|
||||
- apiVersion: "apps/v1"
|
||||
kind: "DaemonSet"
|
||||
name: "istio-cni-node"
|
||||
patches:
|
||||
- path: spec.template.spec.containers.[name:install-cni].securityContext.privileged
|
||||
value: true
|
||||
values:
|
||||
cni:
|
||||
image: rancher/mirrored-istio-install-cni:1.9.3
|
||||
excludeNamespaces:
|
||||
- istio-system
|
||||
- kube-system
|
||||
logLevel: info
|
||||
cniBinDir: /opt/cni/bin
|
||||
cniConfDir: /etc/cni/net.d
|
||||
```
|
||||
<Tabs>
|
||||
<TabItem value="RKE2">
|
||||
|
||||
```yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
components:
|
||||
cni:
|
||||
enabled: true
|
||||
k8s:
|
||||
overlays:
|
||||
- apiVersion: "apps/v1"
|
||||
kind: "DaemonSet"
|
||||
name: "istio-cni-node"
|
||||
patches:
|
||||
- path: spec.template.spec.containers.[name:install-cni].securityContext.privileged
|
||||
value: true
|
||||
values:
|
||||
cni:
|
||||
cniBinDir: /opt/cni/bin
|
||||
cniConfDir: /etc/cni/net.d
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="K3s">
|
||||
|
||||
```yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
components:
|
||||
cni:
|
||||
enabled: true
|
||||
k8s:
|
||||
overlays:
|
||||
- apiVersion: "apps/v1"
|
||||
kind: "DaemonSet"
|
||||
name: "istio-cni-node"
|
||||
patches:
|
||||
- path: spec.template.spec.containers.[name:install-cni].securityContext.privileged
|
||||
value: true
|
||||
values:
|
||||
cni:
|
||||
cniBinDir: /var/lib/rancher/k3s/data/current/bin
|
||||
cniConfDir: /var/lib/rancher/k3s/agent/etc/cni/net.d
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
**结果**:现在你应该可以根据需要使用 Istio,包括 Sidecar 注入和通过 Kiali 进行监控。
|
||||
|
||||
+1
-1
@@ -81,4 +81,4 @@ Rancher v2.7.0 引入了**扩展(Extension)**的新功能。扩展允许用
|
||||
|
||||
## 开发扩展
|
||||
|
||||
要了解如何开发扩展,请参阅 [UI DevKit 文档](https://rancher.github.io/dashboard/plugins/plugins-getting-started)。
|
||||
要了解如何开发你自己的扩展,请参阅官方[入门指南](https://rancher.github.io/dashboard/extensions/extensions-getting-started)。
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
title: Fleet - 大规模的 GitOps
|
||||
---
|
||||
|
||||
Fleet 是大规模的 GitOps。你可以使用 Fleet 管理多达一百万个集群。此外,它非常轻量,因此也非常适用于[单个集群](https://fleet.rancher.io/single-cluster-install/)。但是,它在[大规模](https://fleet.rancher.io/multi-cluster-install/)场景下的功能更加强大。大规模指的是大量集群、大量部署或大量团队。
|
||||
Fleet 是大规模的 GitOps。你可以使用 Fleet 管理多达一百万个集群。此外,它非常轻量,因此也非常适用于[单个集群](https://fleet.rancher.io/tut-deployment#single-cluster-examples)。但是,它在[大规模](https://fleet.rancher.io/tut-deployment#multi-cluster-examples)场景下的功能更加强大。大规模指的是大量集群、大量部署或大量团队。
|
||||
|
||||
Fleet 是一个独立于 Rancher 的项目,你可以使用 Helm 将它安装在任何 Kubernetes 集群上。
|
||||
|
||||
@@ -31,7 +31,7 @@ Fleet 预装在 Rancher 中,可以通过 Rancher UI 中的**持续交付**选
|
||||
|
||||
1. 单击左侧导航栏上的 **Git 仓库**将 git 仓库部署到当前工作空间中的集群中。
|
||||
|
||||
1. 选择你的 [git 仓库](https://fleet.rancher.io/gitrepo-add/)和[目标集群/集群组](https://fleet.rancher.io/gitrepo-structure/)。你还可以单击左侧导航栏中的**集群组**在 UI 中创建集群组。
|
||||
1. 选择你的 [git 仓库](https://fleet.rancher.io/gitrepo-add/)和[目标集群/集群组](https://fleet.rancher.io/gitrepo-targets/)。你还可以单击左侧导航栏中的**集群组**在 UI 中创建集群组。
|
||||
|
||||
1. 部署 git 仓库后,你可以通过 Rancher UI 监控应用。
|
||||
|
||||
@@ -41,7 +41,7 @@ Fleet 预装在 Rancher 中,可以通过 Rancher UI 中的**持续交付**选
|
||||
|
||||
## GitHub 仓库
|
||||
|
||||
你可以单击此处获取 [Fleet Helm Chart](https://github.com/rancher/fleet/releases/tag/v0.3.10)。
|
||||
你可以单击此处获取 [Fleet Helm Chart](https://github.com/rancher/fleet/releases)。
|
||||
|
||||
## 在代理后使用 Fleet
|
||||
|
||||
|
||||
+13
-15
@@ -14,18 +14,16 @@ Prometheus 支持查看 Rancher 和 Kubernetes 对象的指标。通过使用时
|
||||
|
||||
在 Rancher v2.5 中引入的 `rancher-monitoring` operator 由 [Prometheus](https://prometheus.io/)、[Grafana](https://grafana.com/grafana/)、[Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/), [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) 和 [Prometheus adapter](https://github.com/DirectXMan12/k8s-prometheus-adapter) 提供支持。
|
||||
|
||||
Monitoring 应用允许你:
|
||||
Monitoring 应用:
|
||||
|
||||
- 监控集群节点、Kubernetes 组件和软件部署的状态和进程
|
||||
- 根据 Prometheus 收集的指标定义告警
|
||||
- 创建自定义 Grafana 仪表板
|
||||
- 使用 Prometheus Alertmanager 通过电子邮件、Slack、PagerDuty 等配置告警通知
|
||||
- 根据 Prometheus 收集的指标,将预先计算的、经常需要的,或计算成本高的表达式定义为新的时间序列
|
||||
- 通过 Prometheus Adapter,将从 Prometheus 收集的指标公开给 Kubernetes Custom Metrics API,以便在 HPA 中使用
|
||||
- 监控集群节点、Kubernetes 组件和软件部署的状态和进程。
|
||||
- 根据 Prometheus 收集的指标定义告警。
|
||||
- 创建自定义 Grafana 仪表板。
|
||||
- 使用 Prometheus Alertmanager 通过电子邮件、Slack、PagerDuty 等配置告警通知。
|
||||
- 根据 Prometheus 收集的指标,将预先计算的、经常需要的,或计算成本高的表达式定义为新的时间序列。
|
||||
- 通过 Prometheus Adapter,将从 Prometheus 收集的指标公开给 Kubernetes Custom Metrics API,以便在 HPA 中使用。
|
||||
|
||||
## Monitoring 的工作原理
|
||||
|
||||
有关 monitoring 组件如何协同工作的说明,请参阅[此页面](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md)。
|
||||
有关监控组件如何协同工作的说明,请参阅 [Monitoring 工作原理](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md)。
|
||||
|
||||
## 默认组件和部署
|
||||
|
||||
@@ -65,7 +63,7 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到
|
||||
|
||||
### 在 Rancher 中配置 Monitoring 资源
|
||||
|
||||
> 此处的配置参考假设你已经熟悉 monitoring 组件的协同工作方式。如需更多信息,请参阅 [monitoring 的工作原理](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md)。
|
||||
此处的配置参考假设你已经熟悉 monitoring 组件的协同工作方式。如需更多信息,请参阅 [monitoring 的工作原理](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md)。
|
||||
|
||||
- [ServiceMonitor 和 PodMonitor](../reference-guides/monitoring-v2-configuration/servicemonitors-and-podmonitors.md)
|
||||
- [接收器](../reference-guides/monitoring-v2-configuration/receivers.md)
|
||||
@@ -76,7 +74,7 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到
|
||||
|
||||
### 配置 Helm Chart 选项
|
||||
|
||||
有关 `rancher-monitoring` Chart 选项的更多信息,包括设置资源限制和请求的选项,请参阅[此页面](../reference-guides/monitoring-v2-configuration/helm-chart-options.md)。
|
||||
有关 `rancher-monitoring` Chart 选项的更多信息,包括设置资源限制和请求的选项,请参阅 [Helm Chart 选项](../reference-guides/monitoring-v2-configuration/helm-chart-options.md)。
|
||||
|
||||
## Windows 集群支持
|
||||
|
||||
@@ -84,11 +82,11 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到
|
||||
|
||||
为了能够为 Windows 完全部署 Monitoring V2,你的所有 Windows 主机都必须至少具有 v0.1.0 的 [wins](https://github.com/rancher/wins) 版本。
|
||||
|
||||
有关如何在现有 Windows 主机上升级 wins 版本的更多详细信息,请参阅 [Windows 集群对 Monitoring V2 的支持](../integrations-in-rancher/monitoring-and-alerting/windows-support.md)。
|
||||
有关如何在现有 Windows 主机上升级 wins 版本的更多信息,请参阅 [Windows 集群对 Monitoring V2 的支持](../integrations-in-rancher/monitoring-and-alerting/windows-support.md)。
|
||||
|
||||
|
||||
## 已知问题
|
||||
|
||||
有一个[已知问题](https://github.com/rancher/rancher/issues/28787#issuecomment-693611821),即 K3s 集群需要更多的默认内存。如果你在 K3s 集群上启用 monitoring,我们建议将 `prometheus.prometheusSpec.resources.memory.limit` 设置为 2500 Mi,并将 `prometheus.prometheusSpec.resources.memory.request` 设置为 1750 Mi。
|
||||
有一个[已知问题](https://github.com/rancher/rancher/issues/28787#issuecomment-693611821),即 K3s 集群需要的内存超过分配的默认内存。如果你在 K3s 集群上启用 Monitoring,将 `prometheus.prometheusSpec.resources.memory.limit` 设置为 2500 Mi,并将 `prometheus.prometheusSpec.resources.memory.request` 设置为 1750 Mi。
|
||||
|
||||
有关调试高内存用量的提示,请参阅[此页面](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/debug-high-memory-usage.md)。
|
||||
如需获取意见和建议,请参阅[调试高内存使用情况](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/debug-high-memory-usage.md)。
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ title: 在云厂商的新节点上启动 Kubernetes
|
||||
|
||||
#### 节点池污点
|
||||
|
||||
如果你没有在节点模板上定义[污点](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/),则可以为每个节点池添加污点。相比在节点模板上添加污点,在节点池上添加污点的好处在于,你可以替换节点模板,而不必担心污点是否在节点模板中。
|
||||
如果你没有在节点模板上定义[污点](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/),则可以为每个节点池添加污点。将污点添加到节点池的好处是你可以更改节点模板,而不需要先确保污点存在于新模板中。
|
||||
|
||||
每个污点都将自动添加到节点池中已创建的节点。因此,如果你在已有节点的节点池中添加污点,污点不会应用到已有的节点,但是添加到该节点池中的新节点都将获得该污点。
|
||||
|
||||
@@ -149,4 +149,4 @@ RKE2 CLI 公开了 `server` 和 `agent` 两个角色,它们分别代表 Kubern
|
||||
|
||||
- 至少拥有三个角色为 etcd 的节点,来确保失去一个节点时仍能存活。
|
||||
- 至少两个节点具有 controlplane 角色,以实现主组件高可用性。
|
||||
- 至少两个具有 worker 角色的节点,用于在节点故障时重新安排工作负载。
|
||||
- 至少两个具有 worker 角色的节点,用于在节点故障时重新安排工作负载。
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ title: 部署带有 Ingress 的工作负载
|
||||
1. 单击**创建**。
|
||||
1. 点击 **Deployment**。
|
||||
1. 为工作负载设置**名称**。
|
||||
1. 在 **Docker 镜像**字段中,输入 `rancher/hello-world`。注意区分大小写。
|
||||
1. 在**容器镜像**字段中,输入 `rancher/hello-world`。注意区分大小写。
|
||||
1. 在 `Service Type` 点击 **Add Port** 和 `Cluster IP`,并在 **Private Container Port** 字段中输入`80`。你可以将 `Name` 留空或指定名称。通过添加端口,你可以访问集群内外的应用。有关详细信息,请参阅 [Service](../../../pages-for-subheaders/workloads-and-pods.md#services)。
|
||||
1. 单击**创建**。
|
||||
|
||||
|
||||
+78
-62
@@ -3,12 +3,14 @@ title: 配置 Azure AD
|
||||
---
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="Rancher v2.6.7">
|
||||
<TabItem value="Rancher v2.6.7+">
|
||||
|
||||
## Microsoft Graph API
|
||||
|
||||
Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用户](#新用户设置)使用新实例来配置 Azure AD,并帮助现有 Azure 应用所有者[迁移到新流程](#从-azure-ad-graph-api-迁移到-microsoft-graph-api)。
|
||||
|
||||
Rancher 中的 Microsoft Graph API 流程正在不断发展。建议你使用最新的 2.6 补丁版本,该版本仍在积极开发中,并将持续获得新功能和改进。
|
||||
|
||||
### 新用户设置
|
||||
|
||||
如果你在 Azure 中托管了一个 Active Directory(AD)实例,你可以将 Rancher 配置为允许你的用户使用 AD 账号登录。你需要在 Azure 和 Rancher 中进行 Azure AD 外部身份验证。
|
||||
@@ -26,7 +28,7 @@ Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用
|
||||
|
||||
:::tip
|
||||
|
||||
在开始之前,我们建议你创建一个空文本文件。你可以将 Azure 相关的值复制到该文件,然后再粘贴到 Rancher 中。
|
||||
在开始之前,打开两个浏览器选项卡:一个用于 Rancher,另一个用于 Azure 门户。这样,你可以将门户的配置值复制并粘贴到 Rancher 中。
|
||||
|
||||
:::
|
||||
|
||||
@@ -39,9 +41,7 @@ Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用
|
||||
|
||||
1. 使用搜索功能打开 **App registrations** 服务。
|
||||
|
||||

|
||||
|
||||
1. 单击 **New registrations** 并完成 **Create** 表单。
|
||||
1. 点击 **New registration** 并填写表单。
|
||||
|
||||

|
||||
|
||||
@@ -80,20 +80,17 @@ Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用
|
||||
|
||||

|
||||
|
||||
1. 在左侧的导航窗格中,单击 **Certificates and Secrets**。
|
||||
1. 在导航窗格中,单击 **Certificates & secrets**。
|
||||
|
||||
1. 单击 **New client secret**。
|
||||

|
||||
1. 输入 **Description**(例如 `Rancher`)。
|
||||
1. 从 **Expires** 下的选项中选择密钥的持续时间。此下拉菜单设置的是密钥的到期日期。日期越短则越安全,但是在到期后你需要创建新密钥。
|
||||
1. 从 **Expires** 下的选项中选择持续时间。此下拉菜单设置的是密钥的到期日期。日期越短则越安全,但需要你更频繁地创建新密钥。
|
||||
请注意,如果检测到应用程序 Secret 已过期,用户将无法登录 Rancher。为避免此问题,请在 Azure 中轮换 Secret 并在过期前在 Rancher 中更新它。
|
||||
1. 单击 **Add**(无需输入值,保存后会自动填充)。
|
||||
<a id="secret"></a>
|
||||
|
||||
1. 将键值复制保存到[空文本文件](#tip)。
|
||||
|
||||
稍后你将在 Rancher UI 中输入此密钥作为你的 **Application Secret**。
|
||||
|
||||
你将无法在 Azure UI 中再次访问该键值。
|
||||
1. 稍后你将在 Rancher UI 中输入此密钥作为你的 **Application Secret**。由于你将无法在 Azure UI 中再次访问键值,因此请在其余设置过程中保持打开此窗口。
|
||||
|
||||
#### 3. 设置 Rancher 所需的权限
|
||||
|
||||
@@ -101,63 +98,75 @@ Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用
|
||||
|
||||
:::caution
|
||||
|
||||
请确保你设置了 Application 和 NOT Delegated 的权限类型。否则,你可能无法登录 Azure AD。禁用/重新启用 Azure AD 无法解决此问题,你需要等待一小时或手动删除缓存值。
|
||||
确保你设置了 Application 权限,而*不是* Delegated 权限。否则,你将无法登录 Azure AD。
|
||||
|
||||
:::
|
||||
|
||||
1. 从左侧的导航窗格中,选择 **API permissions**。
|
||||
|
||||

|
||||
1. 在导航窗格中,选择 **API permissions**。
|
||||
|
||||
1. 单击 **Add a permission**。
|
||||
|
||||
1. 在 **Microsoft Graph** 中,选择以下 **Application Permissions**:
|
||||
- `Group.Read.All`
|
||||
- `User.Read.All`
|
||||
1. 从 Microsoft Graph API 中,选择以下 **Application Permissions**: `Directory.Read.All`。
|
||||
|
||||

|
||||

|
||||
|
||||
1. 返回左侧导航栏中的 **API permissions**。在那里,单击 **Grant admin consent**。然后单击 **Yes**。
|
||||
:::note
|
||||
|
||||
:::note
|
||||
在 Rancher 2.6.7-2.6.10 版本中,你需要使用 `User.Read.All` 和 `Group.Read.All` 来获取权限。在 v2.6.11 中已更改为允许范围较小的权限(例如 `Directory.Read.All`)。
|
||||
|
||||
你必须以 Azure 管理员身份登录才能保存你的权限设置。
|
||||
:::
|
||||
|
||||
:::
|
||||
1. 返回导航栏中的 **API permissions**。在那里,单击 **Grant admin consent**。然后单击 **Yes**。该应用程序的权限应如下所示:
|
||||
|
||||

|
||||
|
||||
:::note
|
||||
|
||||
Rancher 不会验证你授予 Azure 应用程序的权限。你可以自由使用任何你所需的权限,只要这些权限允许 Rancher 使用 AD 用户和组。
|
||||
|
||||
具体来说,Rancher 需要允许以下操作的权限:
|
||||
- 获取一个用户。
|
||||
- 列出所有用户。
|
||||
- 列出给定用户所属的组。
|
||||
- 获取一个组。
|
||||
- 列出所有组。
|
||||
|
||||
Rancher 执行这些操作来登录用户或搜索用户/组。请记住,权限必须是 `Application` 类型。
|
||||
|
||||
下面是几个满足 Rancher 需求的权限组合示例:
|
||||
- `Directory.Read.All`
|
||||
- `User.Read.All` 和 `GroupMember.Read.All`
|
||||
- `User.Read.All` 和 `Group.Read.All`
|
||||
|
||||
:::
|
||||
|
||||
#### 4. 复制 Azure 应用数据
|
||||
|
||||

|
||||
|
||||
1. 获取你的 Rancher **租户 ID**。
|
||||
|
||||
1. 使用搜索打开 **App registrations**。
|
||||
|
||||

|
||||
|
||||
1. 找到你为 Rancher 创建的项。
|
||||
|
||||
1. 复制 **Directory ID** 并粘贴到你的[文本文件](#tip)。
|
||||
|
||||

|
||||
|
||||
- 你将把这个值作为 **Tenant ID** 粘贴到 Rancher。
|
||||
1. 复制 **Directory ID** 并将其作为 **Tenant ID** 粘贴到 Rancher 中。
|
||||
|
||||
1. 获取你的 Rancher **Application (Client) ID**。
|
||||
|
||||
2.1. 使用搜索打开 **App registrations**(如果还没有的话)。
|
||||
1. 如果你还未在该位置,请使用搜索打开 **App registrations**。
|
||||
|
||||
2.2. 在 **Overview**中,找到你为 Rancher 创建的条目。
|
||||
1. 在 **Overview**中,找到你为 Rancher 创建的条目。
|
||||
|
||||
2.3. 复制 **Application (Client) ID** 并将其粘贴到你的[文本文件](#tip)。
|
||||
1. 复制 **Application (Client) ID** 并将其作为 **Application ID** 粘贴到 Rancher 中。
|
||||
|
||||

|
||||
|
||||
1. 你的端点选项通常是 [Standard](#global) 和 [China](#china)。使用这些选项,你只需要输入 **Tenant ID**、**Application ID** 和 **Application Secret**(Rancher 将负责其余的工作)。
|
||||
1. 你的端点选项通常是 [Standard](#global) 或 [China](#china)。对于这两个选项,你只需要输入 **Tenant ID**、**Application ID** 和 **Application Secret**。
|
||||
|
||||

|
||||
|
||||
**对于自定义端点**:
|
||||
|
||||
**警告**:Rancher 不支持也不完全测试自定义端点。
|
||||
**警告**:Rancher 未测试也未完全支持自定义端点。
|
||||
|
||||
你还需要手动输入 Graph、Token 和 Auth Endpoints。
|
||||
|
||||
@@ -165,7 +174,7 @@ Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用
|
||||
|
||||

|
||||
|
||||
- 将以下端点复制并粘贴到你的[文本文件](#tip)中(这些值将是你的 Rancher 端点值):确保复制端点的 v1 版本。
|
||||
- 以下端点将是你的 Rancher 端点值。请使用这些端点的 v1 版本。
|
||||
- **Microsoft Graph API endpoint**(Graph 端点)
|
||||
- **OAuth 2.0 token endpoint (v1)**(Token 端点)
|
||||
- **OAuth 2.0 authorization endpoint (v1)** (Auth 端点)
|
||||
@@ -222,14 +231,19 @@ Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用
|
||||
|
||||
### 从 Azure AD Graph API 迁移到 Microsoft Graph API
|
||||
|
||||
由于 [Azure AD Graph API](https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-overview) 已于 2022 年 6 月弃用并将于 2022 年底停用,因此用户应更新其 Azure AD 应用程序以在 Rancher 中使用新的 [Microsoft Graph API](https://docs.microsoft.com/en-us/graph/use-the-api)。
|
||||
由于 [Azure AD Graph API](https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-overview) 已弃用并计划于 2023 年 6 月停用,管理员应更新他们的 Azure AD 应用程序以在 Rancher 中使用 [Microsoft Graph API](https://docs.microsoft.com/en-us/graph/use-the-api)。
|
||||
你需要在端点弃用之前完成操作。
|
||||
如果在停用后 Rancher 仍配置为使用 Azure AD Graph API,用户可能无法使用 Azure AD 登录 Rancher。
|
||||
|
||||
#### 在 Rancher UI 中更新端点
|
||||
|
||||
> **重要提示**:管理员应该在他们提交下面第 4 步中的端点迁移之前创建一个[备份](../../../new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher.md)。
|
||||
:::caution
|
||||
|
||||
1. 按照[此处](#3-设置-rancher-所需的权限)所述更新 Azure AD 应用注册的权限。
|
||||
(**重要**)。
|
||||
管理员需要在迁移下述端点之前创建一个 [Rancher 备份](../../../new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher.md)。
|
||||
|
||||
:::
|
||||
|
||||
1. [更新](#3-设置-rancher-所需的权限) Azure AD 应用程序注册的权限。这个步骤非常关键。
|
||||
|
||||
1. 登录到 Rancher。
|
||||
|
||||
@@ -261,17 +275,20 @@ Microsoft Graph API 现在是设置 Azure AD 的流程。下文将帮助[新用
|
||||
|
||||
1. 如果 Azure 应用程序所有者想要轮换应用程序密钥,他们也需要在 Rancher 中进行轮换(因为在 Azure 中更改应用程序密钥时,Rancher 不会自动更新应用程序密钥)。在 Rancher 中,它存储在名为 `azureadconfig-applicationsecret` 的 Kubernetes 密文中,该密文位于 `cattle-global-data` 命名空间中。
|
||||
|
||||
1. **注意**:如果管理员使用现有 Azure AD 设置升级到 Rancher v2.6.7 并选择了禁用身份验证提供程序,他们将无法恢复以前的设置,也无法设置使用旧流程重新设置 Azure AD。然后,管理员需要使用新的身份验证流程重新注册。Rancher 现在使用了新的 Graph API,因此,用户需要在 Azure 门户中设置[适当的权限](#3-设置-rancher-所需的权限)。
|
||||
:::caution
|
||||
|
||||
如果你使用现有的 Azure AD 设置升级到 Rancher v2.6.7+,并选择了禁用认证提供程序,你将无法恢复以前的设置。你也无法使用旧流程设置 Azure AD。你需要使用新的认证流程重新注册。由于 Rancher 现在使用 Graph API,因此用户需要[在 Azure 门户中设置适当的权限](#3-设置-rancher-所需的权限)。
|
||||
|
||||
:::
|
||||
|
||||
#### Global:
|
||||
|
||||
Rancher 字段 | 已弃用端点
|
||||
| Rancher 字段 | 已弃用的端点 |
|
||||
---------------- | -------------------------------------------------------------
|
||||
Auth 端点 | https://login.microsoftonline.com/{tenantID}/oauth2/authorize
|
||||
端点 | https://login.microsoftonline.com/
|
||||
Graph 端点 | https://graph.windows.net/
|
||||
Token 端点 | https://login.microsoftonline.com/{tenantID}/oauth2/token
|
||||
---
|
||||
| Auth 端点 | https://login.microsoftonline.com/{tenantID}/oauth2/authorize |
|
||||
| 端点 | https://login.microsoftonline.com/ |
|
||||
| Graph 端点 | https://graph.windows.net/ |
|
||||
| Token 端点 | https://login.microsoftonline.com/{tenantID}/oauth2/token |
|
||||
|
||||
| Rancher 字段 | 新端点 |
|
||||
---------------- | ------------------------------------------------------------------
|
||||
@@ -282,13 +299,12 @@ Token 端点 | https://login.microsoftonline.com/{tenantID}/oauth2/token
|
||||
|
||||
#### 中国:
|
||||
|
||||
Rancher 字段 | 已弃用端点
|
||||
| Rancher 字段 | 已弃用的端点 |
|
||||
---------------- | ----------------------------------------------------------
|
||||
Auth 端点 | https://login.chinacloudapi.cn/{tenantID}/oauth2/authorize
|
||||
端点 | https://login.chinacloudapi.cn/
|
||||
Graph 端点 | https://graph.chinacloudapi.cn/
|
||||
Token 端点 | https://login.chinacloudapi.cn/{tenantID}/oauth2/token
|
||||
---
|
||||
| Auth 端点 | https://login.chinacloudapi.cn/{tenantID}/oauth2/authorize |
|
||||
| 端点 | https://login.chinacloudapi.cn/ |
|
||||
| Graph 端点 | https://graph.chinacloudapi.cn/ |
|
||||
| Token 端点 | https://login.chinacloudapi.cn/{tenantID}/oauth2/token |
|
||||
|
||||
| Rancher 字段 | 新端点 |
|
||||
---------------- | -------------------------------------------------------------------------
|
||||
@@ -301,19 +317,19 @@ Token 端点 | https://login.chinacloudapi.cn/{tenantID}/oauth2/token
|
||||
</TabItem>
|
||||
<TabItem value="Rancher v2.6.0 - v2.6.6">
|
||||
|
||||
## Azure AD Graph API
|
||||
## 已弃用的 Azure AD Graph API
|
||||
|
||||
> **重要提示**:
|
||||
>
|
||||
> - [Azure AD Graph API](https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-overview) 已于 2022 年 6 月弃用,并将于 2022 年底停用。我们将更新我们的文档,以便在停用时向社区提供建议。Rancher 现在使用 [Microsoft Graph API](https://docs.microsoft.com/en-us/graph/use-the-api) 来将 Azure AD 设置为外部身份验证提供程序。
|
||||
> - [Azure AD Graph API](https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-overview) 已被弃用,Microsoft 将在 2023 年 6 月 30 日后随时停用它且不会另行通知。我们将更新我们的文档,以便在停用时向社区提供建议。Rancher 现在使用 [Microsoft Graph API](https://docs.microsoft.com/en-us/graph/use-the-api) 来将 Azure AD 设置为外部身份验证提供程序。
|
||||
>
|
||||
>
|
||||
> - 对于想要迁移的新用户或现有用户,请参阅 <a href="#microsoft-graph-api/" target="_blank">Rancher v2.6.7</a> 选项卡。
|
||||
> - 如果你是新用户或希望进行迁移,请参阅新的流程说明: <a href="#microsoft-graph-api/" target="_blank">Rancher v2.6.7+</a>。
|
||||
>
|
||||
>
|
||||
> - 对于在 Azure AD Graph API 停用后不希望升级到 v2.6.7 的现有用户,他们需要:
|
||||
> - 使用内置的 Rancher 身份验证,或者
|
||||
> - 使用另一个第三方身份验证系统并在 Rancher 中进行设置。请参阅[身份验证文档](../../../../pages-for-subheaders/authentication-config.md),了解如何配置其他开放式身份验证提供程序。
|
||||
> - 如果你不想在 Azure AD Graph API 停用后升级到 v2.6.7+,你需要:
|
||||
> - 使用内置的 Rancher 身份认证,或者
|
||||
> - 使用另一个第三方身份认证系统并在 Rancher 中进行设置。请参阅[身份验证文档](../../../../pages-for-subheaders/authentication-config.md),了解如何配置其他开放式身份验证提供程序。
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
+25
-3
@@ -26,9 +26,7 @@ Rancher 身份验证代理支持与以下外部身份验证服务集成:
|
||||
| [Google OAuth](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md) |
|
||||
| [Shibboleth](configure-shibboleth-saml.md) |
|
||||
|
||||
<br/>
|
||||
|
||||
同时,Rancher 也提供了[本地验证](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/create-local-users.md)。
|
||||
同时,Rancher 也提供了[本地身份验证](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/create-local-users.md)。
|
||||
|
||||
大多数情况下,应该使用外部身份验证服务,而不是本地身份验证,因为外部身份验证允许对用户进行集中管理。但是你可能需要一些本地身份验证用户,以便在特定的情况下(例如在外部身份验证系统不可用或正在进行维护时)管理 Rancher。
|
||||
|
||||
@@ -109,3 +107,27 @@ Rancher 依赖用户和组来决定允许登录到 Rancher 的用户,以及他
|
||||
如果你需要重新配置或禁用以前设置的提供程序然后再重新启用它,请确保进行此操作的用户使用外部用户身份登录 Rancher,而不是本地管理员。
|
||||
|
||||
:::
|
||||
|
||||
## 禁用认证提供程序
|
||||
|
||||
禁用身份认证提供程序时,Rancher 会删除与其关联的所有资源,例如:
|
||||
- 密文
|
||||
- 全局角色绑定
|
||||
- 集群角色模板绑定
|
||||
- 项目角色模板绑定
|
||||
- 与提供商关联的外部用户,这些用户从未以本地用户身份登录到 Rancher
|
||||
|
||||
由于此操作可能会导致许多资源丢失,因此你可能希望在提供程序上添加保护措施。
|
||||
为确保在禁用身份认证提供程序时不会运行此清理,请向相应的身份认证配置添加特殊注释。
|
||||
|
||||
例如,要为 Azure AD 提供程序添加安全措施,请注释 `azuread` authconfig 对象:
|
||||
|
||||
`kubectl annotate --overwrite authconfig azuread management.cattle.io/auth-provider-cleanup='user-locked'`
|
||||
|
||||
在你将注释设置为 `unlocked` 之前,Rancher 不会执行清理。
|
||||
|
||||
### 手动运行资源清理
|
||||
|
||||
即使在你配置了另一个身份认证提供程序,Rancher 也可能会保留 local 集群中已禁用的身份认证提供程序配置的资源。例如,如果你使用 Provider A,然后禁用了它并开始使用 Provider B,当你升级到新版本的 Rancher 时,你可以手动触发对 Provider A 配置的资源的清理。
|
||||
|
||||
要为已禁用的身份认证提供程序手动触发清理,请将带有 `unlocked` 值的 `management.cattle.io/auth-provider-cleanup` 注释添加到 auth 配置中。
|
||||
|
||||
Reference in New Issue
Block a user