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

How to add tolerations to kube-proxy / kube-svc-redirect #363

Closed
derekperkins opened this issue May 11, 2018 · 25 comments
Closed

How to add tolerations to kube-proxy / kube-svc-redirect #363

derekperkins opened this issue May 11, 2018 · 25 comments

Comments

@derekperkins
Copy link
Contributor

I've added some node taints using NoSchedule, so it hasn't impacted kube-proxy or kube-svc-redirect, which are the only kube-system DaemonSets. If those get reset or upgraded, they currently only have a toleration to run on master nodes, so I don't think that they will get recreated on my tainted nodes. Is there some way to add a toleration, or is there something I'm not seeing that will force them to be deployed on every node?

@derekperkins
Copy link
Contributor Author

Any insights here? I ran into this after upgrading my cluster and neither of these were recreated properly and broke my applications.

@derekperkins
Copy link
Contributor Author

It looks like it has already been implemented in both core k8s AND acs-engine, so I'm surprised that it isn't already in AKS. For reference:

@sancyx
Copy link

sancyx commented Oct 18, 2018

I'm running into the same issue. Tried to manually edit tolerations on daemonsets which is fine for a few minutes, then it's replaced with original, which seems to be the issue on ACS engine Azure/acs-engine#2509.
@derekperkins Did you find any workarounds?

@derekperkins
Copy link
Contributor Author

@sancyx No, and I just got bit by this when Azure redeployed these services to all my nodes except ones with taints. I honestly don't understand how Azure calls AKS a GA product.

@janbrunrasmussen
Copy link

We discussed using node-affinity with labels and pod-presets, but we don't really like having to add metadata to all the deployments not related to the taint. Our MS contact suggested ACI connector for AKS, but our memory requirements exceeds ACI's. So we are also not sure how to continue, other than creating a new cluster for the workloads we intended to go on the tainted nodes.

@erewok
Copy link

erewok commented Jan 29, 2019

I think I'm seeing the same issue. I added a taint to a node and now the only kube-system deployment/daemonset on the node is kube-svc-redirect. Networking then falls apart for all deployments on the tainted node.

The weirdest part is that I tested this same exact set-up for over a month in my dev cluster and didn't see any issues. I can't figure out why it worked in my dev cluster and I wish it wouldn't have so I wouldn't have deployed with this solution in the first place.

Edit:

I removed the taint from my node and kube-proxy was immediately scheduled. After re-adding the taint (NoSchedule), it wasn't ejected, of course, but I assume it won't be rescheduled if needs to be scheduled somewhere.

@brendandburns
Copy link
Member

This is clearly a bug and should be fixed.

For now, in addition to the trick of removing and then re-adding the taint (which will stick around until you upgrade the cluster, and then you will have to do the same trick again), sorry that's hacky.

An alternative hack would be to create a second DaemonSet which places kube-proxy onto the tainted nodes. (also a hack, but it would work as a temporary patch)

Ultimately the right fix is to do this in AKS, we'll get to it.

@larsduelfer
Copy link

We are currently facing a similar issue. Are there any plans to be able to add tolerations to aks components?

@martin2176
Copy link

martin2176 commented Feb 14, 2019

Have this issue been resolved? There are a lot many critical pods . Below is from a cluster fresh built.
I added a noexecute taint to one of the agent node. All the above pods was evicted from the tainted node. Looks like the functionality is still not implemented.

kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system azure-cni-networkmonitor-7b7pj 1/1 Running 0 52m
kube-system azure-cni-networkmonitor-9jthw 1/1 Running 0 57m
kube-system azure-ip-masq-agent-rv6tm 1/1 Running 0 57m
kube-system azure-ip-masq-agent-zfk5f 1/1 Running 0 52m
kube-system coredns-754f947b4-fvw4h 1/1 Running 0 52m
kube-system coredns-754f947b4-st6mv 1/1 Running 0 57m
kube-system coredns-autoscaler-589dd89ffd-pf8sk 1/1 Running 0 52m
kube-system heapster-5d6f9b846c-nnwcm 2/2 Running 0 57m
kube-system kube-proxy-26pff 1/1 Running 0 52m
kube-system kube-proxy-bnpf8 1/1 Running 0 57m
kube-system kube-svc-redirect-b9g5r 2/2 Running 0 52m
kube-system kube-svc-redirect-t78r5 2/2 Running 0 57m
kube-system kubernetes-dashboard-67bdc65878-zdnk2 1/1 Running 0 52m
kube-system metrics-server-5cbc77f79f-m7vtn 1/1 Running 0 52m
kube-system tunnelfront-647865c5c4-wvmpf 1/1 Running 0 52m

@jnoller
Copy link
Contributor

jnoller commented Feb 14, 2019

This issue is unresolved - taints and tolerations are not supported at this time.

@martin2176
Copy link

I think the Azure AKS documentation should make it very clear that taint and tolerations are not supported.
For eg: The below best practices from AKS says go ahead and use taint & tolerations
https://docs.microsoft.com/en-us/azure/aks/operator-best-practices-advanced-scheduler

@martin2176
Copy link

with fix for Issue #468, node labels are now preserved on upgrade.
To be able to use taint and tolerations, the issue mentioned in this thread have to be resolved. Is there a fix coming soon?

@janbrunrasmussen
Copy link

https://github.com/Azure/AKS/releases/tag/2015-05-06

An issue where AKS managed pods (within kube-system) did not have the correct
tolerations preventing them from being scheduled when customers use
taints/tolerations has been fix

Does this mean a fix has been made for this?

@jnoller
Copy link
Contributor

jnoller commented May 13, 2019

@janbrunrasmussen No, we're still ironing out taint/toleration support.

@janbrunrasmussen
Copy link

So what is this quote in the release notes referring to, @jnoller ? It does sound suspiciously like this issue :)

@jnoller
Copy link
Contributor

jnoller commented May 16, 2019

@janbrunrasmussen which quote? We're still ironing out issues with taints / tolerations

@janbrunrasmussen
Copy link

Here: https://github.com/Azure/AKS/releases/tag/2019-05-06

An issue where AKS managed pods (within kube-system) did not have the correct
tolerations preventing them from being scheduled when customers use
taints/tolerations has been fix

@jnoller
Copy link
Contributor

jnoller commented May 16, 2019

@janbrunrasmussen Yep, that was one of the fixes, we're tracking some additional ones to repair ASAP.

@jnoller
Copy link
Contributor

jnoller commented May 17, 2019

Linking Issue #971

@jluk
Copy link
Contributor

jluk commented Jun 6, 2019

@derekperkins and @janbrunrasmussen could you both give this scenario another try? We've made some changes and fixes that should resolve this issue, would be good to get your confirmation.

@janbrunrasmussen
Copy link

@jluk Could you be more specific - which version? which region?

@jluk
Copy link
Contributor

jluk commented Jun 6, 2019

@janbrunrasmussen any region should work, but it may require a new cluster to guarantee the latest changes. Could you please try spinning up a new cluster and rerunning your scenario?

@jluk
Copy link
Contributor

jluk commented Jun 6, 2019

Any supported AKS k8s version should be fine

@janbrunrasmussen
Copy link

I ran through a couple of scenarios, and for me it seems to work - that is, I am able to add a taint, force restart of the proxy pod on the tainted node(s) in various ways and see the proxy pod come back up.
Thanks for resolving the issue (even if it took over a year to fix). I am not sure if others in the issue are facing slightly different use cases though.

@jluk
Copy link
Contributor

jluk commented Jun 7, 2019

@janbrunrasmussen thanks for confirmation and the patience, we've been tracking through a long backlog of things to fix and will be moving onto fixing many more to improve the experience. Closing this issue out based on feedback - if folks still hit issues please feel free to reopen.

@jluk jluk closed this as completed Jun 7, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants