KubernetesAutoscaler

This resource will help you to manager cluster-autoscaler in Kubernetes Cluster.

NOTE: The scaling group must use CentOS7 or AliyunLinux2 as base image.

NOTE: The cluster-autoscaler can only use the same size of instanceTypes in one scaling group.

NOTE: Add Policy to RAM role of the node to deploy cluster-autoscaler if you need.

NOTE: Available in 1.65.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new AliCloud.CS.KubernetesAutoscaler("default", new AliCloud.CS.KubernetesAutoscalerArgs
        {
            ClusterId = @var.Cluster_id,
            CoolDownDuration = @var.Cool_down_duration,
            DeferScaleInDuration = @var.Defer_scale_in_duration,
            Nodepools = 
            {
                new AliCloud.CS.Inputs.KubernetesAutoscalerNodepoolArgs
                {
                    Id = "scaling_group_id",
                    Labels = "a=b",
                    Taints = "c=d:NoSchedule",
                },
            },
            Utilization = @var.Utilization,
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

default = alicloud.cs.KubernetesAutoscaler("default",
    cluster_id=var["cluster_id"],
    cool_down_duration=var["cool_down_duration"],
    defer_scale_in_duration=var["defer_scale_in_duration"],
    nodepools=[{
        "id": "scaling_group_id",
        "labels": "a=b",
        "taints": "c=d:NoSchedule",
    }],
    utilization=var["utilization"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultKubernetesAutoscaler = new alicloud.cs.KubernetesAutoscaler("default", {
    clusterId: var_cluster_id,
    coolDownDuration: var_cool_down_duration,
    deferScaleInDuration: var_defer_scale_in_duration,
    nodepools: [{
        id: "scaling_group_id",
        labels: "a=b",
        taints: "c=d:NoSchedule",
    }],
    utilization: var_utilization,
});

Create a KubernetesAutoscaler Resource

def KubernetesAutoscaler(resource_name, opts=None, cluster_id=None, cool_down_duration=None, defer_scale_in_duration=None, nodepools=None, use_ecs_ram_role_token=None, utilization=None, __props__=None);
name string
The unique name of the resource.
args KubernetesAutoscalerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args KubernetesAutoscalerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KubernetesAutoscalerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

KubernetesAutoscaler Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The KubernetesAutoscaler resource accepts the following input properties:

ClusterId string

The id of kubernetes cluster.

CoolDownDuration string

The cool_down_duration option of cluster-autoscaler.

DeferScaleInDuration string

The defer_scale_in_duration option of cluster-autoscaler.

Utilization string

The utilization option of cluster-autoscaler.

Nodepools List<Pulumi.AliCloud.CS.Inputs.KubernetesAutoscalerNodepoolArgs>
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
UseEcsRamRoleToken bool

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

ClusterId string

The id of kubernetes cluster.

CoolDownDuration string

The cool_down_duration option of cluster-autoscaler.

DeferScaleInDuration string

The defer_scale_in_duration option of cluster-autoscaler.

Utilization string

The utilization option of cluster-autoscaler.

Nodepools []KubernetesAutoscalerNodepool
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
UseEcsRamRoleToken bool

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

clusterId string

The id of kubernetes cluster.

coolDownDuration string

The cool_down_duration option of cluster-autoscaler.

deferScaleInDuration string

The defer_scale_in_duration option of cluster-autoscaler.

utilization string

The utilization option of cluster-autoscaler.

nodepools KubernetesAutoscalerNodepool[]
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
useEcsRamRoleToken boolean

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

cluster_id str

The id of kubernetes cluster.

cool_down_duration str

The cool_down_duration option of cluster-autoscaler.

defer_scale_in_duration str

The defer_scale_in_duration option of cluster-autoscaler.

utilization str

The utilization option of cluster-autoscaler.

nodepools List[KubernetesAutoscalerNodepool]
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
use_ecs_ram_role_token bool

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

Outputs

All input properties are implicitly available as output properties. Additionally, the KubernetesAutoscaler resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing KubernetesAutoscaler Resource

Get an existing KubernetesAutoscaler resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, cluster_id=None, cool_down_duration=None, defer_scale_in_duration=None, nodepools=None, use_ecs_ram_role_token=None, utilization=None, __props__=None);
func GetKubernetesAutoscaler(ctx *Context, name string, id IDInput, state *KubernetesAutoscalerState, opts ...ResourceOption) (*KubernetesAutoscaler, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ClusterId string

The id of kubernetes cluster.

CoolDownDuration string

The cool_down_duration option of cluster-autoscaler.

DeferScaleInDuration string

The defer_scale_in_duration option of cluster-autoscaler.

Nodepools List<Pulumi.AliCloud.CS.Inputs.KubernetesAutoscalerNodepoolArgs>
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
UseEcsRamRoleToken bool

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

Utilization string

The utilization option of cluster-autoscaler.

ClusterId string

The id of kubernetes cluster.

CoolDownDuration string

The cool_down_duration option of cluster-autoscaler.

DeferScaleInDuration string

The defer_scale_in_duration option of cluster-autoscaler.

Nodepools []KubernetesAutoscalerNodepool
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
UseEcsRamRoleToken bool

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

Utilization string

The utilization option of cluster-autoscaler.

clusterId string

The id of kubernetes cluster.

coolDownDuration string

The cool_down_duration option of cluster-autoscaler.

deferScaleInDuration string

The defer_scale_in_duration option of cluster-autoscaler.

nodepools KubernetesAutoscalerNodepool[]
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
useEcsRamRoleToken boolean

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

utilization string

The utilization option of cluster-autoscaler.

cluster_id str

The id of kubernetes cluster.

cool_down_duration str

The cool_down_duration option of cluster-autoscaler.

defer_scale_in_duration str

The defer_scale_in_duration option of cluster-autoscaler.

nodepools List[KubernetesAutoscalerNodepool]
  • nodepools.id - (Required) The scaling group id of the groups configured for cluster-autoscaler.
  • nodepools.taints - (Required) The taints for the nodes in scaling group.
  • nodepools.labels - (Required) The labels for the nodes in scaling group.
use_ecs_ram_role_token bool

Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false

utilization str

The utilization option of cluster-autoscaler.

Supporting Types

KubernetesAutoscalerNodepool

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Id string
Labels string
Taints string
Id string
Labels string
Taints string
id string
labels string
taints string
id str
labels str
taints str

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.