-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
kube-proxy kubeconfig apiserver is wrong when using kubespray 2.14 #6924
Comments
The |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closing this issue. In response to this:
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. |
Environment:
Cloud provider or hardware configuration:
OS (
printf "$(uname -srm)\n$(cat /etc/os-release)\n"
):Version of Ansible (
ansible --version
):2.9.15
Version of Python (
python --version
):2.7.17
Kubespray version (commit) (
git rev-parse --short HEAD
):2.14.2
Network plugin used:
Flannel
Full inventory with variables (
ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"
):3 nodes cluster, all nodes are kube-master and kube-node.
Command used to invoke ansible:
cluster.yml playbook
Output of ansible run:
Anything else do we need to know:
After deployment, I found that the apiserver in kubeconfig.conf inside kube-system/kube-proxy configmap is pointing to the first kube-master IP, when it should be "https://127.0.0.1:6443" (I am using loadbalancer_apiserver_type: "nginx").
This will be a problem when first kube-master is down!
After troubleshooting, problem is caused by https://github.com/kubernetes-sigs/kubespray/blob/v2.14.2/roles/kubespray-defaults/defaults/main.yaml#L36, where "false" is not evaluated to (Bool)False in https://github.com/kubernetes-sigs/kubespray/blob/v2.14.2/roles/kubernetes/kubeadm/tasks/main.yml#L126.
Problem can be fixed by updating "false" to "False" in https://github.com/kubernetes-sigs/kubespray/blob/v2.14.2/roles/kubespray-defaults/defaults/main.yaml#L36.
This problem may be particular to kubespary 2.14 as "kube_proxy_remove" is not defined in master branch.
The text was updated successfully, but these errors were encountered: