How Can I Speed Up My Kubespray Runs for Cluster Upgrades?
Asked by
domino__game
I'm currently in the process of upgrading my Kubernetes cluster using the unsafe upgrade procedure with kubespray (specifically, cluster.yml with the -e upgrade_cluster_setup=true flag). However, this is taking way too longโaround 1-2 hours for a 50+ node cluster. I've tried increasing the ansible forks to 30, but it doesn't seem to make a significant difference. For anyone who uses kubespray, have you discovered any effective methods to speed up this process safely?
Answers
Have you checked if pipelining and connection control are enabled in your ansible.cfg? These tweaks might help improve performance.
Reply to this answer
You're opting for the unsafe upgrade, which is infamous for not being the fastest option out there. Trying to speed up that process with safety in mind could be a challenge. Just a heads up!
Reply to this answer
In the past, people found that using Mitogen could significantly cut down on run times. However, it has struggled to keep pace with new Ansible versions, leading to its removal from many setups. It seems to be getting updates again, so it might be worth a look now.
Reply to this answer
One option you might want to consider is using Molecule to manage your playbooks. It's not officially supported anymore, but it tends to still work for many users looking for ways to speed up their processes.
Reply to this answer
Are you suggesting that using cluster.yml somehow takes more time than upgrade-cluster.yml? I figured upgrade-cluster.yml would be slower because it handles pod evacuations in stages.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions