selectel_mks_cluster_v1
Эта инструкция — копия документации Selectel Terraform-провайдера в Terraform Registry.
Creates and manages a Managed Kubernetes cluster using public API v1. For more information about Managed Kubernetes, see the official Selectel documentation.
Example usage
High availability cluster
resource "selectel_mks_cluster_v1" "ha_cluster" {
name = "cluster-1"
project_id = selectel_vpc_project_v2.project_1.id
region = "ru-7"
kube_version = data.selectel_mks_kube_versions_v1.versions.latest_version
}
Basic cluster
resource "selectel_mks_cluster_v1" "basic_cluster" {
name = "cluster-1"
project_id = selectel_vpc_project_v2.project_1.id
region = "ru-7"
kube_version = data.selectel_mks_kube_versions_v1.versions.latest_version
zonal = true
enable_patch_version_auto_upgrade = false
}
Argument Reference
-
name
— (Required) Cluster name. Changing this creates a new cluster. The cluster name is included into the names of the cluster entities: node groups, nodes, load balancers, networks, and volumes. -
project_id
— (Required) Unique identifier of the associated project. Changing this creates a new cluster. Retrieved from the selectel_vpc_project_v2 resource. Learn more about Projects. -
region
— (Required) Pool where the cluster is located, for example,ru-7
. Changing this creates a new cluster. Learn more about available pools in the Availability matrix. -
kube_version
— (Required) Kubernetes version of the cluster. Changing this upgrades the cluster version. You can retrieve information about the Kubernetes versions with the selectel_mks_kube_versions_v1 data source.To upgrade a patch version, the desired version should match the latest available patch version for the current minor release.
To upgrade a minor version, the desired version should match the next available minor release with the latest patch version.
-
zonal
— (Optional) Specifies a cluster type. Changing this creates a new cluster.Boolean flag:
-
false
(default) — for a high availability cluster with three master nodes located on different hosts in one pool segment. -
true
— for a basic cluster with one master node. Setenable_patch_version_auto_upgrade
tofalse
.
Learn more about Cluster types.
-
-
enable_autorepair