Istio入口网关,收到403禁止错误 [英] Istio ingress gateway, getting 403 forbidden error
问题描述
我可以看到这些资源(Gateway&;VS)是从Kiali和命令行创建的。当我尝试访问位于curl -I -HHost:httpbin.example.com http://$INGRESS_HOST:$INGRESS_PORT/status/200
的终结点时,收到403 Forbidden error
。
推荐答案
我猜HTTP 403
问题可能与IstioAuthorization或Authentication网格配置有关,假设您已成功将EnvoySideCar注入特定Pod或广泛分布在相关命名空间中。
日志检查可能是最能说明问题的任务,确认Envoy's Access Logs已经启用,可以查看相关的istio-proxy
侧车和istio-ingressgateway
Pod日志;而可以获取Envoy proxy响应标志和流量路径工作流:
$ kubectl logs -l app=httpbin -c istio-proxy
[2019-03-06T09:31:27.360Z]"GET/Status/418 HTTP/1.1"418-"-"0 135 5 2"-""cURL/7.60.0""d209e46f-9ed5-9b61-bbdd-43e22662702a" "HTTPbin:8000""127.0.0.1:80" Inbound|8000|http|httpbin.default.svc.cluster.local-172.30.146.73:80 172.30.146.82:38618 outbound_.8000_._.httpbin.default.svc.cluster.local
在Mesh内检查Authentication Policies,这可能会影响SideCars代理行为,并在mTLS身份验证方面修改全局Mesh策略,Permissive模式默认启用:
$ kubectl get policies.authentication.istio.io --all-namespaces
$ kubectl get meshpolicy.authentication.istio.io default -oyaml
如果您在网格中启动了Authorization规则,请验证所有对应的RBAC策略:
$ kubectl get clusterrbacconfigs.rbac.istio.io --all-namespaces
$ kubectl get authorizationpolicies.rbac.istio.io,rbacconfigs.rbac.istio.io,servicerolebindings.rbac.istio.io,serviceroles.rbac.istio.io --all-namespaces
有关故障排除步骤的更多信息,请访问官方网站documentation。
这篇关于Istio入口网关,收到403禁止错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!