kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
16.03k stars 6.45k forks source link

Using the playbook scale.yml to scale out cluster worker nodes will restart kube-proxy. #11272

Open leolingg opened 4 months ago

leolingg commented 4 months ago

What happened?

I noticed that using the playbook scale.yml to scale out the cluster worker nodes will restart kube-proxy.

The corresponding task: https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubernetes/kubeadm/tasks/main.yml#L204

Is it necessary to restart kube-proxy in the scenario where only worker nodes are being added?

What did you expect to happen?

In the case of only scaling out worker nodes, I don't think it is necessary to restart kube-proxy, so I believe this scenario can be optimized.

How can we reproduce it (as minimally and precisely as possible)?

This can be reproduced by using the playbook scale.yml to scale out the cluster worker nodes.

OS

Linux 6.8.0-35-generic x86_64

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.6
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Version of Ansible

ansible [core 2.12.5]
  config file = /kubespray/ansible.cfg
  configured module search path = ['/kubespray/library']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.13 (main, Aug 26 2023, 11:33:35) [GCC 12.2.1 20220924]
  jinja version = 3.1.2
  libyaml = True

Version of Python

Python 3.10.13

Version of Kubespray (commit)

774d824

Network plugin used

calico

Full inventory with variables

~

Command used to invoke ansible

ansible-playbook -i /conf/host.yml --become-user root -e "@/conf/group_vars.yml" --private-key /auth/ssh-privatekey /kubespray/scale.yml --limit=dev1-w-10-64-80-147 --forks=10

Output of ansible run

~

Anything else we need to know

No response

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 week ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten