Kubernetes Ingress Enable Http2

10/3/2021

I have a k8s deployment on an azure cluster, connected to a service, exposed via an ingress like below:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  namespace: infrastructure--buildfarm
  name: buildfarm-ingress
  annotations:
    kubernetes.io/ingress.class: nginx-internal
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/use-regex: "true"
    cert-manager.io/cluster-issuer: selfsigned-cluster-issuer
spec:
  rules:
  - host: buildfarm.dev.azr.internal.mydomain.com
    http:
      paths:
      - backend:
          serviceName: aks-buildfarm
          servicePort: 8980
        path: /(.*)

I'm trying to execute a simple build using the bazel buildfarm API for bazel, but end up with the following error:

eito@fuji:~/MyRepo$ bazel --client_debug build //examples/... --remote_executor=grpcs://buildfarm.azr.internal.mydomain.com/
[INFO 17:07:22.373 src/main/cpp/option_processor.cc:407] Looking for the following rc files: /etc/bazel.bazelrc,/home/eito/MyRepo/.bazelrc,/home/eito/.bazelrc
[INFO 17:07:22.373 src/main/cpp/rc_file.cc:56] Parsing the RcFile /home/eito/MyRepo/.bazelrc
[INFO 17:07:22.373 src/main/cpp/rc_file.cc:56] Parsing the RcFile user.bazelrc
[INFO 17:07:22.373 src/main/cpp/rc_file.cc:129] Skipped optional import of user.bazelrc, the specified rc file either does not exist or is not readable.
[INFO 17:07:22.373 src/main/cpp/rc_file.cc:56] Parsing the RcFile /home/eito/.bazelrc
[INFO 17:07:22.374 src/main/cpp/blaze.cc:1626] Debug logging requested, sending all client log statements to stderr
[INFO 17:07:22.374 src/main/cpp/blaze.cc:1509] Acquired the client lock, waited 0 milliseconds
[INFO 17:07:22.376 src/main/cpp/blaze.cc:1697] Trying to connect to server (timeout: 30 secs)...
[INFO 17:07:22.381 src/main/cpp/blaze.cc:1264] Connected (server pid=240772).
[INFO 17:07:22.381 src/main/cpp/blaze.cc:1974] Releasing client lock, let the server manage concurrent requests.
INFO: Invocation ID: d00bb07c-440c-4220-a04a-74cb54ef9913
ERROR: Failed to query remote execution capabilities: io.grpc.StatusRuntimeException: UNKNOWN: HTTP status code 0
invalid content-type: null
headers: Metadata(:status=000,date=Fri, 01 Oct 2021 16:07:26 GMT,strict-transport-security=max-age=15724800; includeSubDomains)
DATA-----------------------------
��� 
DATA-----------------------------
h���Unexpected HTTP/1.x request: POST /build.bazel.remote.execution.v2.Capabilities/GetCapabilities 
DATA-----------------------------

[INFO 17:07:26.261 src/main/cpp/blaze.cc:2093] failure_detail: message: "Failed to query remote execution capabilities: io.grpc.StatusRuntimeException: UNKNOWN: HTTP status code 0\ninvalid content-type: null\nheaders: Metadata(:status=000,date=Fri, 01 Oct 2021 16:07:26 GMT,strict-transport-security=max-age=15724800; includeSubDomains)\nDATA-----------------------------\n\000\000\022\004\000\000\000\000\000\000\003\177\357\277\275\357\277\275\357\277\275\000\334\000\020\000\000\000\006\000\000 \000\000\000\004\010\000\000\000\000\000\000\019\000\001\nDATA-----------------------------\n\000\000h\007\000\000\000\000\000\177\357\277\275\357\277\275\357\277\275\000\000\000\001Unexpected HTTP/1.x request: POST /build.bazel.remote.execution.v2.Capabilities/GetCapabilities \nDATA-----------------------------\n"
remote_execution {
  code: CAPABILITIES_QUERY_FAILURE
}

I've asked on their slack, and was told I need to use HTTP2 for my ingress, since the error implies I am trying to convert HTTP1->HTTP2. How could I modify my ingress so it uses HTTP2?

I've looked around https://developer-docs.citrix.com/projects/citrix-k8s-ingress-controller/en/latest/how-to/http-use-cases/#http2-upgrade and saw that it requires re-configuration of our nginx controller?

Is there an easier way of doing this instead of taking a deep dive with the nginx controllers? Or am I missing something?

-- M80
bazel
http
kubernetes

0 Answers