Description
What would you like to be added?
It would be nice to have the option to pass along custom headers from kubectl to the k8s api. This would allow for more security options to be used, possibly tracing options or monitoring options as well.
Thinking it could look something like
kubectl get pods --customheader foo:bar --customheader far:bar
It should work with any command as it would need to be global, since any api call could possibly need the custom header ability.
It could also be an option in the kubeconfig per cluster. That way it would not need to be set every single command.
Why is this needed?
It's a best practice to lock down the k8s api, via networking layer, and not run it on the public internet. This requires the api to either have a firewall on it that only allows traffic from specific IPs or to be internal to a network and then some proxy is required to reach it externally, which is typically locked down to IPs as well.
If we had the ability to pass custom headers, we could use zero trust security products that could front the api and then allow much stronger identity based access to the API. This would allow for multi factor auth on k8s API, by locking down the API to only users that need access to it, then on top of that, k8s based authn/z. Allowing for both factors of security is a good way to prevent zero day issues effecting your api. This also allows for k8s to be fully supported by zero trust solutions.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status