Show / Hide Table of Contents

Namespace Pulumi.SpotInst.Gke

Classes

Elastigroup

Provides a Spotinst Elastigroup GKE resource. Please see Importing a GKE cluster for detailed information.

Example Usage

using Pulumi;
using SpotInst = Pulumi.SpotInst;

class MyStack : Stack
{
public MyStack()
{
    var example_gke_elastigroup = new SpotInst.Gke.Elastigroup("example-gke-elastigroup", new SpotInst.Gke.ElastigroupArgs
    {
        BackendServices = 
        {
            new SpotInst.Gke.Inputs.ElastigroupBackendServiceArgs
            {
                LocationType = "global",
                NamedPorts = 
                {
                    new SpotInst.Gke.Inputs.ElastigroupBackendServiceNamedPortArgs
                    {
                        Name = "http",
                        Ports = 
                        {
                            80,
                            8080,
                        },
                    },
                },
                ServiceName = "backend-service",
            },
        },
        ClusterZoneName = "us-central1-a",
        DesiredCapacity = 3,
        InstanceTypesOndemand = "n1-standard-1",
        InstanceTypesPreemptibles = 
        {
            "n1-standard-1",
            "n1-standard-2",
        },
        IntegrationGke = new SpotInst.Gke.Inputs.ElastigroupIntegrationGkeArgs
        {
            AutoscaleCooldown = 300,
            AutoscaleDown = new SpotInst.Gke.Inputs.ElastigroupIntegrationGkeAutoscaleDownArgs
            {
                EvaluationPeriods = 300,
            },
            AutoscaleHeadroom = new SpotInst.Gke.Inputs.ElastigroupIntegrationGkeAutoscaleHeadroomArgs
            {
                CpuPerUnit = 1024,
                MemoryPerUnit = 512,
                NumOfUnits = 2,
            },
            AutoscaleIsAutoConfig = false,
            AutoscaleIsEnabled = true,
            AutoscaleLabels = 
            {
                new SpotInst.Gke.Inputs.ElastigroupIntegrationGkeAutoscaleLabelArgs
                {
                    Key = "label_key",
                    Value = "label_value",
                },
            },
            ClusterId = "example-cluster-id",
            Location = "us-central1-a",
        },
        MaxSize = 5,
        MinSize = 1,
        NodeImage = "COS",
        PreemptiblePercentage = 100,
    });
}

}

Third-Party Integrations

  • integration_gke - (Required) Describes the GKE integration.

  • location - (Optional) The location of your GKE cluster.

  • cluster_id - (Optional) The GKE cluster ID you wish to import.

  • autoscale_is_enabled - (Optional, Default: false) Specifies whether the auto scaling feature is enabled.

  • autoscale_is_autoconfig - (Optional, Default: false) Enabling the automatic auto-scaler functionality. For more information please see: .

  • autoscale_cooldown - (Optional, Default: 300) The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

  • autoscale_headroom - (Optional) Headroom for the cluster.

    • cpu_per_unit - (Optional, Default: 0) Cpu units for compute.
    • memory_per_unit - (Optional, Default: 0) RAM units for compute.
    • num_of_units - (Optional, Default: 0) Amount of units for compute.
  • autoscale_down - (Optional) Enabling scale down.

    • evaluation_periods - (Optional, Default: 5) Amount of cooldown evaluation periods for scale down.
  • autoscale_labels - (Optional) Labels to assign to the resource.

    • key - (Optional) The label name.
    • value - (Optional) The label value.

Usage:

using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="diff-suppressed-parameters"></a>

Diff-suppressed Parameters

The following parameters are created remotely and imported. The diffs have been suppressed in order to maintain plan legibility. You may update the values of these imported parameters by defining them in your template with your desired new value (including null values).

  • backend_services
  • service_name
  • location_type
  • scheme
  • named_port
    • port_name
    • ports
  • labels
  • key
  • value
  • metadata
  • key
  • value
  • tags
  • key
  • value
  • service_account
  • ip_forwarding
  • fallback_to_od
  • subnets
  • region
  • subnet_name

ElastigroupArgs

ElastigroupState

OceanImport

Provides a Spotinst Ocean GKE import resource.

Example Usage

using Pulumi;
using SpotInst = Pulumi.SpotInst;

class MyStack : Stack
{
public MyStack()
{
    var example = new SpotInst.Gke.OceanImport(&quot;example&quot;, new SpotInst.Gke.OceanImportArgs
    {
        BackendServices = 
        {
            new SpotInst.Gke.Inputs.OceanImportBackendServiceArgs
            {
                LocationType = &quot;regional&quot;,
                NamedPorts = 
                {
                    new SpotInst.Gke.Inputs.OceanImportBackendServiceNamedPortArgs
                    {
                        Name = &quot;http&quot;,
                        Ports = 
                        {
                            80,
                            8080,
                        },
                    },
                },
                Scheme = &quot;INTERNAL&quot;,
                ServiceName = &quot;example-backend-service&quot;,
            },
        },
        ClusterName = &quot;example-cluster-name&quot;,
        DesiredCapacity = 0,
        Location = &quot;us-central1-a&quot;,
        MaxSize = 2,
        MinSize = 0,
        Whitelists = 
        {
            &quot;n1-standard-1&quot;,
            &quot;n1-standard-2&quot;,
        },
    });
}

}

