- 概述
- 要求
- 预安装
- 安装
- 安装后
- 迁移和升级
- 监控和警示
- 集群管理
- 特定于产品的配置
- 故障排除
- 由于无法连接到 Azure Government,备份设置不起作用
- 启用自定义节点污点时,UiPath 命名空间中的 Pod 卡住
- 无法使用代理设置启动 Automation Hub 和 Apps
- 由于“验证失败”错误,Velero 备份失败
- 外部密码故障排除
- 时间即服务故障排除
- 无法在启用 TLS 证书验证的情况下启动 AI Center 和 Document Understanding Pod
- TLS 证书验证错误
- Fluentd 不会在 IPv6 环境中导出日志
- Studio 桌面版无法加载 Integration Service 连接器和活动
- 手动 ArgoCD 网络策略缓解措施 (MHSA-47m3-95c7-g2g8)
- 为 uipathctl 创建的工作负载配置资源请求和限制
授予安装权限
在 EKS/AKS 上授予安装 Automation Suite 的必要权限。
仅当您无法为 Automation Suite 安装程序提供管理员权限时,安装权限才有意义。 如果您可以为安装程序提供所需的管理员权限,则无需遵循本部分中的说明。
Automation Suite 依赖于安装过程中的特定权限。 这些权限已分配给服务帐户,该帐户在安装各种 Automation Suite 组件时发挥着关键作用。
要配置安装所需的所有权限,请执行本部分中的步骤。
步骤 1:创建服务帐户
要创建服务帐户,请执行以下步骤:
- 创建
<uipath>命名空间:kubectl create namespace <uipath>kubectl create namespace <uipath> - 创建一个名为
uipathadmin的服务帐户:kubectl create serviceaccount uipathadmin -n <uipath>kubectl create serviceaccount uipathadmin -n <uipath> - 使用现有的
admin集群角色向<uipath>命名空间中的uipathadmin服务帐户授予管理员权限:kubectl create rolebinding uipathadmin --clusterrole=admin --serviceaccount=<uipath>:uipathadmin -n <uipath>kubectl create rolebinding uipathadmin --clusterrole=admin --serviceaccount=<uipath>:uipathadmin -n <uipath>
步骤 2:创建所需的角色
uipathadmin服务帐户在 Automation Suite 安装期间需要特定权限。您可以通过创建角色来提供必要的权限。要创建每个角色,请将其配置保存为 YAML 文件,然后运行以下命令,并将<file_name.yaml>占位符替换为 YAML 文件的实际名称:
kubectl apply -f <file_name.yaml>
kubectl apply -f <file_name.yaml>
您可以通过复制以下部分中的配置来为每个角色创建 YAML 文件。
查询命名空间 [只读]
用于检查命名空间(如<istio-system>命名空间)是否可用。
以下示例显示了namespace-reader-clusterrole ClusterRole 配置:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: namespace-reader-clusterrole
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: namespace-reader-clusterrole
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
列出节点和 CRD [只读]
先决条件检查和诊断性运行状况检查工具需要此权限才能执行节点验证,例如节点上的可用容量。
以下示例显示了list-nodes-and-crd-clusterrole ClusterRole 配置:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: list-nodes-and-crd-clusterrole
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list", "get"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["list"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes"]
verbs: ["list", "get"]
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
verbs: ["get"]
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: list-nodes-and-crd-clusterrole
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list", "get"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["list"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes"]
verbs: ["list", "get"]
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
verbs: ["get"]
如果这些权限在您的集群中不可用,Automation Suite Robot 无法自动确定最大并发作业数。要显式定义限制,请在 concurrency_limit 的 asrobots 部分中配置 input.json。有关详细信息,请参阅Automation Suite Robot 特定配置。
获取存储类 [只读]
先决条件检查和诊断性运行状况检查工具需要此权限才能执行验证。
以下示例显示了storage-class-reader ClusterRole 配置:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: storage-class-reader
rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get"]
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: storage-class-reader
rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get"]
uipath 角色 [write]
大部分 Automation Suite 安装都是通过 ArgoCD 执行的;但是,某些组件是通过 Helm 图表安装的。
uipathctl工具运行安装作业,该作业会执行 Helm 图表安装。连接到kube-api-server并在<uipath>命名空间中安装 Helm 图表,需要命名空间级别的角色创建者角色。
以下示例显示了uipath-automationsuite-role角色配置:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: uipath-automationsuite-role
namespace: <uipath>
rules:
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["*"]
- apiGroups: ["*"]
resources: ["secrets", "configmaps"]
verbs: ["get", "watch", "list", "patch", "update", "create"]
- apiGroups: ["security.istio.io", "networking.istio.io"]
resources: ["*"]
verbs: ["*"]
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: uipath-automationsuite-role
namespace: <uipath>
rules:
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["*"]
- apiGroups: ["*"]
resources: ["secrets", "configmaps"]
verbs: ["get", "watch", "list", "patch", "update", "create"]
- apiGroups: ["security.istio.io", "networking.istio.io"]
resources: ["*"]
verbs: ["*"]
<istio-system> 角色 [write]
仅当您希望安装程序配置 WASM 插件时,才提供这些权限。 否则,不提供权限。
在<istio-system>命名空间中执行以下操作:
- Automation Suite 先决条件检查工具会读取 Pod 和服务,以验证是否已正确安装和配置 Istio。
- Automation Suite 安装 WASM 插件以配置基于路径的路由规则。这需要创建映像拉取密码和命名空间级别的角色创建者权限。
以下示例显示了istio-system-automationsuite-role角色配置:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: istio-system-automationsuite-role
namespace: <istio-system>
rules:
- apiGroups: [""]
resources: ["services", "pods"]
verbs: ["list"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["*"]
- apiGroups: ["*"]
resources: ["secrets", "configmaps"]
verbs: ["get", "watch", "list", "patch", "update", "create"]
- apiGroups: ["networking.istio.io", "extensions.istio.io"]
resources: ["*"]
verbs: ["*"]
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: istio-system-automationsuite-role
namespace: <istio-system>
rules:
- apiGroups: [""]
resources: ["services", "pods"]
verbs: ["list"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["*"]
- apiGroups: ["*"]
resources: ["secrets", "configmaps"]
verbs: ["get", "watch", "list", "patch", "update", "create"]
- apiGroups: ["networking.istio.io", "extensions.istio.io"]
resources: ["*"]
verbs: ["*"]
<istio-system> 角色 [只读]
如果已配置 Istio 和 WASM 插件,请提供这些权限。
在<istio-system>命名空间中执行以下操作:
- 读取 Pod 和服务以验证 Istio 安装。
- 需要
get secrets权限才能将证书文件从<istio-system>命名空间复制到<uipath>命名空间。
以下示例显示了istio-system-automationsuite-role角色配置:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: istio-system-automationsuite-role
namespace: <istio-system>
rules:
- apiGroups: [""]
resources: ["services", "pods"]
verbs: ["list"]
- apiGroups: ["*"]
resources: ["secrets"]
resourceNames: ["istio-ingressgateway-certs"]
verbs: ["get"]
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: istio-system-automationsuite-role
namespace: <istio-system>
rules:
- apiGroups: [""]
resources: ["services", "pods"]
verbs: ["list"]
- apiGroups: ["*"]
resources: ["secrets"]
resourceNames: ["istio-ingressgateway-certs"]
verbs: ["get"]
步骤 3:绑定角色
您必须通过运行以下命令,将上一步中创建的角色绑定到uipathadmin服务帐户:
kubectl -n <istio-system> create rolebinding istio-system-automationsuite-rolebinding \
--role=istio-system-automationsuite-role --serviceaccount=<uipath>:uipathadmin
kubectl -n <istio-system> create rolebinding namespace-reader-rolebinding \
--clusterrole=namespace-reader-clusterrole --serviceaccount=<uipath>:uipathadmin
kubectl -n <uipath> create clusterrolebinding list-nodes-and-crd-rolebinding \
--clusterrole=list-nodes-and-crd-clusterrole --serviceaccount=<uipath>:uipathadmin
kubectl -n <uipath> create rolebinding uipath-automationsuite-rolebinding \
--role=uipath-automationsuite-role --serviceaccount=<uipath>:uipathadmin
kubectl -n <uipath> create clusterrolebinding storage-class-reader-binding \
--clusterrole=storage-class-reader --serviceaccount=<uipath>:uipathadmin
# This step is needed only if you want installer to configure the WASM Plugin. Otherwise skip it.
kubectl -n <istio-system> create rolebinding uipadmin-istio-system \
--clusterrole=admin --serviceaccount=<uipath>:uipathadmin
kubectl -n <istio-system> create rolebinding istio-system-automationsuite-rolebinding \
--role=istio-system-automationsuite-role --serviceaccount=<uipath>:uipathadmin
kubectl -n <istio-system> create rolebinding namespace-reader-rolebinding \
--clusterrole=namespace-reader-clusterrole --serviceaccount=<uipath>:uipathadmin
kubectl -n <uipath> create clusterrolebinding list-nodes-and-crd-rolebinding \
--clusterrole=list-nodes-and-crd-clusterrole --serviceaccount=<uipath>:uipathadmin
kubectl -n <uipath> create rolebinding uipath-automationsuite-rolebinding \
--role=uipath-automationsuite-role --serviceaccount=<uipath>:uipathadmin
kubectl -n <uipath> create clusterrolebinding storage-class-reader-binding \
--clusterrole=storage-class-reader --serviceaccount=<uipath>:uipathadmin
# This step is needed only if you want installer to configure the WASM Plugin. Otherwise skip it.
kubectl -n <istio-system> create rolebinding uipadmin-istio-system \
--clusterrole=admin --serviceaccount=<uipath>:uipathadmin
步骤 4:生成 kubeconfig 文件
将所有权限分配给服务帐户后,必须创建一个kubeconfig文件,以传递给uipathctl工具进行安装。
在 Linux 或 Mac 上生成 kubeconfig 文件
要在 Linux 或 Mac 上生成kubeconfig文件,请运行以下命令:
# Create a token
token="$(kubectl -n <uipath> create token uipathadmin --duration=8760h)"
# copy current kubeconfig to a temp file
mkdir temp
cp ~/.kube/config temp/kubeconfig.tmp
# Find the user name and unset it in the temp file
kube_user_name="$(kubectl config view -o jsonpath="{.users[0].name}")"
kubectl -n <uipath> config unset users."${kube_user_name}" --kubeconfig="temp/kubeconfig.tmp"
# Update the credentials in the temp file
kubectl -n <uipath> --kubeconfig="temp/kubeconfig.tmp" config set-credentials uipathadmin --token="$token"
# Set the context and the namespace
kubectl --kubeconfig="temp/kubeconfig.tmp" config set-context --current --namespace=<uipath> --user=uipathadmin
mv temp/kubeconfig.tmp temp/uipathadminkubeconfig
# Create a token
token="$(kubectl -n <uipath> create token uipathadmin --duration=8760h)"
# copy current kubeconfig to a temp file
mkdir temp
cp ~/.kube/config temp/kubeconfig.tmp
# Find the user name and unset it in the temp file
kube_user_name="$(kubectl config view -o jsonpath="{.users[0].name}")"
kubectl -n <uipath> config unset users."${kube_user_name}" --kubeconfig="temp/kubeconfig.tmp"
# Update the credentials in the temp file
kubectl -n <uipath> --kubeconfig="temp/kubeconfig.tmp" config set-credentials uipathadmin --token="$token"
# Set the context and the namespace
kubectl --kubeconfig="temp/kubeconfig.tmp" config set-context --current --namespace=<uipath> --user=uipathadmin
mv temp/kubeconfig.tmp temp/uipathadminkubeconfig
如果操作成功,您应该会看到一个名为uipathadminkubeconfig的kubeconfig文件。
在 Windows 上生成 kubeconfig 文件
您必须使用 Windows Powershell 执行此步骤。
要在 Windows 上生成 kubeconfig 文件,请运行以下命令:
# Create a token
$token = kubectl -n <uipath> create token uipathadmin --duration=8760h
# copy current kubeconfig to a temp file
mkdir temp
cp ~/.kube/config temp/kubeconfig.tmp
# Find the user name and unset it in the temp file
$kube_user_name = kubectl config view -o jsonpath="{.users[0].name}"
kubectl -n <uipath> config unset users."${kube_user_name}" --kubeconfig="temp/kubeconfig.tmp"
# Update the credentials in the temp file
kubectl -n <uipath> --kubeconfig="temp/kubeconfig.tmp" config set-credentials uipathadmin --token="$token"
# Set the context and the namespace
kubectl --kubeconfig="temp/kubeconfig.tmp" config set-context --current --namespace=<uipath> --user=uipathadmin
mv temp/kubeconfig.tmp temp/uipathadminkubeconfig
# Create a token
$token = kubectl -n <uipath> create token uipathadmin --duration=8760h
# copy current kubeconfig to a temp file
mkdir temp
cp ~/.kube/config temp/kubeconfig.tmp
# Find the user name and unset it in the temp file
$kube_user_name = kubectl config view -o jsonpath="{.users[0].name}"
kubectl -n <uipath> config unset users."${kube_user_name}" --kubeconfig="temp/kubeconfig.tmp"
# Update the credentials in the temp file
kubectl -n <uipath> --kubeconfig="temp/kubeconfig.tmp" config set-credentials uipathadmin --token="$token"
# Set the context and the namespace
kubectl --kubeconfig="temp/kubeconfig.tmp" config set-context --current --namespace=<uipath> --user=uipathadmin
mv temp/kubeconfig.tmp temp/uipathadminkubeconfig
如果操作成功,您应该会在kubeconfig uipathadminkubeconfigtemp文件夹中看到一个名为 的 文件。