Magalix Runs Kubernetes on Autopilot!

Guides    Discussions

Maintenance Window

Avoid disrupting pods during prime business hours.

Overview

Vertically scaling your pods or containers requires them to be restarted. Not having control on when containers can scale may cause unwanted disruption during critical business hours. The maintenance window feature is intended to provide more control over when pods and containers can be scaled. Setting the maintenance window provides clear guidance to the AI-based optimizer to consider the right metrics resolution and optimization window. For example, if the maintenance window is set to be every Sunday from 12 AM to 2 AM UTC, the optimizer will make sure that it considers the whole week metrics consider the 1-minute, 5-minutes, 30-minutes, and 1-hour resolutions. It will optimize for the best resources that will carry the container untouched for the following week, given that enough history is collected.

Using the Maintenance Window Feature

Maintenance window can be set at the controller/pod level. It defines when the pod to be analyzed for scalability. When the maintenance window is set, the pod will be skipped from the regular checks (every 1h) and will consider the set maintenance window.

To define maintenance window on a pod, just annotate this pod's controller with the following annotations:

  • magalix/mw-cron This is a standard (5 parts) CRON expression. see https://en.wikipedia.org/wiki/Cron for more info. This cron defines the times when the pod will be analyzed for scalability. A decision is normally generated after few minutes from this trigger time. (required)
  • magalix/mw-offset An offset duration from the trigger time that the decision will be executed at. Supported duration strings are anything supported by golang time.ParseDuration method. see https://golang.org/pkg/time/#ParseDuration for more info. (optional, defaults to 0). The minimum value is 0s and the minimum recommended is 10m
  • magalix/mw-timezone The optional timezone of the trigger times. The default is UTC if the timezone is not specified.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    magalix/mw-cron: 30 5,10,19,20 * * *
    magalix/mw-offset: 2h
.....

This will trigger the optimizer at At 05:30 AM, 10:30 AM, 07:30 PM and 08:30 PM. The 2h offset means that the decision will be executed at At 07:30 AM, 00:30 AM, 09:30 PM and 10:30 PM. The timezone for those times are UTC

FAQs

What if the maintenance window is not specified?
The AI will assume that hourly checks are acceptable. It will analyze on hourly bases the required resources covering only the next hour.

Is the maintenance window a free feature?
A Pro plan is required to be able to use the maintenance window feature.

What if I set an invalid maintenance window?
The optimizer will ignore it and keep optimizing on an hourly basis.

Maintenance Window


Avoid disrupting pods during prime business hours.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.