使用 istioctl kube-inject 生成的 init-container ,会有如下格式的参数:
initContainers:
- args:
- -p
- "15001"
- -u
- "1337"
- -m
- REDIRECT
- -i
- '*'
- -x
- ""
- -b
- "9080"
- -d
- ""
其中 uid 1337 很诡异,根据 istio 的 ./tools/deb/istio-iptables.sh -h 命令文档说明:
-u: Specify the UID of the user for which the redirection is not
applied. Typically, this is the UID of the proxy container
(default to uid of $ENVOY_USER, uid of istio_proxy, or 1337)
以及代码 istio-proxy uid hardcoded 可以定位到 1337 是 istio 写死在代码里面的,后续 istio 加上了说明:https://github.com/istio/istio.io/pull/2940/files
_**Application UIDs**_: Do **not** run applications as a user with the user ID (UID) value of **1337**.
本文探讨了使用istioctl kube-inject生成的init-container中神秘的UID1337参数,解释了其在Istio环境中的作用及为何应用不应使用此UID。
94

被折叠的 条评论
为什么被折叠?



