import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Creates and manages Scaleway Kubernetes clusters. For more information, see [the documentation](https://www.scaleway.com/en/developers/api/kubernetes/). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const pn = new scaleway.VpcPrivateNetwork("pn", {}); * const cluster = new scaleway.K8sCluster("cluster", { * version: "1.29.1", * cni: "cilium", * privateNetworkId: pn.id, * deleteAdditionalResources: false, * }); * const pool = new scaleway.K8sPool("pool", { * clusterId: cluster.id, * nodeType: "DEV1-M", * size: 1, * }); * ``` * * ### Multicloud * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const cluster = new scaleway.K8sCluster("cluster", { * type: "multicloud", * version: "1.29.1", * cni: "kilo", * deleteAdditionalResources: false, * }); * const pool = new scaleway.K8sPool("pool", { * clusterId: cluster.id, * nodeType: "external", * size: 0, * minSize: 0, * }); * ``` * * For a detailed example of how to add or run Elastic Metal servers instead of Instances on your cluster, please refer to this guide. * * ### With additional configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const pn = new scaleway.VpcPrivateNetwork("pn", {}); * const cluster = new scaleway.K8sCluster("cluster", { * description: "cluster made in terraform", * version: "1.29.1", * cni: "calico", * tags: ["terraform"], * privateNetworkId: pn.id, * deleteAdditionalResources: false, * autoscalerConfig: { * disableScaleDown: false, * scaleDownDelayAfterAdd: "5m", * estimator: "binpacking", * expander: "random", * ignoreDaemonsetsUtilization: true, * balanceSimilarNodeGroups: true, * expendablePodsPriorityCutoff: -5, * }, * }); * const pool = new scaleway.K8sPool("pool", { * clusterId: cluster.id, * nodeType: "DEV1-M", * size: 3, * autoscaling: true, * autohealing: true, * minSize: 1, * maxSize: 5, * }); * ``` * * ## Import * * Kubernetes clusters can be imported using the `{region}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:index/k8sCluster:K8sCluster mycluster fr-par/11111111-1111-1111-1111-111111111111 * ``` */ export declare class K8sCluster extends pulumi.CustomResource { /** * Get an existing K8sCluster 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?: K8sClusterState, opts?: pulumi.CustomResourceOptions): K8sCluster; /** * Returns true if the given object is an instance of K8sCluster. 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 K8sCluster; /** * The list of [admission plugins](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/) to enable on the cluster. */ readonly admissionPlugins: pulumi.Output; /** * Additional Subject Alternative Names for the Kubernetes API server certificate */ readonly apiserverCertSans: pulumi.Output; /** * The URL of the Kubernetes API server. */ readonly apiserverUrl: pulumi.Output; /** * The auto upgrade configuration. */ readonly autoUpgrade: pulumi.Output; /** * The configuration options for the [Kubernetes cluster autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler). */ readonly autoscalerConfig: pulumi.Output; /** * The Container Network Interface (CNI) for the Kubernetes cluster. * > **Important:** Updates to this field will recreate a new resource. */ readonly cni: pulumi.Output; /** * The creation date of the cluster. */ readonly createdAt: pulumi.Output; /** * Delete additional resources like block volumes, load-balancers and the cluster's private network (if empty) that were created in Kubernetes on cluster deletion. * > **Important:** Setting this field to `true` means that you will lose all your cluster data and network configuration when you delete your cluster. * If you prefer keeping it, you should instead set it as `false`. */ readonly deleteAdditionalResources: pulumi.Output; /** * A description for the Kubernetes cluster. */ readonly description: pulumi.Output; /** * The list of [feature gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) to enable on the cluster. */ readonly featureGates: pulumi.Output; /** * The kubeconfig configuration file of the Kubernetes cluster */ readonly kubeconfigs: pulumi.Output; /** * The name for the Kubernetes cluster. */ readonly name: pulumi.Output; /** * The OpenID Connect configuration of the cluster */ readonly openIdConnectConfig: pulumi.Output; /** * The organization ID the cluster is associated with. */ readonly organizationId: pulumi.Output; /** * The ID of the private network of the cluster. * * > **Important:** Changes to this field will recreate a new resource. * * > **Important:** Private Networks are now mandatory with Kapsule Clusters. If you have a legacy cluster (no `privateNetworkId` set), * you can still set it now. In this case it will not destroy and recreate your cluster but migrate it to the Private Network. */ readonly privateNetworkId: pulumi.Output; /** * `projectId`) The ID of the project the cluster is associated with. */ readonly projectId: pulumi.Output; /** * `region`) The region in which the cluster should be created. */ readonly region: pulumi.Output; /** * The status of the Kubernetes cluster. */ readonly status: pulumi.Output; /** * The tags associated with the Kubernetes cluster. */ readonly tags: pulumi.Output; /** * The type of Kubernetes cluster. Possible values are: * * - for mutualized clusters: `kapsule` or `multicloud` * * - for dedicated Kapsule clusters: `kapsule-dedicated-4`, `kapsule-dedicated-8` or `kapsule-dedicated-16`. * * - for dedicated Kosmos clusters: `multicloud-dedicated-4`, `multicloud-dedicated-8` or `multicloud-dedicated-16`. */ readonly type: pulumi.Output; /** * The last update date of the cluster. */ readonly updatedAt: pulumi.Output; /** * Set to `true` if a newer Kubernetes version is available. */ readonly upgradeAvailable: pulumi.Output; /** * The version of the Kubernetes cluster. */ readonly version: pulumi.Output; /** * The DNS wildcard that points to all ready nodes. */ readonly wildcardDns: pulumi.Output; /** * Create a K8sCluster 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: K8sClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering K8sCluster resources. */ export interface K8sClusterState { /** * The list of [admission plugins](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/) to enable on the cluster. */ admissionPlugins?: pulumi.Input[]>; /** * Additional Subject Alternative Names for the Kubernetes API server certificate */ apiserverCertSans?: pulumi.Input[]>; /** * The URL of the Kubernetes API server. */ apiserverUrl?: pulumi.Input; /** * The auto upgrade configuration. */ autoUpgrade?: pulumi.Input; /** * The configuration options for the [Kubernetes cluster autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler). */ autoscalerConfig?: pulumi.Input; /** * The Container Network Interface (CNI) for the Kubernetes cluster. * > **Important:** Updates to this field will recreate a new resource. */ cni?: pulumi.Input; /** * The creation date of the cluster. */ createdAt?: pulumi.Input; /** * Delete additional resources like block volumes, load-balancers and the cluster's private network (if empty) that were created in Kubernetes on cluster deletion. * > **Important:** Setting this field to `true` means that you will lose all your cluster data and network configuration when you delete your cluster. * If you prefer keeping it, you should instead set it as `false`. */ deleteAdditionalResources?: pulumi.Input; /** * A description for the Kubernetes cluster. */ description?: pulumi.Input; /** * The list of [feature gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) to enable on the cluster. */ featureGates?: pulumi.Input[]>; /** * The kubeconfig configuration file of the Kubernetes cluster */ kubeconfigs?: pulumi.Input[]>; /** * The name for the Kubernetes cluster. */ name?: pulumi.Input; /** * The OpenID Connect configuration of the cluster */ openIdConnectConfig?: pulumi.Input; /** * The organization ID the cluster is associated with. */ organizationId?: pulumi.Input; /** * The ID of the private network of the cluster. * * > **Important:** Changes to this field will recreate a new resource. * * > **Important:** Private Networks are now mandatory with Kapsule Clusters. If you have a legacy cluster (no `privateNetworkId` set), * you can still set it now. In this case it will not destroy and recreate your cluster but migrate it to the Private Network. */ privateNetworkId?: pulumi.Input; /** * `projectId`) The ID of the project the cluster is associated with. */ projectId?: pulumi.Input; /** * `region`) The region in which the cluster should be created. */ region?: pulumi.Input; /** * The status of the Kubernetes cluster. */ status?: pulumi.Input; /** * The tags associated with the Kubernetes cluster. */ tags?: pulumi.Input[]>; /** * The type of Kubernetes cluster. Possible values are: * * - for mutualized clusters: `kapsule` or `multicloud` * * - for dedicated Kapsule clusters: `kapsule-dedicated-4`, `kapsule-dedicated-8` or `kapsule-dedicated-16`. * * - for dedicated Kosmos clusters: `multicloud-dedicated-4`, `multicloud-dedicated-8` or `multicloud-dedicated-16`. */ type?: pulumi.Input; /** * The last update date of the cluster. */ updatedAt?: pulumi.Input; /** * Set to `true` if a newer Kubernetes version is available. */ upgradeAvailable?: pulumi.Input; /** * The version of the Kubernetes cluster. */ version?: pulumi.Input; /** * The DNS wildcard that points to all ready nodes. */ wildcardDns?: pulumi.Input; } /** * The set of arguments for constructing a K8sCluster resource. */ export interface K8sClusterArgs { /** * The list of [admission plugins](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/) to enable on the cluster. */ admissionPlugins?: pulumi.Input[]>; /** * Additional Subject Alternative Names for the Kubernetes API server certificate */ apiserverCertSans?: pulumi.Input[]>; /** * The auto upgrade configuration. */ autoUpgrade?: pulumi.Input; /** * The configuration options for the [Kubernetes cluster autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler). */ autoscalerConfig?: pulumi.Input; /** * The Container Network Interface (CNI) for the Kubernetes cluster. * > **Important:** Updates to this field will recreate a new resource. */ cni: pulumi.Input; /** * Delete additional resources like block volumes, load-balancers and the cluster's private network (if empty) that were created in Kubernetes on cluster deletion. * > **Important:** Setting this field to `true` means that you will lose all your cluster data and network configuration when you delete your cluster. * If you prefer keeping it, you should instead set it as `false`. */ deleteAdditionalResources: pulumi.Input; /** * A description for the Kubernetes cluster. */ description?: pulumi.Input; /** * The list of [feature gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) to enable on the cluster. */ featureGates?: pulumi.Input[]>; /** * The name for the Kubernetes cluster. */ name?: pulumi.Input; /** * The OpenID Connect configuration of the cluster */ openIdConnectConfig?: pulumi.Input; /** * The ID of the private network of the cluster. * * > **Important:** Changes to this field will recreate a new resource. * * > **Important:** Private Networks are now mandatory with Kapsule Clusters. If you have a legacy cluster (no `privateNetworkId` set), * you can still set it now. In this case it will not destroy and recreate your cluster but migrate it to the Private Network. */ privateNetworkId?: pulumi.Input; /** * `projectId`) The ID of the project the cluster is associated with. */ projectId?: pulumi.Input; /** * `region`) The region in which the cluster should be created. */ region?: pulumi.Input; /** * The tags associated with the Kubernetes cluster. */ tags?: pulumi.Input[]>; /** * The type of Kubernetes cluster. Possible values are: * * - for mutualized clusters: `kapsule` or `multicloud` * * - for dedicated Kapsule clusters: `kapsule-dedicated-4`, `kapsule-dedicated-8` or `kapsule-dedicated-16`. * * - for dedicated Kosmos clusters: `multicloud-dedicated-4`, `multicloud-dedicated-8` or `multicloud-dedicated-16`. */ type?: pulumi.Input; /** * The version of the Kubernetes cluster. */ version: pulumi.Input; }