我正在尝试使用istio进行jwt验证。我有一个标签为app=auth-verify的应用程序在端口3000上运行,它有一个端点/auth,它将检查授权报头。主应用程序具有标签app=backend,它希望auth-verify应用程序验证jwt并添加标题x-authenticated。下面是我在EnvoyFilter上的CRD。
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: jwt-verification
namespace: default
spec:
workloadSelector:
labels:
app=backend
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: "envoy.filters.network.http_connection_manager"
subFilter:
name: "envoy.filters.http.router"
patch:
operation: INSERT_BEFORE
filterClass: STATS
value:
name: envoy.filters.http.ext_authz
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
http_service:
server_uri:
uri: http://auth-verify.default.svc.cluster.local:3000/auth
cluster: outbound|3000||http://auth-verify
timeout: 5s
status_on_error:
code: FailedDependency当我通过kubectl logs --tail 1 -f backend-695cf5b89d-nkgps istio-proxy检查后端pod上的日志时,我可以看到这个错误。
debug envoy config ext_authz cluster 'outbound|3000||http://auth-verify' does not exist
debug envoy http [C9552][S4342964409469864253] Sending local reply with details ext_authz_error我该如何解决这个问题呢?
发布于 2021-03-28 23:02:17
我的错误是在集群字符串中添加了'http://‘’。通过更改为cluster: outbound|3000||auth-verify.default.svc.cluster.local使其正常工作
https://stackoverflow.com/questions/66797164
复制相似问题