Can not find any issues.
I have to add several custom http headers to access my dedicate api-server proxy, but no clues available right now. Did I miss something?
This is a dirty hard coded hack to show you how to get the outcome your looking for it's not a fully vetted solution. This method will compile a new version of kubectl that will add your needed headers. Maybe it will at least give you a idea to run with.
The reason I wanted to do this is because I put my k8s api endpoint on the internet and safeguarded it with Cloudflare Access. To allow Cloudflare access to let me get past the steel wall I needed to pass in two headers one for my client id and the other for client secret. This ended up working like a charm and is one case someone may want to add custom headers.
Steps:
func (rt userAgentRoundTripper) RoundTrip(req http.Request) (*http.Response, error)
req.Header.Set("Bob-Is", "cool")
-H "Bob-Is: cool"
in the output