mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add proxy for container streaming in kubelet for streaming auth. For https://github.com/kubernetes/kubernetes/issues/36666, option 2 of https://github.com/kubernetes/kubernetes/issues/36666#issuecomment-378440458. This PR: 1. Removed the `DirectStreamingRuntime`, and changed `IndirectStreamingRuntime` to `StreamingRuntime`. All `DirectStreamingRuntime`s, `dockertools` and `rkt`, were removed. 2. Proxy container streaming in kubelet instead of returning redirect to apiserver. This solves the container runtime authentication issue, which is what we agreed on in https://github.com/kubernetes/kubernetes/issues/36666. Please note that, this PR replaced the redirect with proxy directly instead of adding a knob to switch between the 2 behaviors. For existing CRI runtimes like containerd and cri-o, they should change to serve container streaming on localhost, so as to make the whole container streaming connection secure. If a general authentication mechanism proposed in https://github.com/kubernetes/kubernetes/issues/62747 is ready, we can switch back to redirect, and all code can be found in github history. Please also note that this added some overhead in kubelet when there are container streaming connections. However, the actual bottleneck is in the apiserver anyway, because it does proxy for all container streaming happens in the cluster. So it seems fine to get security and simplicity with this overhead. @derekwaynecarr @mrunalp Are you ok with this? Or do you prefer a knob? @yujuhong @timstclair @dchen1107 @mikebrow @feiskyer /cc @kubernetes/sig-node-pr-reviews **Release note**: ```release-note Kubelet now proxies container streaming between apiserver and container runtime. The connection between kubelet and apiserver is authenticated. Container runtime should change streaming server to serve on localhost, to make the connection between kubelet and container runtime local. In this way, the whole container streaming connection is secure. To switch back to the old behavior, set `--redirect-container-streaming=true` flag. ``` |
||
---|---|---|
.. | ||
clicheck | ||
cloud-controller-manager | ||
controller-manager | ||
gendocs | ||
genkubedocs | ||
genman | ||
genswaggertypedocs | ||
genutils | ||
genyaml | ||
hyperkube | ||
importverifier | ||
kube-apiserver | ||
kube-controller-manager | ||
kube-proxy | ||
kube-scheduler | ||
kubeadm | ||
kubectl | ||
kubelet | ||
kubemark | ||
linkcheck | ||
BUILD | ||
OWNERS |