Autoscaling Custom Resources in Kubernetes via Metric API
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing Kubernetes autoscaling solutions primarily focus on core resources like deployments and pods, failing to effectively integrate autoscaling with custom resources and operators, which limits their ability to manage complex, stateful workloads and optimize resource allocation based on dynamic metrics.
Innovation Solution
A method and apparatus for autoscaling custom resources in a containerized application handling system that involves sending API requests to a control plane for metric values, comparing them to desired values, determining target scale metrics, and scaling system objects based on these values, allowing for dynamic resource adjustment.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If existing Kubernetes autoscaling solutions focus on core resources like deployments and pods, then the scaling mechanism is simple to implement, but the ability to manage complex custom resources and stateful workloads is limited
Solution Approach 1:
The patent segments the autoscaling functionality by creating separate controller types for different resource kinds. Each controller is specialized to handle specific custom resource types, allowing the system to manage diverse custom resources without requiring a monolithic complex scaling mechanism. This segmentation enables targeted scaling strategies for each resource type while maintaining overall system manageability.
Solution Approach 2:
The patent implements a universal controller framework that can handle multiple types of custom resources through a common architecture. The controller-manager and controller-runtime provide multi-functional capabilities that work across different resource kinds, enabling the system to scale various custom resources using the same underlying mechanism while accommodating resource-specific requirements through configurable parameters.
2Productivity
If manual monitoring and scaling operations are performed by system administrators, then the system can address specific failures and bottlenecks, but the operation time and human intervention requirements increase
Solution Approach 1:
The patent implements feedback mechanisms where controllers continuously monitor custom resource metrics and automatically adjust scaling based on observed conditions. The controller-runtime framework enables continuous observation of resource states, and the scaling logic responds to metric changes by automatically modifying resource allocations, creating a closed-loop system that eliminates manual intervention while maintaining responsive resource management.
Solution Approach 2:
The system enables self-service autoscaling where the Kubernetes control plane automatically performs monitoring, analysis, and scaling operations without requiring system administrator intervention. The custom resource controllers autonomously manage their own scaling by consuming metrics and applying scaling decisions, allowing the infrastructure to self-regulate resource allocation based on actual workload conditions.
3Adaptability or versatility
If custom resources are integrated with the autoscaling framework, then the system can optimize resource allocation for complex workloads, but the integration complexity with operators increases
Solution Approach 1:
The patent introduces the controller-runtime framework as an intermediary layer between the custom resource operators and the Kubernetes autoscaling mechanisms. This intermediary handles the complexity of operator integration by providing standardized interfaces and abstractions, allowing operators to define custom resource behavior without directly implementing complex scaling logic. The controller-manager acts as a mediator that coordinates between multiple controllers and the Kubernetes API server, simplifying the integration process.
Data Source
AI summary
A method and apparatus for autoscaling a custom resource of a containerized application handling system utilizes a metric value defined for a system object of the custom resource to scale the system object of the custom resource. An API request for the metric value is sent from an autoscaler to a control plane of the containerized application handling system to receive the metric value, which is compared to a desired metric value. A target scale metric value is then determined based on the comparison and posted in a database of the containerized application handling system. The system object of the custom resource is scaled by an operator of the containerized application handling system based on the posted target scale metric value.


