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

kube-proxy kubeconfig apiserver is wrong when using kubespray 2.14 #6924

Closed
snowmansora opened this issue Nov 18, 2020 · 5 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@snowmansora
Copy link

snowmansora commented Nov 18, 2020

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.

@snowmansora snowmansora added the kind/bug Categorizes issue or PR as related to a bug. label Nov 18, 2020
@floryut
Copy link
Member

floryut commented Nov 18, 2020

The kube_proxy_remove was indeed remove with #6512

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 16, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 18, 2021
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants