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

Fix leader election in kube-addon manager #80575

merged 1 commit into from Jul 25, 2019


Copy link

commented Jul 25, 2019

kube-addon-manager doesn't implement it's own leader election logic -- it rather tries to follow kube-controller-manager.

Apparently, it fails to do so, as in logs I see:

INFO: == Kubernetes addon reconcile completed at 2019-07-25T11:55:26+00:00 ==
The connection to the server localhost:8080 was refused - did you specify the right host or port?
INFO: Leader is 

This is caused by lack of ${KUBECTL_OPTS} opts in kubectl call, which makes it tries to reach localhost:8080 instead of the endpoint set in kubeconfig:

Given that the default localhost:8080 port is disabled in 1.15, I think we should consider cherry-picking this PR to that branch as well.

/assign @wojtek-t

What type of PR is this?
/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fixed a bug in kube-addon-manager's leader election logic that made all replicas active.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


This comment has been minimized.

Copy link

commented Jul 25, 2019

Great finding - yes we definitely should cherrypick it.


@k8s-ci-robot k8s-ci-robot added the lgtm label Jul 25, 2019


This comment has been minimized.

Copy link

commented Jul 25, 2019


This pull-request has been approved by: mborsz, wojtek-t

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 merged commit a1f4c2e into kubernetes:master Jul 25, 2019

23 checks passed

cla/linuxfoundation mborsz authorized
pull-kubernetes-bazel-build Job succeeded.
pull-kubernetes-bazel-test Job succeeded.
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
pull-kubernetes-e2e-gce Job succeeded.
pull-kubernetes-e2e-gce-100-performance Job succeeded.
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
pull-kubernetes-node-e2e-containerd Job succeeded.
pull-kubernetes-typecheck Job succeeded.
pull-kubernetes-verify Job succeeded.
pull-publishing-bot-validate Skipped.
tide In merge pool.

mboersma added a commit to mboersma/aks-engine that referenced this pull request Aug 8, 2019

acs-bot added a commit to Azure/aks-engine that referenced this pull request Aug 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.