Skip to content
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

[external-lb]: kubelet.conf server address and kube-proxy api-server address fix #10490

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

ugur99
Copy link
Contributor

@ugur99 ugur99 commented Sep 30, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:
When trying to configure external lb address for already provisioned clusters; it does not set correct external lb fqdn address for worker nodes, instead of it sets first controlplane's ip address.

The problem is that kubeadm does not update the kubeadm-config configmap in kube-system namespace; it only creates that config in kubeadm init phase, even though it creates new ClusterConfiguration on controlplane node in /etc/kubernetes/kubeadm-config.yaml path. Since worker nodes fetch configMap on the cluster when the kubeadm join ... command is run, it was fetching old clusterConfig in already provisioned clusters.

To fix this problem, we added a new task to update kubelet.conf in worker nodes. We also noticed that kube_proxy was not getting the right address for external lb is the case; and we added logic to update kube_proxy config as well.

EDIT: Just a quick edit to fix misunderstanding on my side; it looks like kubeadm fetches the cluster-info configmap in the kube-public namespace to create a new kubelet.conf. But it is the best to handle this on the kubespray side instead of relying on the configmap on the cluster.

Special notes for your reviewer:
For testing purposes, a new cluster was set up and tested.

Does this PR introduce a user-facing change?:

Fix external-lb in kubelet.conf server address and kube-proxy api-server address 

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 30, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 30, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ugur99 / name: Ugur Can Ozturk (c0c7787)
  • ✅ login: pehlicd / name: Furkan Pehlivan (2409876, 3b29bba)

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 30, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @ugur99. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 30, 2023
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 30, 2023
@yankay
Copy link
Member

yankay commented Oct 7, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 7, 2023
@ugur99
Copy link
Contributor Author

ugur99 commented Oct 13, 2023

Hi @yankay! Is there anything else you would like us to do regarding this PR? I think the failing required pipeline has nothing to do with our commits, right?

@yankay
Copy link
Member

yankay commented Oct 14, 2023

Hi @yankay! Is there anything else you would like us to do regarding this PR? I think the failing required pipeline has nothing to do with our commits, right?

HI @ugur99

The CI had been broken in 1st Oct, and it has been fixed :-)
Would you please repush it, and triger the CI to pass it again .

Thanks you :-)

@pehlicd
Copy link
Contributor

pehlicd commented Oct 14, 2023

Hi @yankay,

I merged master to our branch and triggered the CI again. It seems like there is no failed pipeline. Please let us know if you need further actions.

Thanks 🙂

@yankay
Copy link
Member

yankay commented Oct 15, 2023

Thanks @pehlicd

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2023
Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ugur99 Thank you for the PR 👍

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floryut, ugur99

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit 8cce6df into kubernetes-sigs:master Oct 17, 2023
59 checks passed
guytet pushed a commit to guytet/kubespray that referenced this pull request Oct 30, 2023
…address fix (kubernetes-sigs#10490)

* [external-lb-kubeconfig]: fix server address in worker kubelet.conf

Signed-off-by: Ugur Ozturk <[email protected]>

* [external-lb-kubeconfig]: fix server address in kube-proxy

Signed-off-by: Furkan Pehlivan <[email protected]>

---------

Signed-off-by: Ugur Ozturk <[email protected]>
Signed-off-by: Furkan Pehlivan <[email protected]>
Co-authored-by: Furkan Pehlivan <[email protected]>
@yankay yankay mentioned this pull request Dec 15, 2023
pedro-peter pushed a commit to pedro-peter/kubespray that referenced this pull request May 8, 2024
…address fix (kubernetes-sigs#10490)

* [external-lb-kubeconfig]: fix server address in worker kubelet.conf

Signed-off-by: Ugur Ozturk <[email protected]>

* [external-lb-kubeconfig]: fix server address in kube-proxy

Signed-off-by: Furkan Pehlivan <[email protected]>

---------

Signed-off-by: Ugur Ozturk <[email protected]>
Signed-off-by: Furkan Pehlivan <[email protected]>
Co-authored-by: Furkan Pehlivan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants