Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Authentication k8s中带微服务的认证用大使Api网关_Authentication_Kubernetes_Api Gateway_Ambassador - Fatal编程技术网

Authentication k8s中带微服务的认证用大使Api网关

Authentication k8s中带微服务的认证用大使Api网关,authentication,kubernetes,api-gateway,ambassador,Authentication,Kubernetes,Api Gateway,Ambassador,大使版本:0.86.1 我正在使用大使api网关v1 我希望大使为后端服务进行身份验证。 我在后端服务上配置了以下注释: annotations: getambassador.io/config: | --- apiVersion: ambassador/v1 kind: Mapping name: backend-service ambassador_id: backend prefix: / ser

大使版本:0.86.1

我正在使用大使api网关v1 我希望大使为后端服务进行身份验证。 我在后端服务上配置了以下注释:

 annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v1
      kind: Mapping
      name: backend-service
      ambassador_id: backend
      prefix: /
      service: backend-service:3000
      timeout_ms: 120000
      ---
      apiVersion: ambassador/v1
      kind: AuthService
      name: authentication-service
      ambassador_id: backend
      auth_service: "auth-service.auth-ns:3000"
      status_on_error:
        code: 502
      timeout_ms: 120000
      allowed_request_headers:
      - "x-api-key"
      allowed_authorization_headers:
      - "solution"
当我从不同命名空间中的另一个pod调用服务时,此请求不会通过auth服务路由,所有请求都会通过,即使没有通过x-api-key头: 卷曲 如何做到这一点?我只想从k8s集群中的调用后端服务