import * as pulumi from "@pulumi/pulumi"; /** * 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", * }); * // Kubernetes cluster with private node groups requires a network that is routed through NAT gateway. * const example2 = new upcloud.Router("example2", {name: "example2-router"}); * const example2Gateway = new upcloud.Gateway("example2", { * name: "example2-nat-gateway", * zone: "de-fra1", * features: ["nat"], * router: { * id: example2.id, * }, * }); * const example2Network = new upcloud.Network("example2", { * name: "example2-network", * zone: "de-fra1", * ipNetwork: { * address: "10.10.0.0/24", * dhcp: true, * family: "IPv4", * dhcpDefaultRoute: true, * }, * router: example2.id, * }); * const example2KubernetesCluster = new upcloud.KubernetesCluster("example2", { * controlPlaneIpFilters: ["0.0.0.0/0"], * name: "example2-cluster", * network: example2Network.id, * zone: "de-fra1", * plan: "prod-md", * privateNodeGroups: true, * }); * ``` */ export declare class KubernetesCluster extends pulumi.CustomResource { /** * Get an existing KubernetesCluster 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?: KubernetesClusterState, opts?: pulumi.CustomResourceOptions): KubernetesCluster; /** * Returns true if the given object is an instance of KubernetesCluster. 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 KubernetesCluster; /** * IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. */ readonly controlPlaneIpFilters: pulumi.Output; /** * User defined key-value pairs to classify the cluster. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; /** * Cluster name. Needs to be unique within the account. */ readonly name: pulumi.Output; /** * Network ID for the cluster to run in. */ readonly network: pulumi.Output; /** * Network CIDR for the given network. Computed automatically. */ readonly networkCidr: pulumi.Output; /** * Names of the node groups configured to cluster */ readonly nodeGroups: pulumi.Output; /** * The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. */ readonly plan: pulumi.Output; /** * Enable private node groups. Private node groups requires a network that is routed through NAT gateway. */ readonly privateNodeGroups: pulumi.Output; /** * Operational state of the cluster. */ readonly state: pulumi.Output; /** * Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. */ readonly storageEncryption: pulumi.Output; /** * The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. */ readonly upgradeStrategyType: pulumi.Output; /** * Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. * * Note that when changing the cluster version, `upgradeStrategy` will be taken into account. */ readonly version: pulumi.Output; /** * Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. */ readonly zone: pulumi.Output; /** * Create a KubernetesCluster 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: KubernetesClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering KubernetesCluster resources. */ export interface KubernetesClusterState { /** * IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. */ controlPlaneIpFilters?: pulumi.Input[]>; /** * User defined key-value pairs to classify the cluster. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Cluster name. Needs to be unique within the account. */ name?: pulumi.Input; /** * Network ID for the cluster to run in. */ network?: pulumi.Input; /** * Network CIDR for the given network. Computed automatically. */ networkCidr?: pulumi.Input; /** * Names of the node groups configured to cluster */ nodeGroups?: pulumi.Input[]>; /** * The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. */ plan?: pulumi.Input; /** * Enable private node groups. Private node groups requires a network that is routed through NAT gateway. */ privateNodeGroups?: pulumi.Input; /** * Operational state of the cluster. */ state?: pulumi.Input; /** * Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. */ storageEncryption?: pulumi.Input; /** * The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. */ upgradeStrategyType?: pulumi.Input; /** * Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. * * Note that when changing the cluster version, `upgradeStrategy` will be taken into account. */ version?: pulumi.Input; /** * Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. */ zone?: pulumi.Input; } /** * The set of arguments for constructing a KubernetesCluster resource. */ export interface KubernetesClusterArgs { /** * IP addresses or IP ranges in CIDR format which are allowed to access the cluster control plane. To allow access from any source, use `["0.0.0.0/0"]`. To deny access from all sources, use `[]`. Values set here do not restrict access to node groups or exposed Kubernetes services. */ controlPlaneIpFilters: pulumi.Input[]>; /** * User defined key-value pairs to classify the cluster. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Cluster name. Needs to be unique within the account. */ name?: pulumi.Input; /** * Network ID for the cluster to run in. */ network: pulumi.Input; /** * The pricing plan used for the cluster. You can list available plans with `upctl kubernetes plans`. */ plan?: pulumi.Input; /** * Enable private node groups. Private node groups requires a network that is routed through NAT gateway. */ privateNodeGroups?: pulumi.Input; /** * Set default storage encryption strategy for all nodes in the cluster. Valid values are `data-at-rest` and `none`. */ storageEncryption?: pulumi.Input; /** * The upgrade strategy to use when changing the cluster `version`. If not set, `manual` strategy will be used by default. When using `manual` strategy, you must replace the existing node-groups to update them. */ upgradeStrategyType?: pulumi.Input; /** * Kubernetes version ID, e.g. `1.31`. You can list available version IDs with `upctl kubernetes versions`. * * Note that when changing the cluster version, `upgradeStrategy` will be taken into account. */ version?: pulumi.Input; /** * Zone in which the Kubernetes cluster will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. */ zone: pulumi.Input; }