fbpx

Introducing Kubernetes On MCS

Kubernetes is a container cluster management software that makes it easy to manage containerized applications across multiple hosts. It provides deployment scheduling, workload, and resource usage optimization, as well as easy scaling.

Spotinst Elastigroup integrates with Kubernetes via our autonomous Managed Container Service (MCS). MCS manages the infrastructure on which Kubernetes schedules the container workloads.

Before you start using this integration, please make sure to have an active Spotinst account. To create a new account sign up here.
Handling Instance Failures

The diagram below illustrates how MCS handles instance failures. Utilizing prediction algorithms and monitoring services, Elastigroup (1) preemptively provisions EC2 instances and identifies instance failures within the K8s cluster, (2) provisions new instances in parallel as the failures occur, and (3) communicates with the K8s master to mark “bad” instances as Unscheduled {“spec”:{“unschedulable”:true}} in order to drain existing running pods and reschedule them on different hosts across the cluster.

Key Features

MCS Automatic Autoscaler: MCS monitors the cluster workloads and provisions, manages and scales Kubernetes nodes to optimally handle pending tasks, while also detecting underutilized nodes and scaling them down. For more on the Automatic Autoscaler check out the documentation here.

Cost-Optimized Clusters: MCS cost-optimizes Kubernetes clusters from the moment they’re launched. MCS automatically matches the instance type and size to the resource requirements of the Pods, creating an optimal fit between infrastructure supply and demand. By seamlessly leveraging Spot, Reserved and On-Demand instances, MCS keeps costs at a minimum while ensuring Services are always running.

Custom Labels Support: MCS makes it easy to assign custom labels to the instances it launches, which can be used to evaluate where a Pod may or may not be placed, based on constraints (nodeSelectors) configured in the Pod specifications (podSpec). For more complex requirements MCS also supports Affinity and Anti-Affinity constraints. Custom labels can be used to ensure certain Pods only run on nodes with an SSD attached or ensure that certain Pods only run in a development environment. For more on Custom Labels click here.

Persistent Volumes and Persistent Volume Claims: MCS supports Kubernetes Persistent Volumes (PVs) and Persistent Volume Claims (PVCs), which are accounted for during scaling processes to ensure that the instances are collocated in the same Availability Zone as the Persistent Volume. For more on MCS support for Persistent Volumes and Persistent Volume Claims click here.

Pod Disruption Budgets: Pod Disruption Budgets (PDBs) limit the number of pods of replicated applications that can be down simultaneously during voluntary disruptions. Before performing a scale-down operation, MCS determines if the eviction of any of the pods running on the node designated for termination will cause the number of pods to fall below the budget. If so, MCS waits until the cluster has replacement pods up and running on an alternative node. If no replacement pods can be spun up MCS won’t terminate the node.

DaemonSets: DaemonSets ensure that all (or some) Nodes run a copy of a Pod, and are useful for providing common functionality such as logging or monitoring. MCS supports daemonSets during scale up by ensuring that the daemonSet Pod’s resource requirements are accounted for when determining the optimal instance type and size to launch, and during scale down MCS by ensuring that the daemonSet Pods are deleted while other Pods are reassigned to other Nodes.

Integrations with Managed Kubernetes Services: MCS integrates with existing Kubernetes clusters on the following Managed Kubernetes Services, with support for additional services coming soon:
Google Kubernetes Engine
Amazon EKS
Rancher

Support for KOPS: Any cluster provisioned by Kubernetes Operations (KOPS) can be run on infrastructure managed by MCS with MCS’s own KOPS distribution. To get started with KOPS on MCS see the tutorial here.