import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * This resource represents a [Managed Kubernetes](https://upcloud.com/products/managed-kubernetes) cluster. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * // Create a network for the Kubernetes cluster * const example = new upcloud.Network("example", { * name: "example-network", * zone: "de-fra1", * ipNetwork: { * address: "172.16.1.0/24", * dhcp: true, * family: "IPv4", * }, * }); * // Create a Kubernetes cluster * const exampleKubernetesCluster = new upcloud.KubernetesCluster("example", { * controlPlaneIpFilters: ["0.0.0.0/0"], * name: "exampleapp", * network: example.id, * zone: "de-fra1", * }); * // Create a Kubernetes cluster node group * const group = new upcloud.KubernetesNodeGroup("group", { * cluster: upcloudKubernetesCluster.example.id, * nodeCount: 2, * name: "medium", * plan: "2xCPU-4GB", * labels: { * managedBy: "terraform", * }, * taints: [{ * effect: "NoExecute", * key: "taintKey", * value: "taintValue", * }], * }); * // Create a Kubernetes cluster node group with a GPU plan, with a custom storage size * const groupGpu = new upcloud.KubernetesNodeGroup("group_gpu", { * cluster: upcloudKubernetesCluster.example.id, * nodeCount: 2, * name: "gpu-workers", * plan: "GPU-8xCPU-64GB-1xL40S", * gpuPlan: { * storageSize: 250, * }, * labels: { * gpu: "NVIDIA-L40S", * }, * }); * // Create a Kubernetes cluster node group with a Cloud Native plan, with a custom storage size and tier * const groupCloudNative = new upcloud.KubernetesNodeGroup("group_cloud_native", { * cluster: upcloudKubernetesCluster.example.id, * nodeCount: 4, * name: "cloud-native-workers", * plan: "CLOUDNATIVE-4xCPU-8GB", * cloudNativePlan: { * storageSize: 100, * storageTier: "standard", * }, * }); * ``` */ export declare class KubernetesNodeGroup extends pulumi.CustomResource { /** * Get an existing KubernetesNodeGroup resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: KubernetesNodeGroupState, opts?: pulumi.CustomResourceOptions): KubernetesNodeGroup; /** * Returns true if the given object is an instance of KubernetesNodeGroup. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is KubernetesNodeGroup; /** * If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. */ readonly antiAffinity: pulumi.Output; /** * Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. */ readonly cloudNativePlan: pulumi.Output; /** * UUID of the cluster. */ readonly cluster: pulumi.Output; /** * Resource properties for custom plan. This block is required for `custom` plans only. */ readonly customPlan: pulumi.Output; /** * Resource properties for GPU plan storage configuration. This block is optional for GPU plans. */ readonly gpuPlan: pulumi.Output; /** * Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. * * Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. */ readonly kubeletArgs: pulumi.Output; /** * User defined key-value pairs to classify the node_group. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; /** * The name of the node group. Needs to be unique within a cluster. */ readonly name: pulumi.Output; /** * Amount of nodes to provision in the node group. */ readonly nodeCount: pulumi.Output; /** * The server plan used for the node group. You can list available plans with `upctl server plans` */ readonly plan: pulumi.Output; /** * You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. */ readonly sshKeys: pulumi.Output; /** * The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. */ readonly storageEncryption: pulumi.Output; /** * Taints for the nodes in this group. */ readonly taints: pulumi.Output; /** * If set to false, nodes in this group will not have access to utility network. */ readonly utilityNetworkAccess: pulumi.Output; /** * Create a KubernetesNodeGroup resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: KubernetesNodeGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering KubernetesNodeGroup resources. */ export interface KubernetesNodeGroupState { /** * If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. */ antiAffinity?: pulumi.Input; /** * Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. */ cloudNativePlan?: pulumi.Input; /** * UUID of the cluster. */ cluster?: pulumi.Input; /** * Resource properties for custom plan. This block is required for `custom` plans only. */ customPlan?: pulumi.Input; /** * Resource properties for GPU plan storage configuration. This block is optional for GPU plans. */ gpuPlan?: pulumi.Input; /** * Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. * * Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. */ kubeletArgs?: pulumi.Input[]>; /** * User defined key-value pairs to classify the node_group. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the node group. Needs to be unique within a cluster. */ name?: pulumi.Input; /** * Amount of nodes to provision in the node group. */ nodeCount?: pulumi.Input; /** * The server plan used for the node group. You can list available plans with `upctl server plans` */ plan?: pulumi.Input; /** * You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. */ sshKeys?: pulumi.Input[]>; /** * The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. */ storageEncryption?: pulumi.Input; /** * Taints for the nodes in this group. */ taints?: pulumi.Input[]>; /** * If set to false, nodes in this group will not have access to utility network. */ utilityNetworkAccess?: pulumi.Input; } /** * The set of arguments for constructing a KubernetesNodeGroup resource. */ export interface KubernetesNodeGroupArgs { /** * If set to true, nodes in this group will be placed on separate compute hosts. Please note that anti-affinity policy is considered 'best effort' and enabling it does not fully guarantee that the nodes will end up on different hardware. */ antiAffinity?: pulumi.Input; /** * Resource properties for Cloud Native plan storage configuration. This block is optional for Cloud Native plans. */ cloudNativePlan?: pulumi.Input; /** * UUID of the cluster. */ cluster: pulumi.Input; /** * Resource properties for custom plan. This block is required for `custom` plans only. */ customPlan?: pulumi.Input; /** * Resource properties for GPU plan storage configuration. This block is optional for GPU plans. */ gpuPlan?: pulumi.Input; /** * Additional arguments for kubelet for the nodes in this group. Configure the arguments without leading `--`. The API will prefix the arguments with `--` when preparing kubelet call. * * Note that these arguments will be passed directly to kubelet CLI on each worker node without any validation. Passing invalid arguments can break your whole cluster. Be extra careful when adding kubelet args. */ kubeletArgs?: pulumi.Input[]>; /** * User defined key-value pairs to classify the node_group. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the node group. Needs to be unique within a cluster. */ name?: pulumi.Input; /** * Amount of nodes to provision in the node group. */ nodeCount: pulumi.Input; /** * The server plan used for the node group. You can list available plans with `upctl server plans` */ plan: pulumi.Input; /** * You can optionally select SSH keys to be added as authorized keys to the nodes in this node group. This allows you to connect to the nodes via SSH once they are running. */ sshKeys?: pulumi.Input[]>; /** * The storage encryption strategy to use for the nodes in this group. If not set, the cluster's storage encryption strategy will be used, if applicable. Valid values are `data-at-rest` and `none`. */ storageEncryption?: pulumi.Input; /** * Taints for the nodes in this group. */ taints?: pulumi.Input[]>; /** * If set to false, nodes in this group will not have access to utility network. */ utilityNetworkAccess?: pulumi.Input; }