このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、
お気軽にご連絡ください。
Datadog Kubernetes Autoscaling automates the scaling of your Kubernetes environments based on utilization metrics. This feature enables you to make changes to your Kubernetes environments from within Datadog.
How it works
Datadog Kubernetes Autoscaling provides cluster scaling observability and workload scaling recommendations and automation. Datadog uses real-time and historical utilization metrics to make recommendations. With data from Cloud Cost Management, Datadog can also make recommendations based on costs.
Automated workload scaling is powered by a DatadogPodAutoscaler
custom resource that defines scaling behavior on a per-workload level.
Each cluster can have a maximum of 100 workloads optimized with Datadog Kubernetes Autoscaler.
Compatibility
- Distributions: This feature is compatible with all of Datadog’s supported Kubernetes distributions.
- Cluster autoscaling: This feature works alongside cluster autoscaling solutions, such as Karpenter and Cluster Autoscaler.
- Workload autoscaling: This feature is an alternative to Horizontal Pod Autoscaler (HPA) and Vertical Pod Autoscaler (VPA). Datadog recommends that you remove any HPAs or VPAs from a workload before you use Datadog Kubernetes Autoscaling to optimize it.
Requirements
- Remote Configuration must be enabled for your organization. See Enabling Remote Configuration.
- Helm, for updating your Datadog Agent
- (For Datadog Operator users)
kubectl
CLI, for updating the Datadog Agent - The following user permissions:
- Org Management (
org_management
) - API Keys Write (
api_keys_write
) - Workload Scaling Write (
orchestration_workload_scaling_write
)
Setup
- Ensure you are using Datadog Operator v1.8.0+. To upgrade your Datadog Operator:
helm upgrade datadog-operator datadog/datadog-operator
- Add the following to your
datadog-agent.yaml
configuration file:
spec:
features:
orchestratorExplorer:
customResources:
- datadoghq.com/v1alpha1/datadogpodautoscalers
autoscaling:
workload:
enabled: true
eventCollection:
unbundleEvents: true
override:
clusterAgent:
image:
tag: 7.58.1
nodeAgent:
image:
tag: 7.58.1 # or 7.58.1-jmx
clusterChecksRunner
image:
tag: 7.58.1 # or 7.58.1-jmx
- Admission Controller is enabled by default with the Datadog Operator. If you disabled it, re-enable it by adding the following highlighted lines to
datadog-agent.yaml
:
...
spec:
features:
admissionController:
enabled: true
...
- Apply the updated
datadog-agent.yaml
configuration:
kubectl apply -n $DD_NAMESPACE -f datadog-agent.yaml
- Add the following to your
datadog-values.yaml
configuration file:
datadog:
orchestratorExplorer:
customResources:
- datadoghq.com/v1alpha1/datadogpodautoscalers
autoscaling:
workload:
enabled: true
kubernetesEvents:
unbundleEvents: true
clusterAgent:
image:
tag: 7.58.1
agents:
image:
tag: 7.58.1 # or 7.58.1-jmx
clusterChecksRunner:
image:
tag: 7.58.1 # or 7.58.1-jmx
- Admission Controller is enabled by default in the Datadog Helm chart. If you disabled it, re-enable it by adding the following highlighted lines to
datadog-values.yaml
:
...
clusterAgent:
image:
tag: 7.58.1
admissionController:
enabled: true
...
- Update your Helm version:
- Redeploy the Datadog Agent with your updated
datadog-values.yaml
:
helm upgrade -f datadog-values.yaml <RELEASE_NAME> datadog/datadog
Ingest cost data with Cloud Cost Management
Datadog’s Kubernetes Autoscaling works with Cloud Cost Management to make workload scaling recommendations based on cost data.
See Cloud Cost setup instructions for AWS, Azure, or Google Cloud.
Cost data enhances Kubernetes Autoscaling, but it is not required. All of Datadog’s workload recommendations and autoscaling decisions are valid and functional without cost data.
Usage
Identify resources to scale
Use your Kubernetes Autoscaling page to better understand the resource efficiency of your Kubernetes deployments. The Summary view displays information about optimization opportunities and estimated costs across your clusters and workloads. The Cluster Scaling view provides per-cluster information about total idle CPU, total idle memory, and costs. Click on a cluster for detailed information and a table of the cluster’s workloads. You can also use the Workload Scaling view to see a filterable list of all workloads across all clusters.
Click Optimize on any workload to see its scaling recommendation.
Deploy recommendations with Autoscaling
After you identify a workload to optimize, examine its Scaling Recommendation. You can also click Configure Recommendation to make changes to the recommendation before you apply it.
You can use Kubernetes Autoscaling to deploy a scaling recommendation in one of two ways:
- Click Enable Autoscaling. Datadog automatically applies the scaling recommendation to your workload.
- Deploy a
DatadogPodAutoscaler
custom resource. Click Export Recommendation to see values for your CRD.
Deploy recommendations manually
As an alternative to Autoscaling, you can also deploy Datadog’s scaling recommendations manually. When you configure resources for your Kubernetes deployments, use the values suggested in the scaling recommendations. You can also click Export Recommendation to see a generated kubectl patch
command.
Further reading