BookmarkSubscribeRSS Feed

Auto stop or start your Azure AKS cluster on a schedule

Started ‎08-10-2022 by
Modified ‎08-10-2022 by
Views 4,294

Running your Azure Kubernetes Service (AKS) clusters when you are not using them is a waste of money. Depending on the size of your cluster, that can be a lot of money!

 

Remembering to stop the cluster when you do not need it and manually starting it back up when you need to use it can be challenging. So automating the stop and start of your cluster based on your work schedule saves a lot of money and gets rid of the hassle of remembering to stop or start your cluster.

 

Unfortunately, there is no easy way to automate stop and start of AKS in azure. We need to create an automation account, assign roles to that account, create a runbook and create an automation schedule for that runbook. All these steps are, although one time task, still manual and requires prior knowledge of automation in Azure. So I have automated these manual steps using terraform. You can simply specify your schedule and action (stop/start) in terraform configuration and the rest is taken care of by terraform. 

 

In this github project, I show you how to automate stopping and starting your AKS cluster on a schedule using terraform. 

 

Please let me know if the instructions in the github project are unclear or if you have any questions or comments in the comments section below. Have fun automating your Azure cost savings!!

Version history
Last update:
‎08-10-2022 06:23 PM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags