Skip to content

Terraform module to manage k8s cluster with node groups

Notifications You must be signed in to change notification settings

Sebor/terraform-yc-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K8S

Requirements

Name Version
terraform >= 1.2.0
yandex >= 0.75

Providers

Name Version
yandex >= 0.75

Modules

No modules.

Resources

Name Type
yandex_iam_service_account.cluster resource
yandex_iam_service_account.cluster_node resource
yandex_kms_symmetric_key.this resource
yandex_kubernetes_cluster.this resource
yandex_kubernetes_node_group.node_groups resource
yandex_resourcemanager_folder_iam_member.cluster resource
yandex_resourcemanager_folder_iam_member.cluster_node resource

Inputs

Name Description Type Default Required
cluster_description A description of the Kubernetes cluster string "Kubernetes cluster managed by terraform" no
cluster_folder_id The ID of the folder that the Kubernetes cluster belongs to string n/a yes
cluster_ipv4_range CIDR block. IP range for allocating pod addresses. It should not overlap with
any subnet in the network the Kubernetes cluster located in. Static routes will
be set up for this CIDR blocks in node subnets.
string null no
cluster_kms_key_create Should module create KMS key bool false no
cluster_kms_key_id KMS key ID to encrypt kubernetes secrets string null no
cluster_master_auto_upgrade Boolean flag that specifies if master can be upgraded automatically bool false no
cluster_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({
zone = string
subnet_id = string
}))
n/a yes
cluster_master_maintenance_windows List of structures that specifies maintenance windows,
when auto update for master is allowed.
Example:
master_maintenance_windows = [
{
start_time = "23:00"
duration = "3h"
}
]
list(map(string)) [] no
cluster_master_public_ip Boolean flag. When true, Kubernetes master will have visible ipv4 address bool false no
cluster_master_region Name of region where cluster will be created. Required for regional cluster,
not used for zonal cluster
string "ru-central1" no
cluster_master_security_group_ids List of security group IDs to be assigned to cluster list(string) [] no
cluster_master_version Version of Kubernetes that will be used for master string null no
cluster_name Kubernetes cluster name and name prefix for cluster resources string n/a yes
cluster_network_policy_provider Network policy provider for the cluster. Possible values: CALICO string null no
cluster_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
cluster_node_service_account_id ID of service account to be used by the worker nodes of the Kubernetes
cluster to access Container Registry or to push node logs and metrics.
string null no
cluster_release_channel Cluster release channel string "STABLE" no
cluster_service_account_id ID of existing service account to be used for provisioning Compute Cloud
and VPC resources for Kubernetes cluster. Selected service account should have
edit role on the folder where the Kubernetes cluster will be located and on the
folder where selected network resides.
string null no
cluster_service_ipv4_range CIDR block. IP range Kubernetes service Kubernetes cluster IP addresses
will be allocated from. It should not overlap with any subnet in the network
the Kubernetes cluster located in.
string null no
cluster_vpc_id The ID of the cluster network. string n/a yes
labels A set of key/value label pairs to assign to the Kubernetes cluster resources map(any) {} no
node_groups Parameters of Kubernetes node groups.
Example:
node_groups = {
public = {
security_group_ids = [dependency.network.outputs.vpc_sg_id]
nat = true
}
private = {}
}
any {} no
node_groups_default_locations Default locations of Kubernetes node groups.
If ommited, master_locations will be used.
list(object({
subnet_id = string
zone = string
}))
null no
node_groups_default_ssh_keys Map containing SSH keys to install on all Kubernetes node servers by default. map(list(string)) {} no
node_groups_locations Locations of Kubernetes node groups.
Use it to override default locations of certain node groups.
Example:
node_groups_locations = {
public = dependency.network.outputs.public_subnet_ids
private = dependency.network.outputs.private_subnet_ids
}
map(list(object({
subnet_id = string
zone = string
})))
{} no

Outputs

Name Description
cluster_ca_certificate PEM-encoded public certificate that is the root of trust for
the Kubernetes cluster
cluster_ca_certificate_base64 Base64 encoded public certificate that is the root of trust for
the Kubernetes cluster
cluster_external_v4_endpoint An IPv4 external network address that is assigned to the master
cluster_id ID of a new Kubernetes cluster
cluster_internal_v4_endpoint An IPv4 internal network address that is assigned to the master
cluster_kms_key_id ID of a KMS cluster key
cluster_node_service_account_id ID of service account to be used by the worker nodes of the Kubernetes cluster
to access Container Registry or to push node logs and metrics
cluster_service_account_id ID of service account used for provisioning Compute Cloud and VPC resources
for Kubernetes cluster

About

Terraform module to manage k8s cluster with node groups

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages