diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md index 2b751f02074..dee4c863bcf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md @@ -72,7 +72,7 @@ helm template rancher ./rancher-.tgz --output-dir . \ kubectl -n cattle-system apply -R -f ./rancher ``` -# 验证升级 +## 验证升级 登录 Rancher 以确认升级成功。 @@ -84,6 +84,6 @@ kubectl -n cattle-system apply -R -f ./rancher ::: -# 已知升级问题 +## 已知升级问题 你可以在 [GitHub](https://github.com/rancher/rancher/releases) 发布说明以及 [Rancher 论坛](https://forums.rancher.com/c/announcements/12)中找到每个 Rancher 版本的已知问题。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md index 26bf7e2d916..47ff28e2370 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md @@ -34,7 +34,10 @@ title: Rancher Helm Chart 选项 | `auditLog.maxAge` | 1 | `int` - 旧审计日志文件最多可保留的天数(仅当`auditLog.destination` 的值是 `hostPath` 时生效) | | `auditLog.maxBackup` | 1 | `int` - 审计文件最大可保留的个数(仅当 `auditLog.destination` 的值是 `hostPath` 时生效) | | `auditLog.maxSize` | 100 | `int` - 在审计日志被轮换前的最大容量,单位是 MB(仅当 `auditLog.destination` 的值是 `hostPath` 时生效) | -| `busyboxImage` | "busybox" | `string` - 用来收集审计日志的 busybox 镜像位置 | +| `auditLog.image.repository` | "registry.suse.com/bci/bci-micro" | `string` - 用于收集审计日志的镜像的位置。 | +| `auditLog.image.tag` | "15.4.14.3" | `string` - 用于收集审计日志的镜像的标签。 | +| `auditLog.image.pullPolicy` | "IfNotPresent" | `string` - 覆盖 auditLog 镜像的 imagePullPolicy - “Always”、“Never”、“IfNotPresent”。 | +| `busyboxImage` | "" | `string` - 用于收集审计日志的 busybox 镜像位置。_注意:此选项已弃用,请使用 `auditLog.image.repository` 来控制审计 sidecar 镜像_。 | | `certmanager.version` | "" | `string` - 设置 cert-manager compatibility | | `debug` | false | `bool` - 在 Rancher Server 设置 debug 参数 | | `extraEnv` | [] | `list` - 为 Rancher 额外设置环境变量 | @@ -165,7 +168,7 @@ kubectl -n cattle-system create secret generic tls-ca-additional --from-file=ca- 有关使用私有仓库安装 Rancher 的详情,请参见[离线安装](../../../pages-for-subheaders/air-gapped-helm-cli-install.md)。 -# 外部 TLS 终止 +## 外部 TLS 终止 我们建议将负载均衡器配置为 4 层均衡,将普通 80/tcp 和 443/tcp 转发到 Rancher Management 集群节点。集群上的 Ingress Controller 会将端口 80 上的 HTTP 流量重定向到端口 443 上的 HTTPS。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/tls-settings.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/tls-settings.md index 3459988f584..25f5652fe6e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/tls-settings.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-references/tls-settings.md @@ -4,14 +4,14 @@ title: TLS 设置 更改默认 TLS 设置的方法取决于它的安装方式。 -# 在高可用 Kubernetes 集群中运行 Rancher +## 在高可用 Kubernetes 集群中运行 Rancher 当你在 Kubernetes 集群内安装 Rancher 时,TLS 会在集群的 Ingress Controller 上卸载。可用的 TLS 设置取决于使用的 Ingress Controller: * nginx-ingress-controller(RKE1 和 RKE2 默认):[默认的 TLS 版本和密码](https://kubernetes.github.io/ingress-nginx/user-guide/tls/#default-tls-version-and-ciphers)。 * traefik(K3s 默认):[TLS 选项](https://doc.traefik.io/traefik/https/tls/#tls-options)。 -# 在单个 Docker 容器中运行 Rancher +## 在单个 Docker 容器中运行 Rancher 默认 TLS 配置仅支持 TLS 1.2 和安全的 TLS 密码套件。你可以通过设置以下环境变量来更改此配置: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md index fb2a324345f..8468c6a5d6d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md @@ -11,7 +11,7 @@ import PortsImportedHosted from '@site/src/components/PortsImportedHosted' 为了确保能正常运行,Rancher 需要在 Rancher 节点和下游 Kubernetes 集群节点上开放一些端口。 -# Rancher 节点 +## Rancher 节点 下表列出了运行 Rancher Server 的节点之间需要开放的端口。 @@ -176,7 +176,7 @@ RKE2 server 需要开放端口 6443 和 9345 才能供集群中的其他节点 -# 下游 Kubernetes 集群节点 +## 下游 Kubernetes 集群节点 下游 Kubernetes 集群用于运行你的应用和服务。本节介绍了哪些端口需要在下游集群的节点上打开,以便 Rancher 能够与它们进行通信。 @@ -251,7 +251,7 @@ RKE2 server 需要开放端口 6443 和 9345 才能供集群中的其他节点 -# 其他端口注意事项 +## 其他端口注意事项 ### 常用端口 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md index 8a8e88a66ac..9dee02557c2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md @@ -74,7 +74,7 @@ Rancher Server 默认设计为安全的,并且需要 SSL/TLS 配置。 | `systemDefaultRegistry` | `` | 将 Rancher Server 配置成在配置集群时,始终从私有镜像仓库中拉取镜像。 | | `useBundledSystemChart` | `true` | 配置 Rancher Server 使用打包的 Helm System Chart 副本。[system charts](https://github.com/rancher/system-charts) 仓库包含所有 Monitoring,Logging,告警和全局 DNS 等功能所需的应用商店项目。这些 [Helm Chart](https://github.com/rancher/system-charts) 位于 GitHub 中。但是由于你处在离线环境,因此使用 Rancher 内置的 Chart 会比设置 Git mirror 容易得多。 | -### 3. 渲染 Rancher Helm 模板 +### 3. 获取 Cert-Manager Chart 根据你在[2:选择 SSL 配置](#2-选择-ssl-配置)中的选择,完成以下步骤之一: @@ -112,30 +112,62 @@ v2.6.4 兼容 cert-manager 版本 1.6.2 和 1.7.1。推荐使用 v1.7.x,因为 helm fetch jetstack/cert-manager --version v1.7.1 ``` -##### 3. 渲染 cert-manager 模板 -使用你想用来安装 Chart 的选项来渲染 cert-manager 模板。记住要设置 `image.repository` 选项,以从你的私有镜像仓库拉取镜像。此操作会创建一个包含 Kubernetes manifest 文件的 `cert-manager` 目录。 - -```plain -helm template cert-manager ./cert-manager-v1.7.1.tgz --output-dir . \ - --namespace cert-manager \ - --set image.repository=/quay.io/jetstack/cert-manager-controller \ - --set webhook.image.repository=/quay.io/jetstack/cert-manager-webhook \ - --set cainjector.image.repository=/quay.io/jetstack/cert-manager-cainjector \ - --set startupapicheck.image.repository=/quay.io/jetstack/cert-manager-ctl -``` - -##### 4. 下载 cert-manager CRD +##### 3. 检索 Cert-Manager CRD 为 cert-manager 下载所需的 CRD 文件: ```plain curl -L -o cert-manager/cert-manager-crd.yaml https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/cert-manager.crds.yaml ``` -##### 5. 渲染 Rancher 模板 +### 4. 安装 Rancher -渲染 Rancher 模板来声明你的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 +将获取的 Chart 复制到有权访问 Rancher Server 集群的系统以完成安装。 +##### 1. 安装 Cert-Manager + +使用要用于安装 Chart 的选项来安装 cert-manager。记住要设置 `image.repository` 选项,以从你的私有镜像仓库拉取镜像。此操作会创建一个包含 Kubernetes manifest 文件的 `cert-manager` 目录。 + +
+ 单击展开 + +如果你使用自签名证书,安装 cert-manager: + +1. 为 cert-manager 创建命名空间: + + ```plain + kubectl create namespace cert-manager + ``` + +2. 创建 cert-manager CustomResourceDefinition (CRD)。 + + ```plain + kubectl apply -f cert-manager/cert-manager-crd.yaml + ``` + +3. 安装 cert-manager。 + + ```plain + helm install cert-manager ./cert-manager-v1.7.1.tgz \ + --namespace cert-manager \ + --set image.repository=/quay.io/jetstack/cert-manager-controller \ + --set webhook.image.repository=/quay.io/jetstack/cert-manager-webhook \ + --set cainjector.image.repository=/quay.io/jetstack/cert-manager-cainjector \ + --set startupapicheck.image.repository=/quay.io/jetstack/cert-manager-ctl + ``` + +
+ +##### 2. 安装 Rancher +首先,参见[添加 TLS 密文](../../resources/add-tls-secrets.md)发布证书文件,以便 Rancher 和 Ingress Controller 可以使用它们。 + +然后,使用 kubectl 为 Rancher 创建命名空间: + +```plain +kubectl create namespace cattle-system +``` + +然后安装 Rancher,并声明你选择的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 | 占位符 | 描述 | ------------|------------- @@ -145,8 +177,7 @@ curl -L -o cert-manager/cert-manager-crd.yaml https://github.com/cert-manager/ce | `` | 在 K8s 集群上运行的 cert-manager 版本。 | ```plain -helm template rancher ./rancher-.tgz --output-dir . \ - --no-hooks \ # 避免生成 Helm 钩子文件 + helm install rancher ./rancher-.tgz \ --namespace cattle-system \ --set hostname= \ --set certmanager.version= \ @@ -159,14 +190,13 @@ helm template rancher ./rancher-.tgz --output-dir . \ #### 选项 B:使用 Kubernetes 密文从文件中获取证书 - ##### 1. 创建密文 使用你自己的证书来创建 Kubernetes 密文,以供 Rancher 使用。证书的 common name 需要与以下命令中的 `hostname` 选项匹配,否则 Ingress Controller 将无法为 Rancher 配置站点。 -##### 2. 渲染 Rancher 模板 +##### 2. 安装 Rancher -渲染 Rancher 模板来声明你的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 +安装 Rancher,并声明你选择的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 | 占位符 | 描述 | | -------------------------------- | ----------------------------------------------- | @@ -175,8 +205,7 @@ helm template rancher ./rancher-.tgz --output-dir . \ | `` | 你的私有镜像仓库的 DNS 名称。 | ```plain - helm template rancher ./rancher-.tgz --output-dir . \ - --no-hooks \ # 避免生成 Helm 钩子文件 + helm install rancher ./rancher-.tgz --output-dir . \ --namespace cattle-system \ --set hostname= \ --set rancherImage=/rancher/rancher \ @@ -188,8 +217,7 @@ helm template rancher ./rancher-.tgz --output-dir . \ 如果你使用的是私有 CA 签名的证书,请在 `--set ingress.tls.source=secret` 后加上 `--set privateCA=true`: ```plain - helm template rancher ./rancher-.tgz --output-dir . \ - --no-hooks \ # 避免生成 Helm 钩子文件 + helm install rancher ./rancher-.tgz --output-dir . \ --namespace cattle-system \ --set hostname= \ --set rancherImage=/rancher/rancher \ @@ -199,55 +227,8 @@ helm template rancher ./rancher-.tgz --output-dir . \ --set useBundledSystemChart=true # 使用打包的 Rancher System Chart ``` -**可选**:如需安装特定的 Rancher 版本,设置`rancherImageTag` 的值,例如:`--set rancherImageTag=v2.3.6` -然后,参见[添加 TLS 密文](../../resources/add-tls-secrets.md)发布证书文件,以便 Rancher 和 Ingress Controller 可以使用它们。 - -### 4. 安装 Rancher - -将渲染的 manifest 目录复制到可以访问 Rancher Server 集群的系统中,以完成安装。 - -使用 `kubectl` 来创建命名空间和应用渲染的 manifest。 - -如果你使用自签名证书(在[选项B. 选择 SSL 配置](#b-选择-ssl-配置)中),安装 cert-manager。 - -#### 自签名证书安装 - 安装 Cert-manager - -
- 单击展开 - -如果你使用自签名证书,安装 cert-manager: - -1. 为 cert-manager 创建命名空间: - ```plain - kubectl create namespace cert-manager - ``` -2. 创建 cert-manager CustomResourceDefinition (CRD)。 - ```plain - kubectl apply -f cert-manager/cert-manager-crd.yaml - ``` - - :::note - - 如果你运行的 Kubernetes 版本是 1.15 或更低版本,你需要在以上的 `kubectl apply` 命令中添加 `--validate=false`,否则你将看到 cert-manager CRD 资源中的 `x-kubernetes-preserve-unknown-fields` 字段校验错误提示。这是 kubectl 执行资源校验方式产生的良性错误。 - - ::: - -3. 启动 cert-manager. - ```plain - kubectl apply -R -f ./cert-manager - ``` - -
- -#### 使用 kubectl 安装 Rancher - -```plain -kubectl create namespace cattle-system -kubectl -n cattle-system apply -R -f ./rancher -``` 安装已完成。 - :::caution 如果你不想发送遥测数据,在首次登录时退出[遥测](../../../../faq/telemetry.md)。如果在离线安装的环境中让这个功能处于 active 状态,socket 可能无法打开。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md index 3114616d4f2..20e726f6fb4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md @@ -127,7 +127,7 @@ chmod +x rancher-load-images.sh 如果你的 Rancher Server 将用于配置 Linux 和 Windows 集群,你需要执行不同的步骤,来将 Windows 镜像和 Linux 镜像推送到你的私有镜像仓库。由于 Windows 集群同时包含 Linux 和 Windows 节点,因此推送到私有镜像仓库的 Linux 镜像是 Manifest。 -# Windows 步骤 +## Windows 步骤 从 Windows Server 工作站中收集和推送 Windows 镜像。 @@ -206,7 +206,7 @@ chmod +x rancher-load-images.sh ./rancher-load-images.ps1 --registry ``` -# Linux 步骤 +## Linux 步骤 Linux 镜像需要在 Linux 主机上收集和推送,但是你必须先将 Windows 镜像推送到私有镜像仓库,然后再推送 Linux 镜像。由于被推送的 Linux 镜像实际上是支持 Windows 和 Linux 镜像的 manifest,因此涉及的步骤不同于只包含 Linux 节点的集群。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/add-tls-secrets.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/add-tls-secrets.md index 9225f07630e..06e1d1b5f54 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/add-tls-secrets.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/add-tls-secrets.md @@ -23,7 +23,7 @@ kubectl -n cattle-system create secret tls tls-rancher-ingress \ ::: -# 使用私有 CA 签名证书 +## 使用私有 CA 签名证书 如果你使用的是私有 CA,Rancher 需要你提供 CA 证书的副本,用来校验 Rancher Agent 与 Server 的连接。 @@ -40,6 +40,6 @@ Rancher 启动时会检索配置的 `tls-ca` 密文。如果 Rancher 在运行 ::: -# 更新私有 CA 证书 +## 更新私有 CA 证书 按照[步骤](update-rancher-certificate.md)更新 [Rancher 高可用 Kubernetes 安装](../../../pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md)中的 Ingress,或从默认自签名证书切换到自定义证书。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/local-system-charts.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/local-system-charts.md index 887a7aa23d4..d4337ae9182 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/local-system-charts.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/local-system-charts.md @@ -6,7 +6,7 @@ title: 离线安装中设置本地 System Charts 在 Rancher 的离线安装中,你需要配置 Rancher 以使用 System Charts 的本地副本。本节介绍如何通过 CLI 标志使用本地 System Charts。 -# 使用本地 System Charts +## 使用本地 System Charts `system-charts` 的一个本地副本已经打包到 `rancher/rancher` 容器中。为了在离线安装中使用这些功能,你需要使用额外的环境变量 `CATTLE_SYSTEM_CATALOG=bundled` 来运行 Rancher 安装命令,该环境变量告诉 Rancher 使用 Chart 的本地副本,而不是尝试从 GitHub 获取 Chart。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md index 5dda1dd1f4d..87c3b7e2aae 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md @@ -2,7 +2,7 @@ title: 更新 Rancher 证书 --- -# 更新私有 CA 证书 +## 更新私有 CA 证书 本文介绍如何更新 Rancher [高可用 Kubernetes 安装](../../../pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md) 中 Ingress 的 SSL 证书,以及如何从默认的自签名证书切换到自定义证书。 @@ -16,7 +16,7 @@ title: 更新 Rancher 证书 各个步骤的详细说明如下。 -## 1. 创建/更新证书密文资源 +### 1. 创建/更新证书密文资源 首先,将服务器证书和所有中间证书合并到名为 `tls.crt` 的文件,并在名为 `tls.key` 的文件中提供相应的证书密钥。 @@ -37,7 +37,7 @@ $ kubectl -n cattle-system create secret tls tls-rancher-ingress \ --dry-run --save-config -o yaml | kubectl apply -f - ``` -## 2. 创建/更新证书 CA 密文资源 +### 2. 创建/更新证书 CA 密文资源 如果新证书由私有 CA 签发的,你需要将相应的根 CA 证书复制到名为 `cacerts.pem` 的文件中,并创建或更新 `cattle-system` 命名空间中的 `tls-ca` 密文。如果证书由中间 CA 签名,则 `cacerts.pem` 必须按顺序同时包含中间 CA 证书和根 CA 证书。 @@ -56,7 +56,7 @@ $ kubectl -n cattle-system create secret generic tls-ca \ --dry-run --save-config -o yaml | kubectl apply -f - ``` -## 3. 重新配置 Rancher 部署 +### 3. 重新配置 Rancher 部署 :::note @@ -95,18 +95,18 @@ helm upgrade rancher rancher-stable/rancher \ 升级完成后,访问 `https:///v3/settings/cacerts`,验证该值是否与先前写入 `tls-ca` 密文中的 CA 证书匹配。 -## 4. 重新配置 Rancher Agent 以信任私有 CA +### 4. 重新配置 Rancher Agent 以信任私有 CA 本节介绍了重新配置 Rancher Agent 以信任私有 CA 的三种方法。如果你的实际情况符合以下任意一个条件,请执行此步骤: - Rancher 初始配置中使用了 Rancher 自签名证书 (`ingress.tls.source=rancher`) 或 Let's Encrypt 证书 (`ingress.tls.source=letsEncrypt`)。 - 新自定义证书的根 CA 证书已更改。 -### 为什么要执行这一步骤? +#### 为什么要执行这一步骤? 如果 Rancher 配置了私有 CA 签名的证书时,CA 证书链会下载到 Rancher Agent 容器中。代理会对下载证书的校验和及 `CATTLE_CA_CHECKSUM` 环境变量进行比较。如果私有 CA 证书在 Rancher Server 端更改了,环境变量 `CATTLE_CA_CHECKSUM` 必须相应进行更新。 -### 可使用的方法 +#### 可使用的方法 - 方法 1(最简单的方法): 在轮换证书后将所有集群连接到 Rancher。适用于更新 Rancher 部署(步骤 3)后立即执行的情况。 @@ -115,7 +115,7 @@ helm upgrade rancher rancher-stable/rancher \ - 方法 3:方法 1 和方法 2 不可用的情况下可使用。 -### 方法 1:Kubectl 命令 +#### 方法 1:Kubectl 命令 对于**集群管理**中的每个集群(除去 `local` Rancher 管理集群),使用 Rancher 管理集群(RKE 或 K3S)的 `Kubeconfig` 文件运行以下命令: @@ -126,7 +126,7 @@ kubectl patch clusters.management.cattle.io -p '{"statu 这个命令能使所有 Agent Kubernetes 资源使用新证书的校验和重新配置。 -### 方法 2:手动更新校验和 +#### 方法 2:手动更新校验和 通过将 `CATTLE_CA_CHECKSUM` 环境变量更新为匹配新 CA 证书校验和的值,来手动为 Agent Kubernetes 资源打上补丁。通过以下操作生成新的校验和: @@ -142,7 +142,7 @@ $ kubectl edit -n cattle-system ds/cattle-node-agent $ kubectl edit -n cattle-system deployment/cattle-cluster-agent ``` -### 方法 3:重新创建 Rancher Agent +#### 方法 3:重新创建 Rancher Agent 你可以在每个下游集群的 controlplane 节点上运行一组命令,来重新创建 Rancher Agent。 @@ -151,15 +151,15 @@ $ kubectl edit -n cattle-system deployment/cattle-cluster-agent 然后,SSH 连接到下游集群的 controlplane 节点,创建 Kubeconfig 并应用定义(参见[此处]( https://gist.github.com/superseb/b14ed3b5535f621ad3d2aa6a4cd6443b))。 -## 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher +### 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher 在 Rancher UI 的[持续交付](../../../how-to-guides/new-user-guides/deploy-apps-across-clusters/fleet.md#在-rancher-ui-中访问-fleet)中,为集群选择“强制更新”,来允许下游集群中的 fleet-agent 成功连接到 Rancher。 -### 为什么要执行这一步骤? +#### 为什么要执行这一步骤? Rancher 管理的集群中的 Fleet agent 存储 kubeconfig,该配置用于连接到 Fleet 系统命名空间的 fleet-agent 密文中的 Rancher 代理 kube-api。kubeconfig 包括一个包含 Rancher CA 的证书授权数据块。更改 Rancher CA 时,需要更新此块来使 fleet-agent 成功连接到 Rancher。 -# 将私有 CA 证书更改为通用证书 +## 将私有 CA 证书更改为通用证书 :::note @@ -167,7 +167,7 @@ Rancher 管理的集群中的 Fleet agent 存储 kubeconfig,该配置用于连 ::: -## 1. 创建/更新证书密文资源 +### 1. 创建/更新证书密文资源 首先,将服务器证书和所有中间证书合并到名为 `tls.crt` 的文件,并在名为 `tls.key` 的文件中提供相应的证书密钥。 @@ -188,7 +188,7 @@ $ kubectl -n cattle-system create secret tls tls-rancher-ingress \ --dry-run --save-config -o yaml | kubectl apply -f - ``` -## 2. 删除 CA 证书密文资源 +### 2. 删除 CA 证书密文资源 你需要删除 `cattle-system` 命名空间中的 `tls-ca secret`(不再需要它)。如果需要,你还可以选择保存 `tls-ca secret` 的副本。 @@ -204,7 +204,7 @@ kubectl -n cattle-system get secret tls-ca -o yaml > tls-ca.yaml kubectl -n cattle-system delete secret tls-ca ``` -## 3. 重新配置 Rancher 部署 +### 3. 重新配置 Rancher 部署 :::note 重要提示: @@ -250,14 +250,14 @@ helm upgrade rancher rancher-stable/rancher \ set privateCA=false ``` -## 4. 为非私有/通用证书重新配置 Rancher Agent +### 4. 为非私有/通用证书重新配置 Rancher Agent 下游集群 Agent 上的 `CATTLE_CA_CHECKSUM` 环境变量应该被删除或设置为“”(一个空字符串)。 -## 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher +### 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher 在 Rancher UI 的[持续交付](../../../how-to-guides/new-user-guides/deploy-apps-across-clusters/fleet.md#在-rancher-ui-中访问-fleet)中,为集群选择“强制更新”,来允许下游集群中的 fleet-agent 成功连接到 Rancher。 -### 为什么要执行这一步骤? +#### 为什么要执行这一步骤? Rancher 管理的集群中的 Fleet agent 存储 kubeconfig,该配置用于连接到 Fleet 系统命名空间的 fleet-agent 密文中的 Rancher 代理 kube-api。kubeconfig 包括一个包含 Rancher CA 的证书授权数据块。更改 Rancher CA 时,需要更新此块来使 fleet-agent 成功连接到 Rancher。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md index 02c62205ca5..f76e51b15bf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md @@ -19,7 +19,7 @@ Rancher 使用 cert-manager 为 Rancher 高可用部署自动生成和续期 TLS ::: -# 升级 Cert-Manager +## 升级 Cert-Manager 以下说明中使用的命名空间是由当前安装了 cert-manager 的命名空间决定的。如果它在 kube-system 中,在以下说明步骤中使用。你可以运行 `kubectl get pods --all-namespaces` 来验证,并检查 cert-manager-\* pods 列在哪个命名空间中。不要更改运行 cert-manager 的命名空间,否则可能会出现错误。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/overview.md index 5f8c0cc89bb..4e0414b2630 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/overview.md @@ -4,11 +4,11 @@ title: 概述 Rancher 是一个为使用容器的公司打造的容器管理平台。Rancher 使得开发者可以随处运行 Kubernetes(Run Kubernetes Everywhere),满足 IT 需求规范,赋能 DevOps 团队。 -# Run Kubernetes Everywhere +## Run Kubernetes Everywhere Kubernetes 已经成为容器编排标准。现在,大多数云和虚拟化提供商都提供容器编排服务。Rancher 用户可以选择使用 Rancher Kubernetes Engine(RKE)或云 Kubernetes 服务(例如 GKE、AKS 和 EKS)创建 Kubernetes 集群,还可以导入和管理使用任何 Kubernetes 发行版或安装程序创建的现有 Kubernetes 集群。 -# 满足 IT 需求规范 +## 满足 IT 需求规范 Rancher 支持对其控制的所有 Kubernetes 集群进行集中认证、访问控制和监控。例如,你可以: @@ -16,7 +16,7 @@ Rancher 支持对其控制的所有 Kubernetes 集群进行集中认证、访问 - 设置所有用户、组、项目、集群和云服务的权限控制策略和安全策略。 - 一站式查看 Kubernetes 集群的运行状况和容量。 -# 赋能 DevOps 团队 +## 赋能 DevOps 团队 Rancher 为 DevOps 工程师提供简单直接的用户界面,以管理其应用负载。用户不需要对 Kubernetes 有非常深入的了解,即可使用 Rancher。Rancher 应用商店包含一套实用的 DevOps 开发工具。Rancher 获得了多种云原生生态系统产品的认证,包括安全工具、监控系统、容器镜像仓库、存储和网络驱动等。 @@ -24,7 +24,7 @@ Rancher 为 DevOps 工程师提供简单直接的用户界面,以管理其应 ![平台](/img/platform.png) -# Rancher API Server 的功能 +## Rancher API Server 的功能 Rancher API Server 是基于嵌入式 Kubernetes API Server 和 etcd 数据库建立的,它提供了以下功能: @@ -52,7 +52,7 @@ Rancher API Server 是基于嵌入式 Kubernetes API Server 和 etcd 数据库 - **监控**:你可以使用 Rancher,通过业界领先并开源的 Prometheus 来监控集群节点、Kubernetes 组件和软件部署的状态和进程。 - **告警**:为了保证集群和应用的正常运行,提高公司的生产效率,你需要随时了解集群和项目的计划内和非计划事件。 -# 使用 Rancher 编辑下游集群 +## 使用 Rancher 编辑下游集群 对于已有集群而言,可提供的选项和设置取决于你配置集群的方法。例如,只有[通过 RKE 启动](../pages-for-subheaders/launch-kubernetes-with-rancher.md)的集群才有可编辑的**集群选项**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md index 0267b3433d9..6b2acce89b1 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md @@ -3,4 +3,4 @@ title: Rancher AWS Marketplace 快速入门 description: 使用 Amazon EKS 部署 Rancher Server。 --- -你可以在 AWS 中使用 Amazon EKS 部署 Rancher Server。详情请参见我们的 [Amazon Marketplace 列表](https://aws.amazon.com/marketplace/pp/prodview-2yzbnvagmi4as)。 \ No newline at end of file +你可以在 AWS 中使用 Amazon EKS 部署 Rancher Server。详情请参见我们的 [Amazon Marketplace 列表](https://aws.amazon.com/marketplace/pp/prodview-go7ent7goo5ae)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md index d0b33bd6611..c44447ac47c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md @@ -24,6 +24,6 @@ title: 1. 在集群中启用 Istio **结果**:已在集群级别安装 Istio。 -# 其他配置选项 +## 其他配置选项 有关配置 Istio 的更多信息,请参阅[配置参考](../../../pages-for-subheaders/configuration-options.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md index 7439d9b1f8a..a6d77763919 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md @@ -4,7 +4,7 @@ title: 6. 生成和查看流量 本文介绍如何查看 Istio 管理的流量。 -# Kiali 流量图 +## Kiali 流量图 Istio 概览页面提供了 Kiali 仪表板的链接。在 Kiali 仪表板中,你可以查看每个命名空间的图。Kiali 图提供了一种强大的方式来可视化 Istio 服务网格的拓扑。它显示了服务之间相互通信的情况。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md index 49d0130dbd6..42f89baa8ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md @@ -16,7 +16,7 @@ title: 4. 设置 Istio Gateway ![启用 Istio 的集群可以有两个 ingress,分别是默认的 Nginx ingress 和默认的 Istio controller](/img/istio-ingress.svg) -# 启用 Istio Gateway +## 启用 Istio Gateway Ingress Gateway 是一个 Kubernetes 服务,将部署在你的集群中。Istio Gateway 支持更多自定义设置,更加灵活。 @@ -29,7 +29,7 @@ Ingress Gateway 是一个 Kubernetes 服务,将部署在你的集群中。Isti **结果**:已部署网关,将使用应用的规则来路由流量。 -# Istio Gateway 示例 +## Istio Gateway 示例 在演示工作负载示例时,我们在服务中添加 BookInfo 应用部署。接下来,我们添加一个 Istio Gateway,以便从集群外部访问该应用。 @@ -127,7 +127,7 @@ bookinfo-gateway 64m 如需检查 Istio 控制器 URL 和端口的帮助,请尝试运行 [Istio 文档](https://istio.io/docs/tasks/traffic-management/ingress/ingress-control/#determining-the-ingress-ip-and-ports)中的命令。 -# 故障排除 +## 故障排除 [官方 Istio 文档](https://istio.io/docs/tasks/traffic-management/ingress/ingress-control/#troubleshooting)建议使用 `kubectl` 命令来检查外部请求的正确 ingress 主机和 ingress 端口。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/manage-projects/ci-cd-pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/manage-projects/ci-cd-pipelines.md deleted file mode 100644 index 199dcb43f70..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/manage-projects/ci-cd-pipelines.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Rancher CI/CD 流水线 -description: 使用 Rancher 的 CI/CD 流水线自动检出代码、运行构建或脚本、发布 Docker 镜像以及向用户部署软件 ---- -你可以使用 Rancher 与 GitHub 仓库集成,从而设置持续集成(CI)流水线。 - -配置 Rancher 和 GitHub 后,你可以部署运行 Jenkins 的容器来自动化执行流水线: - -- 将应用代码构建为镜像。 -- 验证构建。 -- 将构建的镜像部署到集群。 -- 运行单元测试。 -- 运行回归测试。 - -有关详细信息,请参阅[流水线](../../../pages-for-subheaders/pipelines.md)。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md index 9c7798ec320..9a3337ce3b6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md @@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem'; - [创建持久化 Grafana 仪表板](#创建持久化-grafana-仪表板) - [已知问题](#已知问题) -# 创建持久化 Grafana 仪表板 +## 创建持久化 Grafana 仪表板 @@ -144,7 +144,7 @@ helm.sh/resource-policy: "keep" -# 已知问题 +## 已知问题 如果你的 Monitoring V2 版本是 v9.4.203 或更低版本,卸载 Monitoring chart 将同时删除 `cattle-dashboards` 命名空间,所有持久化的仪表板将被删除(除非命名空间带有注释 `helm.sh/resource-policy: "keep"`)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md index 806a0f8e938..997a94916f5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md @@ -8,7 +8,7 @@ title: 启用 Monitoring 不论是否使用 SSL,你都可以启用 monitoring。 -# 要求 +## 要求 - 确保在每个节点上允许端口 9796 上的流量,因为 Prometheus 将从这里抓取指标。 - 确保你的集群满足资源要求。集群应至少有 1950Mi 可用内存、2700m CPU 和 50Gi 存储。要查看资源限制和请求的明细,请查看[此处](../../../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。 @@ -33,7 +33,7 @@ rkeEtcd: 有关默认限制的更多信息,请参阅[此页面](../../../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。 -# 安装 Monitoring 应用 +## 安装 Monitoring 应用 ### 在不使用 SSL 的情况下启用 Monitoring diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/migrate-to-rancher-v2.5+-monitoring.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/migrate-to-rancher-v2.5+-monitoring.md deleted file mode 100644 index 9ab7401ceba..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-alerting-guides/migrate-to-rancher-v2.5+-monitoring.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: 迁移到 Rancher 2.5+ Monitoring ---- - -如果你在 Rancher 2.5 之前启用了 Monitoring、Alerting 或 Notifiers,则无法自动升级到新的监控/告警解决方案。在 Cluster Explorer 中部署新的监控解决方案之前,你需要禁用并删除整个集群所有项目中的所有自定义告警、通知器和监控安装。 - - -## Rancher 2.5 之前的 Monitoring - -从 2.2.0 开始,旧版 Rancher UI 中的全局视图允许用户在集群内独立启用 Monitoring & Alerting V1(均由 [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) 提供支持)。 - -启用 Monitoring 后,Monitoring V1 会将 [Prometheus](https://prometheus.io/) 和 [Grafana](https://grafana.com/docs/grafana/latest/getting-started/what-is-grafana/) 部署到集群上,从而监控集群节点、Kubernetes 组件和软件部署的进程状态,并创建自定义仪表板来简化指标的可视化。 - -Monitoring V1 可以在集群级别和项目级别进行配置,并且会自动抓取 Rancher 集群上部署为应用的某些工作负载。 - -如果启用了 Alerts 或 Notifiers,Alerting V1 将 [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) 和一组 Rancher 控制器部署到集群上,允许用户定义告警并配置电子邮件、Slack、PagerDuty 等告警通知。用户可以根据需要监控的内容(例如系统服务、资源、CIS 扫描等)创建不同类型的告警。但是,只有在启用 Monitoring V1 时才能创建基于 PromQL 表达式的告警。 - -## 通过 Rancher 2.5 中的 Cluster Explorer 进行监控和告警 - -从 2.5.0 开始,Rancher 的 Cluster Explorer 允许用户在集群内同时启用 Monitoring & Alerting V2(均由 [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) 提供支持)。 - -与 Monitoring & Alerting V1 不同,现在这两个功能都打包在[此处](https://github.com/rancher/charts/blob/main/charts/rancher-monitoring)的单个 Helm Chart 中。此 Chart 和可配置字段与 Prometheus 社区 Helm Chart [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) 非常匹配,与上游 Chart 的任何偏差都可以在 [CHANGELOG.md](https://github.com/rancher/charts/blob/main/charts/rancher-monitoring/CHANGELOG.md) 中找到。 - -Monitoring V2 只能在集群级别进行配置。不再支持项目级别的监控和告警。 - -有关如何配置 Monitoring & Alerting V2 的更多信息,请参阅[此页面](../../../pages-for-subheaders/monitoring-v2-configuration-guides.md)。 - -## RBAC 的更改 - -默认情况下,项目所有者和成员不再可以访问 Grafana 或 Prometheus。如果只读用户有权访问 Grafana,他们将能够查看任何命名空间的数据。对于 Kiali,任何用户都可以在任何命名空间中编辑不属于该用户的东西。 - -有关 `rancher-monitoring` 中 RBAC 的更多信息,请参阅[此页面](../../../integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md)。 - -## 从 Monitoring V1 迁移到 Monitoring V2 - -虽然没有可用的自动迁移方案,但你可以手动将在 Monitoring V1 中创建的自定义 Grafana 仪表板和告警迁移到 Monitoring V2。 - -在安装 Monitoring V2 之前,你需要完全卸载 Monitoring V1。要卸载 Monitoring V1: - -* 删除所有集群和项目特定的告警和告警组。 -* 删除所有通知。 -* 禁用**集群 > 项目 > 工具 > Monitoring** 下的所有项目监控安装。 -* 确保所有项目中的所有项目监控应用都已删除,并且在几分钟后不会重新创建。 -* 在**集群 > 工具 > Monitoring** 下禁用集群监控安装。 -* 确保 System 项目中的 cluster-monitoring 应用和 monitoring-operator 应用已被删除,并且在几分钟后不会重新创建。 - -#### RKE 模板集群 - -要避免重新启用 Monitoring V1,请通过修改 RKE 模板 yaml 来禁用监控以及后续的 RKE 模板修订: - -```yaml -enable_cluster_alerting: false -enable_cluster_monitoring: false -``` - -#### 迁移 Grafana 仪表板 - -你可以将在 Monitoring V1 中添加到 Grafana 的仪表板迁移到 Monitoring V2。在 Monitoring V1 中,你可以这样导出现有仪表板: - -* 登录 Grafana -* 导航到要导出的仪表板 -* 转到仪表板设置 -* 复制 [JSON 模型](https://grafana.com/docs/grafana/latest/dashboards/json-model/) - -在 JSON 模型中,将所有 `datasource` 字段从 `RANCHER_MONITORING` 更改为 `Prometheus`。你可以将所有出现的 `"datasource": "RANCHER_MONITORING"` 替换为 `"datasource": "Prometheus"`。 - -如果 Grafana 由持久卷支持,你可以将此 JSON 模型[导入](https://grafana.com/docs/grafana/latest/dashboards/export-import/)到 Monitoring V2 Grafana UI 中。 -建议使用 `cattle-dashboards` 命名空间具有 `grafana_dashboard: "1"` 标签的 ConfigMap,来为 Grafana 提供仪表板: - -```yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: custom-dashboard - namespace: cattle-dashboards - labels: - grafana_dashboard: "1" -data: - custom-dashboard.json: | - { - ... - } -``` - -创建此 ConfigMap 后,仪表板将自动添加到 Grafana。 - -### 迁移告警 - -只有基于表达式的告警能直接迁移到 Monitoring V2。幸运的是,基于事件的告警可以设置为对系统组件、节点或工作负载事件的告警,而 Monitoring V2 中的告警已覆盖这些告警。所以没有必要迁移它们。 - -如果要迁移以下表达式告警: - -![](/img/monitoring/migration/alert_2.4_to_2.5_source.png) - -你必须在任意命名空间中创建如下 PrometheusRule 配置: - -```yaml -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: custom-rules - namespace: default -spec: - groups: - - name: custom.rules - rules: - - alert: Custom Expression Alert - expr: prometheus_query > 5 - for: 5m - labels: - severity: critical - annotations: - summary: "The result of prometheus_query has been larger than 5 for 5m. Current value {{ $value }}" -``` - -或通过 Cluster Explorer 添加 Prometheus Rule: - -![](/img/monitoring/migration/alert_2.4_to_2.5_target.png) - -有关如何在 Monitoring V2 中配置 PrometheusRules 的更多详细信息,请参阅 [Monitoring 配置](../../../pages-for-subheaders/monitoring-v2-configuration-guides.md)。 - -### 迁移 Notifiers - -Monitoring V1 中没有直接对应 Notifiers 的工作方式。相反,你必须使用 Monitoring V2 中的路由和接收器复制所需的设置。 - - -### 为 RKE 模板用户迁移 - -如果集群是使用 RKE 模板管理的,你需要在后续的 RKE 模板修订版中禁用 Monitoring,以防止重新启用旧版 Monitoring。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md index c2524ceb835..b83ad90b748 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md @@ -10,7 +10,7 @@ title: Prometheus 配置 ::: -# 关于 Prometheus 自定义资源 +## 关于 Prometheus 自定义资源 Prometheus CR 定义了所需的 Prometheus deployment。Prometheus Operator 会观察 Prometheus CR。当 CR 发生变化时,Prometheus Operator 会创建 `prometheus-rancher-monitoring-prometheus`,即根据 CR 配置的 Prometheus deployment。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md index 10d7b9e192b..fc12de7e488 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md @@ -45,7 +45,7 @@ Prometheus 规则文件保存在 PrometheusRule 自定义资源中。PrometheusR 如需查看示例,请参阅 Prometheus 文档中的[记录规则](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)和[告警规则](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)。 -# 配置 +## 配置 ### 规则组 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md index 4810e841cab..7db812c38ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md @@ -6,7 +6,7 @@ title: 模板创建者权限 有关管理员权限的更多信息,请参阅[全局权限文档](../manage-role-based-access-control-rbac/global-permissions.md)。 -# 授予用户创建模板的权限 +## 授予用户创建模板的权限 只有具有**创建 RKE 模板**全局权限的用户才能创建模板。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-azure-ad.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-azure-ad.md index 383fdaf7042..1489e503894 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-azure-ad.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-azure-ad.md @@ -218,7 +218,7 @@ 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) 已于 2022 年 6 月弃用并将于 2023 年 6 月 30 日停用,因此用户应更新其 Azure AD 应用程序以在 Rancher 中使用新的 [Microsoft Graph API](https://docs.microsoft.com/en-us/graph/use-the-api)。 #### 在 Rancher UI 中更新端点 @@ -312,4 +312,4 @@ Token 端点 | https://login.chinacloudapi.cn/{tenantID}/oauth2/token > - 使用另一个第三方身份验证系统并在 Rancher 中进行设置。请参阅[身份验证文档](../../../../pages-for-subheaders/authentication-config.md),了解如何配置其他开放式身份验证提供程序。 - \ No newline at end of file + diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md index 95ce9ef6b4e..ca4d522ba35 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md @@ -8,7 +8,7 @@ title: 配置 Google OAuth 在 Rancher 中,只有具有 **Manage Authentication** [全局角色](../../authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md)的管理员或用户才能配置身份验证。 -# 先决条件 +## 先决条件 - 你必须配置了 [G Suite 管理员账号](https://admin.google.com)。 - G Suite 需要一个[顶级私有域 FQDN](https://github.com/google/guava/wiki/InternetDomainNameExplained#public-suffixes-and-private-domains) 作为授权域。获取 FQDN 的一种方法是在 Route53 中为 Rancher Server 创建 A 记录。你不需要使用该记录更新 Rancher Server 的 URL 设置,因为可能有集群使用该 URL。 @@ -17,7 +17,7 @@ title: 配置 Google OAuth 启用 Admin SDK API 后,你的 G Suite 域的 API 页面应如下图所示: ![Enable Admin APIs](/img/Google-Enable-APIs-Screen.png) -# 在 Rancher 中为 OAuth 设置 G Suite +## 在 Rancher 中为 OAuth 设置 G Suite 在 Rancher 中设置 Google OAuth 之前,你需要登录到你的 G Suite 账号并完成以下设置: @@ -93,7 +93,7 @@ title: 配置 Google OAuth **结果**:ServiceAccount 在你的 G Suite 账号中已注册为 OAuth 客户端。 -# 在 Rancher 中配置 Google OAuth +## 在 Rancher 中配置 Google OAuth 1. 使用分配了 [administrator](../../authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md) 角色的本地用户登录到 Rancher。这个用户也称为本地主体。 1. 在左上角,单击 **☰ > 用户 & 认证**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md index b0f58229191..dd82a6872cf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md @@ -28,7 +28,7 @@ title: 2. 在 Rancher 中配置 Microsoft AD FS **结果**:已将 Rancher 配置为使用 AD FS。你的用户现在可以使用 AD FS 登录名登录 Rancher。 -# 配置 +## 配置 | 字段 | 描述 | |---------------------------|-----------------| diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md index 66eb56899f4..f218974b099 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md @@ -16,7 +16,7 @@ title: OpenLDAP 配置参考 3. 找到用户后,将使用用户的 DN 和提供的密码,通过另一个 LDAP 绑定请求对用户进行身份验证。 4. 身份验证成功后,Rancher 将基于用户对象的成员属性和配置的用户映射属性执行组搜索,来解析组成员。 -# OpenLDAP 服务器配置 +## OpenLDAP 服务器配置 你将需要输入地址,端口和协议来连接到 OpenLDAP 服务器。不安全流量的标准端口为 `389`,TLS 流量的标准端口为 `636`。 @@ -39,7 +39,7 @@ title: OpenLDAP 配置参考 | 用户搜索库 | 输入目录树中开始搜索用户对象的节点的标识名称(DN)。所有用户都必须是此基础标识名称的后代。例如,"ou=people,dc=acme,dc=com"。 | | 组搜索库 | 如果组位于`用户搜索库`下配置的节点之外的其他节点下,则需要在此处提供标识名称。否则,将此字段留空。例如:"ou=groups,dc=acme,dc=com"。 | -# 用户/组 Schema 配置 +## 用户/组 Schema 配置 如果你的 OpenLDAP 目录不同于标准的 OpenLDAP Schema,则必须完成**自定义 Schema** 部分实现匹配。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md index 2f9f6ab940d..825d334dc2c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md @@ -160,7 +160,7 @@ NavLink 自定义资源的 Kubernetes 标签。 需要提供 `toService` 或 `toURL` 指令中的一个。 -# 链接示例 +## 链接示例 ### `toUrl` 的链接示例 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md index 1bfc1238d40..91fb5ea7120 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md @@ -38,7 +38,6 @@ CATTLE_RESTRICTED_DEFAULT_ADMIN=true | 本地集群功能 | 管理本地集群(列出、编辑、导入主机) | 是 | 否 | 否 | | | | 创建项目/命名空间 | 是 | 否 | 否 | | | | 添加集群/项目成员 | 是 | 否 | 否 | | -| | 在本地集群中部署 MulticlusterApp | 是 | 否 | 否 | | | | 全局 DNS | 是 | 否 | 否 | | | | 访问 CRD 和 CR 的管理集群 | 是 | 否 | 是 | | | | 另存为 RKE 模板 | 是 | 否 | 否 | | @@ -60,8 +59,6 @@ CATTLE_RESTRICTED_DEFAULT_ADMIN=true | | GlobalDNS 条目 | 是 | 是(自己) | 是 | | | 设置 | | | | | | | | 管理设置 | 是 | 否(可列出) | 否(可列出) | | -| 应用 | | | | | | -| | 启动 Multicluster 应用 | 是 | 是 | 是 | 不在本地集群中 | | 用户 | | | | | | | | 管理 API 密钥 | 是(管理所有) | 是(管理自己的) | 是(管理自己的) | | | | 管理节点模板 | 是 | 是(管理自己的) | 是(管理自己的) | 只能管理自己的节点模板,不能管理其他用户创建的节点模板。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-docker-installed-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-docker-installed-rancher.md index 2faa76c3d44..51b24396cbd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-docker-installed-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-docker-installed-rancher.md @@ -9,7 +9,7 @@ title: 备份 Docker 安装的 Rancher 在创建备份的过程中,你将输入一系列命令。请使用环境中的数据替换占位符。占位符用尖括号和大写字母(如 ``)表示。以下是带有占位符的命令示例: ``` -docker run --volumes-from rancher-data- -v $PWD:/backup busybox tar pzcvf /backup/rancher-data-backup--.tar.gz /var/lib/rancher +docker run --name busybox-backup- --volumes-from rancher-data- -v $PWD:/backup busybox tar pzcvf /backup/rancher-data-backup--.tar.gz /var/lib/rancher ``` 在该命令中,`` 是数据容器和备份创建日期的占位符(例如,`9-27-18`)。 @@ -51,14 +51,19 @@ docker run --volumes-from rancher-data- -v $PWD:/backup busybox tar pzcvf 1. 从你刚刚创建的数据容器(rancher-data-<DATE>)中,创建一个备份 tar 包(rancher-data-backup-<RANCHER_VERSION>-<DATE>.tar.gz)。替换占位符来运行以下命令: ``` - docker run --volumes-from rancher-data- -v $PWD:/backup:z busybox tar pzcvf /backup/rancher-data-backup--.tar.gz /var/lib/rancher + docker run --name busybox-backup- --volumes-from rancher-data- -v $PWD:/backup:z busybox tar pzcvf /backup/rancher-data-backup--.tar.gz /var/lib/rancher ``` **步骤结果**:屏幕上将运行命令流。 1. 输入 `ls` 命令,确认备份压缩包已创建成功。压缩包的名称格式类似 `rancher-data-backup--.tar.gz`。 -1. 将备份压缩包移动到 Rancher Server 外的安全位置。然后从 Rancher Server 中删除 `rancher-data-` 容器。 +1. 将备份压缩包移动到 Rancher Server 外的安全位置。然后从 Rancher Server 中删除 `rancher-data-` 和 `busybox-backup-` 容器。 + + ``` + docker rm rancher-data- + docker rm busybox-backup- + ``` 1. 重启 Rancher Server。将 `` 替换为 Rancher 容器的名称: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md index 40f1ff8600d..f8773e33a26 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md @@ -8,7 +8,7 @@ Rancher 建议为所有生产集群配置定期 `etcd` 快照。此外,你还 etcd 数据库的快照会保存在 [etcd 节点](#本地备份目标)或 [S3 兼容目标](#s3-备份目标)上。配置 S3 的好处是,如果所有 etcd 节点都丢失了,你的快照会保存到远端并能用于恢复集群。 -# 快照工作原理 +## 快照工作原理 ### 快照组件 @@ -64,7 +64,7 @@ Rancher 在创建 RKE 集群的快照时,快照名称是基于快照创建类 4. 其他 etcd 节点会下载快照并验证校验和,以便都能使用相同的快照进行恢复。 5. 集群已恢复,恢复后的操作将在集群中完成。 -# 配置定期快照 +## 配置定期快照 选择创建定期快照的频率以及要保留的快照数量。时间的单位是小时。用户可以使用时间戳快照进行时间点恢复。 @@ -81,7 +81,7 @@ Rancher 在创建 RKE 集群的快照时,快照名称是基于快照创建类 | 定期 etcd 快照的创建周期 | 定期快照之间的间隔(以小时为单位) | 12 小时 | | 定期 etcd 快照的保留数量 | 要保留的快照数量 | 6 | -# 单次快照 +## 单次快照 除了定期快照之外,你可能还想创建“一次性”快照。例如,在升级集群的 Kubernetes 版本之前,最好备份集群的状态以防止升级失败。 @@ -91,7 +91,7 @@ Rancher 在创建 RKE 集群的快照时,快照名称是基于快照创建类 **结果**:根据你的[快照备份目标](#快照备份目标)创建一次性快照,并将其保存在选定的备份目标中。 -# 快照备份目标 +## 快照备份目标 Rancher 支持两种不同的备份目标: @@ -130,7 +130,7 @@ Rancher 支持两种不同的备份目标: 要授予应用对 S3 的访问权限,请参阅[使用 IAM 角色向在 Amazon EC2 实例上运行的应用授予权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html)的 AWS 文档。 -# 查看可用快照 +## 查看可用快照 Rancher UI 中提供了集群所有可用快照的列表: @@ -138,7 +138,7 @@ Rancher UI 中提供了集群所有可用快照的列表: 1. 在**集群**页面中,转到要查看快照的集群并单击其名称。 1. 单击**快照**选项卡来查看已保存快照的列表。这些快照包括创建时间的时间戳。 -# 安全时间戳 +## 安全时间戳 快照文件带有时间戳,从而简化使用外部工具和脚本处理文件的过程。但在某些与 S3 兼容的后端中,这些时间戳无法使用。 @@ -146,6 +146,6 @@ Rancher UI 中提供了集群所有可用快照的列表: 此选项不能直接在 UI 中使用,只能通过`以 YAML 文件编辑`使用。 -# 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 +## 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 如果你有使用 v2.2.0 之前版本创建的 Rancher 启动的 Kubernetes 集群,升级 Rancher 后,你必须[编辑集群](../../../pages-for-subheaders/cluster-configuration.md)并 _保存_ 它,以启用更新的快照功能。即使你已经在 v2.2.0 之前创建了快照,你也必须执行此步骤,因为旧的快照将无法用于[通过 UI 备份和恢复 etcd](restore-rancher-launched-kubernetes-clusters-from-backup.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md index 6eca5add930..461ef879837 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md @@ -72,6 +72,6 @@ Rancher UI 中提供了集群所有可用快照的列表: 6. 在单个节点启动并运行后,Rancher 建议向你的集群添加额外的 etcd 节点。如果你有一个[自定义集群](../../../pages-for-subheaders/use-existing-nodes.md),并且想要复用旧节点,则需要先[清理节点](../manage-clusters/clean-cluster-nodes.md),然后再尝试将它们重新添加到集群中。 -# 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 +## 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 如果你有使用 v2.2.0 之前版本创建的 Rancher 启动的 Kubernetes 集群,升级 Rancher 后,你必须[编辑集群](../../../pages-for-subheaders/cluster-configuration.md)并 _保存_ 它,以启用更新的快照功能。即使你已经在 v2.2.0 之前创建了快照,你也必须执行此步骤,因为旧的快照将无法用于[通过 UI 备份和恢复 etcd](restore-rancher-launched-kubernetes-clusters-from-backup.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md index a6a6b388627..554725a2e8e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md @@ -12,7 +12,7 @@ Rancher 的应用市场基于 Helm 仓库和 Helm Chart。你可以添加基于 -# Chart 类型 +## Chart 类型 Rancher 支持两种不同类型的 Chart,分别是 Helm Chart 和 Rancher Chart。 @@ -26,7 +26,7 @@ Rancher Chart 是原生 helm Chart,包含两个可增强用户体验的文件 Rancher Chart 添加了简化的 Chart 描述和配置表单,使应用部署变得容易。Rancher 用户无需通读整个 Helm 变量列表即可了解如何启动应用。 -# Chart 目录结构 +## Chart 目录结构 你可以在基于 HTTP 的标准 Helm 仓库中提供 Helm Chart。有关更多信息,请参阅 Helm 官方文档中的 [Chart 仓库指南](https://helm.sh/docs/topics/chart_repository)。 @@ -48,7 +48,7 @@ Rancher Chart 添加了简化的 Chart 描述和配置表单,使应用部署 │ │ │ ├── templates/ # 包含模板的目录,与 values.yml 一起能生成 Kubernetes YAML。 ``` -# Rancher Chart 的附加文件 +## Rancher Chart 的附加文件 在创建你的自定义目录之前,你需要大致了解 Rancher chart 与原生 Helm chart 的区别。Rancher Chart 的目录结构与 Helm Chart 略有不同。Rancher Chart 包含两个 Helm Chart 没有的文件: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md index eb8c47302ae..7c9f11fb942 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md @@ -149,7 +149,7 @@ Rancher 仅支持使用 Amazon NLB 以 `TCP` 模式终止 443 端口的流量, AWS 完成 NLB 创建后,单击**关闭**。 -# 4. 为 TCP 端口 80 向 NLB 添加监听器 +## 4. 为 TCP 端口 80 向 NLB 添加监听器 1. 选择新创建的 NLB 并选择**监听器**选项卡。 @@ -163,7 +163,7 @@ AWS 完成 NLB 创建后,单击**关闭**。 6. 单击右上角的**保存**。 -# NGINX Ingress 和 Traefik Ingress 的健康检查路径 +## NGINX Ingress 和 Traefik Ingress 的健康检查路径 K3s 和 RKE Kubernetes 集群使用的默认 Ingress 不同,因此对应的健康检查方式也不同。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md index 67b8e2ababd..e3fc030f359 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md @@ -16,12 +16,12 @@ title: 为 Rancher 设置高可用 K3s Kubernetes 集群 ::: -# 先决条件 +## 先决条件 以下说明假设你已参见[此章节](../infrastructure-setup/ha-k3s-kubernetes-cluster.md)配置好两个节点,一个负载均衡器,一个 DNS 记录和一个外部 MySQL 数据库。 Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 Rancher 版本支持哪些 Kubernetes 版本,请参见[支持维护条款](https://rancher.com/support-maintenance-terms/)。如需指定 K3s 版本,请在运行 K3s 安装脚本时,使用 `INSTALL_K3S_VERSION` 环境变量。 -# 安装 Kubernetes +## 安装 Kubernetes ### 1. 安装 Kubernetes 并设置 K3s Server diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md index 6b6ffabf66a..75c6149717e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md @@ -23,7 +23,7 @@ Rancher 可以运行在任何 Kubernetes 集群上,包括托管的 Kubernetes ::: -# 安装 Kubernetes +## 安装 Kubernetes ### 所需的 CLI 工具 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md index b89572bf097..6d55d78088a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md @@ -6,14 +6,15 @@ _已在 2.5.6 版本测试_ 本文介绍了如何根据 [Rancher Server 环境的最佳实践](../../../reference-guides/rancher-manager-architecture/architecture-recommendations.md#kubernetes-安装环境)安装 Kubernetes 集群。 -# 先决条件 +## 先决条件 以下说明假设你已参见[此章节](../infrastructure-setup/ha-rke2-kubernetes-cluster.md)配置好三个节点,一个负载均衡器和一个 DNS 记录。 为了让 RKE2 与负载均衡器正常工作,你需要设置两个监听器,一个用于 9345 端口,另一个用于 6443 端口的 Kubernetes API。 Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 Rancher 版本支持哪些 Kubernetes 版本,请参见[支持维护条款](https://rancher.com/support-maintenance-terms/)。如需指定 RKE2 版本,请在运行 RKE2 安装脚本时,使用 `INSTALL_RKE2_VERSION` 环境变量。 -# 安装 Kubernetes + +## 安装 Kubernetes ### 1. 安装 Kubernetes 并设置 RKE2 Server diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters.md index e844f63e631..113171db7c2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters.md @@ -129,7 +129,6 @@ Rancher 管理注册集群的范围取决于集群的类型。 - 启用[Monitoring、告警和 Notifiers](../../../pages-for-subheaders/monitoring-and-alerting.md) - 启用 [Logging](../../../pages-for-subheaders/logging.md) - 启用 [Istio](../../../pages-for-subheaders/istio.md) -- 使用[流水线](../../advanced-user-guides/manage-projects/ci-cd-pipelines.md) - 管理项目和工作负载 ### 已注册 K3s 集群的附加功能 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md index 9af5a210f62..0b6fc4bac45 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md @@ -15,7 +15,7 @@ Azure 订阅不支持以下账号类型: - 单租户账号(即没有订阅的账号)。 - 多订阅账号。 -# RKE 和 RKE2 的先决条件 +## RKE 和 RKE2 的先决条件 要为 RKE 和 RKE2 设置 Azure 云提供商,你需要配置以下凭证: @@ -70,7 +70,7 @@ Azure 订阅不支持以下账号类型: 只有需要成为负载均衡器后端的主机才需要分配到该组。 -# Rancher 中的 RKE2 集群设置 +## Rancher 中的 RKE2 集群设置 1. 在**集群配置**中的**云提供商**下拉列表中选择 **Azure**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md index 26b81788d31..430d08fc1e6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md @@ -6,7 +6,7 @@ Kubernetes 正在逐渐不在树内维护云提供商。vSphere 有一个树外 本页介绍如何在启动集群后安装 Cloud Provider Interface (CPI) 和 Cloud Storage Interface (CSI) 插件。 -# 先决条件 +## 先决条件 支持的 vSphere 版本: @@ -17,7 +17,7 @@ Kubernetes 版本必须为 1.19 或更高版本。 树外 vSphere 云提供商要求使用 Linux 节点,不支持 Windows 节点。 -# 安装 +## 安装 在安装云存储接口 (CSI) 之前,应先安装云提供商接口 (CPI)。 @@ -55,7 +55,7 @@ Kubernetes 版本必须为 1.19 或更高版本。 1. 单击**安装**。 -# 使用 CSI 驱动来置备卷 +## 使用 CSI 驱动来置备卷 CSI chart 默认创建一个 storageClass。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md index 9d4bb823d71..54dfe617868 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md @@ -29,12 +29,12 @@ resourcepool-path: "/Resources/" 跟踪此 bug 的 Rancher issue:https://github.com/rancher/rancher/issues/31105 -# 先决条件 +## 先决条件 - vSphere CSI 迁移需要 vSphere 7.0u1。为了管理现有的树内 vSphere 卷,请将 vSphere 升级到 7.0u1。 - Kubernetes 版本必须为 1.19 或更高版本。 -# 迁移 +## 迁移 ### 1. 安装 CPI 插件 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/use-windows-clusters/windows-linux-cluster-feature-parity.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/use-windows-clusters/windows-linux-cluster-feature-parity.md index 3d1ec9f8064..81d832577f2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/use-windows-clusters/windows-linux-cluster-feature-parity.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/use-windows-clusters/windows-linux-cluster-feature-parity.md @@ -22,13 +22,9 @@ Windows 集群与 Linux 集群的功能支持不相同。 | EKS Operator | 支持 | 不支持 | | AKS Operator | 不支持 | 不支持 | | GKE Operator | 不支持 | 不支持 | -| Alerting v1 | 支持 | 支持 | -| Monitoring v1 | 支持 | 支持 | -| Logging v1 | 支持 | 支持 | | Monitoring/Alerting v2 | 支持 | 支持 | | Logging v2 | 支持 | 支持 | | Istio | 支持 | 不支持 | -| Catalog v1 | 支持 | 不支持 | | Catalog v2 | 支持 | 不支持 | | OPA | 支持 | 不支持 | | Longhorn | 支持 | 不支持 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md index 8eb1156bd48..4d355a7fc2e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md @@ -13,7 +13,7 @@ Deployment 使用 Kubernetes 镜像仓库密文向私有 Docker 镜像仓库进 目前,只有在 Rancher UI 中创建工作负载时(通过 kubectl 创建的工作负载不可以),Deployment 才会自动拉取私有镜像仓库凭证。 -# 在命名空间中创建镜像仓库 +## 在命名空间中创建镜像仓库 :::note 先决条件: @@ -44,7 +44,7 @@ Deployment 使用 Kubernetes 镜像仓库密文向私有 Docker 镜像仓库进 - 你可以通过单击**存储 > 密文**或**更多资源 > 核心 > 密文**在 Rancher UI 中查看密文。 - 如果工作负载在镜像仓库的范围内,你在 Rancher UI 中创建的任何工作负载都将具有访问镜像仓库的凭证。 -# 在项目中创建镜像仓库 +## 在项目中创建镜像仓库 :::note 先决条件: @@ -87,7 +87,7 @@ local 集群上的项目级别镜像仓库仅在选择单个项目时可见。 ::: -# 使用私有镜像仓库 +## 使用私有镜像仓库 你可以通过 Rancher UI 或 `kubectl` 使用私有镜像仓库的镜像来部署工作负载。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md index c0a1f3e7c0c..3c8cd23389b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md @@ -7,7 +7,7 @@ description: Ingress 配置 在 Kubernetes 1.21 及更高版本中,NGINX Ingress Controller 不再运行在 hostNetwork 中,而是将 hostPorts 用于端口 80 和端口 443。这样可以将 admission webhook 配置为使用 ClusterIP 访问,从而只在集群内部访问它。 -# Ingress 规则配置 +## Ingress 规则配置 - [指定要使用的主机名](#指定要使用的主机名) - [用作默认后端](#用作默认后端) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md index b15d24e7270..79e2e607709 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md @@ -14,7 +14,7 @@ title: 密文 除非作为子路径卷挂载,否则挂载的密文会自动更新。有关如何传播更新的密文,请参阅 [Kubernetes 文档](https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically)。 -# 在命名空间中创建密文 +## 在命名空间中创建密文 1. 在左上角,单击 **☰ > 集群管理**。 1. 转到要添加密文的集群,然后单击 **Explore**。 @@ -47,7 +47,7 @@ title: 密文 除非作为子路径卷挂载,否则挂载的密文会自动更新。有关如何传播更新的密文,请参阅 [Kubernetes 文档](https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically)。 -# 在项目中创建密文 +## 在项目中创建密文 在 Rancher 2.6 之前,密文必须创建在项目级别。现在不再需要项目级别,你可以采用命名空间级别。因此,Rancher UI 进行了更新以反映这一新功能。但是,你仍然可以按照需要创建项目级别的密文。请注意,你必须先启用`旧版`功能开关并查看单个项目。执行以下步骤设置你的项目级别密文: @@ -69,7 +69,7 @@ local 集群上的项目级别密文仅在选择单个项目时可见。 ::: -# 后续操作 +## 后续操作 现在你已将密文添加到命名空间,你可以将其添加到你部署的工作负载中。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md index 2b9d1fad4b4..dc1e93f86c6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md @@ -93,7 +93,8 @@ import TabItem from '@theme/TabItem'; - `Default`:包含 `default` 命名空间 - `System`:包含 `cattle-system`,`ingress-nginx`,`kube-public` 和 `kube-system` 命名空间。 -# 可选的后续步骤 + +## 可选的后续步骤 创建集群后,你可以通过 Rancher UI 访问集群。最佳实践建议你设置以下访问集群的备用方式: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md index 2ed2bf2d55a..dc1b5cd4fa8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md @@ -21,7 +21,7 @@ import TabItem from '@theme/TabItem'; - [允许加密 EBS 卷的 IAM 策略示例](#允许加密-ebs-卷的-iam-策略示例) - 为用户添加 **IAM 策略权限**。请参阅 [Amazon 文档:为用户添加权限(控制台)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console),来将权限添加给用户。 -# 创建 EC2 集群 +## 创建 EC2 集群 创建集群的步骤因 Rancher 版本而异。 @@ -133,7 +133,7 @@ import TabItem from '@theme/TabItem'; - **通过 kubectl CLI 访问你的集群**:按照[这些步骤](../../../new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md#在工作站使用-kubectl-访问集群)在你的工作站上使用 kubectl 访问集群。在这种情况下,你将通过 Rancher Server 的身份验证代理进行身份验证,然后 Rancher 会让你连接到下游集群。此方法允许你在没有 Rancher UI 的情况下管理集群。 - **通过 kubectl CLI 使用授权的集群端点访问你的集群**:按照[这些步骤](../../../new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md#直接使用下游集群进行身份验证)直接使用 kubectl 访问集群,而无需通过 Rancher 进行身份验证。我们建议设置此替代方法来访问集群,以便在无法连接到 Rancher 时访问集群。 -# IAM 策略 +## IAM 策略 ### IAM 策略示例 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md index 4ec13bd515c..9ed3477fe08 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md @@ -29,7 +29,7 @@ import TabItem from '@theme/TabItem'; - [Azure 中的准备工作](#azure-中的准备工作) - [创建 Azure 集群](#创建-azure-集群) -# Azure 中的准备工作 +## Azure 中的准备工作 在使用 Azure 等云厂商在 Rancher 中创建节点模板之前,必须先配置 Rancher 以允许操作 Azure 订阅中的资源。 @@ -46,7 +46,7 @@ az ad sp create-for-rbac \ 创建服务主体后会返回三个标识信息,分别是*应用 ID(也称为客户端 ID)*,以及*客户端密码*。为 Azure 创建节点模板时将使用这些信息。 -# 创建 Azure 集群 +## 创建 Azure 集群 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md index 425969461dc..9bed1f9e144 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md @@ -17,7 +17,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 - [Nutanix AOS 中的准备工作](#nutanix-aos-中的准备工作) - [创建 Nutanix AOS 集群](#创建-nutanix-aos-集群) -# Nutanix AOS 中的准备工作 +## Nutanix AOS 中的准备工作 下文介绍了设置 Nutanix AOS 的要求,以便 Rancher 可以配置虚拟机和集群。 @@ -26,6 +26,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 节点模板已使用 Nutanix AOS 5.20.2 和 6.0.1 版本进行记录和测试。 ::: + ### 在 Nutanix AOS 中创建凭证 在继续创建集群之前,请确保你拥有具有管理员权限的 [Nutanix Prism Central 用户账号](https://portal.nutanix.com/page/documents/details?targetId=Nutanix-Security-Guide-v6_0:wc-user-create-wc-t.html)。设置节点模板时,模板将需要使用这些凭证。 @@ -43,7 +44,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 建议设置 [VM-VM 反亲和性策略](https://portal.nutanix.com/page/documents/details?targetId=AHV-Admin-Guide-v6_1:ahv-vm-anti-affinity-t.html)。这些规则允许分配了 etcd 和 controlplane 角色的虚拟机在分配给不同节点池时,在单独的 AHV 主机上运行。这种做法可确保单个物理机的故障不会影响这些平面的可用性。 -# 创建 Nutanix AOS 集群 +## 创建 Nutanix AOS 集群 1. [创建节点模板](#1-创建节点模板) 2. [使用节点模板创建具有节点池的集群](#2-使用节点模板创建具有节点池的集群) @@ -82,8 +83,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 - `Default`:包含 `default` 命名空间 - `System`:包含 `cattle-system`,`ingress-nginx`,`kube-public` 和 `kube-system` 命名空间。 - -# 可选的后续步骤 +## 可选的后续步骤 创建集群后,你可以通过 Rancher UI 访问集群。最佳实践建议你设置以下访问集群的备用方式: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md index fda9835410e..3ec67e041e3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md @@ -16,7 +16,7 @@ title: 在 vSphere 中配置 Kubernetes 集群 - [vSphere 中的准备工作](#vsphere-中的准备工作) - [创建 vSphere 集群](#创建-vsphere-集群) -# vSphere 中的准备工作 +## vSphere 中的准备工作 本节介绍设置 vSphere 的要求,以便 Rancher 可以配置虚拟机和集群。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md index c35617e507a..0dac5b76c61 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md @@ -513,7 +513,7 @@ kubectl -n kube-system apply -f cluster-autoscaler-deployment.yaml ::: -# 测试 +## 测试 此时,cluster-autoscaler 应该已经在 Rancher 自定义集群中启动并运行。当满足以下条件之一时,cluster-autoscaler 需要管理 `K8sWorkerAsg` ASG,以在 2 到 10 个节点之间进行扩缩容: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md index 4bac0a6c539..3962c7b48ff 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md @@ -17,9 +17,9 @@ import TabItem from '@theme/TabItem'; ::: | Rancher 版本 | Adapter 版本 | -| --------------- | :-------------: | -| v2.6.7 | v1.0.1 | -| v2.6.8 | v1.0.1 | +|-----------------|:---------------:| +| v2.7.0 | v2.0.0 | + ### 1. 获取对 Local 集群的访问权限 @@ -71,31 +71,29 @@ helm repo add rancher-charts https://charts.rancher.io 接下来,安装 CSP Adapter。你必须指定多个值,其中包括账号号码以及在先决条件中创建的角色的名称。 -在下方的操作中,将 `$MY_ACC_NUM` 替换为你的 AWS 账号,将 `$MY_ROLE_NAME` 替换为先决条件中创建的角色的名称。 +确保你的 CSP Adapter 版本与你正在运行的 Rancher 版本匹配,如[上文](#rancher-与-adapter-的兼容性矩阵)所述。 + +在下方的操作中,将 `$MY_ACC_NUM` 替换为你的 AWS 账号,将 `$MY_ROLE_NAME` 替换为先决条件中创建的角色的名称。此外,将 `$CSP_ADAPTER_VERSION` 替换为与[版本矩阵](#rancher-与-adapter-的兼容性矩阵)中的 Rancher 版本匹配的版本。 > **注意**:如果你使用 shell 变量,请不要使用引号。例如,MY_ACC_NUM=123456789012 可用,但 MY_ACC_NUM="123456789012" 将失败。 > **注意**:使用欧盟和英国的 AWS Marketplace 列表的账号需要额外指定 `--set image.repository=rancher/rancher-csp-adapter-eu` 选项。要查看你的账号在安装 Adapter 时是否需要此选项,请参阅 Marketplace 列表的使用说明。 -> **注意**:请务必严格按照以下说明进行操作。尤其需要注意安装 1.0.1 版本 Adapter 的命令(使用 `--set image.tag=v1.0.1`),这是确保节点数量准确的关键。 - ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --set image.tag=v1.0.1 +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --version $CSP_ADAPTER_VERSION ``` 你也可以使用 `values.yaml` 并指定以下选项: ```yaml -image: -tag: v1.0.1 aws: -enabled: true -accountNumber: "$MY_ACC_NUM" -roleName: $MY_ROLE_NAME + enabled: true + accountNumber: "$MY_ACC_NUM" + roleName: $MY_ROLE_NAME ``` > **注意**:账号需要像上面那样以字符串格式指定,否则安装会失败。 @@ -103,25 +101,23 @@ roleName: $MY_ROLE_NAME 然后,使用以下命令安装 Adapter: ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml --version $CSP_ADAPTER_VERSION ``` ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --set additionalTrustedCAs=true --set image.tag=v1.0.1 +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --set additionalTrustedCAs=true --version $CSP_ADAPTER_VERSION ``` 你也可以使用 `values.yaml` 并指定以下选项: ```yaml -image: -tag: v1.0.1 aws: -enabled: true -accountNumber: "$MY_ACC_NUM" -roleName: $MY_ROLE_NAME + enabled: true + accountNumber: "$MY_ACC_NUM" + roleName: $MY_ROLE_NAME additionalTrustedCAs: true ``` @@ -130,7 +126,7 @@ additionalTrustedCAs: true 然后,使用以下命令安装 Adapter: ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml --version $CSP_ADAPTER_VERSION ``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md index 24d26829816..37ba154ae39 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md @@ -14,7 +14,7 @@ Rancher 不会与已注册的下游集群建立连接。部署在下游集群上 对于私有节点或私有集群,则需要在节点上设置环境变量。然后,在配置自定义集群或注册私有集群时,在 Rancher UI 中配置环境变量。有关如何在 K3s Kubernetes 集群中的 Ubuntu 节点上设置环境变量的示例,请参阅[本节](#在私有节点上设置环境变量)。 -# 必要的环境变量 +## 必要的环境变量 为代理添加 Fleet agent 环境变量时,将 替换为你的私有代理 IP。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/logging/migrate-to-rancher-v2.5+-logging.md b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/logging/migrate-to-rancher-v2.5+-logging.md deleted file mode 100644 index 2fcd5e6cdd0..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/logging/migrate-to-rancher-v2.5+-logging.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: 迁移到 Rancher 2.5 Logging ---- -Rancher 2.5 彻底修改了 Logging 功能。我们现在使用了 Banzai Cloud 的 [logging operator](https://github.com/banzaicloud/logging-operator),Rancher 配置了此工具以供部署 Logging 使用。 - -在新的 Logging 功能的众多特性和变化中,其中一项是取消了项目级别的 Logging 配置。取而代之的是在命名空间级别配置 Logging。集群级日志仍然可用,但配置选项不同。 - -## 安装 - -要在 Rancher 2.5+ 中安装 Logging,请参阅[安装说明](../../pages-for-subheaders/logging.md#启用-logging)。 - -### 名词解释 - -在 Rancher 2.5+ 中,你需要在**集群仪表板**中配置 Logging。要在安装 Logging 应用程序后配置 Logging 自定义资源,请转到左侧导航栏并单击 **Logging**。这个菜单的选项可以配置集群和命名空间的 Logging。 - -:::note - -Logging 是按集群安装的。你将需要在集群之间切换以配置每个集群的 Logging。 - -::: - -对于 Rancher 2.5+ 中的 Logging 应用程序,你需要了解以下四个关键概念: - -1. Outputs - - `Outputs` 是一种配置资源,用于确定收集日志的目的位置。这是存储 ElasticSearch、Kafka 等聚合器设置的地方。`Outputs` 是命名空间资源。 - -2. Flows - - `Flows` 是一种配置资源,用于确定日志的收集、过滤和目标位置规则。在一个 Flow 中,你需要配置要收集哪些日志、如何改变或过滤它们,以及将日志发送到哪个 `Output`。`Flows` 是命名空间资源,可以连接到同一命名空间中的 `Output` 或 `ClusterOutput`。 - -3. ClusterOutputs - - `ClusterOutputs` 的功能与 `Outputs` 相同,但 ClusterOutput 是集群级别资源。在集群范围内收集日志或要为集群中的所有命名空间提供 `Output` 时,`ClusterOutput` 是必需的。 - -4. ClusterFlows - - `ClusterFlows` 的功能与 `Flows` 相同,但 ClusterFlow 是集群级别资源。它们用于为整个集群配置日志收集,而不是在命名空间级别进行逐个配置。`ClusterFlows` 也是定义改变和过滤器的地方,在功能上与 `Flows` 相同。 - -## 集群日志 - -要在 Rancher 2.5+ 中配置集群级别的 Logging,你需要设置 `ClusterFlow`。此对象定义了日志的来源、要应用的转换或过滤器,以及日志的一个或多个 `Output`。 - -:::note 重要提示: - -`ClusterFlow` 必须在 `cattle-logging-system` 命名空间中定义。如果在其他命名空间中定义,`ClusterFlow` 将不起作用。 - -::: - -在旧版 Logging 中,如果要收集整个集群的日志,你只需要启用集群级别的 Logging 并定义所需的 `Output`。Rancher 2.5+ Logging 保留了这个基本方法。要复制旧版集群级别日志,请执行以下步骤: - -1. 根据[输出配置](#输出配置)下的说明定义 `ClusterOutput`。 -2. 创建一个 `ClusterFlow`,确保它在 `cattle-logging-system` 命名空间中创建。 - 1. 删除 `Flow` 定义的所有 _Include_ 和 _Exclude_ 规则。这将确保能收集所有日志。 - 2. 如果不需要,你可以不配置任何过滤器(默认不需要创建)。 - 3. 定义你的集群 `Output`。 - -操作完成后,集群中所有源(所有 pod 和所有系统组件)上收集的日志都会发送到定义在 `ClusterFlow` 中的 `Output` 处。 - -## 项目日志 - -Rancher 2.5+ Logging 不支持项目。换言之,如果要收集运行在项目命名空间中的 pod 日志,你需要为这些命名空间定义 `Flow`。 - -要收集指定命名空间的日志,请执行以下步骤: - -1. 根据[输出配置](#输出配置)下的说明定义 `Output` 或 `ClusterOutput`。 -2. 创建一个 `Flow`,确保它在你要收集日志的命名空间中创建。 - 1. 如果有需要,你可以定义 _Include_ 或 _Exclude_ 规则。如果删除所有规则,则会收集目标命名空间中的所有 pod 日志。 - 2. 如果不需要,你可以不配置任何过滤器(默认不需要创建)。 - 3. 定义你的 Output,可以是 `ClusterOutput` 或 `Output` 对象。 - -操作完成后,命名空间中所有源(pod)上收集的日志都会发送到你在 `Flow` 中定义的 `Output` 处。 - -:::note - -要收集项目中的日志,请在项目中的每个命名空间中重复上述步骤。你也可以使用通用标签(例如 `project=my-project`)标记你的项目工作负载,并使用 `ClusterFlow` 收集匹配此标签的所有 pod 的日志。 - -::: - -## 输出配置 -旧版 Logging 中有五个日志目标位置可供选择,分别是 Elasticsearch、Splunk、Kafka、Fluentd 和 Syslog。除 Syslog 外,这些目标位置都可用于 2.5+ Logging。 - - -### Elasticsearch - -| 旧版 Logging | 2.5+ Logging | 注意 | -|-----------------------------------------------|-----------------------------------|-----------------------------------------------------------| -| 端点 | Target -> Host | 确保指定了协议 (https/http) 以及端口。 | -| X-Pack Security -> Username | Access -> User | | -| X-Pack Security -> Password | Access -> Password | 密码必须存储在密文中。 | -| SSL Configuration -> Client Private Key | SSL -> Client Key | 密钥必须存储在密文中。 | -| SSL Configuration -> Client Certificate | SSL -> Client Cert | 证书必须存储在密文中。 | -| SSL Configuration -> Client Key Password | SSL -> Client Key Pass | 密码必须存储在密文中。 | -| SSL Configuration -> Enabled SSL Verification | SSL -> Certificate Authority File | 证书必须存储在密文中。 | - - -在旧版 Logging 中,索引是根据“索引模式”中的格式自动创建的。在 2.5 Logging 中,默认的操作已更改为记录单个索引。你仍然可以编辑 YAML 并输入以下值,从而在 `Output` 对象上配置索引模式功能: - -```yaml -... -spec: - elasticsearch: - ... - logstash_format: true - logstash_prefix: - logstash_dateformat: "%Y-%m-%d" -``` - -将 `` 替换为要创建的索引的前缀。在旧版 Logging 中,默认值是集群的名称。 - -### Splunk - -| 旧版 Logging | 2.5+ Logging | 注意 | -|------------------------------------------|----------------------------------------|----------------------------------------------------------------------------------------| -| HEC Configuration -> Endpoint | Target -> Host | 协议(https/http)和端口必须与主机分开定义。 | -| HEC Configuration -> Token | Access -> Token | 令牌必须作为密文存储。 | -| HEC Configuration -> Index | Edit as YAML -> `index` | `index` 字段必须作为 YAML 键添加到 `spec.splunkHec` 下。 | -| HEC Configuration -> Source | Edit as YAML -> `source` | `source` 字段必须作为 YAML 键添加到 `spec.splunkHec` 下。 | -| SSL Configuration -> Client Private Key | Edit as YAML -> `client_key` | `client_key` 字段必须作为 YAML 键添加到 `spec.splunkHec` 下。详见(1)。 | -| SSL Configuration -> Client Certificate | Edit as YAML -> `client_cert` | `client_cert` 字段必须作为 YAML 键添加到 `spec.splunkHec` 下。详见(1)。 | -| SSL Configuration -> Client Key Password | _Not Supported_ | 现在不支持为客户端私钥指定密码。 | -| SSL Configuration -> SSL Verify | Edit as YAML -> `ca_file` or `ca_path` | `ca_file` 或 `ca_path` 字段必须作为 YAML 键添加到 `spec.splunkHec` 下。详见(2)。 | - -_(1) `client_key` 和 `client_cert` 的值必须分别是密钥和证书文件的路径。这些文件必须挂载到 `rancher-logging-fluentd` pod 中才能使用_。 - -_(2) 用户可以配置 `ca_file`(PEM 编码的 CA 证书的路径)或 `ca_path`(包含 PEM 格式的 CA 证书的目录路径)。这些文件必须挂载到 `rancher-logging-fluentd` pod 中才能使用_。 - -### Kafka - -| 旧版 Logging | 2.5+ Logging | 注意 | -|-----------------------------------------|----------------------------|------------------------------------------------------| -| Kafka Configuration -> Endpoint Type | - | 不再支持将 Zookeeper 作为端点类型。 | -| Kafka Configuration -> Endpoint | Target -> Brokers | 逗号分隔的 Broker 列表(host:port)。 | -| Kafka Configuration -> Topic | Target -> Default Topic | | -| SSL Configuration -> Client Private Key | SSL -> SSL Client Cert | 证书必须作为密文存储。 | -| SSL Configuration -> Client Certificate | SSL -> SSL Client Cert Key | 密钥必须作为密文存储。 | -| SSL Configuration -> CA Certificate PEM | SSL -> SSL CA Cert | 证书必须作为密文存储。 | -| SASL Configuration -> Username | Access -> Username | 用户名必须存储在密文中。 | -| SASL Configuration -> Password | Access -> Password | 密码必须存储在密文中。 | -| SASL Configuration -> Scram Mechanism | Access -> Scram Mechanism | 输入机制为字符串,例如“sha256”或“sha512”。 | - -### Fluentd - -v2.5.2 开始只支持使用“以表单编辑”选项来添加单个 Fluentd 服务器。要添加多个服务器,请将 `Output` 编辑为 YAML 并输入多个服务器。 - -| 旧版 Logging | 2.5+ Logging | 注意 | -|------------------------------------------|-----------------------------------------------------|----------------------------------------------------------------------| -| Fluentd Configuration -> Endpoint | Target -> Host, Port | 分别输入主机和端口。 | -| Fluentd Configuration -> Shared Key | Access -> Shared Key | 共享密钥必须存储为密文。 | -| Fluentd Configuration -> Username | Access -> Username | 用户名必须存储为密文。 | -| Fluentd Configuration -> Password | Access -> Password | 密码必须存储为密文。 | -| Fluentd Configuration -> Hostname | Edit as YAML -> `host` | `host` 字段作为 YAML 键设置在 `spec.forward.servers[n]`下。 | -| Fluentd Configuration -> Weight | Edit as YAML -> `weight` | `weight` 字段作为 YAML 键设置在 `spec.forward.servers[n]`下。 | -| SSL Configuration -> Use TLS | - | 不需要显式启用。定义客户端证书字段即可。 | -| SSL Configuration -> Client Private Key | Edit as YAML -> `tls_private_key_path` | `spec.forward` 下的字段设置为 YAML 键。详见(1)。 | -| SSL Configuration -> Client Certificate | Edit as YAML -> `tls_client_cert_path` | `spec.forward` 下的字段设置为 YAML 键。详见(1)。 | -| SSL Configuration -> Client Key Password | Edit as YAML -> `tls_client_private_key_passphrase` | `spec.forward` 下的字段设置为 YAML 键。详见(1)。 | -| SSL Configuration -> SSL Verify | Edit as YAML -> `tls_insecure_mode` | `spec.forward` 下的字段设置为 YAML 键。默认:`false`。 | -| SSL Configuration -> CA Certificate PEM | Edit as YAML -> `tls_cert_path` | `spec.forward` 下的字段设置为 YAML 键。详见(1)。 | -| Enable Gzip Compression | - | 2.5+ Logging 不再支持。 | - -_(1) 这些值将被指定为文件的路径。这些文件必须挂载到 `rancher-logging-fluentd` pod 中才能使用。_ - -### Syslog - -从 v2.5.2 开始,使用 2.5+ Logging 的 `Output` 不支持 syslog。 - -## 自定义日志字段 - -要添加自定义日志字段,你需要将以下 YAML 添加到你的 `Flow` 配置中: - -```yaml -... -spec: - filters: - - record_modifier: - records: - - foo: "bar" -``` - -(将 `foo: "bar"` 替换为要添加的自定义日志字段) - -## 系统日志 - -在旧版 Logging 中,你需要在设置集群 Logging 时选中“包括系统日志”来收集系统组件的日志。在 v2.5+ Logging 中,系统日志可以通过以下两种方式之一来收集: - -1. 收集所有集群日志,不指定任何匹配或排除规则。该设置会收集集群所有容器的日志,其中包括系统日志。 -2. 通过为系统组件添加匹配规则来专门收集系统日志。要收集的组件决定了具体的匹配规则。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md index 327592b5e2b..5bc89589f5e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md @@ -65,6 +65,43 @@ Monitoring 还会创建其他 `Role`,这些角色默认情况下不会分配 | monitoring-dashboard-edit | 允许管理员为用户分配角色,以便查看/编辑 cattle-dashboards 命名空间中的 ConfigMap。此命名空间中的 ConfigMap 将对应于持久化到集群上的 Grafana 仪表板。 | | monitoring-dashboard-view | 允许管理员为用户分配角色,以便查看 cattle-dashboards 命名空间中的 ConfigMap。此命名空间中的 ConfigMap 将对应于持久化到集群上的 Grafana 仪表板。 | + +### 通过自定义角色分配监控角色 + +管理员可以在 Rancher UI 中分配自定义角色以管理、编辑和查看监控。这些“角色”是在安装 Monitoring 应用程序时默认创建的。此外,这些角色也会被部署到相应的 Kubernetes 角色:admin、edit 和 view `ClusterRoles`。 + +:::note 重要提示: + +将用户添加到集群时,UI 不会提供 `monitoring-admin`、`monitoring-edit` 和 `monitoring-view` 选项。这些监控角色只能通过手动创建自定义角色来分配,该自定义角色继承 Project Owner 和 Project Monitoring View 角色。 + +::: + +1. 创建自定义角色: + + 1.1 单击 **☰ > Users & Authentication > Roles**。 + + 1.2 选择适当的选项卡,例如 **Cluster** 角色。然后单击 **Create Cluster Role**。 + + 1.3 在 **Name** 字段中,创建自定义角色,例如 `View Monitoring`、`Edit Monitoring` 或 `Admin Monitoring`。 + + 1.4 单击 **Inherit From > Add Resource**,然后从下拉列表中选择所需的 Kubernetes 角色。 + + 1.5 单击 **Create**。 + + +2. 将自定义角色分配给新用户: + + 2.1 单击 **☰ > Cluster Management > Cluster Explore > Cluster > Cluster Members > Add**。 + + 2.2 从显示的 **Select Member** 中搜索你的新用户名。 + + 2.3 将 **Cluster Permissions** 中的新自定义角色分配给新用户。 + + 2.4 单击 **Create**。 + + +**结果**:新用户现在应该能够看到 monitoring 工具。 + ### 其他监控集群角色 Monitoring 还会创建其他 `ClusterRole`,这些角色默认情况下不会分配给用户,而是在集群中创建。默认情况下,这些角色不会聚合,但你可以部署引用角色的 `RoleBinding` 或 `ClusterRoleBinding` 来将角色绑定到命名空间。要使用 `kubectl` 而不是通过 Rancher 来定义 `RoleBinding`,请单击[此处](#使用-kubectl-分配-role-和-clusterrole)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/windows-support.md b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/windows-support.md index 1dd6ac4e171..c8de9476221 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/windows-support.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/monitoring-and-alerting/windows-support.md @@ -6,13 +6,6 @@ _从 v2.5.8 起可用_ 从 Monitoring V2 14.5.100(Rancher 2.5.8 的默认版本)开始,Monitoring V2 可以部署在 Windows 集群上,并将使用 [prometheus-community/windows_exporter](https://github.com/prometheus-community/windows_exporter)(旧名是 `wmi_exporter`)来抓取 Windows 节点的指标。 - -## 与 Monitoring V1 的对比 - -由于命名已根据上游从 `wmi_exporter` 更改为 `windows_exporter`,因此 `windows_exporter` 收集的指标会标记为 `windows_` 而不是 `wmi_`。 - -此外,由于主机指标将直接发布到暴露在 windows-exporter Pod 上的端口上,因此 Monitoring V2 for Windows 将不再要求用户在 Windows 主机上保持打开端口 9796。此功能由 `wins` v0.1.0 最近的更改提供,以支持在 Pod 上发布暴露在 hostNetwork 上的端口,这些 Pod 使用 wins 来运行一个有特权的 Windows 二进制文件作为主机进程。 - ## 集群要求 Monitoring V2 for Windows 只能从最低是 `wins` v0.1.0 的 Windows 主机中抓取指标。要完全部署 Monitoring V2 for Windows,你的所有主机都必须满足此要求。 @@ -25,8 +18,6 @@ Monitoring V2 for Windows 只能从最低是 `wins` v0.1.0 的 Windows 主机中 为了方便此次升级,Rancher 2.5.8 发布了一个全新的 Helm Chart,名为 `rancher-wins-upgrader`。 -> **先决条件**:确保已卸载 Monitoring V1 for Windows。 - 1. 使用以下覆盖部署 `rancher-wins-upgrader`: ```yaml # 通过先前已列入白名单的进程路径 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/rancher-extensions.md b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/rancher-extensions.md new file mode 100644 index 00000000000..8cacedcf342 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/integrations-in-rancher/rancher-extensions.md @@ -0,0 +1,80 @@ +--- +title: Rancher 扩展 +--- + +Rancher v2.7.0 引入了**扩展(Extension)**的新功能。扩展允许用户、开发人员、合作伙伴和客户扩展和增强 Rancher Manager UI。此外,用户可以独立于 Rancher Manager 版本对其 UI 功能进行更改和增强。有了扩展,用户能够在 Rancher 之上进行构建,从而更好地根据环境进行定制。用户还可以更新到新版本以及回滚到以前的版本。 + +扩展是只能在集群中安装一次的 Helm Chart。因此,这些 Chart 已经过简化,并与 **Apps & Marketplace** 下列出的常规 Helm Chart 分开。 + +内置的 Rancher Manager 扩展示例包括 Fleet、Explorer 和 Harvester。使用可手动添加的 Extensions API 的其他扩展示例包括 Kubewarden 和 Elemental。 + +## 先决条件 + +> 你必须以管理员身份登录才能查看扩展管理页面并与之交互。 + +## 安装扩展 + +1. 点击 **Configuration** 下的 **☰ > Extensions**。 + +2. 如果它尚未安装到 **Apps & Marketplace** 中,则你必须通过单击 **Enable** 按钮启用扩展 operator。 + + - 如果不是离线安装环境,请单击 **OK** 添加 Rancher 扩展仓库。否则,取消选中复选框并单击 **OK**。 + + ![Rancher extension repository](/img/add-rancher-extension-repo.png) + +3. 在 **Extensions** 页面上,单击 **Available** 选项卡选择要安装的扩展。 + +:::info + +在 v2.7.0 中,**Available** 选项卡下不会显示内置扩展。因此,你需要手动添加所需的仓库以安装扩展。一旦这些扩展可用了,我们将同步社区。 + +::: +
+ +4. 如果没有显示可用的扩展,你可以手动添加仓库,如下所示: + + 4.1. 在屏幕右上角,点击 **⋮ > Manage Repositories > Create**。 + + 4.2. 添加所需的仓库名称,确保指定了 Git 仓库 URL 和 Git 分支。 + + 4.3. 再次点击右下方的 **Create**。 + + ![Manage repositories](/img/manage-repos.png) + +5. 在 **Available** 选项卡下,单击所需扩展和版本上的 **Install** 按钮,如下例所示。请注意,如果扩展程序可用,**Update** 按钮将出现在该扩展上,因此你可以轻松更新扩展。 + + ![Install Kubewarden](/img/install-kubewarden.png) + +6. 点击 **Reload** 按钮,该按钮将在你的扩展成功安装后出现。请注意,对于刚刚安装扩展的登录用户而言,**除非**他们重新加载页面,否则他们不会看到 UI 的变化。 + + ![Reload button](/img/reload-button.png) + +## 卸载扩展 + +你可以通过两种方式卸载或禁用扩展: + +1. 在 **Installed** 选项卡下,单击要删除的扩展上的 **Uninstall** 按钮。 + + ![Uninstall extensions](/img/uninstall-extension.png) + +1. 在扩展管理页面,点击 **⋮ > Disable Extension Support**。这将禁用所有已安装的扩展。 + + ![Disable extensions](/img/disable-extension-support.png) + +:::caution + +你必须在禁用扩展后重新加载页面,否则可能会出现显示问题。 + +::: + +## 回滚扩展 + +在 **Installed** 选项卡下,单击要回滚的扩展上的 **Rollback** 按钮。 + +![Roll back extensions](/img/roll-back-extension.png) + +:::caution + +回滚扩展后必须重新加载页面,否则可能会出现显示问题。 + +::: \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/air-gapped-helm-cli-install.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/air-gapped-helm-cli-install.md index df97c6c17b3..b5b58f77e56 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/air-gapped-helm-cli-install.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/air-gapped-helm-cli-install.md @@ -16,14 +16,14 @@ Rancher 安装在 RKE Kubernetes 集群、K3s Kubernetes 集群,或单个 Dock ::: -# 安装概要 +## 安装概要 1. [设置基础设施和私有镜像仓库](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/infrastructure-private-registry.md) 2. [收集镜像到私有镜像仓库](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md) 3. [设置 Kubernetes 集群(如果你使用 Docker 安装,请跳过此步骤)](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-kubernetes.md) 4. [安装 Rancher](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md) -# 升级 +## 升级 如需在离线环境中使用 Helm CLI 升级 Rancher,请按照[升级步骤](../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades.md)进行操作。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/aws-cloud-marketplace.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/aws-cloud-marketplace.md index cacf3e209d1..980a427cf4d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/aws-cloud-marketplace.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/aws-cloud-marketplace.md @@ -2,11 +2,11 @@ title: AWS Marketplace 集成 --- -# 概述 +## 概述 Rancher 提供了与 AWS Marketplace 的集成,允许用户向 SUSE 购买支持。此集成帮助你在需要使用更多集群时轻松调整支持需求。 -# 限制 +## 限制 - 必须使用 Rancher v2.6.7 或更高版本。 - Rancher 必须在启用其他指标的情况下进行部署。 @@ -14,11 +14,12 @@ Rancher 提供了与 AWS Marketplace 的集成,允许用户向 SUSE 购买支 - 必须通过 AWS Marketplace 购买至少一项 Rancher 支持的 Entitlement。 - 你可能需要额外的设置来支持代理/离线用例。有关详细信息,请参阅[先决条件](../integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/adapter-requirements.md)。 -# 如何使用 +## 如何使用 + 1. 完成[先决条件步骤](../integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/adapter-requirements.md)。 2. [安装 CSP Adapter](../integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md)。 -# 常见问题 +## 常见问题 **我以后后续再购买更多节点的支持吗?** diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/configure-shibboleth-saml.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/configure-shibboleth-saml.md index 32c0a26a22d..c8af4a97381 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/configure-shibboleth-saml.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/configure-shibboleth-saml.md @@ -11,7 +11,7 @@ title: 配置 Shibboleth (SAML) > 本节假定你已了解 Rancher,Shibboleth 和 OpenLDAP 是如何协同工作的。有关工作原理的详细说明,请参见[本页](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-shibboleth-saml/about-group-permissions.md)。 -# 在 Rancher 中设置 Shibboleth +## 在 Rancher 中设置 Shibboleth ### Shibboleth 先决条件 > @@ -73,7 +73,7 @@ SAML 协议不支持用户或用户组的搜索或查找。因此,如果你没 要在 Rancher 中分配权限时启用搜索组,你需要为支持组的 SAML 身份验证提供商配置后端(例如 OpenLDAP)。 -# 在 Rancher 中设置 OpenLDAP +## 在 Rancher 中设置 OpenLDAP 如果你将 OpenLDAP 配置为 Shibboleth 的后端,SAML 断言会返回到 Rancher,其中包括用于引用组的用户属性。然后,通过身份验证的用户将能够访问其所在的组有权访问的 Rancher 资源。 @@ -96,6 +96,6 @@ SAML 协议不支持用户或用户组的搜索或查找。因此,如果你没 1. 在左侧导航栏,单击**认证**。 1. 单击 **OpenLDAP**。将显示**配置 OpenLDAP 服务器**表单。 -# 故障排除 +## 故障排除 如果在测试与 OpenLDAP 服务器的连接时遇到问题,请首先仔细检查为 ServiceAccount 输入的凭证以及搜索库配置。你还可以检查 Rancher 日志来查明问题的原因。调试日志可能包含有关错误的更详细信息。详情请参见[如何启用调试日志](../faq/technical-items.md#如何启用调试日志记录?)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/enable-experimental-features.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/enable-experimental-features.md index 2fc41acbcf1..d4bac212a62 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/enable-experimental-features.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/enable-experimental-features.md @@ -20,7 +20,7 @@ Rancher 包含一些默认关闭的实验功能。在某些情况下,例如当 如果你安装 Rancher 后使用 Rancher API 将功能开关设置为 true,然后在使用命令升级 Rancher 时将功能开关设置为 false,在这种情况下,虽然默认值会是 false,但是该功能依然会被启用,因为它是通过 API 设置的。如果你随后使用 Rancher API 删除设置值(true)并将它设置为 NULL,则默认值(false)将生效。有关详细信息,请参阅[功能开关页面](../getting-started/installation-and-upgrade/installation-references/feature-flags.md)。 -# 启动 Rancher 时启用功能 +## 启动 Rancher 时启用功能 安装 Rancher 时,使用功能开关启用你所需的功能。通过单节点容器安装 Rancher,和在 Kubernetes 集群上安装 Rancher 对应的命令有所不同。 @@ -81,7 +81,7 @@ docker run -d -p 80:80 -p 443:443 \ ``` -# 使用 Rancher UI 启用功能 +## 使用 Rancher UI 启用功能 1. 在左上角,单击 **☰ > 全局设置**。 1. 单击**功能开关**。 @@ -97,7 +97,7 @@ docker run -d -p 80:80 -p 443:443 \ **结果**:该功能已禁用。 -# 使用 Rancher API 启用功能 +## 使用 Rancher API 启用功能 1. 前往 `/v3/features`。 1. 在 `data` 中,你会看到一个数组,该数组包含所有能通过功能开关启用的功能。功能的名称在 `id` 字段中。单击要启用的功能的名称。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/gke-cluster-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/gke-cluster-configuration.md index 9d8f3861c77..7ae7e6292c2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/gke-cluster-configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/gke-cluster-configuration.md @@ -133,7 +133,7 @@ _可变:是_ 启用 controlplane 授权网络,以阻止不受信任的非 GCP 源 IP 通过 HTTPS 访问 Kubernetes master。如果选择,则可以添加额外的授权网络。如果集群是使用公共端点创建的,则此选项可用于将公共端点的访问锁定到特定网络(例如运行 Rancher 服务的网络)。如果集群只有一个私有端点,则需要此设置。 -# 其他选项 +## 其他选项 ### 集群插件 @@ -182,7 +182,7 @@ _可变:是_ 设置时长 4 小时的维护窗口的开始时间。使用 HH:MM 格式在 UTC 时区中指定时间。有关详细信息,请参阅[此页面](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)。 -# 节点池 +## 节点池 在此部分中,输入描述节点池中每个节点的配置的详细信息。 @@ -256,7 +256,7 @@ _可变:否_ 有关标签语法和要求的详细信息,请参阅 [Kubernetes 文档](https://cloud.google.com/vpc/docs/add-remove-network-tags)。 -# 组详细信息 +## 组详细信息 在此部分中,输入描述节点池的详细信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-cluster-autoscaler.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-cluster-autoscaler.md index 49c280b4b32..87620b84498 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-cluster-autoscaler.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-cluster-autoscaler.md @@ -15,7 +15,7 @@ Cluster Autoscaler 运行在 Kubernetes master 节点上。它可以在 `kube-sy 你可以在 worker 节点上运行 Cluster Autoscaler 的自定义 deployment,但需要小心以保证 Cluster Autoscaler 能正常运行。 -# 云提供商 +## 云提供商 Cluster Autoscaler 为不同的云提供商提供支持。有关详细信息,请参见 [Cluster Autoscaler 支持的云提供商](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#deployment)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md index 593d0e7cb2d..11e22929133 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md @@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem'; 在本节中,你将学习如何使用 Helm CLI 在 Kubernetes 集群上部署 Rancher。 -# 先决条件 +## 先决条件 - [Kubernetes 集群](#kubernetes-集群) - [Ingress Controller](#ingress-controller) @@ -47,7 +47,7 @@ Rancher UI 和 API 通过 Ingress 公开。换言之,安装 Rancher 的 Kubern - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) - Kubernetes 命令行工具。 - [Helm](https://docs.helm.sh/using_helm/#installing-helm) - Kubernetes 的包管理器。请参见 [Helm 版本要求](../getting-started/installation-and-upgrade/resources/helm-version-requirements.md)选择 Helm 版本来安装 Rancher。请为你的具体平台参见 [Helm 项目提供的说明](https://helm.sh/docs/intro/install/)。 -# 安装 Rancher Helm Chart +## 安装 Rancher Helm Chart Rancher 是使用 Kubernetes 的 [Helm](https://helm.sh/) 包管理器安装的。Helm Chart 为 Kubernetes YAML 清单文件提供了模板语法。通过 Helm,用户可以创建可配置的 deployment,而不仅仅只能使用静态文件。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-and-upgrade.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-and-upgrade.md index af4d07ad8ca..95a4415ebbf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-and-upgrade.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-and-upgrade.md @@ -5,7 +5,7 @@ description: 了解如何在开发和生产环境中安装 Rancher。了解单 本节介绍了 Rancher 各种安装方式以及每个安装方式的优点。 -# 名词解释 +## 名词解释 本章节涉及以下名词: @@ -16,7 +16,7 @@ description: 了解如何在开发和生产环境中安装 Rancher。了解单 `restrictedAdmin` Helm Chart 选项在 **Rancher Server** 可用。如果该选项设置为 true,初始的 Rancher 用户访问本地 Kubernetes 集群会受到限制,以避免权限升级。详情请参见 [restricted-admin 角色](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md#受限管理员)。 -# 安装方式概述 +## 安装方式概述 Rancher 可以安装在以下主要架构上: @@ -62,10 +62,11 @@ Rancher backup operator 可将 Rancher 从单个 Docker 容器迁移到高可用 如需进一步了解 Rancher 架构,请参见[架构概述](rancher-manager-architecture.md),[生产级别架构推荐](../reference-guides/rancher-manager-architecture/architecture-recommendations.md)或[最佳实践指南](../reference-guides/best-practices/rancher-server/tips-for-running-rancher.md)。 -# 先决条件 +## 先决条件 + 安装 Rancher 之前,请确保你的节点满足所有[安装要求](installation-requirements.md)。 -# 架构建议 +## 架构建议 为了达到最佳性能和安全性,我们建议你为 Rancher Management Server 使用单独的专用 Kubernetes 集群。不建议在此集群上运行用户工作负载。部署 Rancher 后,你可以[创建或导入集群](kubernetes-clusters-in-rancher-setup.md)来运行你的工作负载。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-requirements.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-requirements.md index 63b17877efd..2a6ae93021d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-requirements.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/installation-requirements.md @@ -35,7 +35,7 @@ description: 如果 Rancher 配置在 Docker 或 Kubernetes 中运行时,了 Rancher UI 在基于 Firefox 或 Chromium 的浏览器(Chrome、Edge、Opera、Brave 等)中效果最佳。 -# 操作系统和容器运行时要求 +## 操作系统和容器运行时要求 Rancher 兼容当前所有的主流 Linux 发行版。 @@ -77,11 +77,11 @@ Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 如需了解 RKE2 通过了哪些操作系统版本的测试,请参见[支持和维护条款](https://rancher.com/support-maintenance-terms/)。 -# 硬件要求 +## 硬件要求 本节描述安装 Rancher Server 的节点的 CPU、内存和磁盘要求。 -# CPU 和内存 +## CPU 和内存 硬件要求根据你的 Rancher 部署规模而定。请根据要求配置每个节点。通过单节点容器安装 Rancher,和在 Kubernetes 集群上安装 Rancher 的要求有所不同。 @@ -134,7 +134,7 @@ Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 | 小 | 最多 5 个 | 最多 50 个 | 1 | 4 GB | | 中 | 最多 15 个 | 最多 200 个 | 2 | 8 GB | -# Ingress +## Ingress 安装 Rancher 的 Kubernetes 集群中的每个节点都应该运行一个 Ingress。 @@ -148,11 +148,11 @@ Ingress 需要部署为 DaemonSet 以确保负载均衡器能成功把流量转 - **AKS**:[使用 Azure Kubernetes 服务安装 Rancher 以及如何安装 Ingress 以访问 Rancher Server](../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-aks.md)。 - **GKE**:[使用 GKE 安装 Rancher 以及如何安装 Ingress 以访问 Rancher Server](../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-gke.md)。 -# 磁盘 +## 磁盘 etcd 在集群中的性能决定了 Rancher 的性能。因此,为了获得最佳速度,我们建议使用 SSD 磁盘来支持 Rancher 管理的 Kubernetes 集群。在云提供商上,你还需使用能获得最大 IOPS 的最小大小。在较大的集群中,请考虑使用专用存储设备存储 etcd 数据和 wal 目录。 -# 网络要求 +## 网络要求 本节描述了安装 Rancher Server 的节点的网络要求。 @@ -170,6 +170,6 @@ etcd 在集群中的性能决定了 Rancher 的性能。因此,为了获得最 为了确保能正常运行,Rancher 需要在 Rancher 节点和下游 Kubernetes 集群节点上开放一些端口。不同集群类型的 Rancher 和下游集群的所有必要端口,请参见[端口要求](../getting-started/installation-and-upgrade/installation-requirements/port-requirements.md)。 -# Dockershim 支持 +## Dockershim 支持 有关 Dockershim 支持的详情,请参见[此页面](../getting-started/installation-and-upgrade/installation-requirements/dockershim.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio-setup-guide.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio-setup-guide.md index 78347a5ceb0..4ed26979729 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio-setup-guide.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio-setup-guide.md @@ -6,7 +6,7 @@ title: 设置指南 如果你使用 Istio 进行流量管理,则需要允许外部流量进入集群。在这种情况下,你将需要执行以下所有步骤。 -# 先决条件 +## 先决条件 本指南假设你已经[安装 Rancher](installation-and-upgrade.md),且已经[配置了一个单独的 Kubernetes 集群](kubernetes-clusters-in-rancher-setup.md)并要在该集群上安装 Istio。 @@ -14,8 +14,7 @@ title: 设置指南 Istio 控制的工作负载和服务必须满足 [Istio 要求](https://istio.io/docs/setup/additional-setup/requirements/)。 - -# 安装 +## 安装 :::tip 快速设置提示: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio.md index 6a843913209..ead58277054 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/istio.md @@ -65,14 +65,6 @@ Jaeger 是用于跟踪分布式系统的工具。我们的 Istio 安装程序包 要从集群、命名空间或工作负载中删除 Istio 组件,请参阅[卸载 Istio](../integrations-in-rancher/istio/disable-istio.md)。 -## 迁移旧 Istio 版本 - -如果你的 Istio 版本低于 1.7.x,则没有升级路径。要在**应用 & 应用市场**页面安装 Istio,你需要在旧版 Rancher UI 的全局视图中禁用现有的 Istio。 - -如果你有大量其他的 Istio CRD,你可能需要手动迁移两个 Istio 版本都支持的 CRD。为此,你可以运行 `kubectl get -n istio-system -o yaml`,保存输出的 yaml,并在新版本中重新应用。 - -另一种选择是一次手动卸载一个 Istio 资源,但保留两个 Istio 版本都支持且最新版本不会安装的资源。此方法有可能导致安装新版本时出现问题。你可以根据你的实际情况选择是否采用该方法。 - ## 访问可视化 > 默认情况下,只有 cluster-admin 可以访问 Kiali。有关如何允许具有管理员、编辑或查看权限的角色访问它们的说明,请参阅[本节](../integrations-in-rancher/istio/rbac-for-istio.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-components.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-components.md index 17e72da03a3..7deb6057b8a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-components.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-components.md @@ -11,7 +11,7 @@ title: Kubernetes 组件 - [nginx-proxy 节点故障排除](../troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md) - [Worker 节点和通用组件故障排除](../troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md) -# Kubernetes 组件图 +## Kubernetes 组件图 ![集群图](/img/clusterdiagram.svg)
线条表示组件之间的通信。而颜色纯粹用于视觉辅助。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-resources-setup.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-resources-setup.md index c8067e478a0..146521b2bc5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-resources-setup.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/kubernetes-resources-setup.md @@ -47,12 +47,6 @@ Ingress 是一组充当负载均衡器的规则。Ingress 与一个或多个 Ing 有关详细信息,请参阅[服务发现](../how-to-guides/new-user-guides/kubernetes-resources-setup/create-services.md)。 -## 流水线 - -在你的项目中[配置版本控制提供程序](../how-to-guides/advanced-user-guides/manage-projects/ci-cd-pipelines.md#1-配置版本控制提供商)后,你可以添加仓库并开始为每个仓库配置流水线。 - -有关详细信息,请参阅[流水线](pipelines.md)。 - ## 应用程序 除了启动应用程序的各个组件外,你还可以使用 Rancher 应用商店来启动应用,即 Helm Chart。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/launch-kubernetes-with-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/launch-kubernetes-with-rancher.md index 53b726e9fb2..9a76e330e6c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/launch-kubernetes-with-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/launch-kubernetes-with-rancher.md @@ -34,7 +34,7 @@ Rancher 还可以创建节点池。在托管在云厂商的节点池上安装 Ku 有关详细信息,请参阅[自定义节点](use-existing-nodes.md)。 -# 以编程方式创建 RKE 集群 +### 以编程方式创建 RKE 集群 通过 Rancher 以编程方式部署 RKE 集群的最常见方法是使用 Rancher 2 Terraform Provider。详情请参见[使用 Terraform 创建集群](https://registry.terraform.io/providers/rancher/rancher2/latest/docs/resources/cluster)。 @@ -75,6 +75,6 @@ RKE2 还支持在预配置的虚拟机或裸机节点上安装自定义集群。 如果要重复使用之前的自定义集群中的节点,请在复用之前清理节点。如果你重复使用尚未清理的节点,则集群配置可能会失败。 -# 以编程方式创建 RKE2 集群 +### 以编程方式创建 RKE2 集群 通过 Rancher 以编程方式部署 RKE2 集群的最常见方法是使用 Rancher 2 Terraform Provider。详情请参见[使用 Terraform 创建集群](https://registry.terraform.io/providers/rancher/rancher2/latest/docs/resources/cluster_v2)。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/logging.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/logging.md index 282b4d3f42f..7529a96236b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/logging.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/logging.md @@ -5,8 +5,7 @@ description: Rancher 集成了主流的日志服务。了解集成日志服务 现在,Rancher 的日志管理由 [Banzai Cloud Logging operator](https://banzaicloud.com/docs/one-eye/logging-operator/) 提供支持,它取代了以前的内部解决方案。 -有关 Rancher 2.5 更改的概述,请参阅[本节](../integrations-in-rancher/logging/logging-architecture.md#rancher-2-5-变更)。有关迁移 Logging V1 的更多信息,请参阅[本页](../integrations-in-rancher/logging/migrate-to-rancher-v2.5+-logging.md)。 - +有关 Rancher 2.5 更改的概述,请参阅[本节](../integrations-in-rancher/logging/logging-architecture.md#rancher-2-5-变更)。 ## 启用 Logging diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/manage-projects.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/manage-projects.md index e48191a3662..341878779ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/manage-projects.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/manage-projects.md @@ -20,7 +20,6 @@ _项目_ 是 Rancher 中引入的对象,可帮助你更有组织地管理 Kube - [设置资源配额](manage-project-resource-quotas.md) - [管理命名空间](../how-to-guides/new-user-guides/manage-namespaces.md) - [配置工具](../reference-guides/rancher-project-tools.md) -- [为持续集成和 deployment 设置流水线](../how-to-guides/advanced-user-guides/manage-projects/ci-cd-pipelines.md) - [配置 Pod 安全策略](../how-to-guides/advanced-user-guides/manage-projects/manage-pod-security-policies.md) ### 授权 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-alerting-guides.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-alerting-guides.md index 6eb23261fa2..7769d685ae4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-alerting-guides.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-alerting-guides.md @@ -8,4 +8,3 @@ title: Monitoring 指南 - [自定义 Grafana 仪表板](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/customize-grafana-dashboard.md) - [持久化 Grafana 仪表板](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md) - [调试高内存使用率](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/debug-high-memory-usage.md) -- [从 Monitoring V1 迁移到 V2](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/migrate-to-rancher-v2.5+-monitoring.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-and-alerting.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-and-alerting.md index e51afee6897..8bea3e29ed7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-and-alerting.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-and-alerting.md @@ -23,11 +23,11 @@ Monitoring 应用允许你: - 根据 Prometheus 收集的指标,将预先计算的、经常需要的,或计算成本高的表达式定义为新的时间序列 - 通过 Prometheus Adapter,将从 Prometheus 收集的指标公开给 Kubernetes Custom Metrics API,以便在 HPA 中使用 -# Monitoring 的工作原理 +## Monitoring 的工作原理 有关 monitoring 组件如何协同工作的说明,请参阅[此页面](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md)。 -# 默认组件和部署 +## 默认组件和部署 ### 内置仪表板 @@ -48,11 +48,11 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 有关 Rancher UI 中公开的监控组件列表,以及编辑它们的常见用例,请参阅[本节](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md#rancher-ui-中公开的组件)。 -# RBAC +## RBAC 有关配置 monitoring 访问权限的信息,请参阅[此页面](../integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md)。 -# 指南 +## 指南 - [启用 monitoring](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md) - [卸载 monitoring](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/uninstall-monitoring.md) @@ -60,9 +60,8 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 - [自定义 Grafana 仪表板](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/customize-grafana-dashboard.md) - [持久化 Grafana 仪表板](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md) - [调试高内存使用率](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/debug-high-memory-usage.md) -- [从 Monitoring V1 迁移到 V2](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/migrate-to-rancher-v2.5+-monitoring.md) -# 配置 +## 配置 ### 在 Rancher 中配置 Monitoring 资源 @@ -79,7 +78,7 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 有关 `rancher-monitoring` Chart 选项的更多信息,包括设置资源限制和请求的选项,请参阅[此页面](../reference-guides/monitoring-v2-configuration/helm-chart-options.md)。 -# Windows 集群支持 +## Windows 集群支持 如果 Monitoring 部署到 RKE1 Windows 集群,Monitoring V2 将自动部署 [windows-exporter](https://github.com/prometheus-community/windows_exporter) DaemonSet 并设置 ServiceMonitor,以从每个部署的 Pod 中收集指标。这将使用 `windows_` 指标填充 Prometheus,这些指标与 [node_exporter](https://github.com/prometheus/node_exporter) 为 Linux 主机导出的 `node_` 指标类似。 @@ -88,8 +87,7 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 有关如何在现有 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。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-v2-configuration-guides.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-v2-configuration-guides.md index 53ae5734dbc..cdc63d55f53 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-v2-configuration-guides.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/monitoring-v2-configuration-guides.md @@ -6,17 +6,17 @@ title: 配置 有关为 Prometheus 配置自定义抓取目标和规则的信息,请参阅 [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) 的上游文档。Prometheus Operator [设计文档](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md)中解释了一些最重要的自定义资源。Prometheus Operator 文档还可以帮助你设置 RBAC、Thanos 或进行自定义配置。 -# 设置资源限制和请求 +## 设置资源限制和请求 安装 `rancher-monitoring` 时可以配置 Monitoring 应用的资源请求和限制。有关默认限制的更多信息,请参阅[此页面](../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。 -:::note +:::tip -在空闲集群上,Monitoring V2 的 CPU 使用率(高达 70%)比 Monitoring V1 显著更高。要提高性能并获得与 Monitoring V1 类似的结果,请关闭 Prometheus Adapter。 +在空闲集群上,Monitoring 可能会占用很多 CPU 资源。要提高性能,请关闭 Prometheus Adapter。 ::: -# Prometheus 配置 +## Prometheus 配置 通常不需要直接编辑 Prometheus 自定义资源。 @@ -31,7 +31,7 @@ title: 配置 有关直接编辑 Prometheus 自定义资源(对高级用例可能有帮助)的更多信息,请参阅[此页面](../how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md)。 -# Alertmanager 配置 +## Alertmanager 配置 Alertmanager 自定义资源通常不需要直接编辑。在常见用例中,你可以通过更新路由和接收器来管理告警。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/nutanix.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/nutanix.md index b6bc5cad7a1..38ddc1b13b2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/nutanix.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/nutanix.md @@ -12,6 +12,6 @@ Nutanix 集群可能由多组具有不同属性(例如内存或 vCPU 数量) - [创建 Nutanix 集群](../how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md#创建-nutanix-aos-集群) - [配置存储](../how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos) -# 创建 Nutanix 集群 +## 创建 Nutanix 集群 在[本节](../how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md)中,你将学习如何使用 Rancher 在 Nutanix AOS 中安装 [RKE](https://rancher.com/docs/rke/latest/en/) Kubernetes 集群。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/pipelines.md deleted file mode 100644 index c453abcf674..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/pipelines.md +++ /dev/null @@ -1,286 +0,0 @@ ---- -title: 流水线 ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -:::note 注意事项 - -- Rancher 2.5 开始已弃用基于 Git 的部署流水线。我们建议使用由 [Fleet](../how-to-guides/new-user-guides/deploy-apps-across-clusters/fleet.md) 提供支持的 Rancher Continuous Delivery (CD) 来处理流水线。如需在 Rancher 中访问 Fleet,请单击 ☰ > 持续交付。 - -- 不再支持 Kubernetes 1.21+ 中的流水线。 - -- Fleet 不会取代 Rancher 流水线,只是 Rancher 流水线现在由 Fleet 提供支持。 - -::: - -Rancher 的流水线提供了简单的 CI/CD 体验。你可以使用流水线来自动签出代码、运行构建或脚本、发布 Docker 镜像或商店应用,以及将更新的软件部署给用户。 - -设置流水线可以帮助开发者快速高效地上线新软件。你可以使用 Rancher 与 GitHub 仓库集成,从而设置持续集成(CI)流水线。 - -配置 Rancher 和 GitHub 后,你可以部署运行 Jenkins 的容器来自动化执行流水线: - -- 将应用代码构建为镜像。 -- 验证构建。 -- 将构建的镜像部署到集群。 -- 运行单元测试。 -- 运行回归测试。 - -:::note - -Rancher 的流水线提供简单的 CI/CD 体验,但不提供完整的功能和灵活性,也不能替代你团队正在使用的企业级 Jenkins 或其他 CI 工具。 - -::: - - -## 概念 - -有关本节中使用的概念和术语说明,请参阅[此页面](../reference-guides/pipelines/concepts.md)。 - -## 流水线的工作原理 - -为项目中启用流水线功能后,你可以在每个项目中配置多个流水线。每个流水线都是独一无二的,可以独立配置。 - -流水线是由一组签入源代码仓库的文件配置的。用户可以通过 Rancher UI 或通过将 `.rancher-pipeline.yml` 添加到仓库来配置流水线。 - -在配置流水线之前,你需要为版本控制提供商(例如 GitHub、GitLab 或 Bitbucket)配置身份验证。如果你还没有配置版本控制提供商,你可以随时使用 [Rancher 的示例仓库](../reference-guides/pipelines/example-repositories.md)来查看​​常见的流水线部署。 - -在项目中配置流水线时,会自动创建一个专门用于该流水线的命名空间。以下组件部署到它: - -- **Jenkins**: - - 流水线的构建引擎。由于项目用户不直接与 Jenkins 交互,因此 Jenkins 是被托管和锁定的。 - - :::note - - 没有使用现有 Jenkins deployment 作为流水线引擎的选项。 - - ::: - -- **Docker 镜像仓库**: - - 内部 Docker 镜像仓库是开箱即用,用于构建到发布步骤的默认目标。你也可以进行配置以推送到远程镜像仓库。内部 Docker 镜像仓库只能从集群节点访问,用户不能直接访问它。镜像不会在流水线的生命周期之外被持久化,并且只能在流水线运行使用。如果你需要在流水线运行之外访问镜像,请将镜像推送到外部镜像仓库。 - -- **Minio**: - - Minio 存储用于存储流水线执行的日志。 - - :::note - - 托管的 Jenkins 实例是无状态工作的,因此你不用担心它的数据持久性。Docker 镜像仓库和 Minio 实例默认使用临时卷,这种做法适用于大多数用例。如果你想确保流水线日志能够在节点故障的情况下也能保存,你可以为它们配置持久卷(参见[流水线组件的数据持久性](../reference-guides/pipelines/configure-persistent-data.md))。 - - ::: - -## 流水线的 RBAC - -如果你可以访问项目,则可以启用仓库来开始构建流水线。 - -只有[管理员](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md)、[集群所有者或成员](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/cluster-and-project-roles.md#集群角色)或[项目所有者](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/cluster-and-project-roles.md#项目角色)可以配置版本控制提供商和管理全局流水线的执行设置。 - -项目成员只能配置仓库和流水线。 - -## 设置流水线 - -### 先决条件 - -:::note 旧版功能开关: - -由于流水线应用已被弃用并替换为 Fleet,因此在使用流水线之前,你需要打开旧版功能的功能开关。请注意,我们不再支持 Kubernetes 1.21+ 中的流水线。 - -1. 在左上角,单击 **☰ > 全局设置**。 -1. 单击**功能开关**。 -1. 转到`旧版应用 `功能开关并单击 **⋮ > 激活**。 - -::: - -1. [配置版本控制提供商](#1-配置版本控制提供商) -2. [配置仓库](#2-配置仓库) -3. [配置流水线](#3-配置流水线) - -### 1. 配置版本控制提供商 - -在为仓库配置流水线之前,你必须配置和授权版本控制提供商: - -- GitHub -- GitLab -- Bitbucket - -在下方选择你的提供商对应的选项卡,然后按照说明进行操作。 - - - - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 单击**配置**选项卡。 -1. 按照说明**设置 Github 应用**。Rancher 会将你重定向到 GitHub 以在 GitHub 中设置 OAuth 应用。 -1. 从 GitHub 复制 **Client ID** 和 **Client Secret**。将它们粘贴到 Rancher 中。 -1. 如果你使用的是企业版 GitHub,请选择**使用私有 GitHub 企业版安装**。输入 GitHub 安装的主机地址。 -1. 单击**验证**。 - - - - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 单击**配置**选项卡。 -1. 单击 **GitLab**。 -1. 按照说明**设置 GitLab 应用**。Rancher 会将你重定向到 GitLab。 -1. 从 GitLab 复制 **Application ID** 和 **Secret**。将它们粘贴到 Rancher 中。 -1. 如果你使用的是企业版 GitLab,请选择**使用私有 GitLab 企业版安装**。输入 GitLab 安装的主机地址。 -1. 单击**验证**。 - -:::note 注意事项: - -1. 流水线使用 GitLab [v4 API](https://docs.gitlab.com/ee/api/v3_to_v4.html),支持的 GitLab 版本为 9.0+。 -2. 如果你使用 GitLab 10.7+ 并且你的 Rancher 设置位于本地网络中,请在 GitLab 管理设置中启用 **Allow requests to the local network from hooks and services** 选项。 - - -::: - - - - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 单击**配置**选项卡。 -1. 单击 **Bitbucket** 并保留默认选中的**使用 Bitbucket Cloud**。 -1. 按照说明**设置 Bitbucket Cloud 应用**。Rancher 会将你重定向到 Bitbucket 以在 Bitbucket 中设置 OAuth 使用者。 -1. 从 Bitbucket 复制使用者 **Key** 和 **Secret**。将它们粘贴到 Rancher 中。 -1. 单击**验证**。 - - - - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 单击**配置**选项卡。 -1. 点击 **Bitbucket** 并选择**使用私有 Bitbucket Server 设置**选项。 -1. 按照说明**设置 Bitbucket Server 应用**。 -1. 输入 Bitbucket Server 安装的主机地址。 -1. 单击**验证**。 - -:::note - -Bitbucket server 在向 Rancher 发送 webhook 时需要进行 SSL 验证。请确保 Rancher server 的证书被 Bitbucket server 信任。有两种选择: - -1. 使用受信任的 CA 签发的证书来设置 Rancher server。 -1. 如果你使用的是自签名证书,请将 Rancher server 的证书导入 Bitbucket server。有关说明,请参阅 Bitbucket sever 文档以了解如何[配置自签名证书](https://confluence.atlassian.com/bitbucketserver/if-you-use-self-signed-certificates-938028692.html)。 - -::: - - - - -**结果**:版本控制提供商通过身份验证后,你将被自动重定向以配置你希望使用流水线的仓库。 - -### 2. 配置仓库 - -授权版本控制提供商后,你将被自动重定向以配置你希望使用流水线的仓库。即使其他人设置了版本控制提供商,你也能看到他们的仓库并构建流水线: - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 单击**配置仓库**。 - -1. 此处会显示仓库列表。如果你是第一次配置仓库,请单击 **Authorize & Fetch Your Own Repositories** 来获取你的仓库列表。 - -1. 在要设置流水线的仓库处单击**启用**。 - -1. 启用所有仓库后,单击**完成**。 - -**结果**:你有了一个可以配置流水线的仓库列表。 - -### 3. 配置流水线 - -现在仓库已添加到你的项目中。你可以通过添加自动化阶段和步骤来配置流水线。为方便起见,我们提供了多种用于特有任务的内置步骤类型。 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 找到要设置流水线的仓库。 -1. 通过 UI 或使用仓库中的 YAML 文件(即 `.rancher-pipeline.yml` 或 `.rancher-pipeline.yaml`)配置流水线。流水线配置分为阶段和步骤。必须完全完成阶段后才能进入下一个阶段,但一个阶段中的步骤可以同时运行。你可以在每个阶段中添加不同的步骤类型。请注意,在构建步骤时,会根据步骤类型提供不同的高级选项。高级选项包括触发规则、环境变量和密文。有关通过 UI 或 YAML 文件配置流水线的更多信息,请参阅[流水线配置参考](../reference-guides/pipelines/pipeline-configuration.md)。 - - * 如果要使用 UI,请选择 **⋮ > 编辑配置**以使用 UI 配置流水线。配置流水线后,你必须查看 YAML 文件并将其推送到仓库。 - * 如果你要使用 YAML 文件,请选择 **⋮ > 查看/编辑 YAML** 来配置流水线。如果你使用 YAML 文件,你需要在更改文件后将更新的文件推送到仓库,以便更新仓库中的内容。在编辑流水线配置时,Rancher 需要花一些时间检查现有的流水线配置。 - -1. 从分支列表中选择要使用的`分支`。 - -1. 可选:设置通知。 - -1. 设置流水线的触发规则。 - -1. 为流水线输入**超时**。 - -1. 配置完所有阶段和步骤后,单击**完成**。 - -**结果** :你的流水线已配置好并可以运行了。 - - -## 流水线配置参考 - -参见[此页面](../reference-guides/pipelines/pipeline-configuration.md)以了解如何通过配置流水线实现以下目的: - -- 运行脚本 -- 构建和发布镜像 -- 发布应用商店模板 -- 部署 YAML -- 部署商店应用 - -配置参考还包括如何配置: - -- 通知 -- 超时 -- 触发流水线的规则 -- 环境变量 -- 密文 - - -## 运行流水线 - -首次运行你的流水线。找到你的流水线并选择 **⋮ > 运行**。 - -在此初始运行期间将测试你的流水线。以下流水线组件将作为工作负载部署到你的项目专用于该流水线的命名空间: - -- `docker-registry` -- `jenkins` -- `minio` - -这个过程需要几分钟。完成后,你可以从项目的**工作负载**选项卡中查看每个流水线组件。 - -## 触发流水线 - -启用仓库后,会在版本控制提供商中自动设置 webhook。默认情况下,流水线会由 **push** 事件触发到仓库,但你也可以修改触发运行流水线的事件。 - -可用事件: - -* **Push**:当提交被推送到仓库中的分支时,触发流水线。 -* **Pull Request**:对仓库发起 PR 时,触发流水线。 -* **Tag**:在仓库中创建标签时,触发流水线。 - -:::note - -Rancher 的[示例仓库](../reference-guides/pipelines/example-repositories.md)不存在此选项。 - -::: - -### 修改仓库的事件触发器 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 找到要修改事件触发器的仓库。选择 **⋮ > 设置**。 -1. 为仓库选择所需的事件触发器(**Push**、**Pull Request** 或 **Tag**)。 -1. 单击**保存**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-behind-an-http-proxy.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-behind-an-http-proxy.md index bc8d53c692f..e468db53dd5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-behind-an-http-proxy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-behind-an-http-proxy.md @@ -6,7 +6,7 @@ title: 使用 HTTP 代理安装 Rancher 另外,用户也可以在没有任何互联网访问的情况下离线设置 Rancher。详情请参见 [Rancher 官方文档](air-gapped-helm-cli-install.md)。 -# 安装概要 +## 安装概要 1. [配置基础设施](../getting-started/installation-and-upgrade/other-installation-methods/rancher-behind-an-http-proxy/set-up-infrastructure.md) 2. [配置 Kubernetes 集群](../getting-started/installation-and-upgrade/other-installation-methods/rancher-behind-an-http-proxy/install-kubernetes.md) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-on-a-single-node-with-docker.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-on-a-single-node-with-docker.md index 2fe58e12691..4a7a88b81ff 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-on-a-single-node-with-docker.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/rancher-on-a-single-node-with-docker.md @@ -17,19 +17,19 @@ Rancher 的 Docker 安装仅推荐用于开发和测试环境中。Rancher 版 Rancher backup operator 可将 Rancher 从单个 Docker 容器迁移到高可用 Kubernetes 集群上。详情请参见[把 Rancher 迁移到新集群](../how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/migrate-rancher-to-new-cluster.md)。 -### Rancher 特权访问 +## Rancher 特权访问 当 Rancher Server 部署在 Docker 容器中时,容器内会安装一个本地 Kubernetes 集群供 Rancher 使用。为 Rancher 的很多功能都是以 deployment 的方式运行的,而在容器内运行容器是需要特权模式的,因此你需要在安装 Rancher 时添加 `--privileged` 选项。 -# 操作系统,Docker,硬件和网络要求 +## 操作系统,Docker,硬件和网络要求 请确保你的节点满足常规的[安装要求](installation-requirements.md)。 -# 1. 配置 Linux 主机 +## 1. 配置 Linux 主机 按照[要求](installation-requirements.md)配置一个 Linux 主机,用于运行 Rancher Server。 -# 2. 选择一个 SSL 选项并安装 Rancher +## 2. 选择一个 SSL 选项并安装 Rancher 出于安全考虑,使用 Rancher 时请使用 SSL(Secure Sockets Layer)。SSL 保护所有 Rancher 网络通信(如登录和与集群交互)的安全。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/use-existing-nodes.md b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/use-existing-nodes.md index 6730a5afe8f..d54ae37d50b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/use-existing-nodes.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pages-for-subheaders/use-existing-nodes.md @@ -9,7 +9,7 @@ description: 要创建具有自定义节点的集群,你需要访问集群中 本节介绍如何设置自定义集群。 -# 使用自定义节点创建集群 +## 使用自定义节点创建集群 :::note 使用 Windows 主机作为 Kubernetes Worker 节点? @@ -17,7 +17,6 @@ description: 要创建具有自定义节点的集群,你需要访问集群中 ::: - ### 1. 配置 Linux 主机 你可以通过配置 Linux 主机,来创建自定义集群。你的主机可以是: @@ -130,7 +129,7 @@ Key=kubernetes.io/cluster/, Value=owned Key=kubernetes.io/cluster/CLUSTERID, Value=shared ``` -# 可选的后续步骤 +## 可选的后续步骤 创建集群后,你可以通过 Rancher UI 访问集群。最佳实践建议你设置以下访问集群的备用方式: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/about-the-api/api-tokens.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/about-the-api/api-tokens.md index 294faf111ab..95b91376881 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/about-the-api/api-tokens.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/about-the-api/api-tokens.md @@ -24,7 +24,6 @@ title: API 令牌 | `agent-*` | Agent deployment 令牌 | | `compose-token-*` | compose 令牌 | | `helm-token-*` | Helm Chart deployment 令牌 | -| `*-pipeline*` | 项目流水线令牌 | | `telemetry-*` | 遥测令牌 | | `drain-node-*` | 用于清空的令牌(由于没有原生 Kubernetes API,我们使用 `kubectl` 来清空) | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/backup-restore-configuration/examples.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/backup-restore-configuration/examples.md index 5f568aa1b1a..ca1ce934d84 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/backup-restore-configuration/examples.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/backup-restore-configuration/examples.md @@ -242,7 +242,7 @@ spec: encryptionConfigSecretName: test-encryptionconfig ``` -# 在 S3 中存储备份的凭证密文示例 +## 在 S3 中存储备份的凭证密文示例 ```yaml apiVersion: v1 @@ -255,7 +255,7 @@ data: secretKey: ``` -# EncryptionConfiguration 示例 +## EncryptionConfiguration 示例 以下代码片段演示了两种不同类型的密文及其与自定义资源的备份和还原的相关性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md index 983541f1ebd..de11f24cedd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md @@ -13,7 +13,7 @@ title: Rancher 管理 vSphere 集群的最佳实践 ![解决方案概述](/img/solution_overview.drawio.svg) -# 1. 虚拟机注意事项 +## 1. 虚拟机注意事项 ### 利用虚拟机模板来构建环境 @@ -31,7 +31,7 @@ title: Rancher 管理 vSphere 集群的最佳实践 在部署节点时,请遵循 K8s 和 etcd 的最佳实践,其中包括禁用 swap,检查集群中的所有主机之间是否有良好的网络连接,为每个节点使用唯一的主机名、MAC 地址和 `product_uuids`。 -# 2. 网络注意事项 +## 2. 网络注意事项 ### 利用 ETCD 节点之间的低延迟和高带宽连接 @@ -41,13 +41,13 @@ title: Rancher 管理 vSphere 集群的最佳实践 你可以为使用的所有节点都配置一个静态 IP。如果使用 DHCP,则每个节点都应该有一个 DHCP 预留,以确保节点分配到相同的 IP 地址。 -# 3. 存储注意事项 +## 3. 存储注意事项 ### 在 ETCD 节点上使用 SSD 磁盘 ETCD 对写入延迟非常敏感。因此,你可以尽量使用 SSD 磁盘来提高写入性能。 -# 4. 备份和灾难恢复 +## 4. 备份和灾难恢复 ### 定期备份下游集群 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/cli-with-rancher/kubectl-utility.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/cli-with-rancher/kubectl-utility.md index 8d81f941fda..62377d846c6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/cli-with-rancher/kubectl-utility.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/cli-with-rancher/kubectl-utility.md @@ -2,7 +2,7 @@ title: kubectl 实用程序 --- -# kubectl +## kubectl kubectl 用于与 Rancher 进行交互。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/concepts.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/concepts.md deleted file mode 100644 index e277e96b61e..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/concepts.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: 概念 ---- - -本文解释与流水线相关的常见概念和术语。 - -- **流水线**: - - _流水线_ 是一个软件交付过程,它被分成不同的阶段和步骤。设置流水线可以帮助开发者快速高效地上线新软件。Rancher 支持给每个项目单独设置流水线。流水线基于特定的仓库。它定义了构建、测试和部署代码的过程。Rancher 使用的是[流水线即代码](https://jenkins.io/doc/book/pipeline-as-code/)模型。在源代码仓库中,流水线配置以流水线文件表示,文件名为 `.rancher-pipeline.yml` 或 `.rancher-pipeline.yaml`。 - -- **阶段**: - - 一个流水线阶段由多个步骤组成。阶段按照流水线文件中定义的顺序执行。一个阶段中的步骤是同时执行的。只有上一个阶段中的所有步骤都完成且没有失败时,下一个阶段才会开始。 - -- **步骤**: - - 流水线步骤在指定阶段内执行。如果一个步骤以 `0` 以外的代码退出,则该步骤失败了。如果某个步骤以此失败代码退出,则整个流水线将失败并终止。 - -- **工作空间**: - - 工作空间是所有流水线步骤共享的工作目录。在流水线开始时,源代码会被检出到工作空间。每个步骤的命令都会在工作空间中启动。在流水线执行期间,上一步骤的工件将在后续步骤中使用。工作目录是一个临时卷,将在流水线执行完成时使用 executor pod 进行清理。 - -通常,流水线阶段包括: - -- **Build**: - - 每次将代码签入仓库时,流水线都会自动克隆仓库并构建软件的新迭代。在整个过程中,软件通常通过自动化测试进行审查。 - -- **Publish**: - - 构建完成后,将构建 Docker 镜像并将其发布到 Docker 镜像仓库,或发布商店应用模板。 - -- **Deploy**: - - 发布工件后,你将发布你的应用,以便用户开始使用更新后的产品。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/configure-persistent-data.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/configure-persistent-data.md deleted file mode 100644 index d8ea5061606..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/configure-persistent-data.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: 为流水线组件配置持久数据 ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -默认情况下,流水线内部的 Docker 镜像仓库和 Minio 工作负载都使用临时卷。这是开箱即用的默认存储方式,能让测试变得更加便利。但如果运行 Docker 镜像仓库或 Minio 的节点出现故障,你将丢失构建镜像和构建日志。在大多数情况下,这不是太大的问题。如果你希望构建镜像和日志能够在节点故障中幸免于难,你可以让 Docker 镜像仓库和 Minio 使用持久卷。 - -本节假设你了解持久存储在 Kubernetes 中的工作原理。如需更多信息,请参阅[存储的工作原理](../../how-to-guides/new-user-guides/manage-clusters/create-kubernetes-persistent-storage/manage-persistent-storage/about-persistent-storage.md)。 - -:::note 先决条件(适用于 A 和 B): - -[持久卷](../../pages-for-subheaders/create-kubernetes-persistent-storage.md)必须在集群中可用。 - -::: - -### A. 为 Docker 镜像仓库配置持久数据 - -1. 点击 **☰ > 集群管理**。 -1. 选择你创建的集群,并点击 **Explore**。 -1. 点击**工作负载**。 - -1. 找到 `docker-registry` 工作负载并选择 **⋮ > 编辑**。 - -1. 滚动到**卷**部分并展开它。从底部的**添加卷**菜单中选择以下选项之一: - - - **添加卷 > 添加新的持久卷(声明)** - - **添加卷 > 使用已有的持久卷(声明)** - -1. 完成为内部 Docker 镜像仓库选择持久卷的表单。 - - - - 1. 输入卷声明的**名称**。 - 1. 选择一个卷声明**源**: - - 如果你选择**使用存储类来配置新持久卷**,请选择存储类并输入**容量**。 - - 如果你选择**使用已有的持久卷**,请从下拉列表中选择**持久卷**。 - 1. 从**自定义**中,选择卷的读/写访问权限。 - 1. 单击**定义**。 - - - - - 1. 输入卷声明的**名称**。 - 1. 从下拉列表中选择**持久卷声明**。 - 1. 从**自定义**中,选择卷的读/写访问权限。 - 1. 单击**定义**。 - - - - -1. 在**挂载点**字段中,输入 `/var/lib/registry`,这是 Docker 镜像仓库容器内的数据存储路径。 - -1. 点击**升级**。 - -### B. 为 Minio 配置持久数据 - -1. 点击 **☰ > 集群管理**。 -1. 选择你创建的集群,并点击 **Explore**。 -1. 点击**工作负载**。 -1. 转到 `minio` 工作负载并选择 **⋮ > 编辑**。 - -1. 滚动到**卷**部分并展开它。从底部的**添加卷**菜单中选择以下选项之一: - - - **添加卷 > 添加新的持久卷(声明)** - - **添加卷 > 使用已有的持久卷(声明)** - -1. 完成为内部 Docker 镜像仓库选择持久卷的表单。 - - - - 1. 输入卷声明的**名称**。 - 1. 选择一个卷声明**源**: - - 如果你选择**使用存储类来配置新持久卷**,请选择存储类并输入**容量**。 - - 如果你选择**使用已有的持久卷**,请从下拉列表中选择**持久卷**。 - 1. 从**自定义**中,选择卷的读/写访问权限。 - 1. 单击**定义**。 - - - - - 1. 输入卷声明的**名称**。 - 1. 从下拉列表中选择**持久卷声明**。 - 1. 从**自定义**中,选择卷的读/写访问权限。 - 1. 单击**定义**。 - - - - -1. 在**挂载点**字段中,输入 `/data`,这是 Minio 容器内的数据存储路径。 - -1. 点击**升级**。 - -**结果**:已为你的流水线组件配置了持久存储。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/example-repositories.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/example-repositories.md deleted file mode 100644 index 3b89bb5b69c..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/example-repositories.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: 示例仓库 ---- - -Rancher 附带了几个示例仓库,你可以通过这些仓库来熟悉流水线(pipeline)。在生产环境中为你的仓库使用流水线之前,我们建议你先配置和测试与你的环境最相似的示例仓库。你可以把这个示例仓库用作沙盒来配置仓库和构建演示等。Rancher 包含以下示例仓库: - -- Go -- Maven -- php - -:::note 先决条件: - -- 示例仓库仅在你没有[配置版本控制提供商](../../how-to-guides/advanced-user-guides/manage-projects/ci-cd-pipelines.md)时可用。 -- 由于流水线应用已被弃用并替换为 Fleet,因此在使用流水线之前,你需要打开旧版功能的功能开关。 -- 请注意,我们不再支持 Kubernetes 1.21+ 中的流水线。 - - 1. 在左上角,单击 **☰ > 全局设置**。 - 1. 单击**功能开关**。 - 1. 转到`旧版应用 `功能开关并单击 **⋮ > 激活**。 - -::: - -要开始使用这些示例仓库: - -1. [启用示例仓库](#1-启用示例仓库) -2. [查看示例流水线](#2-查看示例流水线) -3. [运行示例流水线](#3-运行示例流水线) - -### 1. 启用示例仓库 - -默认情况下,示例流水线仓库是禁用的。你可以启用一个(或多个)示例仓库来测试流水线功能,并查看流水线的工作原理。 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 在**流水线**选项卡中,单击**配置仓库**。 - - :::note - - 示例仓库仅在你尚未 fetch 你自己的仓库时显示。 - - ::: - -1. 单击某个示例仓库(例如 `https://github.com/rancher/pipeline-example-go.git`)的**启用**按钮。然后单击**完成**。 - -**结果**: - -- **流水线**选项卡中启用了示例仓库以使用流水线。 - -- 以下工作负载被部署到新命名空间: - - - `docker-registry` - - `jenkins` - - `minio` - -### 2. 查看示例流水线 - -启用示例仓库后,查看流水线的配置: - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 在**流水线**选项卡中,单击**配置仓库**。 -1. 找到示例仓库,然后选择 **⋮ > 编辑配置**。查看流水线有两种方式: -* **Rancher UI**:点击**编辑配置**或**查看/编辑 YAML** 以查看流水线的阶段和步骤。YAML 视图会显示 `./rancher-pipeline.yml` 文件。 - -### 3. 运行示例流水线 - -启用示例仓库后,运行流水线以查看其工作原理。 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 在**流水线**选项卡中,转到流水线并选择 **⋮ > 运行**。 - - :::note - - 第一次运行流水线时,需要几分钟来拉取相关镜像并预置必要的流水线组件。 - - ::: - -**结果**:流水线已运行。你可以在日志中查看结果。 - -### 后续操作 - -有关为仓库设置流水线的详细信息,请[配置版本控制提供商](../../how-to-guides/advanced-user-guides/manage-projects/ci-cd-pipelines.md)、启用仓库并配置流水线。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/example-yaml.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/example-yaml.md deleted file mode 100644 index e46a18f9698..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/example-yaml.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: 示例 YAML 文件 ---- - -你可以通过 UI 或使用仓库中的 YAML 文件(即 `.rancher-pipeline.yml` 或 `.rancher-pipeline.yaml`)配置流水线。 - -在[流水线配置参考](pipeline-configuration.md)中,我们提供了使用 Rancher UI 或 YAML 来配置每个功能的示例。 - -以下是一个完整的 `rancher-pipeline.yml` 示例,供想要直接使用的用户使用: - -```yaml -# 示例 -stages: - - name: Build something - # 阶段的条件 - when: - branch: master - event: [ push, pull_request ] - # 多个步骤并发运行 - steps: - - runScriptConfig: - image: busybox - shellScript: echo ${FIRST_KEY} && echo ${ALIAS_ENV} - # 在容器中为步骤设置环境变量 - env: - FIRST_KEY: VALUE - SECOND_KEY: VALUE2 - # 从项目密文中设置环境变量 - envFrom: - - sourceName: my-secret - sourceKey: secret-key - targetKey: ALIAS_ENV - - runScriptConfig: - image: busybox - shellScript: date -R - # 步骤条件 - when: - branch: [ master, dev ] - event: push - - name: Publish my image - steps: - - publishImageConfig: - dockerfilePath: ./Dockerfile - buildContext: . - tag: rancher/rancher:v2.0.0 - # 可选择推送到远端镜像仓库 - pushRemote: true - registry: reg.example.com - - name: Deploy some workloads - steps: - - applyYamlConfig: - path: ./deployment.yaml -# 流水线的分支条件 -branch: - include: [ master, feature/*] - exclude: [ dev ] -# 以分钟为单位的超时 -timeout: 30 -notification: - recipients: - - # Recipient - recipient: "#mychannel" - # Notifier 的 ID - notifier: "c-wdcsr:n-c9pg7" - - recipient: "test@example.com" - notifier: "c-wdcsr:n-lkrhd" - # 选择发送通知的条件 - condition: ["Failed", "Success", "Changed"] - # 覆盖默认消息(可选) - message: "my-message" -``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/pipeline-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/pipeline-configuration.md deleted file mode 100644 index fe6565d6475..00000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/pipelines/pipeline-configuration.md +++ /dev/null @@ -1,633 +0,0 @@ ---- -title: 流水线配置参考 ---- - -在本文中,你将学习如何配置流水线。 - - -## 步骤类型 - -在每个阶段中,你都可以添加任意数量的步骤。一个阶段中的多个步骤会并发运行。 - -步骤类型包括: - -- [运行脚本](#步骤类型:运行脚本) -- [构建和发布镜像](#步骤类型:构建和发布镜像) -- [发布商店应用模板](#步骤类型:发布商店应用模板) -- [部署 YAML](#步骤类型:部署-yaml) -- [部署商店应用](#步骤类型:部署商店应用) - - - -### 通过 UI 配置步骤 - -如果你还没有添加任何阶段,请单击**为此分支配置流水线**以在 UI 中配置流水线。 - -1. 通过单击**添加阶段**将阶段添加到流水线执行中。 - - 1. 输入流水线中各个阶段的**名称**。 - 1. 你可以单击**显示高级选项**来配置[触发阶段的规则](#触发器和触发器规则)。注意,你之后还可以更新它们。 - -1. 创建阶段后,单击**添加步骤**来开始[添加步骤](#步骤类型)。你可以向每个阶段添加多个步骤。 - -### 通过 YAML 配置步骤 - -你可以在每个阶段中添加多个步骤。如需了解如何配置 YAML,请阅读每个[步骤类型](#步骤类型)和高级选项的更多信息。以下是一个小示例,说明如何配置多个阶段,其中各个阶段中都只有一个步骤: - -```yaml -# 示例 -stages: - - name: Build something - # 阶段的条件 - when: - branch: master - event: [ push, pull_request ] - # 多个步骤并发运行 - steps: - - runScriptConfig: - image: busybox - shellScript: date -R - - name: Publish my image - steps: - - publishImageConfig: - dockerfilePath: ./Dockerfile - buildContext: . - tag: rancher/rancher:v2.0.0 - # 可选择推送到远端镜像仓库 - pushRemote: true - registry: reg.example.com -``` -# 步骤类型:运行脚本 - -**运行脚本**步骤用于在指定容器内的工作空间中执行命令。你可以根据基础镜像提供的实用程序,使用这个步骤来构建、测试,以及执行更多其他操作。为方便起见,你可以使用变量来引用流水线执行的元数据。有关可用变量的列表,请参阅[流水线变量替换参考](#流水线变量替换参考)。 - -### 通过 UI 配置脚本 - -1. 从**步骤类型**下拉列表中,选择**运行脚本**并填写表单。 - -1. 单击**添加**。 - -### 通过 YAML 配置脚本 -```yaml -# 示例 -stages: -- name: Build something - steps: - - runScriptConfig: - image: golang - shellScript: go build -``` -## 步骤类型:构建和发布镜像 - -**构建和发布镜像**步骤用于构建并发布 Docker 镜像。此步骤需要源代码仓库中的 Dockerfile。 - -UI 中不提供将镜像发布到不安全镜像仓库的选项。但你可以在 YAML 中指定一个环境变量,从而将镜像发布到不安全的镜像仓库。 - -### 通过 UI 配置镜像的构建和发布 -1. 从**步骤类型**下拉菜单中,选择**构建和发布**。 - -1. 完成表单的剩余部分。下面列出了每个字段的说明。完成后,请单击**添加**。 - - | 字段 | 描述 | - ---------|----------| - | Dockerfile 路径 | 源代码仓库中 Dockerfile 的相对路径。如果 Dockerfile 位于根目录,则默认路径为 `./Dockerfile`。你可以在不同用例中将其设置为其他路径(例如 `./path/to/myDockerfile`)。 | - | 镜像名称 | `name:tag` 格式的镜像名称。不需要填写镜像仓库地址。例如,如果要构建 `example.com/repo/my-image:dev`,请输入 `repo/my-image:dev`。 | - | 将镜像推送到远端仓库 | 设置用于发布已构建的镜像的镜像仓库。要使用此选项,请启用它并从下拉列表中选择一个镜像仓库。如果禁用此选项,则将镜像推送到内部镜像仓库。 | - | 构建上下文

(**显示高级选项**) | 默认是源代码的根目录 (`.`)。有关更多详细信息,请参阅 Docker [构建命令文档](https://docs.docker.com/engine/reference/commandline/build/)。 | - -### 通过 YAML 配置镜像的构建和发布 - -你可以为 Docker daemon 和构建使用特定参数。UI 中没有开放这些参数,但你能以流水线 YAML 格式配置这些参数,如下例所示。可用的环境变量包括: - -| 变量名称 | 描述 | -------------------------|------------------------------------------------------------ -| PLUGIN_DRY_RUN | 禁用 Docker push | -| PLUGIN_DEBUG | Docker daemon 在调试模式下执行 | -| PLUGIN_MIRROR | Docker daemon 镜像仓库 mirror | -| PLUGIN_INSECURE | Docker daemon 允许不安全的镜像仓库 | -| PLUGIN_BUILD_ARGS | Docker 构建参数(逗号分隔的列表) | - -
- -```yaml -# 此示例展示了在"推送镜像"步骤中使用的环境变量。 -# 此变量允许你 -# 将镜像发布到不安全的镜像仓库: - -stages: -- name: Publish Image - steps: - - publishImageConfig: - dockerfilePath: ./Dockerfile - buildContext: . - tag: repo/app:v1 - pushRemote: true - registry: example.com - env: - PLUGIN_INSECURE: "true" -``` - -## 步骤类型:发布商店应用模板 - -**发布商店应用模板**步骤将商店应用模板的版本(即 Helm Chart)发布到 Git 托管的镜像仓库。它生成一个 Git commit 并将其推送到你的 chart 仓库。要让这个步骤成功完成,需要源代码仓库中的 Chart 文件夹和专用流水线命名空间中的预配置密文。Chart 文件夹中的任何文件都支持[流水线变量替换参考](#流水线变量替换参考)中的变量。 - -### 通过 UI 配置发布商店应用的模板 - -1. 从**步骤类型**下拉菜单中,选择**发布商店应用模板**。 - -1. 完成表单的剩余部分。下面列出了每个字段的说明。完成后,请单击**添加**。 - - | 字段 | 描述 | - ---------|----------| - | Chart 文件夹 | `Chart.yaml` 文件所在的源代码仓库中, chart 文件夹的相对路径。 | - | 商店应用模板名称 | 模板的名称。例如,wordpress。 | - | 商店应用模板版本 | 你要发布的模板版本,应该和 `Chart.yaml` 文件中定义的版本一致。 | - | 协议 | 可以选择使用 HTTP(S) 或 SSH 协议发布。 | - | 密文 | 存储 Git 凭证的密文。在添加此步骤之前,你需要在项目的专用流水线命名空间中创建一个密文。如果你使用 HTTP(S) 协议,请将 Git 用户名和密码存储在密文的 `USERNAME` 和 `PASSWORD` 键中。如果你使用 SSH 协议,请将 Git 部署密钥存储在密文的 `DEPLOY_KEY` 中。创建密文后,在此选项中选择它。 | - | Git URL | 用于发布模板的 chart 仓库的 Git URL。 | - | Git 分支 | 用于发布模板的 chart 仓库的 Git 分支。 | - | 提交者姓名 | Commit 消息中使用的提交者姓名。 | - | 提交者邮箱 | Commit 消息中使用的提交者邮箱。 | - - -### 通过 YAML 配置发布商店应用的模板 - -你可以直接在 `.rancher-pipeline.yml` 文件中添加**发布商店应用模板**步骤。 - -在 `steps` 中,使用 `publishCatalogConfig` 添加一个步骤。你需要提供以下信息: - -* Path:`Chart.yaml` 文件所在的源代码仓库中, chart 文件夹的相对路径。 -* CatalogTemplate:模板的名称。 -* Version:你要发布的模板版本,应该和 `Chart.yaml` 文件中定义的版本一致。 -* GitUrl:用于发布模板的 chart 仓库的 Git URL。 -* GitBranch:用于发布模板的 chart 仓库的 Git 分支。 -* GitAuthor:Commit 消息中使用的提交者姓名。 -* GitEmail:Commit 消息中使用的提交者邮箱。 -* Credentials:需要通过引用专用流水线命名空间中的密文来提供 Git 凭证。如果你使用 SSH 协议进行发布,请将部署密钥保存在 `DEPLOY_KEY` 环境变量中。如果你使用 HTTP(S) 协议进行发布,请将你的用户名和密码保存在 `USERNAME` 和 `PASSWORD` 环境变量中。 - -```yaml -# 示例 -stages: -- name: Publish Wordpress Template - steps: - - publishCatalogConfig: - path: ./charts/wordpress/latest - catalogTemplate: wordpress - version: ${CICD_GIT_TAG} - gitUrl: git@github.com:myrepo/charts.git - gitBranch: master - gitAuthor: example-user - gitEmail: user@example.com - envFrom: - - sourceName: publish-keys - sourceKey: DEPLOY_KEY -``` - -## 步骤类型:部署 YAML - -此步骤将任意 Kubernetes 资源部署到项目中。此部署需要 Kubernetes 清单文件存在于源代码仓库中。清单文件中支持流水线变量替换。你可以在 [GitHub](https://github.com/rancher/pipeline-example-go/blob/master/deployment.yaml) 中查看​​示例文件。有关可用变量的列表,请参阅[流水线变量替换参考](#流水线变量替换参考)。 - -### 通过 UI 配置 YAML 的部署 - -1. 从**步骤类型**下拉列表中,选择**部署 YAML** 并填写表单。 - -1. 输入 **YAML 路径**,即源代码中清单文件的路径。 - -1. 单击**添加**。 - -### 通过 YAML 配置 YAML 的部署 - -```yaml -# 示例 -stages: -- name: Deploy - steps: - - applyYamlConfig: - path: ./deployment.yaml -``` - -## 步骤类型:部署商店应用 - -**部署商店应用**步骤用于在项目中部署商店应用。如果应用不存在,则将安装一个新应用,或升级现有应用。 - -### 通过 UI 配置商店应用的部署 - -1. 从**步骤类型**下拉菜单中,选择**部署商店应用**。 - -1. 完成表单的剩余部分。下面列出了每个字段的说明。完成后,请单击**添加**。 - - | 字段 | 描述 | - ---------|----------| - | Catalog | 将使用应用模板的商店应用。 | - | 模板名称 | 应用模板的名称。例如,wordpress。 | - | 模板版本 | 要部署的应用模板的版本。 | - | 命名空间 | 要部署应用的目标命名空间。 | - | 应用名称 | 要部署的应用的名称。 | - | 答案 | 用于部署应用的答案的键值对。 | - - -### 通过 YAML 配置商店应用的部署 - -你可以直接在 `.rancher-pipeline.yml` 文件中添加**部署商店应用**步骤。 - -在 `steps` 中,使用 `applyAppConfig` 添加一个步骤。你需要提供以下信息: - -* CatalogTemplate:模板的 ID。你可以单击`启动应用`,并选择该应用的`查看详情`来找到 ID。它是 URL 的最后一部分。 -* Version:要部署的模板的版本。 -* Answers:用于部署应用的答案的键值对。 -* Name:要部署的应用的名称。 -* TargetNamespace:要部署应用的目标命名空间。 - -```yaml -# 示例 -stages: -- name: Deploy App - steps: - - applyAppConfig: - catalogTemplate: cattle-global-data:library-mysql - version: 0.3.8 - answers: - persistence.enabled: "false" - name: testmysql - targetNamespace: test -``` - -## 超时 - -默认情况下,每个流水线执行的超时时间为 60 分钟。如果流水线执行无法在超时期限内完成,则流水线将中止。 - -### 通过 UI 配置超时 - -在**超时**字段中输入所需的值。 - -### 通过 YAML 配置超时 - -在 `timeout` 中,输入超时值(以分钟为单位)。 - -```yaml -# 示例 -stages: - - name: Build something - steps: - - runScriptConfig: - image: busybox - shellScript: ls -# 以分钟为单位的超时 -timeout: 30 -``` - -## 通知 - -你可以根据流水线的构建状态,启用对通知器的通知。在启用通知之前,Rancher 建议你先设置通知器,以便立即添加收件人。 - -### 通过 UI 配置通知 - -1. 在**通知**中,单击**启用**以打开通知。 - -1. 选择通知的条件。你可以选择接收以下状态的通知:`失败`、`成功`或`已更改`。例如,如果你想在执行失败时接收通知,请选择**失败**。 - -1. 如果你没有现有的通知器,Rancher 会提示未设置通知器的警告,并显示跳转到通知器页面的链接。你可以按照[说明](/versioned_docs/version-2.0-2.4/explanations/integrations-in-rancher/notifiers.md)添加通知器。如果你已经有通知器,你可以单击**添加收件人**按钮,将他们添加到通知中。 - - :::note - - 通知器是在集群级别配置的,需要不同级别的权限。 - - ::: - -1. 在下拉列表中为每个收件人选择通知器类型。根据通知器的类型,你可以使用默认收件人或覆盖收件人。例如,如果你有 _Slack_ 通知器,你可以更新通知发送的频道。你可以通过单击**添加收件人**来添加其他通知。 - -### 通过 YAML 配置通知 - -在 `notification` 中,你需要提供以下信息: - -* **Recipients**:接收通知的通知器/收件人的列表。 - * **Notifier**:通知器的 ID。你可以先找到通知器,并选择**在 API 中查看**来获取 ID。 - * **Recipient**:根据通知器的类型,你可以使用“默认收件人”,或使用不同的收件人来覆盖默认收件人。例如,在配置 slack 通知器时,你选择一个频道作为默认收件人,但如果你想将通知发送到不同的频道,你也可以选择不同的收件人。 -* **Condition**:发送通知的条件。 -* **Message(可选)**:如果你想更改默认通知消息,你可以在 yaml 中进行编辑。注意:此选项在 UI 中不可用。 - -```yaml -# 示例 -stages: - - name: Build something - steps: - - runScriptConfig: - image: busybox - shellScript: ls -notification: - recipients: - - # Recipient - recipient: "#mychannel" - # Notifier 的 ID - notifier: "c-wdcsr:n-c9pg7" - - recipient: "test@example.com" - notifier: "c-wdcsr:n-lkrhd" - # 选择发送通知的条件 - condition: ["Failed", "Success", "Changed"] - # 覆盖默认消息(可选) - message: "my-message" -``` - -## 触发器和触发器规则 - -配置流水线后,你可以使用不同的方法触发它: - -- **手动**: - - 配置流水线后,你可以使用 Rancher UI 中的最新 CI 定义来触发构建。流水线执行被触发后,Rancher 会动态配置一个 Kubernetes pod 来运行你的 CI 任务,然后在完成后将该 Pod 移除。 - -- **自动**: - - 为流水线启用仓库后,Webhook 会自动添加到版本控制系统中。当项目用户通过推送代码、新建 PR 或创建标签与仓库交互时,版本控制系统会向 Rancher Server 发送一个 webhook,从而触发流水线执行。 - - 要使用此自动化,仓库需要 webhook 管理权限。因此,当用户进行身份验证并 fetch 仓库时,只会显示他们具有 webhook 管理权限的仓库。 - -你可以创建触发规则,从而对流水线配置中的流水线执行进行细粒度控制。触发规则有两种: - -- **Run this when**:在触发器被显式触发时,此类规则将启动流水线、阶段或步骤。 - -- **Do Not Run this when**:当触发器被显式触发时,这类规则会跳过流水线、阶段或步骤。 - -如果所有条件都评估为 `true`,则执行流水线/阶段/步骤。否则将会跳过。跳过流水线时,不会执行任何流水线。如果一个阶段/步骤被跳过了,它会被认为是成功的,而且后续阶段/步骤会继续运行。 - -`branch` 条件支持通配符 (`*`) 扩展。 - -### 配置流水线触发器 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 在要管理触发器规则的仓库中,选择 **⋮ > 编辑配置**。 -1. 点击**显示高级选项**。 -1. 在**触发器**中,配置规则以运行或跳过流水线。 - - 1. 单击**添加规则**。在**值**字段中,输入触发流水线的分支名称。 - - 1. **可选**:添加更多触发构建的分支。 - -1. 单击**完成**。 - -### 配置阶段触发器 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 在要管理触发器规则的仓库中,选择 **⋮ > 编辑配置**。 -1. 找到要用于管理触发规则的**阶段**,单击该阶段的**编辑**图标。 -1. 单击**显示高级选项**。 -1. 在**触发器**中,配置规则以运行或跳过阶段。 - - 1. 单击**添加规则**。 - - 1. 选择触发阶段的**类型**并输入一个值。 - - | 类型 | 值 | - | ------ | -------------------------------------------------------------------- | - | 分支 | 触发阶段的分支名称。 | - | 事件 | 触发阶段的事件类型。可选值为 `Push`,`Pull Request` 和 `Tag`。 | - -1. 单击**保存**。 - -### 配置步骤触发器 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 在要管理触发器规则的仓库中,选择 **⋮ > 编辑配置**。 -1. 找到要用于管理触发规则的**步骤**,单击该步骤的**编辑**图标。 -1. 单击**显示高级选项**。 -1. 在**触发器**中,配置规则以运行或跳过步骤。 - - 1. 单击**添加规则**。 - - 1. 选择触发步骤的**类型**并输入一个值。 - - | 类型 | 值 | - | ------ | -------------------------------------------------------------------- | - | 分支 | 触发步骤的分支名称。 | - | 事件 | 触发步骤的事件类型。可选值为 `Push`,`Pull Request` 和 `Tag`。 | - -1. 单击**保存**。 - - -### 通过 YAML 配置触发器 - -```yaml -# 示例 -stages: - - name: Build something - # 阶段的条件 - when: - branch: master - event: [ push, pull_request ] - # 多个步骤并发运行 - steps: - - runScriptConfig: - image: busybox - shellScript: date -R - # 步骤条件 - when: - branch: [ master, dev ] - event: push -# 流水线的分支条件 -branch: - include: [ master, feature/*] - exclude: [ dev ] -``` - -## 环境变量 - -配置流水线时,某些[步骤类型](#步骤类型)会允许你使用环境变量来配置步骤的脚本。 - -### 通过 UI 配置环境变量 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 找到要编辑构建触发器的流水线,然后选择 **⋮ > 编辑配置**。 -1. 在其中一个阶段中,找到要为其添加环境变量的**步骤**,然后单击**编辑**图标。 -1. 单击**显示高级选项**。 -1. 单击**添加变量**,然后在出现的字段中输入键和值。根据需要添加更多的变量。 -1. 将你的环境变量添加到脚本或文件中。 -1. 单击**保存**。 - -### 通过 YAML 配置环境变量 - -```yaml -# 示例 -stages: - - name: Build something - steps: - - runScriptConfig: - image: busybox - shellScript: echo ${FIRST_KEY} && echo ${SECOND_KEY} - env: - FIRST_KEY: VALUE - SECOND_KEY: VALUE2 -``` - -## 密文 - -如果你需要在流水线脚本中使用安全敏感信息(如密码),你可以使用 Kubernetes [密文](../../how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md)来传入这些信息。 - -### 先决条件 -在与流水线相同的项目中创建一个密文,或者在运行流水线构建 pod 的命名空间中显式创建一个密文。 -
- -:::note - -[PR 事件](#触发器和触发器规则)中的密文传入是禁用的。 - -::: - -### 通过 UI 配置密文 - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 -1. 找到要编辑构建触发器的流水线,然后选择 **⋮ > 编辑配置**。 -1. 在其中一个阶段中,找到要使用密文的**步骤**,然后单击**编辑**图标。 -1. 单击**显示高级选项**。 -1. 单击**使用密文添加**。选择要使用的密文文件。然后选择密钥。或者,你也可以输入密钥的别名。 -1. 单击**保存**。 - -### 通过 YAML 配置密文 - -```yaml -# 示例 -stages: - - name: Build something - steps: - - runScriptConfig: - image: busybox - shellScript: echo ${ALIAS_ENV} - # 来自项目密文的环境变量 - envFrom: - - sourceName: my-secret - sourceKey: secret-key - targetKey: ALIAS_ENV -``` - -## 流水线变量替换参考 - -为了方便你的使用,我们提供了以下在流水线配置脚本中可以使用的变量。在流水线执行期间,这些变量会被元数据替换。你可以使用 `${VAR_NAME}` 格式引用这些变量。 - -| 变量名称 | 描述 | -------------------------|------------------------------------------------------------ -| `CICD_GIT_REPO_NAME` | 仓库名称(省略 GitHub 组织)。 | -| `CICD_GIT_URL` | Git 仓库的 URL。 | -| `CICD_GIT_COMMIT` | 正在执行的 Git commit ID。 | -| `CICD_GIT_BRANCH` | 此事件的 Git 分支。 | -| `CICD_GIT_REF` | 此事件的 Git 参考规范。 | -| `CICD_GIT_TAG` | Git 标签名称,在标签事件上设置。 | -| `CICD_EVENT` | 触发构建的事件(`push`、`pull_request` 或 `tag`)。 | -| `CICD_PIPELINE_ID` | 流水线的 Rancher ID。 | -| `CICD_EXECUTION_SEQUENCE` | 流水线的生成号(build number)。 | -| `CICD_EXECUTION_ID` | `{CICD_PIPELINE_ID}-{CICD_EXECUTION_SEQUENCE}` 的组合。 | -| `CICD_REGISTRY` | 上一个发布镜像步骤的 Docker 镜像仓库地址,可在`部署 YAML` 步骤的 Kubernetes 清单文件中找到。 | -| `CICD_IMAGE` | 上一个发布镜像步骤构建的镜像的名称,可在 `Deploy YAML` 步骤的 Kubernetes 清单文件中找到。不包含镜像标签。

[示例](https://github.com/rancher/pipeline-example-go/blob/master/deployment.yaml) | - -## 全局流水线执行设置 - -配置版本控制提供商后,你可以在 Rancher 中全局配置流水线的几个执行选项。 - -### 更改流水线设置 - -:::note 先决条件: - -由于流水线应用已被弃用并替换为 Fleet,因此在使用流水线之前,你需要打开旧版功能的功能开关。请注意,我们不再支持 Kubernetes 1.21+ 中的流水线。 - -1. 在左上角,单击 **☰ > 全局设置**。 -1. 单击**功能开关**。 -1. 转到`旧版应用 `功能开关并单击 **⋮ > 激活**。 - -::: - -要编辑这些设置: - -1. 在左上角,单击 **☰ > 集群管理**。 -1. 转到要配置流水线的集群,然后单击 **Explore**。 -1. 在顶部导航栏的下拉菜单中,选择要配置流水线的项目。 -1. 在左侧导航栏中,单击**旧版应用 > 项目 > 流水线**。 - -- [Executor 配额](#executor-配额) -- [Executor 的资源配额](#executor-的资源配额) -- [自定义 CA](#自定义-ca) - -### Executor 配额 - -选择流水线 Executor 的最大数量。_executor 配额_ 决定了项目中可以同时运行多少个构建。如果触发的构建数量超过配额,后续构建将排队并等待空缺。默认情况下,配额为 `2`。如果配置为 `0` 或更小的值,则表示删除配额限制。 - -### Executor 的资源配额 - -为 Jenkins Agent 容器配置计算资源。当触发流水线执行时,会动态配置构建 pod 以运行你的 CI 任务。在底层,一个构建 pod 由一个 Jenkins Agent 容器和一个用于各个流水线步骤的容器组成。你可以为 pod 中的每个容器[管理计算资源](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/)。 - -编辑**内存预留**、**内存限制**、**CPU 预留**或 **CPU 限制**,然后点击**更新限制和预留**。 - -要为流水线步骤容器配置计算资源: - -你可以在 `.rancher-pipeline.yml` 文件中为流水线步骤容器配置计算资源。 - -在步骤中,你需要提供以下信息: - -* **CPU 预留 (`CpuRequest`)**:对流水线步骤的容器的 CPU 请求。 -* **CPU 预留 (`CpuRequest`)**:对流水线步骤的容器的 CPU 限制。 -* **内存预留 (`MemoryRequest`)**:对流水线步骤的容器的内存请求。 -* **内存限制(`MemoryLimit`)**:对流水线步骤的容器的内存限制。 - -```yaml -# 示例 -stages: - - name: Build something - steps: - - runScriptConfig: - image: busybox - shellScript: ls - cpuRequest: 100m - cpuLimit: 1 - memoryRequest:100Mi - memoryLimit: 1Gi - - publishImageConfig: - dockerfilePath: ./Dockerfile - buildContext: . - tag: repo/app:v1 - cpuRequest: 100m - cpuLimit: 1 - memoryRequest:100Mi - memoryLimit: 1Gi -``` - -:::note - -Rancher 为流水线步骤设置了默认计算资源(`构建和发布镜像`和`运行脚本`步骤除外)。你可以通过指定计算资源来覆盖默认值。 - -::: - -### 自定义 CA - -如果你想将版本控制提供商与自定义/内部 CA 根证书一起使用,则需要将 CA 根证书添加到版本控制提供商的配置中,从而让流水线构建 pod 成功运行。 - -1. 单击**编辑证书**。 - -1. 粘贴 CA 根证书并单击**保存 CA 证书**。 - -**结果**:你现在可以使用流水线,而且新的 pod 将能够使用自签名证书。 - -# 流水线组件的持久化数据 - -默认情况下,内部 Docker 镜像仓库和 Minio 工作负载都使用临时卷。这是开箱即用的默认存储方式,能让测试变得更加便利。但如果运行 Docker 镜像仓库或 Minio 的节点出现故障,你将丢失构建镜像和构建日志。在大多数情况下,这不是太大的问题。如果你希望构建镜像和日志能够在节点故障中幸免于难,你可以让 Docker 镜像仓库和 Minio 使用持久卷。 - -有关为流水线设置持久存储的详细信息,请参阅[此页面](configure-persistent-data.md)。 - -## 示例 rancher-pipeline.yml - -如果你需要查看示例流水线配置文件,请参见[此页面](example-yaml.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/architecture-recommendations.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/architecture-recommendations.md index a7a69a0e642..bfc319cbe09 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/architecture-recommendations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/architecture-recommendations.md @@ -4,7 +4,7 @@ title: 架构推荐 如果你准备在单个节点上安装 Rancher,我们推荐你[分开部署 Rancher 与下游集群](#分开部署-rancher-与下游集群)。 -# 分开部署 Rancher 与下游集群 +## 分开部署 Rancher 与下游集群 下游集群,是运行你自己的应用和服务的下游 Kubernetes 集群。 @@ -14,7 +14,7 @@ title: 架构推荐 ![分开部署 Rancher Server 与下游集群](/img/rancher-architecture-separation-of-rancher-server.svg) -# 为什么高可用(HA)更适合生产环境中的 Rancher +## 为什么高可用(HA)更适合生产环境中的 Rancher 我们建议在高可用 Kubernetes 集群上安装 Rancher Server,以保护 Rancher Server 的数据。在高可用安装中,负载均衡器充当客户端的单点入口,并在集群中的多台服务器之间分配网络流量,这有助于防止任何一台服务器成为单点故障。 @@ -36,7 +36,7 @@ title: 架构推荐 ![运行 Rancher Management Server 的 RKE Kubernetes 集群的架构](/img/rke-server-storage.svg) -# Kubernetes 安装的负载均衡器推荐配置 +## Kubernetes 安装的负载均衡器推荐配置 我们建议你为负载均衡器和 Ingress Controller 使用以下配置: @@ -49,13 +49,13 @@ title: 架构推荐 ![Rancher HA](/img/ha/rancher2ha.svg) -# Kubernetes 安装环境 +## Kubernetes 安装环境 我们强烈建议你把 Rancher 安装到托管在云提供商(如 AWS EC2 和 Google Compute Engine(GCE)等)上的 Kubernetes 集群上。 为了达到最佳性能和安全性,我们建议你为 Rancher Management Server 创建一个专用的 Kubernetes 集群。不建议在此集群上运行用户工作负载。部署 Rancher 后,你可以[创建或导入集群](../../pages-for-subheaders/kubernetes-clusters-in-rancher-setup.md)来运行你的工作负载。 -# Kubernetes 安装的推荐节点角色 +## Kubernetes 安装的推荐节点角色 如果 Rancher 安装在 K3s Kubernetes 或 RKE Kubernetes 集群上,以下建议适用。 @@ -97,7 +97,7 @@ RKE 每个角色至少需要一个节点,但并不强制每个节点只能有 有关下游集群的最佳实践,请查看[生产环境清单](../../pages-for-subheaders/checklist-for-production-ready-clusters.md)或[最佳实践](../../pages-for-subheaders/best-practices.md)。 -# 授权集群端点架构 +## 授权集群端点架构 如果你使用[授权集群端点(ACE)](../../pages-for-subheaders/rancher-manager-architecture.md#4-授权集群端点),我们建议你创建一个指向负载均衡器的 FQDN,这个负载均衡器把流量转到所有角色为 `controlplane` 的节点。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md index 76f4a68dfaf..353d90a6661 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md @@ -75,7 +75,7 @@ Cluster Agent,也叫做 `cattle-cluster-agent`,是运行在下游集群中 如果 Rancher 出现问题,你需要使用此 kubeconfig 文件中定义的上下文来访问集群。因此,我们建议你导出 kubeconfig 文件,以便在 Rancher 出现问题时,仍能使用文件中的凭证访问集群。详情请参见使用 [kubectl 和 kubeconfig 文件](../../how-to-guides/new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md)访问集群的章节。 -# 重要文件 +## 重要文件 维护、排除问题和升级集群需要用到以下文件,请妥善保管这些文件: @@ -87,7 +87,7 @@ Cluster Agent,也叫做 `cattle-cluster-agent`,是运行在下游集群中 有关在没有 Rancher 认证代理和其他配置选项的情况下连接到集群的更多信息,请参见 [kubeconfig 文件](../../how-to-guides/new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md)。 -# 配置 Kubernetes 集群的工具 +## 配置 Kubernetes 集群的工具 Rancher 使用什么工具配置下游集群,取决于集群的类型。 @@ -113,7 +113,7 @@ Rancher 使用 [kontainer-engine](https://github.com/rancher/kontainer-engine) 这种情况下,Rancher 需要连接到一个设置好的 Kubernetes 集群。因此,Rancher 不提供 Kubernetes,只设置 Rancher Agent 实现与集群通信。 -# Rancher Server 组件和源码 +## Rancher Server 组件和源码 下图展示了 Rancher Server 的组件: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/system-tools.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/system-tools.md index a56f8684bd8..ce21d6c41fd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/system-tools.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference-guides/system-tools.md @@ -8,11 +8,11 @@ title: 系统工具 ::: -# 日志 +## 日志 请使用 [logs-collector](https://github.com/rancherlabs/support-tools/tree/master/collection/rancher/v2.x/logs-collector) 来收集你的集群日志。 -# Stats +## Stats 如果要复制 stats 命令,你可以在集群节点上运行以下命令: @@ -26,6 +26,6 @@ title: 系统工具 /usr/bin/sar -u -r -F 1 1 ``` -# Remove +## Remove 请使用 [Rancher Cleanup](https://github.com/rancher/rancher-cleanup) 工具。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/shared-files/_cluster-capabilities-table.md b/i18n/zh/docusaurus-plugin-content-docs/current/shared-files/_cluster-capabilities-table.md index 1dac148eb45..c416039011e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/shared-files/_cluster-capabilities-table.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/shared-files/_cluster-capabilities-table.md @@ -15,7 +15,7 @@ | [在 Rancher 无法访问集群时清理 Kubernetes 组件](../how-to-guides/new-user-guides/manage-clusters/clean-cluster-nodes.md) | ✓ | | | | | [配置 Pod 安全策略](../how-to-guides/new-user-guides/manage-clusters/add-a-pod-security-policy.md) | ✓ | ✓ | | -1. 注册的 GKE 和 EKS 集群与从 Rancher UI 创建的 GKE 和 EKS 集群的可用选项一致。不同之处是,从 Rancher UI 中删除已注册的集群后,集群不会被销毁。 +1. 注册的 EKS、GKE 和 AKS 集群与从 Rancher UI 创建的 EKS、GKE 和 AKS 集群的可用选项一致。不同之处是,从 Rancher UI 中删除已注册的集群后,集群不会被销毁。 2. 无法编辑已注册的集群的集群配置选项([K3s 和 RKE2 集群](../how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters.md)除外)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md index 7aafae5e832..6c9a8d5291a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md @@ -4,7 +4,7 @@ title: Controlplane 节点故障排除 本文适用于具有 `controlplane` 角色的节点。 -# 检查 controlplane 容器是否正在运行 +## 检查 controlplane 容器是否正在运行 具有 `controlplane` 角色的节点上启动了三个容器: @@ -26,7 +26,7 @@ f3d287ca4549 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." bdf3898b8063 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." 3 hours ago Up 3 hours kube-controller-manager ``` -# controlplane 容器日志记录 +## controlplane 容器日志记录 :::note @@ -42,7 +42,7 @@ docker logs kube-controller-manager docker logs kube-scheduler ``` -# RKE2 Server 日志 +## RKE2 Server 日志 如果 Rancher 配置的 RKE2 集群无法与 Rancher 通信,你可以在下游集群中的 Server 节点上运行此命令,从而获取 RKE2 Server 日志: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md index f86039effd5..c2ee756591f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md @@ -4,7 +4,7 @@ title: nginx-proxy 故障排除 每个没有 `controlplane` 角色的节点上都部署了 `nginx-proxy` 容器。`nginx-proxy` 基于具有 `controlplane` 角色的可用节点来动态生成 NGINX 配置,从而提供对这些 `controlplane` 角色节点的访问。 -# 检查容器是否正在运行 +## 检查容器是否正在运行 该容器称为 `nginx-proxy`,它的状态应该是 `Up`。`Up` 后面显示的时间指的是容器运行的时间。 @@ -20,7 +20,7 @@ CONTAINER ID IMAGE COMMAND CREATED c3e933687c0e rancher/rke-tools:v0.1.15 "nginx-proxy CP_HO..." 3 hours ago Up 3 hours nginx-proxy ``` -# 检查生成的 NGINX 配置 +## 检查生成的 NGINX 配置 生成的配置包括了具有 `controlplane` 角色的节点的 IP 地址。你可以使用以下命令来检查配置: @@ -59,7 +59,7 @@ stream { } ``` -# nginx-proxy 容器日志记录 +## nginx-proxy 容器日志记录 容器的日志记录可能包含问题的信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md index 180e16a1d1c..ae6b283c056 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md @@ -4,7 +4,7 @@ title: Worker 节点和通用组件故障排除 本文包括了运行在所有角色节点上的组件,因此适用于每个节点。 -# 检查容器是否正在运行 +## 检查容器是否正在运行 具有 `worker` 角色的节点上启动了两个容器: @@ -24,7 +24,7 @@ CONTAINER ID IMAGE COMMAND a30717ecfb55 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." 3 hours ago Up 3 hours kubelet ``` -# 容器日志记录 +## 容器日志记录 容器的日志记录可能包含问题的信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/other-troubleshooting-tips/logging.md b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/other-troubleshooting-tips/logging.md index a58ee8b2b82..01747944e49 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/other-troubleshooting-tips/logging.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/troubleshooting/other-troubleshooting-tips/logging.md @@ -12,8 +12,10 @@ Rancher 使用了以下日志级别: ### 如何配置日志级别 -* Kubernetes 安装 +#### Kubernetes 安装 + * 配置 debug 日志级别 + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set debug; done @@ -24,6 +26,7 @@ $ kubectl -n cattle-system logs -l app=rancher -c rancher ``` * 配置 info 日志级别 + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set info; done @@ -32,8 +35,10 @@ OK OK ``` -* Docker 安装 +#### Docker 安装 + * 配置 debug 日志级别 + ``` $ docker exec -ti loglevel --set debug OK @@ -41,6 +46,7 @@ $ docker logs -f ``` * 配置 info 日志级别 + ``` $ docker exec -ti loglevel --set info OK diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md index 2b751f02074..3c81903d43a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/air-gapped-upgrades.md @@ -72,7 +72,7 @@ helm template rancher ./rancher-.tgz --output-dir . \ kubectl -n cattle-system apply -R -f ./rancher ``` -# 验证升级 +## 验证升级 登录 Rancher 以确认升级成功。 @@ -80,10 +80,10 @@ kubectl -n cattle-system apply -R -f ./rancher 升级后出现网络问题? -请参见[恢复集群网络](/versioned_docs/version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/namespace-migration.md)。 +请参见[恢复集群网络](../../../../version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/namespace-migration.md)。 ::: -# 已知升级问题 +## 已知升级问题 你可以在 [GitHub](https://github.com/rancher/rancher/releases) 发布说明以及 [Rancher 论坛](https://forums.rancher.com/c/announcements/12)中找到每个 Rancher 版本的已知问题。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rollbacks.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rollbacks.md index f438fcbd326..070f14df643 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rollbacks.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rollbacks.md @@ -100,7 +100,7 @@ helm rollback rancher 3 -n cattle-system ## 回滚到 Rancher 2.2-2.4 -要回滚到 2.5 之前的 Rancher 版本,参考此处的步骤[恢复备份 — Kubernetes 安装](/versioned_docs/version-2.0-2.4/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md)。如果恢复 Rancher Server 的集群的某个快照,Rancher 的版本以及状态均会恢复回到快照时的版本和状态。 +要回滚到 2.5 之前的 Rancher 版本,参考此处的步骤[恢复备份 — Kubernetes 安装](../../../../version-2.0-2.4/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md)。如果恢复 Rancher Server 的集群的某个快照,Rancher 的版本以及状态均会恢复回到快照时的版本和状态。 有关回滚 Docker 安装的 Rancher,请参见[本页](../other-installation-methods/rancher-on-a-single-node-with-docker/roll-back-docker-installed-rancher.md)。 @@ -112,4 +112,4 @@ helm rollback rancher 3 -n cattle-system ## 回滚到 Rancher 2.0-2.1 -我们不再支持回滚到 Rancher 2.0-2.1。回滚到这些版本的说明保留在[此处](/versioned_docs/version-2.0-2.4/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup/roll-back-to-v2.0-v2.1.md),仅用于无法升级到 v2.2 的情况。 +我们不再支持回滚到 Rancher 2.0-2.1。回滚到这些版本的说明保留在[此处](../../../../version-2.0-2.4/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup/roll-back-to-v2.0-v2.1.md),仅用于无法升级到 v2.2 的情况。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades.md index 127e6131018..de4ccb19218 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades.md @@ -27,7 +27,7 @@ kubeconfig 也可以通过 `--kubeconfig` 标签(详情请参见 https://helm. 本安装指南假定你使用的是 Helm 3。 -如果你使用 Helm 2,请参见 [Helm 2 迁移到 Helm 3 文档](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/)。如果你不能升级到 Helm 3,[Helm 2 升级页面](/versioned_docs/version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/helm2.md)提供了使用 Helm 2 升级的旧升级指南。 +如果你使用 Helm 2,请参见 [Helm 2 迁移到 Helm 3 文档](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/)。如果你不能升级到 Helm 3,[Helm 2 升级页面](../../../../version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/helm2.md)提供了使用 Helm 2 升级的旧升级指南。 ### 离线安装:推送镜像到私有镜像仓库 @@ -170,7 +170,7 @@ helm upgrade rancher rancher-/rancher \ 升级后出现网络问题? -请参见[恢复集群网络](/versioned_docs/version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/namespace-migration.md)。 +请参见[恢复集群网络](../../../../version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/namespace-migration.md)。 ::: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md index 26bf7e2d916..c7ebe5287f7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/helm-chart-options.md @@ -165,7 +165,7 @@ kubectl -n cattle-system create secret generic tls-ca-additional --from-file=ca- 有关使用私有仓库安装 Rancher 的详情,请参见[离线安装](../../../pages-for-subheaders/air-gapped-helm-cli-install.md)。 -# 外部 TLS 终止 +## 外部 TLS 终止 我们建议将负载均衡器配置为 4 层均衡,将普通 80/tcp 和 443/tcp 转发到 Rancher Management 集群节点。集群上的 Ingress Controller 会将端口 80 上的 HTTP 流量重定向到端口 443 上的 HTTPS。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/tls-settings.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/tls-settings.md index 3459988f584..25f5652fe6e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/tls-settings.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-references/tls-settings.md @@ -4,14 +4,14 @@ title: TLS 设置 更改默认 TLS 设置的方法取决于它的安装方式。 -# 在高可用 Kubernetes 集群中运行 Rancher +## 在高可用 Kubernetes 集群中运行 Rancher 当你在 Kubernetes 集群内安装 Rancher 时,TLS 会在集群的 Ingress Controller 上卸载。可用的 TLS 设置取决于使用的 Ingress Controller: * nginx-ingress-controller(RKE1 和 RKE2 默认):[默认的 TLS 版本和密码](https://kubernetes.github.io/ingress-nginx/user-guide/tls/#default-tls-version-and-ciphers)。 * traefik(K3s 默认):[TLS 选项](https://doc.traefik.io/traefik/https/tls/#tls-options)。 -# 在单个 Docker 容器中运行 Rancher +## 在单个 Docker 容器中运行 Rancher 默认 TLS 配置仅支持 TLS 1.2 和安全的 TLS 密码套件。你可以通过设置以下环境变量来更改此配置: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md index fb2a324345f..8468c6a5d6d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/installation-requirements/port-requirements.md @@ -11,7 +11,7 @@ import PortsImportedHosted from '@site/src/components/PortsImportedHosted' 为了确保能正常运行,Rancher 需要在 Rancher 节点和下游 Kubernetes 集群节点上开放一些端口。 -# Rancher 节点 +## Rancher 节点 下表列出了运行 Rancher Server 的节点之间需要开放的端口。 @@ -176,7 +176,7 @@ RKE2 server 需要开放端口 6443 和 9345 才能供集群中的其他节点 -# 下游 Kubernetes 集群节点 +## 下游 Kubernetes 集群节点 下游 Kubernetes 集群用于运行你的应用和服务。本节介绍了哪些端口需要在下游集群的节点上打开,以便 Rancher 能够与它们进行通信。 @@ -251,7 +251,7 @@ RKE2 server 需要开放端口 6443 和 9345 才能供集群中的其他节点 -# 其他端口注意事项 +## 其他端口注意事项 ### 常用端口 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md index 8a8e88a66ac..9dee02557c2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md @@ -74,7 +74,7 @@ Rancher Server 默认设计为安全的,并且需要 SSL/TLS 配置。 | `systemDefaultRegistry` | `` | 将 Rancher Server 配置成在配置集群时,始终从私有镜像仓库中拉取镜像。 | | `useBundledSystemChart` | `true` | 配置 Rancher Server 使用打包的 Helm System Chart 副本。[system charts](https://github.com/rancher/system-charts) 仓库包含所有 Monitoring,Logging,告警和全局 DNS 等功能所需的应用商店项目。这些 [Helm Chart](https://github.com/rancher/system-charts) 位于 GitHub 中。但是由于你处在离线环境,因此使用 Rancher 内置的 Chart 会比设置 Git mirror 容易得多。 | -### 3. 渲染 Rancher Helm 模板 +### 3. 获取 Cert-Manager Chart 根据你在[2:选择 SSL 配置](#2-选择-ssl-配置)中的选择,完成以下步骤之一: @@ -112,30 +112,62 @@ v2.6.4 兼容 cert-manager 版本 1.6.2 和 1.7.1。推荐使用 v1.7.x,因为 helm fetch jetstack/cert-manager --version v1.7.1 ``` -##### 3. 渲染 cert-manager 模板 -使用你想用来安装 Chart 的选项来渲染 cert-manager 模板。记住要设置 `image.repository` 选项,以从你的私有镜像仓库拉取镜像。此操作会创建一个包含 Kubernetes manifest 文件的 `cert-manager` 目录。 - -```plain -helm template cert-manager ./cert-manager-v1.7.1.tgz --output-dir . \ - --namespace cert-manager \ - --set image.repository=/quay.io/jetstack/cert-manager-controller \ - --set webhook.image.repository=/quay.io/jetstack/cert-manager-webhook \ - --set cainjector.image.repository=/quay.io/jetstack/cert-manager-cainjector \ - --set startupapicheck.image.repository=/quay.io/jetstack/cert-manager-ctl -``` - -##### 4. 下载 cert-manager CRD +##### 3. 检索 Cert-Manager CRD 为 cert-manager 下载所需的 CRD 文件: ```plain curl -L -o cert-manager/cert-manager-crd.yaml https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/cert-manager.crds.yaml ``` -##### 5. 渲染 Rancher 模板 +### 4. 安装 Rancher -渲染 Rancher 模板来声明你的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 +将获取的 Chart 复制到有权访问 Rancher Server 集群的系统以完成安装。 +##### 1. 安装 Cert-Manager + +使用要用于安装 Chart 的选项来安装 cert-manager。记住要设置 `image.repository` 选项,以从你的私有镜像仓库拉取镜像。此操作会创建一个包含 Kubernetes manifest 文件的 `cert-manager` 目录。 + +
+ 单击展开 + +如果你使用自签名证书,安装 cert-manager: + +1. 为 cert-manager 创建命名空间: + + ```plain + kubectl create namespace cert-manager + ``` + +2. 创建 cert-manager CustomResourceDefinition (CRD)。 + + ```plain + kubectl apply -f cert-manager/cert-manager-crd.yaml + ``` + +3. 安装 cert-manager。 + + ```plain + helm install cert-manager ./cert-manager-v1.7.1.tgz \ + --namespace cert-manager \ + --set image.repository=/quay.io/jetstack/cert-manager-controller \ + --set webhook.image.repository=/quay.io/jetstack/cert-manager-webhook \ + --set cainjector.image.repository=/quay.io/jetstack/cert-manager-cainjector \ + --set startupapicheck.image.repository=/quay.io/jetstack/cert-manager-ctl + ``` + +
+ +##### 2. 安装 Rancher +首先,参见[添加 TLS 密文](../../resources/add-tls-secrets.md)发布证书文件,以便 Rancher 和 Ingress Controller 可以使用它们。 + +然后,使用 kubectl 为 Rancher 创建命名空间: + +```plain +kubectl create namespace cattle-system +``` + +然后安装 Rancher,并声明你选择的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 | 占位符 | 描述 | ------------|------------- @@ -145,8 +177,7 @@ curl -L -o cert-manager/cert-manager-crd.yaml https://github.com/cert-manager/ce | `` | 在 K8s 集群上运行的 cert-manager 版本。 | ```plain -helm template rancher ./rancher-.tgz --output-dir . \ - --no-hooks \ # 避免生成 Helm 钩子文件 + helm install rancher ./rancher-.tgz \ --namespace cattle-system \ --set hostname= \ --set certmanager.version= \ @@ -159,14 +190,13 @@ helm template rancher ./rancher-.tgz --output-dir . \ #### 选项 B:使用 Kubernetes 密文从文件中获取证书 - ##### 1. 创建密文 使用你自己的证书来创建 Kubernetes 密文,以供 Rancher 使用。证书的 common name 需要与以下命令中的 `hostname` 选项匹配,否则 Ingress Controller 将无法为 Rancher 配置站点。 -##### 2. 渲染 Rancher 模板 +##### 2. 安装 Rancher -渲染 Rancher 模板来声明你的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 +安装 Rancher,并声明你选择的选项。参考下表来替换每个占位符。Rancher 需要配置为使用私有镜像仓库,以便配置所有 Rancher 启动的 Kubernetes 集群或 Rancher 工具。 | 占位符 | 描述 | | -------------------------------- | ----------------------------------------------- | @@ -175,8 +205,7 @@ helm template rancher ./rancher-.tgz --output-dir . \ | `` | 你的私有镜像仓库的 DNS 名称。 | ```plain - helm template rancher ./rancher-.tgz --output-dir . \ - --no-hooks \ # 避免生成 Helm 钩子文件 + helm install rancher ./rancher-.tgz --output-dir . \ --namespace cattle-system \ --set hostname= \ --set rancherImage=/rancher/rancher \ @@ -188,8 +217,7 @@ helm template rancher ./rancher-.tgz --output-dir . \ 如果你使用的是私有 CA 签名的证书,请在 `--set ingress.tls.source=secret` 后加上 `--set privateCA=true`: ```plain - helm template rancher ./rancher-.tgz --output-dir . \ - --no-hooks \ # 避免生成 Helm 钩子文件 + helm install rancher ./rancher-.tgz --output-dir . \ --namespace cattle-system \ --set hostname= \ --set rancherImage=/rancher/rancher \ @@ -199,55 +227,8 @@ helm template rancher ./rancher-.tgz --output-dir . \ --set useBundledSystemChart=true # 使用打包的 Rancher System Chart ``` -**可选**:如需安装特定的 Rancher 版本,设置`rancherImageTag` 的值,例如:`--set rancherImageTag=v2.3.6` -然后,参见[添加 TLS 密文](../../resources/add-tls-secrets.md)发布证书文件,以便 Rancher 和 Ingress Controller 可以使用它们。 - -### 4. 安装 Rancher - -将渲染的 manifest 目录复制到可以访问 Rancher Server 集群的系统中,以完成安装。 - -使用 `kubectl` 来创建命名空间和应用渲染的 manifest。 - -如果你使用自签名证书(在[选项B. 选择 SSL 配置](#b-选择-ssl-配置)中),安装 cert-manager。 - -#### 自签名证书安装 - 安装 Cert-manager - -
- 单击展开 - -如果你使用自签名证书,安装 cert-manager: - -1. 为 cert-manager 创建命名空间: - ```plain - kubectl create namespace cert-manager - ``` -2. 创建 cert-manager CustomResourceDefinition (CRD)。 - ```plain - kubectl apply -f cert-manager/cert-manager-crd.yaml - ``` - - :::note - - 如果你运行的 Kubernetes 版本是 1.15 或更低版本,你需要在以上的 `kubectl apply` 命令中添加 `--validate=false`,否则你将看到 cert-manager CRD 资源中的 `x-kubernetes-preserve-unknown-fields` 字段校验错误提示。这是 kubectl 执行资源校验方式产生的良性错误。 - - ::: - -3. 启动 cert-manager. - ```plain - kubectl apply -R -f ./cert-manager - ``` - -
- -#### 使用 kubectl 安装 Rancher - -```plain -kubectl create namespace cattle-system -kubectl -n cattle-system apply -R -f ./rancher -``` 安装已完成。 - :::caution 如果你不想发送遥测数据,在首次登录时退出[遥测](../../../../faq/telemetry.md)。如果在离线安装的环境中让这个功能处于 active 状态,socket 可能无法打开。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md index 3114616d4f2..20e726f6fb4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md @@ -127,7 +127,7 @@ chmod +x rancher-load-images.sh 如果你的 Rancher Server 将用于配置 Linux 和 Windows 集群,你需要执行不同的步骤,来将 Windows 镜像和 Linux 镜像推送到你的私有镜像仓库。由于 Windows 集群同时包含 Linux 和 Windows 节点,因此推送到私有镜像仓库的 Linux 镜像是 Manifest。 -# Windows 步骤 +## Windows 步骤 从 Windows Server 工作站中收集和推送 Windows 镜像。 @@ -206,7 +206,7 @@ chmod +x rancher-load-images.sh ./rancher-load-images.ps1 --registry ``` -# Linux 步骤 +## Linux 步骤 Linux 镜像需要在 Linux 主机上收集和推送,但是你必须先将 Windows 镜像推送到私有镜像仓库,然后再推送 Linux 镜像。由于被推送的 Linux 镜像实际上是支持 Windows 和 Linux 镜像的 manifest,因此涉及的步骤不同于只包含 Linux 节点的集群。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/rancher-on-a-single-node-with-docker/upgrade-docker-installed-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/rancher-on-a-single-node-with-docker/upgrade-docker-installed-rancher.md index dcdc1b9fc38..b0c5abca357 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/rancher-on-a-single-node-with-docker/upgrade-docker-installed-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/other-installation-methods/rancher-on-a-single-node-with-docker/upgrade-docker-installed-rancher.md @@ -383,7 +383,7 @@ docker run -d --volumes-from rancher-data \ :::note 升级后下游集群出现网络问题? -请参见[恢复集群网络](/versioned_docs/version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/namespace-migration.md)。 +请参见[恢复集群网络](../../../../../version-2.0-2.4/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades/namespace-migration.md)。 ::: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/add-tls-secrets.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/add-tls-secrets.md index 9225f07630e..06e1d1b5f54 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/add-tls-secrets.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/add-tls-secrets.md @@ -23,7 +23,7 @@ kubectl -n cattle-system create secret tls tls-rancher-ingress \ ::: -# 使用私有 CA 签名证书 +## 使用私有 CA 签名证书 如果你使用的是私有 CA,Rancher 需要你提供 CA 证书的副本,用来校验 Rancher Agent 与 Server 的连接。 @@ -40,6 +40,6 @@ Rancher 启动时会检索配置的 `tls-ca` 密文。如果 Rancher 在运行 ::: -# 更新私有 CA 证书 +## 更新私有 CA 证书 按照[步骤](update-rancher-certificate.md)更新 [Rancher 高可用 Kubernetes 安装](../../../pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md)中的 Ingress,或从默认自签名证书切换到自定义证书。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/helm-version-requirements.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/helm-version-requirements.md index 273711a4de0..9c6bfed34ab 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/helm-version-requirements.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/helm-version-requirements.md @@ -4,7 +4,7 @@ title: Helm 版本要求 本文介绍 Helm 的要求。Helm 是用于把 Rancher 安装在高可用 Kubernetes 集群上的工具。 -> 我们已针对 Helm 3 更新了安装指南。如果你使用 Helm 2 进行安装,请参见 [Helm 2 迁移到 Helm 3 文档](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/)。[本文](/versioned_docs/version-2.0-2.4/pages-for-subheaders/helm2.md)提供了较早的使用 Helm 2 的 Rancher 高可用安装指南的副本。如果你如果无法升级到 Helm 3,可以使用这个说明安装。 +> 我们已针对 Helm 3 更新了安装指南。如果你使用 Helm 2 进行安装,请参见 [Helm 2 迁移到 Helm 3 文档](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/)。[本文](../../../../version-2.0-2.4/pages-for-subheaders/helm2.md)提供了较早的使用 Helm 2 的 Rancher 高可用安装指南的副本。如果你如果无法升级到 Helm 3,可以使用这个说明安装。 - 如需安装或升级 Rancher 2.5,请使用 Helm 3.2.x 或更高版本。 - Kubernetes 1.16 要求 Helm 2.16.0 或更高版本。如果使用的是默认 Kubernetes 版本,请参见[发行说明](https://github.com/rancher/rke/releases)获取所使用的 RKE 版本。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/local-system-charts.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/local-system-charts.md index 887a7aa23d4..d4337ae9182 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/local-system-charts.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/local-system-charts.md @@ -6,7 +6,7 @@ title: 离线安装中设置本地 System Charts 在 Rancher 的离线安装中,你需要配置 Rancher 以使用 System Charts 的本地副本。本节介绍如何通过 CLI 标志使用本地 System Charts。 -# 使用本地 System Charts +## 使用本地 System Charts `system-charts` 的一个本地副本已经打包到 `rancher/rancher` 容器中。为了在离线安装中使用这些功能,你需要使用额外的环境变量 `CATTLE_SYSTEM_CATALOG=bundled` 来运行 Rancher 安装命令,该环境变量告诉 Rancher 使用 Chart 的本地副本,而不是尝试从 GitHub 获取 Chart。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md index 5dda1dd1f4d..87c3b7e2aae 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/update-rancher-certificate.md @@ -2,7 +2,7 @@ title: 更新 Rancher 证书 --- -# 更新私有 CA 证书 +## 更新私有 CA 证书 本文介绍如何更新 Rancher [高可用 Kubernetes 安装](../../../pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md) 中 Ingress 的 SSL 证书,以及如何从默认的自签名证书切换到自定义证书。 @@ -16,7 +16,7 @@ title: 更新 Rancher 证书 各个步骤的详细说明如下。 -## 1. 创建/更新证书密文资源 +### 1. 创建/更新证书密文资源 首先,将服务器证书和所有中间证书合并到名为 `tls.crt` 的文件,并在名为 `tls.key` 的文件中提供相应的证书密钥。 @@ -37,7 +37,7 @@ $ kubectl -n cattle-system create secret tls tls-rancher-ingress \ --dry-run --save-config -o yaml | kubectl apply -f - ``` -## 2. 创建/更新证书 CA 密文资源 +### 2. 创建/更新证书 CA 密文资源 如果新证书由私有 CA 签发的,你需要将相应的根 CA 证书复制到名为 `cacerts.pem` 的文件中,并创建或更新 `cattle-system` 命名空间中的 `tls-ca` 密文。如果证书由中间 CA 签名,则 `cacerts.pem` 必须按顺序同时包含中间 CA 证书和根 CA 证书。 @@ -56,7 +56,7 @@ $ kubectl -n cattle-system create secret generic tls-ca \ --dry-run --save-config -o yaml | kubectl apply -f - ``` -## 3. 重新配置 Rancher 部署 +### 3. 重新配置 Rancher 部署 :::note @@ -95,18 +95,18 @@ helm upgrade rancher rancher-stable/rancher \ 升级完成后,访问 `https:///v3/settings/cacerts`,验证该值是否与先前写入 `tls-ca` 密文中的 CA 证书匹配。 -## 4. 重新配置 Rancher Agent 以信任私有 CA +### 4. 重新配置 Rancher Agent 以信任私有 CA 本节介绍了重新配置 Rancher Agent 以信任私有 CA 的三种方法。如果你的实际情况符合以下任意一个条件,请执行此步骤: - Rancher 初始配置中使用了 Rancher 自签名证书 (`ingress.tls.source=rancher`) 或 Let's Encrypt 证书 (`ingress.tls.source=letsEncrypt`)。 - 新自定义证书的根 CA 证书已更改。 -### 为什么要执行这一步骤? +#### 为什么要执行这一步骤? 如果 Rancher 配置了私有 CA 签名的证书时,CA 证书链会下载到 Rancher Agent 容器中。代理会对下载证书的校验和及 `CATTLE_CA_CHECKSUM` 环境变量进行比较。如果私有 CA 证书在 Rancher Server 端更改了,环境变量 `CATTLE_CA_CHECKSUM` 必须相应进行更新。 -### 可使用的方法 +#### 可使用的方法 - 方法 1(最简单的方法): 在轮换证书后将所有集群连接到 Rancher。适用于更新 Rancher 部署(步骤 3)后立即执行的情况。 @@ -115,7 +115,7 @@ helm upgrade rancher rancher-stable/rancher \ - 方法 3:方法 1 和方法 2 不可用的情况下可使用。 -### 方法 1:Kubectl 命令 +#### 方法 1:Kubectl 命令 对于**集群管理**中的每个集群(除去 `local` Rancher 管理集群),使用 Rancher 管理集群(RKE 或 K3S)的 `Kubeconfig` 文件运行以下命令: @@ -126,7 +126,7 @@ kubectl patch clusters.management.cattle.io -p '{"statu 这个命令能使所有 Agent Kubernetes 资源使用新证书的校验和重新配置。 -### 方法 2:手动更新校验和 +#### 方法 2:手动更新校验和 通过将 `CATTLE_CA_CHECKSUM` 环境变量更新为匹配新 CA 证书校验和的值,来手动为 Agent Kubernetes 资源打上补丁。通过以下操作生成新的校验和: @@ -142,7 +142,7 @@ $ kubectl edit -n cattle-system ds/cattle-node-agent $ kubectl edit -n cattle-system deployment/cattle-cluster-agent ``` -### 方法 3:重新创建 Rancher Agent +#### 方法 3:重新创建 Rancher Agent 你可以在每个下游集群的 controlplane 节点上运行一组命令,来重新创建 Rancher Agent。 @@ -151,15 +151,15 @@ $ kubectl edit -n cattle-system deployment/cattle-cluster-agent 然后,SSH 连接到下游集群的 controlplane 节点,创建 Kubeconfig 并应用定义(参见[此处]( https://gist.github.com/superseb/b14ed3b5535f621ad3d2aa6a4cd6443b))。 -## 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher +### 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher 在 Rancher UI 的[持续交付](../../../how-to-guides/new-user-guides/deploy-apps-across-clusters/fleet.md#在-rancher-ui-中访问-fleet)中,为集群选择“强制更新”,来允许下游集群中的 fleet-agent 成功连接到 Rancher。 -### 为什么要执行这一步骤? +#### 为什么要执行这一步骤? Rancher 管理的集群中的 Fleet agent 存储 kubeconfig,该配置用于连接到 Fleet 系统命名空间的 fleet-agent 密文中的 Rancher 代理 kube-api。kubeconfig 包括一个包含 Rancher CA 的证书授权数据块。更改 Rancher CA 时,需要更新此块来使 fleet-agent 成功连接到 Rancher。 -# 将私有 CA 证书更改为通用证书 +## 将私有 CA 证书更改为通用证书 :::note @@ -167,7 +167,7 @@ Rancher 管理的集群中的 Fleet agent 存储 kubeconfig,该配置用于连 ::: -## 1. 创建/更新证书密文资源 +### 1. 创建/更新证书密文资源 首先,将服务器证书和所有中间证书合并到名为 `tls.crt` 的文件,并在名为 `tls.key` 的文件中提供相应的证书密钥。 @@ -188,7 +188,7 @@ $ kubectl -n cattle-system create secret tls tls-rancher-ingress \ --dry-run --save-config -o yaml | kubectl apply -f - ``` -## 2. 删除 CA 证书密文资源 +### 2. 删除 CA 证书密文资源 你需要删除 `cattle-system` 命名空间中的 `tls-ca secret`(不再需要它)。如果需要,你还可以选择保存 `tls-ca secret` 的副本。 @@ -204,7 +204,7 @@ kubectl -n cattle-system get secret tls-ca -o yaml > tls-ca.yaml kubectl -n cattle-system delete secret tls-ca ``` -## 3. 重新配置 Rancher 部署 +### 3. 重新配置 Rancher 部署 :::note 重要提示: @@ -250,14 +250,14 @@ helm upgrade rancher rancher-stable/rancher \ set privateCA=false ``` -## 4. 为非私有/通用证书重新配置 Rancher Agent +### 4. 为非私有/通用证书重新配置 Rancher Agent 下游集群 Agent 上的 `CATTLE_CA_CHECKSUM` 环境变量应该被删除或设置为“”(一个空字符串)。 -## 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher +### 5. 选择 Fleet 集群的强制更新,来将 fleet-agent 连接到 Rancher 在 Rancher UI 的[持续交付](../../../how-to-guides/new-user-guides/deploy-apps-across-clusters/fleet.md#在-rancher-ui-中访问-fleet)中,为集群选择“强制更新”,来允许下游集群中的 fleet-agent 成功连接到 Rancher。 -### 为什么要执行这一步骤? +#### 为什么要执行这一步骤? Rancher 管理的集群中的 Fleet agent 存储 kubeconfig,该配置用于连接到 Fleet 系统命名空间的 fleet-agent 密文中的 Rancher 代理 kube-api。kubeconfig 包括一个包含 Rancher CA 的证书授权数据块。更改 Rancher CA 时,需要更新此块来使 fleet-agent 成功连接到 Rancher。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md index 02c62205ca5..f76e51b15bf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/installation-and-upgrade/resources/upgrade-cert-manager.md @@ -19,7 +19,7 @@ Rancher 使用 cert-manager 为 Rancher 高可用部署自动生成和续期 TLS ::: -# 升级 Cert-Manager +## 升级 Cert-Manager 以下说明中使用的命名空间是由当前安装了 cert-manager 的命名空间决定的。如果它在 kube-system 中,在以下说明步骤中使用。你可以运行 `kubectl get pods --all-namespaces` 来验证,并检查 cert-manager-\* pods 列在哪个命名空间中。不要更改运行 cert-manager 的命名空间,否则可能会出现错误。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/overview.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/overview.md index 5f8c0cc89bb..4e0414b2630 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/overview.md @@ -4,11 +4,11 @@ title: 概述 Rancher 是一个为使用容器的公司打造的容器管理平台。Rancher 使得开发者可以随处运行 Kubernetes(Run Kubernetes Everywhere),满足 IT 需求规范,赋能 DevOps 团队。 -# Run Kubernetes Everywhere +## Run Kubernetes Everywhere Kubernetes 已经成为容器编排标准。现在,大多数云和虚拟化提供商都提供容器编排服务。Rancher 用户可以选择使用 Rancher Kubernetes Engine(RKE)或云 Kubernetes 服务(例如 GKE、AKS 和 EKS)创建 Kubernetes 集群,还可以导入和管理使用任何 Kubernetes 发行版或安装程序创建的现有 Kubernetes 集群。 -# 满足 IT 需求规范 +## 满足 IT 需求规范 Rancher 支持对其控制的所有 Kubernetes 集群进行集中认证、访问控制和监控。例如,你可以: @@ -16,7 +16,7 @@ Rancher 支持对其控制的所有 Kubernetes 集群进行集中认证、访问 - 设置所有用户、组、项目、集群和云服务的权限控制策略和安全策略。 - 一站式查看 Kubernetes 集群的运行状况和容量。 -# 赋能 DevOps 团队 +## 赋能 DevOps 团队 Rancher 为 DevOps 工程师提供简单直接的用户界面,以管理其应用负载。用户不需要对 Kubernetes 有非常深入的了解,即可使用 Rancher。Rancher 应用商店包含一套实用的 DevOps 开发工具。Rancher 获得了多种云原生生态系统产品的认证,包括安全工具、监控系统、容器镜像仓库、存储和网络驱动等。 @@ -24,7 +24,7 @@ Rancher 为 DevOps 工程师提供简单直接的用户界面,以管理其应 ![平台](/img/platform.png) -# Rancher API Server 的功能 +## Rancher API Server 的功能 Rancher API Server 是基于嵌入式 Kubernetes API Server 和 etcd 数据库建立的,它提供了以下功能: @@ -52,7 +52,7 @@ Rancher API Server 是基于嵌入式 Kubernetes API Server 和 etcd 数据库 - **监控**:你可以使用 Rancher,通过业界领先并开源的 Prometheus 来监控集群节点、Kubernetes 组件和软件部署的状态和进程。 - **告警**:为了保证集群和应用的正常运行,提高公司的生产效率,你需要随时了解集群和项目的计划内和非计划事件。 -# 使用 Rancher 编辑下游集群 +## 使用 Rancher 编辑下游集群 对于已有集群而言,可提供的选项和设置取决于你配置集群的方法。例如,只有[通过 RKE 启动](../pages-for-subheaders/launch-kubernetes-with-rancher.md)的集群才有可编辑的**集群选项**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md index 0267b3433d9..6b2acce89b1 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/getting-started/quick-start-guides/deploy-rancher-manager/aws-marketplace.md @@ -3,4 +3,4 @@ title: Rancher AWS Marketplace 快速入门 description: 使用 Amazon EKS 部署 Rancher Server。 --- -你可以在 AWS 中使用 Amazon EKS 部署 Rancher Server。详情请参见我们的 [Amazon Marketplace 列表](https://aws.amazon.com/marketplace/pp/prodview-2yzbnvagmi4as)。 \ No newline at end of file +你可以在 AWS 中使用 Amazon EKS 部署 Rancher Server。详情请参见我们的 [Amazon Marketplace 列表](https://aws.amazon.com/marketplace/pp/prodview-go7ent7goo5ae)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md index d0b33bd6611..c44447ac47c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/enable-istio-in-cluster.md @@ -24,6 +24,6 @@ title: 1. 在集群中启用 Istio **结果**:已在集群级别安装 Istio。 -# 其他配置选项 +## 其他配置选项 有关配置 Istio 的更多信息,请参阅[配置参考](../../../pages-for-subheaders/configuration-options.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md index 7439d9b1f8a..a6d77763919 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/generate-and-view-traffic.md @@ -4,7 +4,7 @@ title: 6. 生成和查看流量 本文介绍如何查看 Istio 管理的流量。 -# Kiali 流量图 +## Kiali 流量图 Istio 概览页面提供了 Kiali 仪表板的链接。在 Kiali 仪表板中,你可以查看每个命名空间的图。Kiali 图提供了一种强大的方式来可视化 Istio 服务网格的拓扑。它显示了服务之间相互通信的情况。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md index 49d0130dbd6..42f89baa8ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/istio-setup-guide/set-up-istio-gateway.md @@ -16,7 +16,7 @@ title: 4. 设置 Istio Gateway ![启用 Istio 的集群可以有两个 ingress,分别是默认的 Nginx ingress 和默认的 Istio controller](/img/istio-ingress.svg) -# 启用 Istio Gateway +## 启用 Istio Gateway Ingress Gateway 是一个 Kubernetes 服务,将部署在你的集群中。Istio Gateway 支持更多自定义设置,更加灵活。 @@ -29,7 +29,7 @@ Ingress Gateway 是一个 Kubernetes 服务,将部署在你的集群中。Isti **结果**:已部署网关,将使用应用的规则来路由流量。 -# Istio Gateway 示例 +## Istio Gateway 示例 在演示工作负载示例时,我们在服务中添加 BookInfo 应用部署。接下来,我们添加一个 Istio Gateway,以便从集群外部访问该应用。 @@ -127,7 +127,7 @@ bookinfo-gateway 64m 如需检查 Istio 控制器 URL 和端口的帮助,请尝试运行 [Istio 文档](https://istio.io/docs/tasks/traffic-management/ingress/ingress-control/#determining-the-ingress-ip-and-ports)中的命令。 -# 故障排除 +## 故障排除 [官方 Istio 文档](https://istio.io/docs/tasks/traffic-management/ingress/ingress-control/#troubleshooting)建议使用 `kubectl` 命令来检查外部请求的正确 ingress 主机和 ingress 端口。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md index 9c7798ec320..9a3337ce3b6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/create-persistent-grafana-dashboard.md @@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem'; - [创建持久化 Grafana 仪表板](#创建持久化-grafana-仪表板) - [已知问题](#已知问题) -# 创建持久化 Grafana 仪表板 +## 创建持久化 Grafana 仪表板 @@ -144,7 +144,7 @@ helm.sh/resource-policy: "keep" -# 已知问题 +## 已知问题 如果你的 Monitoring V2 版本是 v9.4.203 或更低版本,卸载 Monitoring chart 将同时删除 `cattle-dashboards` 命名空间,所有持久化的仪表板将被删除(除非命名空间带有注释 `helm.sh/resource-policy: "keep"`)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md index 806a0f8e938..997a94916f5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md @@ -8,7 +8,7 @@ title: 启用 Monitoring 不论是否使用 SSL,你都可以启用 monitoring。 -# 要求 +## 要求 - 确保在每个节点上允许端口 9796 上的流量,因为 Prometheus 将从这里抓取指标。 - 确保你的集群满足资源要求。集群应至少有 1950Mi 可用内存、2700m CPU 和 50Gi 存储。要查看资源限制和请求的明细,请查看[此处](../../../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。 @@ -33,7 +33,7 @@ rkeEtcd: 有关默认限制的更多信息,请参阅[此页面](../../../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。 -# 安装 Monitoring 应用 +## 安装 Monitoring 应用 ### 在不使用 SSL 的情况下启用 Monitoring diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md index c2524ceb835..b83ad90b748 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md @@ -10,7 +10,7 @@ title: Prometheus 配置 ::: -# 关于 Prometheus 自定义资源 +## 关于 Prometheus 自定义资源 Prometheus CR 定义了所需的 Prometheus deployment。Prometheus Operator 会观察 Prometheus CR。当 CR 发生变化时,Prometheus Operator 会创建 `prometheus-rancher-monitoring-prometheus`,即根据 CR 配置的 Prometheus deployment。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md index 10d7b9e192b..fc12de7e488 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheusrules.md @@ -45,7 +45,7 @@ Prometheus 规则文件保存在 PrometheusRule 自定义资源中。PrometheusR 如需查看示例,请参阅 Prometheus 文档中的[记录规则](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)和[告警规则](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)。 -# 配置 +## 配置 ### 规则组 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md index 4810e841cab..7db812c38ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions.md @@ -6,7 +6,7 @@ title: 模板创建者权限 有关管理员权限的更多信息,请参阅[全局权限文档](../manage-role-based-access-control-rbac/global-permissions.md)。 -# 授予用户创建模板的权限 +## 授予用户创建模板的权限 只有具有**创建 RKE 模板**全局权限的用户才能创建模板。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md index 95ce9ef6b4e..ca4d522ba35 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config/configure-google-oauth.md @@ -8,7 +8,7 @@ title: 配置 Google OAuth 在 Rancher 中,只有具有 **Manage Authentication** [全局角色](../../authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md)的管理员或用户才能配置身份验证。 -# 先决条件 +## 先决条件 - 你必须配置了 [G Suite 管理员账号](https://admin.google.com)。 - G Suite 需要一个[顶级私有域 FQDN](https://github.com/google/guava/wiki/InternetDomainNameExplained#public-suffixes-and-private-domains) 作为授权域。获取 FQDN 的一种方法是在 Route53 中为 Rancher Server 创建 A 记录。你不需要使用该记录更新 Rancher Server 的 URL 设置,因为可能有集群使用该 URL。 @@ -17,7 +17,7 @@ title: 配置 Google OAuth 启用 Admin SDK API 后,你的 G Suite 域的 API 页面应如下图所示: ![Enable Admin APIs](/img/Google-Enable-APIs-Screen.png) -# 在 Rancher 中为 OAuth 设置 G Suite +## 在 Rancher 中为 OAuth 设置 G Suite 在 Rancher 中设置 Google OAuth 之前,你需要登录到你的 G Suite 账号并完成以下设置: @@ -93,7 +93,7 @@ title: 配置 Google OAuth **结果**:ServiceAccount 在你的 G Suite 账号中已注册为 OAuth 客户端。 -# 在 Rancher 中配置 Google OAuth +## 在 Rancher 中配置 Google OAuth 1. 使用分配了 [administrator](../../authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md) 角色的本地用户登录到 Rancher。这个用户也称为本地主体。 1. 在左上角,单击 **☰ > 用户 & 认证**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md index b0f58229191..dd82a6872cf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-microsoft-ad-federation-service-saml/configure-rancher-for-ms-adfs.md @@ -28,7 +28,7 @@ title: 2. 在 Rancher 中配置 Microsoft AD FS **结果**:已将 Rancher 配置为使用 AD FS。你的用户现在可以使用 AD FS 登录名登录 Rancher。 -# 配置 +## 配置 | 字段 | 描述 | |---------------------------|-----------------| diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md index 66eb56899f4..f218974b099 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-openldap/openldap-config-reference.md @@ -16,7 +16,7 @@ title: OpenLDAP 配置参考 3. 找到用户后,将使用用户的 DN 和提供的密码,通过另一个 LDAP 绑定请求对用户进行身份验证。 4. 身份验证成功后,Rancher 将基于用户对象的成员属性和配置的用户映射属性执行组搜索,来解析组成员。 -# OpenLDAP 服务器配置 +## OpenLDAP 服务器配置 你将需要输入地址,端口和协议来连接到 OpenLDAP 服务器。不安全流量的标准端口为 `389`,TLS 流量的标准端口为 `636`。 @@ -39,7 +39,7 @@ title: OpenLDAP 配置参考 | 用户搜索库 | 输入目录树中开始搜索用户对象的节点的标识名称(DN)。所有用户都必须是此基础标识名称的后代。例如,"ou=people,dc=acme,dc=com"。 | | 组搜索库 | 如果组位于`用户搜索库`下配置的节点之外的其他节点下,则需要在此处提供标识名称。否则,将此字段留空。例如:"ou=groups,dc=acme,dc=com"。 | -# 用户/组 Schema 配置 +## 用户/组 Schema 配置 如果你的 OpenLDAP 目录不同于标准的 OpenLDAP Schema,则必须完成**自定义 Schema** 部分实现匹配。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md index 2f9f6ab940d..825d334dc2c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding.md @@ -160,7 +160,7 @@ NavLink 自定义资源的 Kubernetes 标签。 需要提供 `toService` 或 `toURL` 指令中的一个。 -# 链接示例 +## 链接示例 ### `toUrl` 的链接示例 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md index 40f1ff8600d..f8773e33a26 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/back-up-rancher-launched-kubernetes-clusters.md @@ -8,7 +8,7 @@ Rancher 建议为所有生产集群配置定期 `etcd` 快照。此外,你还 etcd 数据库的快照会保存在 [etcd 节点](#本地备份目标)或 [S3 兼容目标](#s3-备份目标)上。配置 S3 的好处是,如果所有 etcd 节点都丢失了,你的快照会保存到远端并能用于恢复集群。 -# 快照工作原理 +## 快照工作原理 ### 快照组件 @@ -64,7 +64,7 @@ Rancher 在创建 RKE 集群的快照时,快照名称是基于快照创建类 4. 其他 etcd 节点会下载快照并验证校验和,以便都能使用相同的快照进行恢复。 5. 集群已恢复,恢复后的操作将在集群中完成。 -# 配置定期快照 +## 配置定期快照 选择创建定期快照的频率以及要保留的快照数量。时间的单位是小时。用户可以使用时间戳快照进行时间点恢复。 @@ -81,7 +81,7 @@ Rancher 在创建 RKE 集群的快照时,快照名称是基于快照创建类 | 定期 etcd 快照的创建周期 | 定期快照之间的间隔(以小时为单位) | 12 小时 | | 定期 etcd 快照的保留数量 | 要保留的快照数量 | 6 | -# 单次快照 +## 单次快照 除了定期快照之外,你可能还想创建“一次性”快照。例如,在升级集群的 Kubernetes 版本之前,最好备份集群的状态以防止升级失败。 @@ -91,7 +91,7 @@ Rancher 在创建 RKE 集群的快照时,快照名称是基于快照创建类 **结果**:根据你的[快照备份目标](#快照备份目标)创建一次性快照,并将其保存在选定的备份目标中。 -# 快照备份目标 +## 快照备份目标 Rancher 支持两种不同的备份目标: @@ -130,7 +130,7 @@ Rancher 支持两种不同的备份目标: 要授予应用对 S3 的访问权限,请参阅[使用 IAM 角色向在 Amazon EC2 实例上运行的应用授予权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html)的 AWS 文档。 -# 查看可用快照 +## 查看可用快照 Rancher UI 中提供了集群所有可用快照的列表: @@ -138,7 +138,7 @@ Rancher UI 中提供了集群所有可用快照的列表: 1. 在**集群**页面中,转到要查看快照的集群并单击其名称。 1. 单击**快照**选项卡来查看已保存快照的列表。这些快照包括创建时间的时间戳。 -# 安全时间戳 +## 安全时间戳 快照文件带有时间戳,从而简化使用外部工具和脚本处理文件的过程。但在某些与 S3 兼容的后端中,这些时间戳无法使用。 @@ -146,6 +146,6 @@ Rancher UI 中提供了集群所有可用快照的列表: 此选项不能直接在 UI 中使用,只能通过`以 YAML 文件编辑`使用。 -# 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 +## 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 如果你有使用 v2.2.0 之前版本创建的 Rancher 启动的 Kubernetes 集群,升级 Rancher 后,你必须[编辑集群](../../../pages-for-subheaders/cluster-configuration.md)并 _保存_ 它,以启用更新的快照功能。即使你已经在 v2.2.0 之前创建了快照,你也必须执行此步骤,因为旧的快照将无法用于[通过 UI 备份和恢复 etcd](restore-rancher-launched-kubernetes-clusters-from-backup.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md index 6eca5add930..461ef879837 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup.md @@ -72,6 +72,6 @@ Rancher UI 中提供了集群所有可用快照的列表: 6. 在单个节点启动并运行后,Rancher 建议向你的集群添加额外的 etcd 节点。如果你有一个[自定义集群](../../../pages-for-subheaders/use-existing-nodes.md),并且想要复用旧节点,则需要先[清理节点](../manage-clusters/clean-cluster-nodes.md),然后再尝试将它们重新添加到集群中。 -# 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 +## 为使用 Rancher v2.2.0 之前的版本创建的集群启用快照功能 如果你有使用 v2.2.0 之前版本创建的 Rancher 启动的 Kubernetes 集群,升级 Rancher 后,你必须[编辑集群](../../../pages-for-subheaders/cluster-configuration.md)并 _保存_ 它,以启用更新的快照功能。即使你已经在 v2.2.0 之前创建了快照,你也必须执行此步骤,因为旧的快照将无法用于[通过 UI 备份和恢复 etcd](restore-rancher-launched-kubernetes-clusters-from-backup.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md index a6a6b388627..554725a2e8e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/helm-charts-in-rancher/create-apps.md @@ -12,7 +12,7 @@ Rancher 的应用市场基于 Helm 仓库和 Helm Chart。你可以添加基于 -# Chart 类型 +## Chart 类型 Rancher 支持两种不同类型的 Chart,分别是 Helm Chart 和 Rancher Chart。 @@ -26,7 +26,7 @@ Rancher Chart 是原生 helm Chart,包含两个可增强用户体验的文件 Rancher Chart 添加了简化的 Chart 描述和配置表单,使应用部署变得容易。Rancher 用户无需通读整个 Helm 变量列表即可了解如何启动应用。 -# Chart 目录结构 +## Chart 目录结构 你可以在基于 HTTP 的标准 Helm 仓库中提供 Helm Chart。有关更多信息,请参阅 Helm 官方文档中的 [Chart 仓库指南](https://helm.sh/docs/topics/chart_repository)。 @@ -48,7 +48,7 @@ Rancher Chart 添加了简化的 Chart 描述和配置表单,使应用部署 │ │ │ ├── templates/ # 包含模板的目录,与 values.yml 一起能生成 Kubernetes YAML。 ``` -# Rancher Chart 的附加文件 +## Rancher Chart 的附加文件 在创建你的自定义目录之前,你需要大致了解 Rancher chart 与原生 Helm chart 的区别。Rancher Chart 的目录结构与 Helm Chart 略有不同。Rancher Chart 包含两个 Helm Chart 没有的文件: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md index eb8c47302ae..7c9f11fb942 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/infrastructure-setup/amazon-elb-load-balancer.md @@ -149,7 +149,7 @@ Rancher 仅支持使用 Amazon NLB 以 `TCP` 模式终止 443 端口的流量, AWS 完成 NLB 创建后,单击**关闭**。 -# 4. 为 TCP 端口 80 向 NLB 添加监听器 +## 4. 为 TCP 端口 80 向 NLB 添加监听器 1. 选择新创建的 NLB 并选择**监听器**选项卡。 @@ -163,7 +163,7 @@ AWS 完成 NLB 创建后,单击**关闭**。 6. 单击右上角的**保存**。 -# NGINX Ingress 和 Traefik Ingress 的健康检查路径 +## NGINX Ingress 和 Traefik Ingress 的健康检查路径 K3s 和 RKE Kubernetes 集群使用的默认 Ingress 不同,因此对应的健康检查方式也不同。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md index 67b8e2ababd..e3fc030f359 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/k3s-for-rancher.md @@ -16,12 +16,12 @@ title: 为 Rancher 设置高可用 K3s Kubernetes 集群 ::: -# 先决条件 +## 先决条件 以下说明假设你已参见[此章节](../infrastructure-setup/ha-k3s-kubernetes-cluster.md)配置好两个节点,一个负载均衡器,一个 DNS 记录和一个外部 MySQL 数据库。 Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 Rancher 版本支持哪些 Kubernetes 版本,请参见[支持维护条款](https://rancher.com/support-maintenance-terms/)。如需指定 K3s 版本,请在运行 K3s 安装脚本时,使用 `INSTALL_K3S_VERSION` 环境变量。 -# 安装 Kubernetes +## 安装 Kubernetes ### 1. 安装 Kubernetes 并设置 K3s Server diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md index 6b6ffabf66a..75c6149717e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke1-for-rancher.md @@ -23,7 +23,7 @@ Rancher 可以运行在任何 Kubernetes 集群上,包括托管的 Kubernetes ::: -# 安装 Kubernetes +## 安装 Kubernetes ### 所需的 CLI 工具 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md index b89572bf097..6d55d78088a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-cluster-setup/rke2-for-rancher.md @@ -6,14 +6,15 @@ _已在 2.5.6 版本测试_ 本文介绍了如何根据 [Rancher Server 环境的最佳实践](../../../reference-guides/rancher-manager-architecture/architecture-recommendations.md#kubernetes-安装环境)安装 Kubernetes 集群。 -# 先决条件 +## 先决条件 以下说明假设你已参见[此章节](../infrastructure-setup/ha-rke2-kubernetes-cluster.md)配置好三个节点,一个负载均衡器和一个 DNS 记录。 为了让 RKE2 与负载均衡器正常工作,你需要设置两个监听器,一个用于 9345 端口,另一个用于 6443 端口的 Kubernetes API。 Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 Rancher 版本支持哪些 Kubernetes 版本,请参见[支持维护条款](https://rancher.com/support-maintenance-terms/)。如需指定 RKE2 版本,请在运行 RKE2 安装脚本时,使用 `INSTALL_RKE2_VERSION` 环境变量。 -# 安装 Kubernetes + +## 安装 Kubernetes ### 1. 安装 Kubernetes 并设置 RKE2 Server diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md index 9af5a210f62..0b6fc4bac45 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md @@ -15,7 +15,7 @@ Azure 订阅不支持以下账号类型: - 单租户账号(即没有订阅的账号)。 - 多订阅账号。 -# RKE 和 RKE2 的先决条件 +## RKE 和 RKE2 的先决条件 要为 RKE 和 RKE2 设置 Azure 云提供商,你需要配置以下凭证: @@ -70,7 +70,7 @@ Azure 订阅不支持以下账号类型: 只有需要成为负载均衡器后端的主机才需要分配到该组。 -# Rancher 中的 RKE2 集群设置 +## Rancher 中的 RKE2 集群设置 1. 在**集群配置**中的**云提供商**下拉列表中选择 **Azure**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md index 26b81788d31..430d08fc1e6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/configure-out-of-tree-vsphere.md @@ -6,7 +6,7 @@ Kubernetes 正在逐渐不在树内维护云提供商。vSphere 有一个树外 本页介绍如何在启动集群后安装 Cloud Provider Interface (CPI) 和 Cloud Storage Interface (CSI) 插件。 -# 先决条件 +## 先决条件 支持的 vSphere 版本: @@ -17,7 +17,7 @@ Kubernetes 版本必须为 1.19 或更高版本。 树外 vSphere 云提供商要求使用 Linux 节点,不支持 Windows 节点。 -# 安装 +## 安装 在安装云存储接口 (CSI) 之前,应先安装云提供商接口 (CPI)。 @@ -55,7 +55,7 @@ Kubernetes 版本必须为 1.19 或更高版本。 1. 单击**安装**。 -# 使用 CSI 驱动来置备卷 +## 使用 CSI 驱动来置备卷 CSI chart 默认创建一个 storageClass。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md index 9d4bb823d71..54dfe617868 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/migrate-from-in-tree-to-out-of-tree.md @@ -29,12 +29,12 @@ resourcepool-path: "/Resources/" 跟踪此 bug 的 Rancher issue:https://github.com/rancher/rancher/issues/31105 -# 先决条件 +## 先决条件 - vSphere CSI 迁移需要 vSphere 7.0u1。为了管理现有的树内 vSphere 卷,请将 vSphere 升级到 7.0u1。 - Kubernetes 版本必须为 1.19 或更高版本。 -# 迁移 +## 迁移 ### 1. 安装 CPI 插件 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md index 8eb1156bd48..4d355a7fc2e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries.md @@ -13,7 +13,7 @@ Deployment 使用 Kubernetes 镜像仓库密文向私有 Docker 镜像仓库进 目前,只有在 Rancher UI 中创建工作负载时(通过 kubectl 创建的工作负载不可以),Deployment 才会自动拉取私有镜像仓库凭证。 -# 在命名空间中创建镜像仓库 +## 在命名空间中创建镜像仓库 :::note 先决条件: @@ -44,7 +44,7 @@ Deployment 使用 Kubernetes 镜像仓库密文向私有 Docker 镜像仓库进 - 你可以通过单击**存储 > 密文**或**更多资源 > 核心 > 密文**在 Rancher UI 中查看密文。 - 如果工作负载在镜像仓库的范围内,你在 Rancher UI 中创建的任何工作负载都将具有访问镜像仓库的凭证。 -# 在项目中创建镜像仓库 +## 在项目中创建镜像仓库 :::note 先决条件: @@ -87,7 +87,7 @@ local 集群上的项目级别镜像仓库仅在选择单个项目时可见。 ::: -# 使用私有镜像仓库 +## 使用私有镜像仓库 你可以通过 Rancher UI 或 `kubectl` 使用私有镜像仓库的镜像来部署工作负载。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md index c0a1f3e7c0c..3c8cd23389b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/load-balancer-and-ingress-controller/ingress-configuration.md @@ -7,7 +7,7 @@ description: Ingress 配置 在 Kubernetes 1.21 及更高版本中,NGINX Ingress Controller 不再运行在 hostNetwork 中,而是将 hostPorts 用于端口 80 和端口 443。这样可以将 admission webhook 配置为使用 ClusterIP 访问,从而只在集群内部访问它。 -# Ingress 规则配置 +## Ingress 规则配置 - [指定要使用的主机名](#指定要使用的主机名) - [用作默认后端](#用作默认后端) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md index b15d24e7270..79e2e607709 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md @@ -14,7 +14,7 @@ title: 密文 除非作为子路径卷挂载,否则挂载的密文会自动更新。有关如何传播更新的密文,请参阅 [Kubernetes 文档](https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically)。 -# 在命名空间中创建密文 +## 在命名空间中创建密文 1. 在左上角,单击 **☰ > 集群管理**。 1. 转到要添加密文的集群,然后单击 **Explore**。 @@ -47,7 +47,7 @@ title: 密文 除非作为子路径卷挂载,否则挂载的密文会自动更新。有关如何传播更新的密文,请参阅 [Kubernetes 文档](https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically)。 -# 在项目中创建密文 +## 在项目中创建密文 在 Rancher 2.6 之前,密文必须创建在项目级别。现在不再需要项目级别,你可以采用命名空间级别。因此,Rancher UI 进行了更新以反映这一新功能。但是,你仍然可以按照需要创建项目级别的密文。请注意,你必须先启用`旧版`功能开关并查看单个项目。执行以下步骤设置你的项目级别密文: @@ -69,7 +69,7 @@ local 集群上的项目级别密文仅在选择单个项目时可见。 ::: -# 后续操作 +## 后续操作 现在你已将密文添加到命名空间,你可以将其添加到你部署的工作负载中。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md index 2b9d1fad4b4..dc1e93f86c6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-a-digitalocean-cluster.md @@ -93,7 +93,8 @@ import TabItem from '@theme/TabItem'; - `Default`:包含 `default` 命名空间 - `System`:包含 `cattle-system`,`ingress-nginx`,`kube-public` 和 `kube-system` 命名空间。 -# 可选的后续步骤 + +## 可选的后续步骤 创建集群后,你可以通过 Rancher UI 访问集群。最佳实践建议你设置以下访问集群的备用方式: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md index 2ed2bf2d55a..dc1b5cd4fa8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-amazon-ec2-cluster.md @@ -21,7 +21,7 @@ import TabItem from '@theme/TabItem'; - [允许加密 EBS 卷的 IAM 策略示例](#允许加密-ebs-卷的-iam-策略示例) - 为用户添加 **IAM 策略权限**。请参阅 [Amazon 文档:为用户添加权限(控制台)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console),来将权限添加给用户。 -# 创建 EC2 集群 +## 创建 EC2 集群 创建集群的步骤因 Rancher 版本而异。 @@ -133,7 +133,7 @@ import TabItem from '@theme/TabItem'; - **通过 kubectl CLI 访问你的集群**:按照[这些步骤](../../../new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md#在工作站使用-kubectl-访问集群)在你的工作站上使用 kubectl 访问集群。在这种情况下,你将通过 Rancher Server 的身份验证代理进行身份验证,然后 Rancher 会让你连接到下游集群。此方法允许你在没有 Rancher UI 的情况下管理集群。 - **通过 kubectl CLI 使用授权的集群端点访问你的集群**:按照[这些步骤](../../../new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md#直接使用下游集群进行身份验证)直接使用 kubectl 访问集群,而无需通过 Rancher 进行身份验证。我们建议设置此替代方法来访问集群,以便在无法连接到 Rancher 时访问集群。 -# IAM 策略 +## IAM 策略 ### IAM 策略示例 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md index 4ec13bd515c..9ed3477fe08 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/create-an-azure-cluster.md @@ -29,7 +29,7 @@ import TabItem from '@theme/TabItem'; - [Azure 中的准备工作](#azure-中的准备工作) - [创建 Azure 集群](#创建-azure-集群) -# Azure 中的准备工作 +## Azure 中的准备工作 在使用 Azure 等云厂商在 Rancher 中创建节点模板之前,必须先配置 Rancher 以允许操作 Azure 订阅中的资源。 @@ -46,7 +46,7 @@ az ad sp create-for-rbac \ 创建服务主体后会返回三个标识信息,分别是*应用 ID(也称为客户端 ID)*,以及*客户端密码*。为 Azure 创建节点模板时将使用这些信息。 -# 创建 Azure 集群 +## 创建 Azure 集群 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md index 425969461dc..9bed1f9e144 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md @@ -17,7 +17,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 - [Nutanix AOS 中的准备工作](#nutanix-aos-中的准备工作) - [创建 Nutanix AOS 集群](#创建-nutanix-aos-集群) -# Nutanix AOS 中的准备工作 +## Nutanix AOS 中的准备工作 下文介绍了设置 Nutanix AOS 的要求,以便 Rancher 可以配置虚拟机和集群。 @@ -26,6 +26,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 节点模板已使用 Nutanix AOS 5.20.2 和 6.0.1 版本进行记录和测试。 ::: + ### 在 Nutanix AOS 中创建凭证 在继续创建集群之前,请确保你拥有具有管理员权限的 [Nutanix Prism Central 用户账号](https://portal.nutanix.com/page/documents/details?targetId=Nutanix-Security-Guide-v6_0:wc-user-create-wc-t.html)。设置节点模板时,模板将需要使用这些凭证。 @@ -43,7 +44,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 建议设置 [VM-VM 反亲和性策略](https://portal.nutanix.com/page/documents/details?targetId=AHV-Admin-Guide-v6_1:ahv-vm-anti-affinity-t.html)。这些规则允许分配了 etcd 和 controlplane 角色的虚拟机在分配给不同节点池时,在单独的 AHV 主机上运行。这种做法可确保单个物理机的故障不会影响这些平面的可用性。 -# 创建 Nutanix AOS 集群 +## 创建 Nutanix AOS 集群 1. [创建节点模板](#1-创建节点模板) 2. [使用节点模板创建具有节点池的集群](#2-使用节点模板创建具有节点池的集群) @@ -82,8 +83,7 @@ title: 在 Nutanix AOS 中配置 Kubernetes 集群 - `Default`:包含 `default` 命名空间 - `System`:包含 `cattle-system`,`ingress-nginx`,`kube-public` 和 `kube-system` 命名空间。 - -# 可选的后续步骤 +## 可选的后续步骤 创建集群后,你可以通过 Rancher UI 访问集群。最佳实践建议你设置以下访问集群的备用方式: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md index fda9835410e..3ec67e041e3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/provision-kubernetes-clusters-in-vsphere.md @@ -16,7 +16,7 @@ title: 在 vSphere 中配置 Kubernetes 集群 - [vSphere 中的准备工作](#vsphere-中的准备工作) - [创建 vSphere 集群](#创建-vsphere-集群) -# vSphere 中的准备工作 +## vSphere 中的准备工作 本节介绍设置 vSphere 的要求,以便 Rancher 可以配置虚拟机和集群。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md index c35617e507a..0dac5b76c61 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/how-to-guides/new-user-guides/manage-clusters/install-cluster-autoscaler/use-aws-ec2-auto-scaling-groups.md @@ -513,7 +513,7 @@ kubectl -n kube-system apply -f cluster-autoscaler-deployment.yaml ::: -# 测试 +## 测试 此时,cluster-autoscaler 应该已经在 Rancher 自定义集群中启动并运行。当满足以下条件之一时,cluster-autoscaler 需要管理 `K8sWorkerAsg` ASG,以在 2 到 10 个节点之间进行扩缩容: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md index 4bac0a6c539..4d92664ac6d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md @@ -17,9 +17,12 @@ import TabItem from '@theme/TabItem'; ::: | Rancher 版本 | Adapter 版本 | -| --------------- | :-------------: | -| v2.6.7 | v1.0.1 | -| v2.6.8 | v1.0.1 | +|-----------------|:---------------:| +| v2.6.7* | v1.0.1 | +| v2.6.8* | v1.0.1 | +| v2.6.9 | v1.0.1 | + +> **注意**:虽然技术上来说,Adapter 可以安装在 Rancher v2.6.7 和 v2.6.8 上,但建议使用 2.6.9 或更高版本以避免出现错误。 ### 1. 获取对 Local 集群的访问权限 @@ -71,31 +74,29 @@ helm repo add rancher-charts https://charts.rancher.io 接下来,安装 CSP Adapter。你必须指定多个值,其中包括账号号码以及在先决条件中创建的角色的名称。 -在下方的操作中,将 `$MY_ACC_NUM` 替换为你的 AWS 账号,将 `$MY_ROLE_NAME` 替换为先决条件中创建的角色的名称。 +确保你的 CSP Adapter 版本与你正在运行的 Rancher 版本匹配,如[上文](#rancher-与-adapter-的兼容性矩阵)所述。 + +在下方的操作中,将 `$MY_ACC_NUM` 替换为你的 AWS 账号,将 `$MY_ROLE_NAME` 替换为先决条件中创建的角色的名称。此外,将 `$CSP_ADAPTER_VERSION` 替换为与[版本矩阵](#rancher-与-adapter-的兼容性矩阵)中的 Rancher 版本匹配的版本。 > **注意**:如果你使用 shell 变量,请不要使用引号。例如,MY_ACC_NUM=123456789012 可用,但 MY_ACC_NUM="123456789012" 将失败。 > **注意**:使用欧盟和英国的 AWS Marketplace 列表的账号需要额外指定 `--set image.repository=rancher/rancher-csp-adapter-eu` 选项。要查看你的账号在安装 Adapter 时是否需要此选项,请参阅 Marketplace 列表的使用说明。 -> **注意**:请务必严格按照以下说明进行操作。尤其需要注意安装 1.0.1 版本 Adapter 的命令(使用 `--set image.tag=v1.0.1`),这是确保节点数量准确的关键。 - ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --set image.tag=v1.0.1 +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --version $CSP_ADAPTER_VERSION ``` 你也可以使用 `values.yaml` 并指定以下选项: ```yaml -image: -tag: v1.0.1 aws: -enabled: true -accountNumber: "$MY_ACC_NUM" -roleName: $MY_ROLE_NAME + enabled: true + accountNumber: "$MY_ACC_NUM" + roleName: $MY_ROLE_NAME ``` > **注意**:账号需要像上面那样以字符串格式指定,否则安装会失败。 @@ -103,25 +104,23 @@ roleName: $MY_ROLE_NAME 然后,使用以下命令安装 Adapter: ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml --version $CSP_ADAPTER_VERSION ``` ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --set additionalTrustedCAs=true --set image.tag=v1.0.1 +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter --namespace cattle-csp-adapter-system --set aws.enabled=true --set aws.roleName=$MY_ROLE_NAME --set-string aws.accountNumber=$MY_ACC_NUM --set additionalTrustedCAs=true --version $CSP_ADAPTER_VERSION ``` 你也可以使用 `values.yaml` 并指定以下选项: ```yaml -image: -tag: v1.0.1 aws: -enabled: true -accountNumber: "$MY_ACC_NUM" -roleName: $MY_ROLE_NAME + enabled: true + accountNumber: "$MY_ACC_NUM" + roleName: $MY_ROLE_NAME additionalTrustedCAs: true ``` @@ -130,7 +129,7 @@ additionalTrustedCAs: true 然后,使用以下命令安装 Adapter: ```bash -helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml +helm install rancher-csp-adapter rancher-charts/rancher-csp-adapter -f values.yaml --version $CSP_ADAPTER_VERSION ``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md index 24d26829816..37ba154ae39 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy.md @@ -14,7 +14,7 @@ Rancher 不会与已注册的下游集群建立连接。部署在下游集群上 对于私有节点或私有集群,则需要在节点上设置环境变量。然后,在配置自定义集群或注册私有集群时,在 Rancher UI 中配置环境变量。有关如何在 K3s Kubernetes 集群中的 Ubuntu 节点上设置环境变量的示例,请参阅[本节](#在私有节点上设置环境变量)。 -# 必要的环境变量 +## 必要的环境变量 为代理添加 Fleet agent 环境变量时,将 替换为你的私有代理 IP。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md index 327592b5e2b..5bc89589f5e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md @@ -65,6 +65,43 @@ Monitoring 还会创建其他 `Role`,这些角色默认情况下不会分配 | monitoring-dashboard-edit | 允许管理员为用户分配角色,以便查看/编辑 cattle-dashboards 命名空间中的 ConfigMap。此命名空间中的 ConfigMap 将对应于持久化到集群上的 Grafana 仪表板。 | | monitoring-dashboard-view | 允许管理员为用户分配角色,以便查看 cattle-dashboards 命名空间中的 ConfigMap。此命名空间中的 ConfigMap 将对应于持久化到集群上的 Grafana 仪表板。 | + +### 通过自定义角色分配监控角色 + +管理员可以在 Rancher UI 中分配自定义角色以管理、编辑和查看监控。这些“角色”是在安装 Monitoring 应用程序时默认创建的。此外,这些角色也会被部署到相应的 Kubernetes 角色:admin、edit 和 view `ClusterRoles`。 + +:::note 重要提示: + +将用户添加到集群时,UI 不会提供 `monitoring-admin`、`monitoring-edit` 和 `monitoring-view` 选项。这些监控角色只能通过手动创建自定义角色来分配,该自定义角色继承 Project Owner 和 Project Monitoring View 角色。 + +::: + +1. 创建自定义角色: + + 1.1 单击 **☰ > Users & Authentication > Roles**。 + + 1.2 选择适当的选项卡,例如 **Cluster** 角色。然后单击 **Create Cluster Role**。 + + 1.3 在 **Name** 字段中,创建自定义角色,例如 `View Monitoring`、`Edit Monitoring` 或 `Admin Monitoring`。 + + 1.4 单击 **Inherit From > Add Resource**,然后从下拉列表中选择所需的 Kubernetes 角色。 + + 1.5 单击 **Create**。 + + +2. 将自定义角色分配给新用户: + + 2.1 单击 **☰ > Cluster Management > Cluster Explore > Cluster > Cluster Members > Add**。 + + 2.2 从显示的 **Select Member** 中搜索你的新用户名。 + + 2.3 将 **Cluster Permissions** 中的新自定义角色分配给新用户。 + + 2.4 单击 **Create**。 + + +**结果**:新用户现在应该能够看到 monitoring 工具。 + ### 其他监控集群角色 Monitoring 还会创建其他 `ClusterRole`,这些角色默认情况下不会分配给用户,而是在集群中创建。默认情况下,这些角色不会聚合,但你可以部署引用角色的 `RoleBinding` 或 `ClusterRoleBinding` 来将角色绑定到命名空间。要使用 `kubectl` 而不是通过 Rancher 来定义 `RoleBinding`,请单击[此处](#使用-kubectl-分配-role-和-clusterrole)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/air-gapped-helm-cli-install.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/air-gapped-helm-cli-install.md index df97c6c17b3..b5b58f77e56 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/air-gapped-helm-cli-install.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/air-gapped-helm-cli-install.md @@ -16,14 +16,14 @@ Rancher 安装在 RKE Kubernetes 集群、K3s Kubernetes 集群,或单个 Dock ::: -# 安装概要 +## 安装概要 1. [设置基础设施和私有镜像仓库](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/infrastructure-private-registry.md) 2. [收集镜像到私有镜像仓库](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/publish-images.md) 3. [设置 Kubernetes 集群(如果你使用 Docker 安装,请跳过此步骤)](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-kubernetes.md) 4. [安装 Rancher](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md) -# 升级 +## 升级 如需在离线环境中使用 Helm CLI 升级 Rancher,请按照[升级步骤](../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades.md)进行操作。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/aws-cloud-marketplace.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/aws-cloud-marketplace.md index cacf3e209d1..980a427cf4d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/aws-cloud-marketplace.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/aws-cloud-marketplace.md @@ -2,11 +2,11 @@ title: AWS Marketplace 集成 --- -# 概述 +## 概述 Rancher 提供了与 AWS Marketplace 的集成,允许用户向 SUSE 购买支持。此集成帮助你在需要使用更多集群时轻松调整支持需求。 -# 限制 +## 限制 - 必须使用 Rancher v2.6.7 或更高版本。 - Rancher 必须在启用其他指标的情况下进行部署。 @@ -14,11 +14,12 @@ Rancher 提供了与 AWS Marketplace 的集成,允许用户向 SUSE 购买支 - 必须通过 AWS Marketplace 购买至少一项 Rancher 支持的 Entitlement。 - 你可能需要额外的设置来支持代理/离线用例。有关详细信息,请参阅[先决条件](../integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/adapter-requirements.md)。 -# 如何使用 +## 如何使用 + 1. 完成[先决条件步骤](../integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/adapter-requirements.md)。 2. [安装 CSP Adapter](../integrations-in-rancher/cloud-marketplace/aws-cloud-marketplace/install-adapter.md)。 -# 常见问题 +## 常见问题 **我以后后续再购买更多节点的支持吗?** diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/configure-shibboleth-saml.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/configure-shibboleth-saml.md index 32c0a26a22d..c8af4a97381 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/configure-shibboleth-saml.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/configure-shibboleth-saml.md @@ -11,7 +11,7 @@ title: 配置 Shibboleth (SAML) > 本节假定你已了解 Rancher,Shibboleth 和 OpenLDAP 是如何协同工作的。有关工作原理的详细说明,请参见[本页](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/configure-shibboleth-saml/about-group-permissions.md)。 -# 在 Rancher 中设置 Shibboleth +## 在 Rancher 中设置 Shibboleth ### Shibboleth 先决条件 > @@ -73,7 +73,7 @@ SAML 协议不支持用户或用户组的搜索或查找。因此,如果你没 要在 Rancher 中分配权限时启用搜索组,你需要为支持组的 SAML 身份验证提供商配置后端(例如 OpenLDAP)。 -# 在 Rancher 中设置 OpenLDAP +## 在 Rancher 中设置 OpenLDAP 如果你将 OpenLDAP 配置为 Shibboleth 的后端,SAML 断言会返回到 Rancher,其中包括用于引用组的用户属性。然后,通过身份验证的用户将能够访问其所在的组有权访问的 Rancher 资源。 @@ -96,6 +96,6 @@ SAML 协议不支持用户或用户组的搜索或查找。因此,如果你没 1. 在左侧导航栏,单击**认证**。 1. 单击 **OpenLDAP**。将显示**配置 OpenLDAP 服务器**表单。 -# 故障排除 +## 故障排除 如果在测试与 OpenLDAP 服务器的连接时遇到问题,请首先仔细检查为 ServiceAccount 输入的凭证以及搜索库配置。你还可以检查 Rancher 日志来查明问题的原因。调试日志可能包含有关错误的更详细信息。详情请参见[如何启用调试日志](../faq/technical-items.md#如何启用调试日志记录?)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/enable-experimental-features.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/enable-experimental-features.md index 2fc41acbcf1..d4bac212a62 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/enable-experimental-features.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/enable-experimental-features.md @@ -20,7 +20,7 @@ Rancher 包含一些默认关闭的实验功能。在某些情况下,例如当 如果你安装 Rancher 后使用 Rancher API 将功能开关设置为 true,然后在使用命令升级 Rancher 时将功能开关设置为 false,在这种情况下,虽然默认值会是 false,但是该功能依然会被启用,因为它是通过 API 设置的。如果你随后使用 Rancher API 删除设置值(true)并将它设置为 NULL,则默认值(false)将生效。有关详细信息,请参阅[功能开关页面](../getting-started/installation-and-upgrade/installation-references/feature-flags.md)。 -# 启动 Rancher 时启用功能 +## 启动 Rancher 时启用功能 安装 Rancher 时,使用功能开关启用你所需的功能。通过单节点容器安装 Rancher,和在 Kubernetes 集群上安装 Rancher 对应的命令有所不同。 @@ -81,7 +81,7 @@ docker run -d -p 80:80 -p 443:443 \ ``` -# 使用 Rancher UI 启用功能 +## 使用 Rancher UI 启用功能 1. 在左上角,单击 **☰ > 全局设置**。 1. 单击**功能开关**。 @@ -97,7 +97,7 @@ docker run -d -p 80:80 -p 443:443 \ **结果**:该功能已禁用。 -# 使用 Rancher API 启用功能 +## 使用 Rancher API 启用功能 1. 前往 `/v3/features`。 1. 在 `data` 中,你会看到一个数组,该数组包含所有能通过功能开关启用的功能。功能的名称在 `id` 字段中。单击要启用的功能的名称。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/gke-cluster-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/gke-cluster-configuration.md index 9d8f3861c77..15d7679ba34 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/gke-cluster-configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/gke-cluster-configuration.md @@ -133,7 +133,7 @@ _可变:是_ 启用 controlplane 授权网络,以阻止不受信任的非 GCP 源 IP 通过 HTTPS 访问 Kubernetes master。如果选择,则可以添加额外的授权网络。如果集群是使用公共端点创建的,则此选项可用于将公共端点的访问锁定到特定网络(例如运行 Rancher 服务的网络)。如果集群只有一个私有端点,则需要此设置。 -# 其他选项 +## 其他选项 ### 集群插件 @@ -182,7 +182,7 @@ _可变:是_ 设置时长 4 小时的维护窗口的开始时间。使用 HH:MM 格式在 UTC 时区中指定时间。有关详细信息,请参阅[此页面](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)。 -# 节点池 +## 节点池 在此部分中,输入描述节点池中每个节点的配置的详细信息。 @@ -200,7 +200,7 @@ _可变:是_ :::note -默认选项是 “Container-Optimized OS with Docker”。GCP Container-Optimized OS 上的只读文件系统与 Rancher 中的 [legacy logging](/versioned_docs/version-2.0-2.4/pages-for-subheaders/cluster-logging.md) 实现不兼容。如果你需要使用旧版日志管理功能,请选择 “Ubuntu with Docker” 或 “Ubuntu with Containerd”。[current logging feature](logging.md) 与 Container-Optimized OS 镜像兼容。 +默认选项是 “Container-Optimized OS with Docker”。GCP Container-Optimized OS 上的只读文件系统与 Rancher 中的 [legacy logging](../../version-2.0-2.4/pages-for-subheaders/cluster-logging.md) 实现不兼容。如果你需要使用旧版日志管理功能,请选择 “Ubuntu with Docker” 或 “Ubuntu with Containerd”。[current logging feature](logging.md) 与 Container-Optimized OS 镜像兼容。 ::: @@ -256,7 +256,7 @@ _可变:否_ 有关标签语法和要求的详细信息,请参阅 [Kubernetes 文档](https://cloud.google.com/vpc/docs/add-remove-network-tags)。 -# 组详细信息 +## 组详细信息 在此部分中,输入描述节点池的详细信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-cluster-autoscaler.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-cluster-autoscaler.md index 49c280b4b32..87620b84498 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-cluster-autoscaler.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-cluster-autoscaler.md @@ -15,7 +15,7 @@ Cluster Autoscaler 运行在 Kubernetes master 节点上。它可以在 `kube-sy 你可以在 worker 节点上运行 Cluster Autoscaler 的自定义 deployment,但需要小心以保证 Cluster Autoscaler 能正常运行。 -# 云提供商 +## 云提供商 Cluster Autoscaler 为不同的云提供商提供支持。有关详细信息,请参见 [Cluster Autoscaler 支持的云提供商](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#deployment)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md index 593d0e7cb2d..11e22929133 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster.md @@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem'; 在本节中,你将学习如何使用 Helm CLI 在 Kubernetes 集群上部署 Rancher。 -# 先决条件 +## 先决条件 - [Kubernetes 集群](#kubernetes-集群) - [Ingress Controller](#ingress-controller) @@ -47,7 +47,7 @@ Rancher UI 和 API 通过 Ingress 公开。换言之,安装 Rancher 的 Kubern - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) - Kubernetes 命令行工具。 - [Helm](https://docs.helm.sh/using_helm/#installing-helm) - Kubernetes 的包管理器。请参见 [Helm 版本要求](../getting-started/installation-and-upgrade/resources/helm-version-requirements.md)选择 Helm 版本来安装 Rancher。请为你的具体平台参见 [Helm 项目提供的说明](https://helm.sh/docs/intro/install/)。 -# 安装 Rancher Helm Chart +## 安装 Rancher Helm Chart Rancher 是使用 Kubernetes 的 [Helm](https://helm.sh/) 包管理器安装的。Helm Chart 为 Kubernetes YAML 清单文件提供了模板语法。通过 Helm,用户可以创建可配置的 deployment,而不仅仅只能使用静态文件。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-and-upgrade.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-and-upgrade.md index af4d07ad8ca..95a4415ebbf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-and-upgrade.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-and-upgrade.md @@ -5,7 +5,7 @@ description: 了解如何在开发和生产环境中安装 Rancher。了解单 本节介绍了 Rancher 各种安装方式以及每个安装方式的优点。 -# 名词解释 +## 名词解释 本章节涉及以下名词: @@ -16,7 +16,7 @@ description: 了解如何在开发和生产环境中安装 Rancher。了解单 `restrictedAdmin` Helm Chart 选项在 **Rancher Server** 可用。如果该选项设置为 true,初始的 Rancher 用户访问本地 Kubernetes 集群会受到限制,以避免权限升级。详情请参见 [restricted-admin 角色](../how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/manage-role-based-access-control-rbac/global-permissions.md#受限管理员)。 -# 安装方式概述 +## 安装方式概述 Rancher 可以安装在以下主要架构上: @@ -62,10 +62,11 @@ Rancher backup operator 可将 Rancher 从单个 Docker 容器迁移到高可用 如需进一步了解 Rancher 架构,请参见[架构概述](rancher-manager-architecture.md),[生产级别架构推荐](../reference-guides/rancher-manager-architecture/architecture-recommendations.md)或[最佳实践指南](../reference-guides/best-practices/rancher-server/tips-for-running-rancher.md)。 -# 先决条件 +## 先决条件 + 安装 Rancher 之前,请确保你的节点满足所有[安装要求](installation-requirements.md)。 -# 架构建议 +## 架构建议 为了达到最佳性能和安全性,我们建议你为 Rancher Management Server 使用单独的专用 Kubernetes 集群。不建议在此集群上运行用户工作负载。部署 Rancher 后,你可以[创建或导入集群](kubernetes-clusters-in-rancher-setup.md)来运行你的工作负载。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-requirements.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-requirements.md index 63b17877efd..2a6ae93021d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-requirements.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/installation-requirements.md @@ -35,7 +35,7 @@ description: 如果 Rancher 配置在 Docker 或 Kubernetes 中运行时,了 Rancher UI 在基于 Firefox 或 Chromium 的浏览器(Chrome、Edge、Opera、Brave 等)中效果最佳。 -# 操作系统和容器运行时要求 +## 操作系统和容器运行时要求 Rancher 兼容当前所有的主流 Linux 发行版。 @@ -77,11 +77,11 @@ Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 如需了解 RKE2 通过了哪些操作系统版本的测试,请参见[支持和维护条款](https://rancher.com/support-maintenance-terms/)。 -# 硬件要求 +## 硬件要求 本节描述安装 Rancher Server 的节点的 CPU、内存和磁盘要求。 -# CPU 和内存 +## CPU 和内存 硬件要求根据你的 Rancher 部署规模而定。请根据要求配置每个节点。通过单节点容器安装 Rancher,和在 Kubernetes 集群上安装 Rancher 的要求有所不同。 @@ -134,7 +134,7 @@ Rancher 需要安装在支持的 Kubernetes 版本上。如需了解你使用的 | 小 | 最多 5 个 | 最多 50 个 | 1 | 4 GB | | 中 | 最多 15 个 | 最多 200 个 | 2 | 8 GB | -# Ingress +## Ingress 安装 Rancher 的 Kubernetes 集群中的每个节点都应该运行一个 Ingress。 @@ -148,11 +148,11 @@ Ingress 需要部署为 DaemonSet 以确保负载均衡器能成功把流量转 - **AKS**:[使用 Azure Kubernetes 服务安装 Rancher 以及如何安装 Ingress 以访问 Rancher Server](../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-aks.md)。 - **GKE**:[使用 GKE 安装 Rancher 以及如何安装 Ingress 以访问 Rancher Server](../getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-gke.md)。 -# 磁盘 +## 磁盘 etcd 在集群中的性能决定了 Rancher 的性能。因此,为了获得最佳速度,我们建议使用 SSD 磁盘来支持 Rancher 管理的 Kubernetes 集群。在云提供商上,你还需使用能获得最大 IOPS 的最小大小。在较大的集群中,请考虑使用专用存储设备存储 etcd 数据和 wal 目录。 -# 网络要求 +## 网络要求 本节描述了安装 Rancher Server 的节点的网络要求。 @@ -170,6 +170,6 @@ etcd 在集群中的性能决定了 Rancher 的性能。因此,为了获得最 为了确保能正常运行,Rancher 需要在 Rancher 节点和下游 Kubernetes 集群节点上开放一些端口。不同集群类型的 Rancher 和下游集群的所有必要端口,请参见[端口要求](../getting-started/installation-and-upgrade/installation-requirements/port-requirements.md)。 -# Dockershim 支持 +## Dockershim 支持 有关 Dockershim 支持的详情,请参见[此页面](../getting-started/installation-and-upgrade/installation-requirements/dockershim.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/istio-setup-guide.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/istio-setup-guide.md index 78347a5ceb0..4ed26979729 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/istio-setup-guide.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/istio-setup-guide.md @@ -6,7 +6,7 @@ title: 设置指南 如果你使用 Istio 进行流量管理,则需要允许外部流量进入集群。在这种情况下,你将需要执行以下所有步骤。 -# 先决条件 +## 先决条件 本指南假设你已经[安装 Rancher](installation-and-upgrade.md),且已经[配置了一个单独的 Kubernetes 集群](kubernetes-clusters-in-rancher-setup.md)并要在该集群上安装 Istio。 @@ -14,8 +14,7 @@ title: 设置指南 Istio 控制的工作负载和服务必须满足 [Istio 要求](https://istio.io/docs/setup/additional-setup/requirements/)。 - -# 安装 +## 安装 :::tip 快速设置提示: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/kubernetes-components.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/kubernetes-components.md index 17e72da03a3..7deb6057b8a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/kubernetes-components.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/kubernetes-components.md @@ -11,7 +11,7 @@ title: Kubernetes 组件 - [nginx-proxy 节点故障排除](../troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md) - [Worker 节点和通用组件故障排除](../troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md) -# Kubernetes 组件图 +## Kubernetes 组件图 ![集群图](/img/clusterdiagram.svg)
线条表示组件之间的通信。而颜色纯粹用于视觉辅助。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/launch-kubernetes-with-rancher.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/launch-kubernetes-with-rancher.md index 53b726e9fb2..9a76e330e6c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/launch-kubernetes-with-rancher.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/launch-kubernetes-with-rancher.md @@ -34,7 +34,7 @@ Rancher 还可以创建节点池。在托管在云厂商的节点池上安装 Ku 有关详细信息,请参阅[自定义节点](use-existing-nodes.md)。 -# 以编程方式创建 RKE 集群 +### 以编程方式创建 RKE 集群 通过 Rancher 以编程方式部署 RKE 集群的最常见方法是使用 Rancher 2 Terraform Provider。详情请参见[使用 Terraform 创建集群](https://registry.terraform.io/providers/rancher/rancher2/latest/docs/resources/cluster)。 @@ -75,6 +75,6 @@ RKE2 还支持在预配置的虚拟机或裸机节点上安装自定义集群。 如果要重复使用之前的自定义集群中的节点,请在复用之前清理节点。如果你重复使用尚未清理的节点,则集群配置可能会失败。 -# 以编程方式创建 RKE2 集群 +### 以编程方式创建 RKE2 集群 通过 Rancher 以编程方式部署 RKE2 集群的最常见方法是使用 Rancher 2 Terraform Provider。详情请参见[使用 Terraform 创建集群](https://registry.terraform.io/providers/rancher/rancher2/latest/docs/resources/cluster_v2)。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-and-alerting.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-and-alerting.md index e51afee6897..d8be0cf1edb 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-and-alerting.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-and-alerting.md @@ -23,11 +23,11 @@ Monitoring 应用允许你: - 根据 Prometheus 收集的指标,将预先计算的、经常需要的,或计算成本高的表达式定义为新的时间序列 - 通过 Prometheus Adapter,将从 Prometheus 收集的指标公开给 Kubernetes Custom Metrics API,以便在 HPA 中使用 -# Monitoring 的工作原理 +## Monitoring 的工作原理 有关 monitoring 组件如何协同工作的说明,请参阅[此页面](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md)。 -# 默认组件和部署 +## 默认组件和部署 ### 内置仪表板 @@ -48,11 +48,11 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 有关 Rancher UI 中公开的监控组件列表,以及编辑它们的常见用例,请参阅[本节](../integrations-in-rancher/monitoring-and-alerting/how-monitoring-works.md#rancher-ui-中公开的组件)。 -# RBAC +## RBAC 有关配置 monitoring 访问权限的信息,请参阅[此页面](../integrations-in-rancher/monitoring-and-alerting/rbac-for-monitoring.md)。 -# 指南 +## 指南 - [启用 monitoring](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/enable-monitoring.md) - [卸载 monitoring](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/uninstall-monitoring.md) @@ -62,7 +62,7 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 - [调试高内存使用率](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/debug-high-memory-usage.md) - [从 Monitoring V1 迁移到 V2](../how-to-guides/advanced-user-guides/monitoring-alerting-guides/migrate-to-rancher-v2.5+-monitoring.md) -# 配置 +## 配置 ### 在 Rancher 中配置 Monitoring 资源 @@ -79,7 +79,7 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 有关 `rancher-monitoring` Chart 选项的更多信息,包括设置资源限制和请求的选项,请参阅[此页面](../reference-guides/monitoring-v2-configuration/helm-chart-options.md)。 -# Windows 集群支持 +## Windows 集群支持 如果 Monitoring 部署到 RKE1 Windows 集群,Monitoring V2 将自动部署 [windows-exporter](https://github.com/prometheus-community/windows_exporter) DaemonSet 并设置 ServiceMonitor,以从每个部署的 Pod 中收集指标。这将使用 `windows_` 指标填充 Prometheus,这些指标与 [node_exporter](https://github.com/prometheus/node_exporter) 为 Linux 主机导出的 `node_` 指标类似。 @@ -88,8 +88,7 @@ Monitoring 应用会默认部署一些告警。要查看默认告警,请转到 有关如何在现有 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。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-v2-configuration-guides.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-v2-configuration-guides.md index 53ae5734dbc..d5ee2c63ba3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-v2-configuration-guides.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/monitoring-v2-configuration-guides.md @@ -6,7 +6,7 @@ title: 配置 有关为 Prometheus 配置自定义抓取目标和规则的信息,请参阅 [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) 的上游文档。Prometheus Operator [设计文档](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md)中解释了一些最重要的自定义资源。Prometheus Operator 文档还可以帮助你设置 RBAC、Thanos 或进行自定义配置。 -# 设置资源限制和请求 +## 设置资源限制和请求 安装 `rancher-monitoring` 时可以配置 Monitoring 应用的资源请求和限制。有关默认限制的更多信息,请参阅[此页面](../reference-guides/monitoring-v2-configuration/helm-chart-options.md#配置资源限制和请求)。 @@ -16,7 +16,7 @@ title: 配置 ::: -# Prometheus 配置 +## Prometheus 配置 通常不需要直接编辑 Prometheus 自定义资源。 @@ -31,7 +31,7 @@ title: 配置 有关直接编辑 Prometheus 自定义资源(对高级用例可能有帮助)的更多信息,请参阅[此页面](../how-to-guides/advanced-user-guides/monitoring-v2-configuration-guides/advanced-configuration/prometheus.md)。 -# Alertmanager 配置 +## Alertmanager 配置 Alertmanager 自定义资源通常不需要直接编辑。在常见用例中,你可以通过更新路由和接收器来管理告警。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/nutanix.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/nutanix.md index b6bc5cad7a1..38ddc1b13b2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/nutanix.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/nutanix.md @@ -12,6 +12,6 @@ Nutanix 集群可能由多组具有不同属性(例如内存或 vCPU 数量) - [创建 Nutanix 集群](../how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md#创建-nutanix-aos-集群) - [配置存储](../how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos) -# 创建 Nutanix 集群 +## 创建 Nutanix 集群 在[本节](../how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/nutanix/provision-kubernetes-clusters-in-aos.md)中,你将学习如何使用 Rancher 在 Nutanix AOS 中安装 [RKE](https://rancher.com/docs/rke/latest/en/) Kubernetes 集群。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-behind-an-http-proxy.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-behind-an-http-proxy.md index bc8d53c692f..e468db53dd5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-behind-an-http-proxy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-behind-an-http-proxy.md @@ -6,7 +6,7 @@ title: 使用 HTTP 代理安装 Rancher 另外,用户也可以在没有任何互联网访问的情况下离线设置 Rancher。详情请参见 [Rancher 官方文档](air-gapped-helm-cli-install.md)。 -# 安装概要 +## 安装概要 1. [配置基础设施](../getting-started/installation-and-upgrade/other-installation-methods/rancher-behind-an-http-proxy/set-up-infrastructure.md) 2. [配置 Kubernetes 集群](../getting-started/installation-and-upgrade/other-installation-methods/rancher-behind-an-http-proxy/install-kubernetes.md) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-on-a-single-node-with-docker.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-on-a-single-node-with-docker.md index 2fe58e12691..4a7a88b81ff 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-on-a-single-node-with-docker.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/rancher-on-a-single-node-with-docker.md @@ -17,19 +17,19 @@ Rancher 的 Docker 安装仅推荐用于开发和测试环境中。Rancher 版 Rancher backup operator 可将 Rancher 从单个 Docker 容器迁移到高可用 Kubernetes 集群上。详情请参见[把 Rancher 迁移到新集群](../how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/migrate-rancher-to-new-cluster.md)。 -### Rancher 特权访问 +## Rancher 特权访问 当 Rancher Server 部署在 Docker 容器中时,容器内会安装一个本地 Kubernetes 集群供 Rancher 使用。为 Rancher 的很多功能都是以 deployment 的方式运行的,而在容器内运行容器是需要特权模式的,因此你需要在安装 Rancher 时添加 `--privileged` 选项。 -# 操作系统,Docker,硬件和网络要求 +## 操作系统,Docker,硬件和网络要求 请确保你的节点满足常规的[安装要求](installation-requirements.md)。 -# 1. 配置 Linux 主机 +## 1. 配置 Linux 主机 按照[要求](installation-requirements.md)配置一个 Linux 主机,用于运行 Rancher Server。 -# 2. 选择一个 SSL 选项并安装 Rancher +## 2. 选择一个 SSL 选项并安装 Rancher 出于安全考虑,使用 Rancher 时请使用 SSL(Secure Sockets Layer)。SSL 保护所有 Rancher 网络通信(如登录和与集群交互)的安全。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/use-existing-nodes.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/use-existing-nodes.md index 6730a5afe8f..d54ae37d50b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/use-existing-nodes.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/pages-for-subheaders/use-existing-nodes.md @@ -9,7 +9,7 @@ description: 要创建具有自定义节点的集群,你需要访问集群中 本节介绍如何设置自定义集群。 -# 使用自定义节点创建集群 +## 使用自定义节点创建集群 :::note 使用 Windows 主机作为 Kubernetes Worker 节点? @@ -17,7 +17,6 @@ description: 要创建具有自定义节点的集群,你需要访问集群中 ::: - ### 1. 配置 Linux 主机 你可以通过配置 Linux 主机,来创建自定义集群。你的主机可以是: @@ -130,7 +129,7 @@ Key=kubernetes.io/cluster/, Value=owned Key=kubernetes.io/cluster/CLUSTERID, Value=shared ``` -# 可选的后续步骤 +## 可选的后续步骤 创建集群后,你可以通过 Rancher UI 访问集群。最佳实践建议你设置以下访问集群的备用方式: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/backup-restore-configuration/examples.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/backup-restore-configuration/examples.md index 5f568aa1b1a..ca1ce934d84 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/backup-restore-configuration/examples.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/backup-restore-configuration/examples.md @@ -242,7 +242,7 @@ spec: encryptionConfigSecretName: test-encryptionconfig ``` -# 在 S3 中存储备份的凭证密文示例 +## 在 S3 中存储备份的凭证密文示例 ```yaml apiVersion: v1 @@ -255,7 +255,7 @@ data: secretKey: ``` -# EncryptionConfiguration 示例 +## EncryptionConfiguration 示例 以下代码片段演示了两种不同类型的密文及其与自定义资源的备份和还原的相关性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md index 983541f1ebd..de11f24cedd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/best-practices/rancher-managed-clusters/rancher-managed-clusters-in-vsphere.md @@ -13,7 +13,7 @@ title: Rancher 管理 vSphere 集群的最佳实践 ![解决方案概述](/img/solution_overview.drawio.svg) -# 1. 虚拟机注意事项 +## 1. 虚拟机注意事项 ### 利用虚拟机模板来构建环境 @@ -31,7 +31,7 @@ title: Rancher 管理 vSphere 集群的最佳实践 在部署节点时,请遵循 K8s 和 etcd 的最佳实践,其中包括禁用 swap,检查集群中的所有主机之间是否有良好的网络连接,为每个节点使用唯一的主机名、MAC 地址和 `product_uuids`。 -# 2. 网络注意事项 +## 2. 网络注意事项 ### 利用 ETCD 节点之间的低延迟和高带宽连接 @@ -41,13 +41,13 @@ title: Rancher 管理 vSphere 集群的最佳实践 你可以为使用的所有节点都配置一个静态 IP。如果使用 DHCP,则每个节点都应该有一个 DHCP 预留,以确保节点分配到相同的 IP 地址。 -# 3. 存储注意事项 +## 3. 存储注意事项 ### 在 ETCD 节点上使用 SSD 磁盘 ETCD 对写入延迟非常敏感。因此,你可以尽量使用 SSD 磁盘来提高写入性能。 -# 4. 备份和灾难恢复 +## 4. 备份和灾难恢复 ### 定期备份下游集群 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/cli-with-rancher/kubectl-utility.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/cli-with-rancher/kubectl-utility.md index 8d81f941fda..62377d846c6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/cli-with-rancher/kubectl-utility.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/cli-with-rancher/kubectl-utility.md @@ -2,7 +2,7 @@ title: kubectl 实用程序 --- -# kubectl +## kubectl kubectl 用于与 Rancher 进行交互。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/pipelines/pipeline-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/pipelines/pipeline-configuration.md index fe6565d6475..87e812e4d2e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/pipelines/pipeline-configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/pipelines/pipeline-configuration.md @@ -61,7 +61,8 @@ stages: pushRemote: true registry: reg.example.com ``` -# 步骤类型:运行脚本 + +## 步骤类型:运行脚本 **运行脚本**步骤用于在指定容器内的工作空间中执行命令。你可以根据基础镜像提供的实用程序,使用这个步骤来构建、测试,以及执行更多其他操作。为方便起见,你可以使用变量来引用流水线执行的元数据。有关可用变量的列表,请参阅[流水线变量替换参考](#流水线变量替换参考)。 @@ -290,7 +291,7 @@ timeout: 30 1. 选择通知的条件。你可以选择接收以下状态的通知:`失败`、`成功`或`已更改`。例如,如果你想在执行失败时接收通知,请选择**失败**。 -1. 如果你没有现有的通知器,Rancher 会提示未设置通知器的警告,并显示跳转到通知器页面的链接。你可以按照[说明](/versioned_docs/version-2.0-2.4/explanations/integrations-in-rancher/notifiers.md)添加通知器。如果你已经有通知器,你可以单击**添加收件人**按钮,将他们添加到通知中。 +1. 如果你没有现有的通知器,Rancher 会提示未设置通知器的警告,并显示跳转到通知器页面的链接。你可以按照[说明](../../../version-2.0-2.4/explanations/integrations-in-rancher/notifiers.md)添加通知器。如果你已经有通知器,你可以单击**添加收件人**按钮,将他们添加到通知中。 :::note @@ -622,7 +623,7 @@ Rancher 为流水线步骤设置了默认计算资源(`构建和发布镜像` **结果**:你现在可以使用流水线,而且新的 pod 将能够使用自签名证书。 -# 流水线组件的持久化数据 +## 流水线组件的持久化数据 默认情况下,内部 Docker 镜像仓库和 Minio 工作负载都使用临时卷。这是开箱即用的默认存储方式,能让测试变得更加便利。但如果运行 Docker 镜像仓库或 Minio 的节点出现故障,你将丢失构建镜像和构建日志。在大多数情况下,这不是太大的问题。如果你希望构建镜像和日志能够在节点故障中幸免于难,你可以让 Docker 镜像仓库和 Minio 使用持久卷。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/architecture-recommendations.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/architecture-recommendations.md index a7a69a0e642..bfc319cbe09 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/architecture-recommendations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/architecture-recommendations.md @@ -4,7 +4,7 @@ title: 架构推荐 如果你准备在单个节点上安装 Rancher,我们推荐你[分开部署 Rancher 与下游集群](#分开部署-rancher-与下游集群)。 -# 分开部署 Rancher 与下游集群 +## 分开部署 Rancher 与下游集群 下游集群,是运行你自己的应用和服务的下游 Kubernetes 集群。 @@ -14,7 +14,7 @@ title: 架构推荐 ![分开部署 Rancher Server 与下游集群](/img/rancher-architecture-separation-of-rancher-server.svg) -# 为什么高可用(HA)更适合生产环境中的 Rancher +## 为什么高可用(HA)更适合生产环境中的 Rancher 我们建议在高可用 Kubernetes 集群上安装 Rancher Server,以保护 Rancher Server 的数据。在高可用安装中,负载均衡器充当客户端的单点入口,并在集群中的多台服务器之间分配网络流量,这有助于防止任何一台服务器成为单点故障。 @@ -36,7 +36,7 @@ title: 架构推荐 ![运行 Rancher Management Server 的 RKE Kubernetes 集群的架构](/img/rke-server-storage.svg) -# Kubernetes 安装的负载均衡器推荐配置 +## Kubernetes 安装的负载均衡器推荐配置 我们建议你为负载均衡器和 Ingress Controller 使用以下配置: @@ -49,13 +49,13 @@ title: 架构推荐 ![Rancher HA](/img/ha/rancher2ha.svg) -# Kubernetes 安装环境 +## Kubernetes 安装环境 我们强烈建议你把 Rancher 安装到托管在云提供商(如 AWS EC2 和 Google Compute Engine(GCE)等)上的 Kubernetes 集群上。 为了达到最佳性能和安全性,我们建议你为 Rancher Management Server 创建一个专用的 Kubernetes 集群。不建议在此集群上运行用户工作负载。部署 Rancher 后,你可以[创建或导入集群](../../pages-for-subheaders/kubernetes-clusters-in-rancher-setup.md)来运行你的工作负载。 -# Kubernetes 安装的推荐节点角色 +## Kubernetes 安装的推荐节点角色 如果 Rancher 安装在 K3s Kubernetes 或 RKE Kubernetes 集群上,以下建议适用。 @@ -97,7 +97,7 @@ RKE 每个角色至少需要一个节点,但并不强制每个节点只能有 有关下游集群的最佳实践,请查看[生产环境清单](../../pages-for-subheaders/checklist-for-production-ready-clusters.md)或[最佳实践](../../pages-for-subheaders/best-practices.md)。 -# 授权集群端点架构 +## 授权集群端点架构 如果你使用[授权集群端点(ACE)](../../pages-for-subheaders/rancher-manager-architecture.md#4-授权集群端点),我们建议你创建一个指向负载均衡器的 FQDN,这个负载均衡器把流量转到所有角色为 `controlplane` 的节点。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md index 76f4a68dfaf..353d90a6661 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/rancher-manager-architecture/communicating-with-downstream-user-clusters.md @@ -75,7 +75,7 @@ Cluster Agent,也叫做 `cattle-cluster-agent`,是运行在下游集群中 如果 Rancher 出现问题,你需要使用此 kubeconfig 文件中定义的上下文来访问集群。因此,我们建议你导出 kubeconfig 文件,以便在 Rancher 出现问题时,仍能使用文件中的凭证访问集群。详情请参见使用 [kubectl 和 kubeconfig 文件](../../how-to-guides/new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md)访问集群的章节。 -# 重要文件 +## 重要文件 维护、排除问题和升级集群需要用到以下文件,请妥善保管这些文件: @@ -87,7 +87,7 @@ Cluster Agent,也叫做 `cattle-cluster-agent`,是运行在下游集群中 有关在没有 Rancher 认证代理和其他配置选项的情况下连接到集群的更多信息,请参见 [kubeconfig 文件](../../how-to-guides/new-user-guides/manage-clusters/access-clusters/use-kubectl-and-kubeconfig.md)。 -# 配置 Kubernetes 集群的工具 +## 配置 Kubernetes 集群的工具 Rancher 使用什么工具配置下游集群,取决于集群的类型。 @@ -113,7 +113,7 @@ Rancher 使用 [kontainer-engine](https://github.com/rancher/kontainer-engine) 这种情况下,Rancher 需要连接到一个设置好的 Kubernetes 集群。因此,Rancher 不提供 Kubernetes,只设置 Rancher Agent 实现与集群通信。 -# Rancher Server 组件和源码 +## Rancher Server 组件和源码 下图展示了 Rancher Server 的组件: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/system-tools.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/system-tools.md index a56f8684bd8..ce21d6c41fd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/system-tools.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/reference-guides/system-tools.md @@ -8,11 +8,11 @@ title: 系统工具 ::: -# 日志 +## 日志 请使用 [logs-collector](https://github.com/rancherlabs/support-tools/tree/master/collection/rancher/v2.x/logs-collector) 来收集你的集群日志。 -# Stats +## Stats 如果要复制 stats 命令,你可以在集群节点上运行以下命令: @@ -26,6 +26,6 @@ title: 系统工具 /usr/bin/sar -u -r -F 1 1 ``` -# Remove +## Remove 请使用 [Rancher Cleanup](https://github.com/rancher/rancher-cleanup) 工具。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/shared-files/_cluster-capabilities-table.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/shared-files/_cluster-capabilities-table.md index 1dac148eb45..c416039011e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/shared-files/_cluster-capabilities-table.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/shared-files/_cluster-capabilities-table.md @@ -15,7 +15,7 @@ | [在 Rancher 无法访问集群时清理 Kubernetes 组件](../how-to-guides/new-user-guides/manage-clusters/clean-cluster-nodes.md) | ✓ | | | | | [配置 Pod 安全策略](../how-to-guides/new-user-guides/manage-clusters/add-a-pod-security-policy.md) | ✓ | ✓ | | -1. 注册的 GKE 和 EKS 集群与从 Rancher UI 创建的 GKE 和 EKS 集群的可用选项一致。不同之处是,从 Rancher UI 中删除已注册的集群后,集群不会被销毁。 +1. 注册的 EKS、GKE 和 AKS 集群与从 Rancher UI 创建的 EKS、GKE 和 AKS 集群的可用选项一致。不同之处是,从 Rancher UI 中删除已注册的集群后,集群不会被销毁。 2. 无法编辑已注册的集群的集群配置选项([K3s 和 RKE2 集群](../how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/register-existing-clusters.md)除外)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md index 7aafae5e832..6c9a8d5291a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md @@ -4,7 +4,7 @@ title: Controlplane 节点故障排除 本文适用于具有 `controlplane` 角色的节点。 -# 检查 controlplane 容器是否正在运行 +## 检查 controlplane 容器是否正在运行 具有 `controlplane` 角色的节点上启动了三个容器: @@ -26,7 +26,7 @@ f3d287ca4549 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." bdf3898b8063 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." 3 hours ago Up 3 hours kube-controller-manager ``` -# controlplane 容器日志记录 +## controlplane 容器日志记录 :::note @@ -42,7 +42,7 @@ docker logs kube-controller-manager docker logs kube-scheduler ``` -# RKE2 Server 日志 +## RKE2 Server 日志 如果 Rancher 配置的 RKE2 集群无法与 Rancher 通信,你可以在下游集群中的 Server 节点上运行此命令,从而获取 RKE2 Server 日志: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md index f86039effd5..c2ee756591f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy.md @@ -4,7 +4,7 @@ title: nginx-proxy 故障排除 每个没有 `controlplane` 角色的节点上都部署了 `nginx-proxy` 容器。`nginx-proxy` 基于具有 `controlplane` 角色的可用节点来动态生成 NGINX 配置,从而提供对这些 `controlplane` 角色节点的访问。 -# 检查容器是否正在运行 +## 检查容器是否正在运行 该容器称为 `nginx-proxy`,它的状态应该是 `Up`。`Up` 后面显示的时间指的是容器运行的时间。 @@ -20,7 +20,7 @@ CONTAINER ID IMAGE COMMAND CREATED c3e933687c0e rancher/rke-tools:v0.1.15 "nginx-proxy CP_HO..." 3 hours ago Up 3 hours nginx-proxy ``` -# 检查生成的 NGINX 配置 +## 检查生成的 NGINX 配置 生成的配置包括了具有 `controlplane` 角色的节点的 IP 地址。你可以使用以下命令来检查配置: @@ -59,7 +59,7 @@ stream { } ``` -# nginx-proxy 容器日志记录 +## nginx-proxy 容器日志记录 容器的日志记录可能包含问题的信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md index 180e16a1d1c..ae6b283c056 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/kubernetes-components/troubleshooting-worker-nodes-and-generic-components.md @@ -4,7 +4,7 @@ title: Worker 节点和通用组件故障排除 本文包括了运行在所有角色节点上的组件,因此适用于每个节点。 -# 检查容器是否正在运行 +## 检查容器是否正在运行 具有 `worker` 角色的节点上启动了两个容器: @@ -24,7 +24,7 @@ CONTAINER ID IMAGE COMMAND a30717ecfb55 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." 3 hours ago Up 3 hours kubelet ``` -# 容器日志记录 +## 容器日志记录 容器的日志记录可能包含问题的信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md index a58ee8b2b82..01747944e49 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.6/troubleshooting/other-troubleshooting-tips/logging.md @@ -12,8 +12,10 @@ Rancher 使用了以下日志级别: ### 如何配置日志级别 -* Kubernetes 安装 +#### Kubernetes 安装 + * 配置 debug 日志级别 + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set debug; done @@ -24,6 +26,7 @@ $ kubectl -n cattle-system logs -l app=rancher -c rancher ``` * 配置 info 日志级别 + ``` $ KUBECONFIG=./kube_config_cluster.yml $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set info; done @@ -32,8 +35,10 @@ OK OK ``` -* Docker 安装 +#### Docker 安装 + * 配置 debug 日志级别 + ``` $ docker exec -ti loglevel --set debug OK @@ -41,6 +46,7 @@ $ docker logs -f ``` * 配置 info 日志级别 + ``` $ docker exec -ti loglevel --set info OK