Kubernetes “为什么要这么做?”;“身份验证策略”;示例页面为';你没按预期工作吗?
文章如下: 具体地说,当我按照Kubernetes “为什么要这么做?”;“身份验证策略”;示例页面为';你没按预期工作吗?,kubernetes,istio,Kubernetes,Istio,文章如下: 具体地说,当我按照设置部分的说明操作时,我无法连接位于命名空间foo和bar中的任何httpbin。但是遗留的是可以的。我想正在安装的侧车代理可能有问题 这是httpbinpod yaml文件的输出(在注入istioctl kubeinject--includeIPRanges“10.32.0.0/16”命令后)。我使用--includeIPRanges,以便pod可以与外部ip通信(用于我安装dnsutils等软件包的调试目的) 下面是我收到错误sleep.legacy->http
设置
部分的说明操作时,我无法连接位于命名空间foo
和bar
中的任何httpbin
。但是遗留的
是可以的。我想正在安装的侧车代理可能有问题
这是httpbin
pod yaml文件的输出(在注入istioctl kubeinject--includeIPRanges“10.32.0.0/16”
命令后)。我使用--includeIPRanges
,以便pod可以与外部ip通信(用于我安装dnsutils
等软件包的调试目的)
下面是我收到错误sleep.legacy->httpbin.foo时的示例命令
> kubectl exec $(kubectl get pod -l app=sleep -n legacy -o jsonpath={.items..metadata.name}) -c sleep -n legacy -- curl http://httpbin.foo:8000/ip -s -o /dev/null -w "%{http_code}\n"
000
command terminated with exit code 7
**下面是获得成功状态时的示例命令:sleep.legacy->httpbin.legacy**
> kubectl exec $(kubectl get pod -l app=sleep -n legacy -o jsonpath={.items..metadata.name}) -csleep -n legacy -- curl http://httpbin.legacy:8000/ip -s -o /dev/null -w "%{http_code}\n"
200
我已按照指示确保未定义mtls政策等
> kubectl get policies.authentication.istio.io --all-namespaces
No resources found.
> kubectl get meshpolicies.authentication.istio.io
No resources found.
> kubectl get destinationrules.networking.istio.io --all-namespaces -o yaml | grep "host:"
host: istio-policy.istio-system.svc.cluster.local
host: istio-telemetry.istio-system.svc.cluster.local
NVM,我想我找到了原因。在我的角色中有一个配置被弄乱了。 如果查看statsd地址,它是用无法识别的主机名定义的。
istio statsd prom bridge.istio system.istio system:9125
。我注意到,在多次查看代理容器被重新启动/崩溃之后
> kubectl get policies.authentication.istio.io --all-namespaces
No resources found.
> kubectl get meshpolicies.authentication.istio.io
No resources found.
> kubectl get destinationrules.networking.istio.io --all-namespaces -o yaml | grep "host:"
host: istio-policy.istio-system.svc.cluster.local
host: istio-telemetry.istio-system.svc.cluster.local