Terraform module which creates Yandex Cloud Kubernetes resources.
Examples codified under
the examples
are intended
to give users references for how to use the module(s) as well as testing/validating changes to the source code of the
module. If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow
maintainers to test your changes and to keep the examples up to date for users. Thank you!
Name | Version |
---|---|
terraform | >= 1.3 |
Name | Version |
---|---|
tls | n/a |
yandex | n/a |
No modules.
Name | Type |
---|---|
tls_private_key.default_ssh_key | resource |
yandex_kubernetes_cluster.main | resource |
yandex_kubernetes_node_group.node_groups | resource |
yandex_logging_group.main | resource |
yandex_client_config.client | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cluster_ipv4_range | CIDR block. IP range for allocating pod addresses. It should not overlap with any subnet in the network the K8S cluster located in. Static routes will be set up for this CIDR blocks in node subnets |
string |
null |
no |
cluster_ipv6_range | Identical to cluster_ipv4_range but for IPv6 protocol | string |
null |
no |
cni_type | Type of K8S CNI which will be used for the cluster | string |
"cillium" |
no |
description | K8S cluster description | string |
"" |
no |
folder_id | Folder ID | string |
null |
no |
generate_default_ssh_key | If true, SSH key for node groups will be generated | bool |
true |
no |
kms_provider_key_id | K8S cluster KMS key ID | string |
null |
no |
labels | A set of labels to assign to the K8S cluster | map(string) |
{} |
no |
master_auto_upgrade | Boolean flag that specifies if master can be upgraded automatically | bool |
false |
no |
master_locations | List of locations where cluster will be created. If list contains only one location, will be created zonal cluster, if more than one -- regional |
list(object({ |
n/a | yes |
master_logging | Master logging | object({ |
{ |
no |
master_maintenance_windows | List of structures that specifies maintenance windows, when auto update for master is allowed E.g: master_maintenance_windows = [ |
list(map(string)) |
[ |
no |
master_public_ip | Boolean flag. When true, K8S master will have visible ipv4 address | bool |
true |
no |
master_region | Name of region where cluster will be created. Required for regional cluster, not used for zonal cluster |
string |
null |
no |
master_security_group_ids | List of security group IDs to which the K8S cluster belongs | set(string) |
null |
no |
master_version | Version of K8S that will be used for master | string |
"1.23" |
no |
name | K8S cluster name | string |
n/a | yes |
network_id | The ID of the cluster network | string |
null |
no |
node_groups | K8S node groups | map(object({ |
{} |
no |
node_groups_default_security_groups_ids | A list of default IDs for node groups. Will be used if node_groups[].security_group_ids is empty | list(string) |
[] |
no |
node_groups_locations | Locations of K8S node groups. If omitted, master_locations will be used | list(object({ |
null |
no |
node_groups_ssh_keys | Map containing SSH keys to install on all K8S node servers by default | map(list(string)) |
{} |
no |
node_ipv4_cidr_mask_size | Size of the masks that are assigned to each node in the cluster. Effectively limits maximum number of pods for each node |
number |
null |
no |
node_name_prefix | The prefix for node group name | string |
"" |
no |
node_service_account_id | ID of service account to be used by the worker nodes of the K8S cluster to access Container Registry or to push node logs and metrics. If omitted or equal to service_account_id , service account will be usedas node service account. |
string |
null |
no |
nodes_default_ssh_user | Default SSH user for node groups. Used only if generate_default_ssh_key == true | string |
"ubuntu" |
no |
release_channel | K8S cluster release channel | string |
"STABLE" |
no |
service_account_id | ID of existing service account to be used for provisioning Compute Cloud and VPC resources for K8S cluster. Selected service account should have edit role on the folder where the K8S cluster will be located and on the folder where selected network resides |
string |
null |
no |
service_ipv4_range | CIDR block. IP range K8S service K8S cluster IP addresses will be allocated from. It should not overlap with any subnet in the network the K8S cluster located in |
string |
null |
no |
service_ipv6_range | Identical to service_ipv4_range but for IPv6 protocol | string |
null |
no |
Name | Description |
---|---|
cluster_ca_certificate | PEM-encoded public certificate that is the root of trust for the K8S cluster |
cluster_id | ID of a new K8S cluster |
default_ssh_key_prv | Default node groups that is attached to all node groups |
default_ssh_key_pub | Default node groups that is attached to all node groups |
external_v4_endpoint | An IPv4 external network address that is assigned to the master |
internal_v4_endpoint | An IPv4 internal network address that is assigned to the master |
node_groups | Attributes of yandex_node_group resources created in cluster |
Apache-2.0 Licensed. See LICENSE.