create_horizontal_pod_autoscaler
Configure automatic scaling for a Kubernetes Deployment by creating a Horizontal Pod Autoscaler with CPU target, min/max replicas, or custom YAML manifest. Supports dry-run for validation.
Instructions
Creates an HPA for a Deployment. Use either basic configuration or provide a raw YAML manifest.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"namespace": "<namespace>"
},
"name": "create_horizontal_pod_autoscaler"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | If true, simulates the action without making changes | |
| cluster | No | Target cluster name (default: 'default') | |
| hpaName | No | The name of the HPA to create | |
| namespace | Yes | The Kubernetes namespace | |
| maxReplicas | No | Maximum number of replicas | |
| minReplicas | No | Minimum number of replicas | |
| yamlManifest | No | Full YAML manifest for advanced HPA creation | |
| targetDeployment | No | The name of the target Deployment to scale | |
| targetCPUUtilizationPercentage | No | Target CPU utilization percentage |