New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use host IP instead of localhost for GKE control plane kubeconfig #95209
Conversation
Welcome @benhxy! |
Hi @benhxy. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I believe you need to specify None is release notes to remove do-not-merge/release-note-label-needed |
Why is this considered kind/cleanup? |
/ok-to-test |
/retest |
/assign @dchen1107 |
/retest |
/test pull-kubernetes-integration |
/test pull-kubernetes-node-e2e |
/test pull-kubernetes-integration |
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
/test pull-kubernetes-integration |
…ig files. This is a part of work to allow control plane components to be moved off hostNetwork.
/assign cheftako |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benhxy, dchen1107, roycaihw, vinayakankugoyal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
local kube_apiserver="localhost" | ||
if [[ ${KUBECONFIG_USE_HOST_IP:-} == "true" ]] ; then | ||
kube_apiserver=$(hostname -i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not ok, it produces a kubeconfig that sends a replayable credential over an unverified TLS connection. Reverting in 1.20.1, can bring this back in in 1.21 with a verified TLS connection if desired.
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR modifies kubeconfig file generation for GKE control plane components. Instead of using localhost:443 to target kube-apiserver, this change will use host IP. This is a part of work to allow GKE control plane components to be moved off hostNetwork, which will improve control plane security by isolating container network namespaces.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
no
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: