mirror of https://github.com/istio/istio.io.git
[zh] Sync platform-setup/openshift (#14008)
Signed-off-by: ii2day <ji.li@daocloud.io>
This commit is contained in:
parent
5dcf9b348a
commit
23c54b5bd6
|
@ -13,14 +13,6 @@ test: no
|
|||
|
||||
根据以下操作指南 为 Istio 准备一个 OpenShift 集群。
|
||||
|
||||
默认情况下,OpenShift 不允许容器使用 User ID(UID)1337 来运行。通过以下命令可以让 Istio
|
||||
的服务账户(Service Account)以 UID 1337 来运行容器(如果您将 Istio 部署到其它 Namespace,
|
||||
请注意替换 `istio-system`):
|
||||
|
||||
{{< text bash >}}
|
||||
$ oc adm policy add-scc-to-group anyuid system:serviceaccounts:istio-system
|
||||
{{< /text >}}
|
||||
|
||||
使用 OpenShift 配置文件进行安装 Istio:
|
||||
|
||||
{{< text bash >}}
|
||||
|
@ -32,18 +24,3 @@ $ istioctl install --set profile=openshift
|
|||
{{< text bash >}}
|
||||
$ oc -n istio-system expose svc/istio-ingressgateway --port=http2
|
||||
{{< /text >}}
|
||||
|
||||
## Sidecar 应用的安全上下文约束(SCC){#security-context-constraints-for-application-sidecars}
|
||||
|
||||
OpenShift 默认是不允许 Istio Sidecar 注入到每个应用 Pod 中以用户 ID 为 1377 来运行的。
|
||||
要允许使用该 UID 运行,需要执行以下命令(注意替换 `<target-namespace>` 为适当的 Namespace):
|
||||
|
||||
{{< text bash >}}
|
||||
$ oc adm policy add-scc-to-group anyuid system:serviceaccounts:<target-namespace>
|
||||
{{< /text >}}
|
||||
|
||||
当需要移除应用时,请按以下操作移除权限:
|
||||
|
||||
{{< text bash >}}
|
||||
$ oc adm policy remove-scc-from-group anyuid system:serviceaccounts:<target-namespace>
|
||||
{{< /text >}}
|
||||
|
|
Loading…
Reference in New Issue