Show / Hide Table of Contents

Class 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,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
KubernetesAutoscaler
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.CS
Assembly: Pulumi.AliCloud.dll
Syntax
public class KubernetesAutoscaler : CustomResource

Constructors

View Source

KubernetesAutoscaler(String, KubernetesAutoscalerArgs, CustomResourceOptions)

Create a KubernetesAutoscaler resource with the given unique name, arguments, and options.

Declaration
public KubernetesAutoscaler(string name, KubernetesAutoscalerArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

KubernetesAutoscalerArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ClusterId

The id of kubernetes cluster.

Declaration
public Output<string> ClusterId { get; }
Property Value
Type Description
Output<System.String>
View Source

CoolDownDuration

The cool_down_duration option of cluster-autoscaler.

Declaration
public Output<string> CoolDownDuration { get; }
Property Value
Type Description
Output<System.String>
View Source

DeferScaleInDuration

The defer_scale_in_duration option of cluster-autoscaler.

Declaration
public Output<string> DeferScaleInDuration { get; }
Property Value
Type Description
Output<System.String>
View Source

Nodepools

  • 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.
Declaration
public Output<ImmutableArray<KubernetesAutoscalerNodepool>> Nodepools { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<KubernetesAutoscalerNodepool>>
View Source

Utilization

The utilization option of cluster-autoscaler.

Declaration
public Output<string> Utilization { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, KubernetesAutoscalerState, CustomResourceOptions)

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

Declaration
public static KubernetesAutoscaler Get(string name, Input<string> id, KubernetesAutoscalerState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

KubernetesAutoscalerState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
KubernetesAutoscaler
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.