scheduled task

  • scheduled_task - (Optional) Set scheduling object.
  • shutdown_hours - (Optional) Set shutdown hours for cluster object.
    • is_enabled - (Optional) Flag to enable / disable the shutdown hours. Example: True
    • time_windows - (Required) Set time windows for shutdown hours. specify a list of 'timeWindows' with at least one time window Each string is in the format of - ddd:hh:mm-ddd:hh:mm ddd = day of week = Sun | Mon | Tue | Wed | Thu | Fri | Sat hh = hour 24 = 0 -23 mm = minute = 0 - 59. Time windows should not overlap. required on cluster.scheduling.isEnabled = True. API Times are in UTC Example: Fri:15:30-Wed:14:30
  • tasks - (Optional) The scheduling tasks for the cluster.
    • is_enabled - (Required) Describes whether the task is enabled. When true the task should run when false it should not run. Required for cluster.scheduling.tasks object.
    • cron_expression - (Required) A valid cron expression. For example : " * * * * * ".The cron is running in UTC time zone and is in Unix cron format Cron Expression Validator Script. Only one of ‘frequency’ or ‘cronExpression’ should be used at a time. Required for cluster.scheduling.tasks object Example: 0 1 * * *
    • task_type - (Required) Valid values: "clusterRoll". Required for cluster.scheduling.tasks object.
    • batch_size_percentage - (Optional) Value in % to set size of batch in roll. Valid values are 0-100 Example: 20.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

<a id="autoscaler"></a>

Autoscaler

  • autoscaler - (Optional) The Ocean Kubernetes Autoscaler object.
  • is_enabled - (Optional, Default: true) Enable the Ocean Kubernetes Autoscaler.
  • is_auto_config - (Optional, Default: true) Automatically configure and optimize headroom resources.
  • auto_headroom_percentage - Optionally set the auto headroom percentage, set a number between 0-200 to control the headroom % from the cluster. Relevant when isAutoConfig=true.
  • cooldown - (Optional, Default: null) Cooldown period between scaling actions.
  • headroom - (Optional) Spare resource capacity management enabling fast assignment of Pods without waiting for new resources to launch.
  • cpu_per_unit - (Optional) Optionally configure the number of CPUs to allocate the headroom. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.
  • memory_per_unit - (Optional) Optionally configure the amount of memory (MiB) to allocate the headroom.
  • gpu_per_unit - (Optional) How much GPU allocate for headroom unit.
  • num_of_units - (Optional) The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
  • down - (Optional) Auto Scaling scale down operations.
  • evaluation_periods - (Optional, Default: null) The number of evaluation periods that should accumulate before a scale down action takes place.
  • max_scale_down_percentage - (Optional) Would represent the maximum % to scale-down. Number between 1-100.
  • resource_limits - (Optional) Optionally set upper and lower bounds on the resource usage of the cluster.
  • max_vcpu - (Optional) The maximum cpu in vCpu units that can be allocated to the cluster.
  • max_memory_gib - (Optional) The maximum memory in GiB units that can be allocated to the cluster.
using Pulumi;

class MyStack : Stack
{
public MyStack()
{
}

}

OceanImportArgs

OceanImportState

OceanLaunchSpec

Provides a custom Spotinst Ocean GKE Launch Spec resource.

Example Usage

using Pulumi;
using SpotInst = Pulumi.SpotInst;

class MyStack : Stack
{
public MyStack()
{
    var example = new SpotInst.Gke.OceanLaunchSpec(&quot;example&quot;, new SpotInst.Gke.OceanLaunchSpecArgs
    {
        AutoscaleHeadrooms = 
        {
            new SpotInst.Gke.Inputs.OceanLaunchSpecAutoscaleHeadroomArgs
            {
                CpuPerUnit = 1000,
                GpuPerUnit = 0,
                MemoryPerUnit = 2048,
                NumOfUnits = 5,
            },
        },
        Labels = 
        {
            new SpotInst.Gke.Inputs.OceanLaunchSpecLabelArgs
            {
                Key = &quot;labelKey&quot;,
                Value = &quot;labelVal&quot;,
            },
        },
        Metadatas = 
        {
            new SpotInst.Gke.Inputs.OceanLaunchSpecMetadataArgs
            {
                Key = &quot;gci-update-strategy&quot;,
                Value = &quot;update_disabled&quot;,
            },
        },
        OceanId = &quot;o-123456&quot;,
        SourceImage = &quot;image&quot;,
        Taints = 
        {
            new SpotInst.Gke.Inputs.OceanLaunchSpecTaintArgs
            {
                Effect = &quot;taintEffect&quot;,
                Key = &quot;taintKey&quot;,
                Value = &quot;taintVal&quot;,
            },
        },
    });
}

}

OceanLaunchSpecArgs

OceanLaunchSpecImport

Provides a custom Spotinst Ocean GKE Launch Spec Import resource.

Example Usage

using Pulumi;
using SpotInst = Pulumi.SpotInst;

class MyStack : Stack
{
public MyStack()
{
    var example = new SpotInst.Gke.OceanLaunchSpecImport(&quot;example&quot;, new SpotInst.Gke.OceanLaunchSpecImportArgs
    {
        NodePoolName = &quot;default-pool&quot;,
        OceanId = &quot;o-123456&quot;,
    });
}

}

OceanLaunchSpecImportArgs

OceanLaunchSpecImportState

OceanLaunchSpecState

Back to top Copyright 2016-2020, Pulumi Corporation.