import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## Example Usage * * Create a new VKE cluster: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const k8 = new vultr.Kubernetes("k8", { * label: "vke-test", * nodePools: { * autoScaler: true, * label: "vke-nodepool", * labels: { * "my-label": "a-label-on-all-nodes", * "my-second-label": "another-label-on-all-nodes", * }, * maxNodes: 2, * minNodes: 1, * nodeQuantity: 1, * plan: "vc2-1c-2gb", * taints: [{ * effect: "NoExecute", * key: "a-taint", * value: "is-tainted", * }], * }, * region: "ewr", * version: "v1.28.2+1", * }); * ``` * * A default node pool is required when first creating the resource but it can be removed at a later point so long as there is a separate `vultr.KubernetesNodePools` resource attached. For example: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const k8 = new vultr.Kubernetes("k8", { * region: "ewr", * label: "vke-test", * version: "v1.28.2+1", * }); * // This resource must be created and attached to the cluster * // before removing the default node from the vultr_kubernetes resource * const np = new vultr.KubernetesNodePools("np", { * clusterId: k8.id, * nodeQuantity: 1, * plan: "vc2-1c-2gb", * label: "vke-nodepool", * autoScaler: true, * minNodes: 1, * maxNodes: 2, * }); * ``` * * There is still a requirement that there be one node pool attached to the cluster but this should allow more flexibility about which node pool that is. * * ## Import * * A kubernetes cluster created outside of terraform can be imported into the * * terraform state using the UUID. One thing to note is that all kubernetes * * resources have a default node pool with a tag of `tf-vke-default`. In order to * * avoid errors, ensure that there is a node pool with that tag set. * * ```sh * $ pulumi import vultr:index/kubernetes:Kubernetes my-k8s 7365a98b-5a43-450f-bd27-d768827100e5 * ``` */ export declare class Kubernetes extends pulumi.CustomResource { /** * Get an existing Kubernetes 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?: KubernetesState, opts?: pulumi.CustomResourceOptions): Kubernetes; /** * Returns true if the given object is an instance of Kubernetes. 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 Kubernetes; /** * The base64 encoded public certificate used by clients to access the cluster. */ readonly clientCertificate: pulumi.Output; /** * The base64 encoded private key used by clients to access the cluster. */ readonly clientKey: pulumi.Output; /** * The base64 encoded public certificate for the cluster's certificate authority. */ readonly clusterCaCertificate: pulumi.Output; /** * IP range that your pods will run on in this cluster. */ readonly clusterSubnet: pulumi.Output; /** * Date node was created. */ readonly dateCreated: pulumi.Output; /** * Boolean indicating if the cluster should be created with a managed firewall. */ readonly enableFirewall: pulumi.Output; /** * Domain for your Kubernetes clusters control plane. */ readonly endpoint: pulumi.Output; /** * The ID of the firewall group managed by this cluster. */ readonly firewallGroupId: pulumi.Output; /** * Boolean indicating if the cluster should be created with multiple, highly available controlplanes. */ readonly haControlplanes: pulumi.Output; /** * IP address of VKE cluster control plane. */ readonly ip: pulumi.Output; /** * Base64 encoded Kubeconfig for this VKE cluster. */ readonly kubeConfig: pulumi.Output; /** * The VKE clusters label. */ readonly label: pulumi.Output; /** * Contains the default node pool that was deployed. */ readonly nodePools: pulumi.Output; /** * The region your VKE cluster will be deployed in. */ readonly region: pulumi.Output; /** * IP range that services will run on this cluster. */ readonly serviceSubnet: pulumi.Output; /** * Status of node. */ readonly status: pulumi.Output; /** * The version your VKE cluster you want deployed. [See Available Version](https://www.vultr.com/api/#operation/get-kubernetes-versions) */ readonly version: pulumi.Output; /** * The ID of the VPC to use when creating the cluster. If not provided a new VPC will be created instead. */ readonly vpcId: pulumi.Output; /** * Create a Kubernetes 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: KubernetesArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Kubernetes resources. */ export interface KubernetesState { /** * The base64 encoded public certificate used by clients to access the cluster. */ clientCertificate?: pulumi.Input; /** * The base64 encoded private key used by clients to access the cluster. */ clientKey?: pulumi.Input; /** * The base64 encoded public certificate for the cluster's certificate authority. */ clusterCaCertificate?: pulumi.Input; /** * IP range that your pods will run on in this cluster. */ clusterSubnet?: pulumi.Input; /** * Date node was created. */ dateCreated?: pulumi.Input; /** * Boolean indicating if the cluster should be created with a managed firewall. */ enableFirewall?: pulumi.Input; /** * Domain for your Kubernetes clusters control plane. */ endpoint?: pulumi.Input; /** * The ID of the firewall group managed by this cluster. */ firewallGroupId?: pulumi.Input; /** * Boolean indicating if the cluster should be created with multiple, highly available controlplanes. */ haControlplanes?: pulumi.Input; /** * IP address of VKE cluster control plane. */ ip?: pulumi.Input; /** * Base64 encoded Kubeconfig for this VKE cluster. */ kubeConfig?: pulumi.Input; /** * The VKE clusters label. */ label?: pulumi.Input; /** * Contains the default node pool that was deployed. */ nodePools?: pulumi.Input; /** * The region your VKE cluster will be deployed in. */ region?: pulumi.Input; /** * IP range that services will run on this cluster. */ serviceSubnet?: pulumi.Input; /** * Status of node. */ status?: pulumi.Input; /** * The version your VKE cluster you want deployed. [See Available Version](https://www.vultr.com/api/#operation/get-kubernetes-versions) */ version?: pulumi.Input; /** * The ID of the VPC to use when creating the cluster. If not provided a new VPC will be created instead. */ vpcId?: pulumi.Input; } /** * The set of arguments for constructing a Kubernetes resource. */ export interface KubernetesArgs { /** * Boolean indicating if the cluster should be created with a managed firewall. */ enableFirewall?: pulumi.Input; /** * Boolean indicating if the cluster should be created with multiple, highly available controlplanes. */ haControlplanes?: pulumi.Input; /** * The VKE clusters label. */ label: pulumi.Input; /** * Contains the default node pool that was deployed. */ nodePools?: pulumi.Input; /** * The region your VKE cluster will be deployed in. */ region: pulumi.Input; /** * The version your VKE cluster you want deployed. [See Available Version](https://www.vultr.com/api/#operation/get-kubernetes-versions) */ version: pulumi.Input; /** * The ID of the VPC to use when creating the cluster. If not provided a new VPC will be created instead. */ vpcId?: pulumi.Input; }