使用 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**.