port-forward through a revser-proxy got 'error upgrading connection' error

276 views Asked by At

I have written a simple reverse proxy which will proxy requests to a K8s cluster. The reverse proxy is deployed in a cluster which use gloo as api gateway.

I can perform kubectl get pods operations outside the cluster, using the reverse proxy to proxy kubectl requests to kube-apiserver: kubectl -> gloo -> simple reverse proxy -> kube-apiserver

But when I do kubectl portward I find that the request gets exception at POST /api/v1/namespaces/<namespace>/pods/<pod name>/portforward with exception info error: error upgrading connection: enter image description here

From the exception, it seems that gloo does not support the http to spdy protocol upgrade. How to solve this problem?

Any advice is greatly appreciated.

0

There are 0 answers