What I need to do is to make request without forwarding the port to the HTTP server located in k8s pod.
I have tried to make this request:
res := clientset.CoreV1().RESTClient().Get().
Namespace("default").
Resource("pods").
Name("my_pod_name:8080").
SubResource("proxy").
Suffix("api").
Do(context.Background())
and it is working for simple HTTP GET but I also need to pass headers and query parameters and I cannot do it using SetHeader.
Does a better solution/client exist for that case?