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

Support specifying kube-proxy tolerations #699

Closed
discordianfish opened this issue Feb 12, 2018 · 14 comments · Fixed by kubernetes/kubernetes#62390 or kubernetes/kubernetes#65931
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.
Milestone

Comments

@discordianfish
Copy link

FEATURE REQUEST

kubeadm deploys kube-proxy with these tolerations:

      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
      - effect: NoSchedule
        key: node.cloudprovider.kubernetes.io/uninitialized
        value: "true"

This allows kube-proxy to run on masters but not any other tainted hosts. In my case, I want to taint a group of hosts to reserve them for special workloads. But they still need to run kube-proxy. I could just edit the daemonset directly but would prefer a declarative way (e.g kubeadm config) and I'm worried that kubeadm might revert this change on upgrades/replacing masters.

Alternatively the toleration could also just be made to apply to all NoSchedule taints which would solve my problem without introducing a new flag/config.

@discordianfish
Copy link
Author

I can confirm: kubeadm init seems to revert the tolerations, so this is required for prod operations.

@discordianfish
Copy link
Author

Related #609
A simple stop-gap would be to not touch the kube-proxy ds if possible.

@luxas Both issues are today the biggest problems we have using kubeadm in a prod/HA cluster. I can help fixing them if you can tell me how you'd like to approach these things. I can also bring that up somewhere more suitable to discuss this, don't really know where though.

@timothysc
Copy link
Member

/assign @chuckha @detiber

@timothysc timothysc added kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Apr 6, 2018
@timothysc timothysc added this to the v1.11 milestone Apr 6, 2018
@discordianfish
Copy link
Author

Any ideas already how to approach this? This hit us multiple time now and I'd be happy helping to fix this.

For something as fundamental as kube-proxy maybe just having a generic NoSchedule toleration would be fine?

@timothysc
Copy link
Member

/assign @fabriziopandini

@timothysc
Copy link
Member

@discordianfish - we're going to address in the 1.11 cycle, but the backlog is pretty Y'uge atm.

@discordianfish
Copy link
Author

@timothysc That's why I'm offering my help :)
So if there is a actionable plan or route to get there, I can look into it.

@discordianfish
Copy link
Author

So I think there are two options:

  1. Tolerate all taints, that's trivial to change

  2. Tolerate only specific taints but make it possible to use taints for special nodes (eg. GPU workers like in my case)

  3. Would be very involved since it would require a mechanism to update the kube-proxy manifest during runtime, all things given. The best way I can imaging to solve this would be changing the taints to allow them to specify pods for which it not applies. This way I could taint my workers for all pods except kube-proxy or maybe everything in kube-system.

So I'd just go with 1., at least for now. I think it's very rare that somebody wants to prevent kube-proxy from running on their nodes. At least it's arguably much more likely that somebody tainting their nodes want kube-proxy on it than not. Since it's so trivial, I'll just submit a PR for this where this approach can be discussed.

discordianfish added a commit to discordianfish/kubernetes that referenced this issue Apr 13, 2018
As a essential core component, kube-proxy should generally run on all
nodes even if the cluster operator taints nodes for special purposes.

This fixes kubernetes/kubeadm#699
@timothysc timothysc added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Apr 24, 2018
@mxey
Copy link

mxey commented Jun 28, 2018

This change was reverted/broken by the next commit to the manifest, kubernetes/kubernetes@d194926#diff-e3ad35b550d4fcbf99d00903a91c787e

@neolit123
Copy link
Member

^ @dixudx WDYT?

@luxas
Copy link
Member

luxas commented Jun 28, 2018

@mxey Yeah 😕
Let's fix this in v1.11.1

@luxas luxas reopened this Jun 28, 2018
@luxas luxas added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. kind/bug Categorizes issue or PR as related to a bug. and removed lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jun 28, 2018
@luxas luxas added cherrypick-candidate and removed kind/feature Categorizes issue or PR as related to a new feature. labels Jun 28, 2018
@timothysc
Copy link
Member

@kubernetes/sig-cluster-lifecycle-bugs - who is actively working on re-fixing this one?

@k8s-ci-robot k8s-ci-robot added the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Jul 3, 2018
@neolit123
Copy link
Member

i pinged @dixudx earlier because he made the last change in this space.
@dixudx, do you think you have time to fix this?

@timothysc timothysc self-assigned this Jul 3, 2018
@luxas
Copy link
Member

luxas commented Jul 6, 2018

/assign @neolit123
for fixing this on master & cherrypicking

@timothysc timothysc added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. cherrypick-candidate labels Jul 9, 2018
cdkbot-zz pushed a commit to juju-solutions/kubernetes that referenced this issue Jul 10, 2018
Automatic merge from submit-queue (batch tested with PRs 65931, 65705, 66033). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: run kube-proxy on non-master tainted nodes

**What this PR does / why we need it**:
kube-proxy should be able to run on all nodes, independent
on the taint of such nodes.

This restriction was previously removed in bb28449 but
then was brought back in d194926.

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews 
/cc @luxas @detiber @dixudx @discordianfish @mxey 
/kind bug
/area kube-proxy
/area kubeadm

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes/kubeadm#699

**Special notes for your reviewer**:
we are removing the requirement again, but please have a look at all the implications here.
hopefully we don't have to bring it again.

**Release note**:

```release-note
kubeadm: run kube-proxy on non-master tainted nodes
```
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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.
Projects
None yet
9 participants