Cluster Hibernation (coming soon) #
Stackbooster allows you to schedule shutdowns of your Kubernetes clusters to optimize costs, especially useful for development environments that are not required during off-hours or on weekends.
Overview #
Scheduled shutdowns can significantly reduce costs by stopping resources when they are not in use. This feature is particularly beneficial for development clusters that do not need to operate continuously, allowing you to designate specific times (such as nights and weekends) when the cluster can be safely powered down.
Configuration Steps #
Access the Stackbooster Dashboard: Log in to your Stackbooster management dashboard
Navigate to Clusters Section: Select the Kubernetes cluster you want to configure from your list of clusters.
Set Shutdown Schedules: Go to the scheduling section and choose ‘Add Schedule’ to define new shutdown times.
- Specify Days: Select the days of the week when the shutdown should occur.
- Set Times: Define the start and end times for the shutdown period. Ensure you set this according to your local time zone or the time zone where the cluster is deployed.
Configure Notifications: Optionally, set up notifications to be alerted when the cluster begins to shutdown or restarts. This can be done through email or Slack.
Save and Apply Settings: Review your settings and apply them to initiate the scheduled shutdowns. The system will automatically start and stop the cluster based on your configuration.
Example YAML Configuration #
For users who prefer to apply configurations via kubectl or CI/CD pipelines, here’s an example of how you might define a shutdown schedule using a YAML file:
apiVersion: stackbooster.io/v1
kind: ClusterSchedule
metadata:
name: dev-cluster-schedule
namespace: stackbooster
spec:
shutdownSchedules:
- days: ["Saturday", "Sunday"]
startTime: "00:00"
endTime: "23:59"
- days: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
startTime: "20:00"
endTime: "05:00"
This configuration shuts the cluster down for the entire weekend and every weekday from 8 PM to 5 AM.
Important Considerations #
- Data Persistence: Ensure that any stateful applications have persistent storage configured to prevent data loss during shutdowns.
- Workload Management: Verify that jobs and critical operations are completed or suitably paused before the shutdown begins to avoid incomplete transactions or corrupted data.
- Monitoring and Alerts: It is advisable to monitor the first few scheduled shutdowns to ensure that all systems resume normal operation upon restart without issues.