Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • kubernetes_cluster
          • kubernetes_node_group

In this article:

  • Example usage
  • Schema
  • Optional
  • Read-Only
  • Nested Schema for kms_provider
  • Nested Schema for master
  • Nested Schema for master.maintenance_policy
  • Nested Schema for master.maintenance_policy.maintenance_window
  • Nested Schema for master.master_location
  • Nested Schema for master.master_logging
  • Nested Schema for master.regional
  • Nested Schema for master.scale_policy
  • Nested Schema for master.scale_policy.auto_scale
  • Nested Schema for master.version_info
  • Nested Schema for master.zonal
  • Nested Schema for network_implementation
  • Nested Schema for network_implementation.cilium
  • Nested Schema for workload_identity_federation
  1. Terraform reference
  2. Resources
  3. Managed Service for Kubernetes (MK8S)
  4. Data Sources
  5. kubernetes_cluster

yandex_kubernetes_cluster (Data Source)

Written by
Yandex Cloud
Updated at September 26, 2025
  • Example usage
  • Schema
    • Optional
    • Read-Only
    • Nested Schema for kms_provider
    • Nested Schema for master
    • Nested Schema for master.maintenance_policy
    • Nested Schema for master.maintenance_policy.maintenance_window
    • Nested Schema for master.master_location
    • Nested Schema for master.master_logging
    • Nested Schema for master.regional
    • Nested Schema for master.scale_policy
    • Nested Schema for master.scale_policy.auto_scale
    • Nested Schema for master.version_info
    • Nested Schema for master.zonal
    • Nested Schema for network_implementation
    • Nested Schema for network_implementation.cilium
    • Nested Schema for workload_identity_federation

Get information about a Yandex Cloud Managed Kubernetes Cluster. For more information, see the official documentation.

Warning

One of cluster_id or name should be specified.

Example usageExample usage

//
// Get information about existing Managed Kubernetes Cluster (MK8S).
//
data "yandex_kubernetes_cluster" "my_cluster" {
  cluster_id = "some_k8s_cluster_id"
}

output "cluster_external_v4_endpoint" {
  value = data.yandex_kubernetes_cluster.my_cluster.master.0.external_v4_endpoint
}

SchemaSchema

OptionalOptional

  • cluster_id (String) ID of a specific Kubernetes cluster.
  • folder_id (String) The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • name (String) The resource name.

Read-OnlyRead-Only

  • cluster_ipv4_range (String) 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.
  • cluster_ipv6_range (String) Identical to cluster_ipv4_range but for IPv6 protocol.
  • created_at (String) The creation timestamp of the resource.
  • description (String) The resource description.
  • health (String) Health of the Kubernetes cluster.
  • id (String) The ID of this resource.
  • kms_provider (List of Object) Cluster KMS provider parameters. (see below for nested schema)
  • labels (Map of String) A set of key/value label pairs which assigned to resource.
  • log_group_id (String) Log group where cluster stores cluster system logs, like audit, events, or control plane logs.
  • master (List of Object) Kubernetes master configuration options. (see below for nested schema)
  • network_id (String) The ID of the cluster network.
  • network_implementation (List of Object) Network Implementation options. (see below for nested schema)
  • network_policy_provider (String) Network policy provider for the cluster. Possible values: CALICO.
  • node_ipv4_cidr_mask_size (Number) Size of the masks that are assigned to each node in the cluster. Effectively limits maximum number of pods for each node.
  • node_service_account_id (String) Service account to be used by the worker nodes of the Kubernetes cluster to access Container Registry or to push node logs and metrics.
  • release_channel (String) Cluster release channel.
  • service_account_id (String) 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.
  • service_ipv4_range (String) 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.
  • service_ipv6_range (String) Identical to service_ipv4_range but for IPv6 protocol.
  • status (String) Status of the Kubernetes cluster.
  • workload_identity_federation (List of Object) Workload Identity Federation configuration. (see below for nested schema)

Nested Schema for Nested Schema for kms_provider

Read-Only:

  • key_id (String) KMS key ID.

Nested Schema for Nested Schema for master

Read-Only:

  • cluster_ca_certificate (String) PEM-encoded public certificate that is the root of trust for the Kubernetes cluster.

  • etcd_cluster_size (Number) Number of etcd clusters that will be used for the Kubernetes master.

  • external_v4_address (String) An IPv4 external network address that is assigned to the master.

  • external_v4_endpoint (String) External endpoint that can be used to access Kubernetes cluster API from the internet (outside of the cloud).

  • external_v6_address (String) An IPv6 external network address that is assigned to the master.

  • external_v6_endpoint (String) External IPv6 endpoint that can be used to access Kubernetes cluster API from the internet (outside of the cloud).

  • internal_v4_address (String) An IPv4 internal network address that is assigned to the master.

  • internal_v4_endpoint (String) Internal endpoint that can be used to connect to the master from cloud networks.

  • maintenance_policy (Block List, Max: 1) Maintenance policy for Kubernetes master. If policy is omitted, automatic revision upgrades of the kubernetes master are enabled and could happen at any time. Revision upgrades are performed only within the same minor version, e.g. 1.29. Minor version upgrades (e.g. 1.29->1.30) should be performed manually. (see below for nested schema)

  • master_location (Block List) Cluster master's instances locations array (zone and subnet). Cannot be used together with zonal or regional. Currently, supports either one, for zonal master, or three instances of master_location. Can be updated in place. When creating regional cluster (three master instances), its region will be evaluated automatically by backend. (see below for nested schema)

  • master_logging (Block List, Max: 1) Master Logging options. (see below for nested schema)

  • public_ip (Boolean) When true, Kubernetes master will have visible ipv4 address.

  • regional (Block List, Max: 1) Initialize parameters for Regional Master (highly available master). (see below for nested schema)

  • scale_policy (Block List, Max: 1) Scale policy of the master. (see below for nested schema)

  • security_group_ids (Set of String) The list of security groups applied to resource or their components.

  • version (String) Version of Kubernetes that will be used for master.

  • version_info (List of Object) Information about cluster version. (see below for nested schema) (see below for nested schema)

  • zonal (Block List, Max: 1) Initialize parameters for Zonal Master (single node master). (see below for nested schema)

Nested Schema for Nested Schema for master.maintenance_policy

Read-Only:

  • auto_upgrade (Boolean) Boolean flag that specifies if master can be upgraded automatically. When omitted, default value is TRUE.

  • maintenance_window (Block Set) This structure specifies maintenance window, when update for master is allowed. When omitted, it defaults to any time. To specify time of day interval, for all days, one element should be provided, with two fields set, start_time and duration. Please see zonal_cluster_resource_name config example. (see below for nested schema)

Nested Schema for Nested Schema for master.maintenance_policy.maintenance_window

Read-Only:

  • day (String) The day of the week which you want to update.

  • duration (String) The duration of the day of week you want to update.

  • start_time (String) The start time of the day of week you want to update.

Nested Schema for Nested Schema for master.master_location

Read-Only:

  • subnet_id (String) ID of the subnet.

  • zone (String) ID of the availability zone.

Nested Schema for Nested Schema for master.master_logging

Read-Only:

  • audit_enabled (Boolean) Boolean flag that specifies if kube-apiserver audit logs should be sent to Yandex Cloud Logging.

  • cluster_autoscaler_enabled (Boolean) Boolean flag that specifies if cluster-autoscaler logs should be sent to Yandex Cloud Logging.

  • enabled (Boolean) Boolean flag that specifies if master components logs should be sent to Yandex Cloud Logging. The exact components that will send their logs must be configured via the options described below.

  • events_enabled (Boolean) Boolean flag that specifies if kubernetes cluster events should be sent to Yandex Cloud Logging.

  • folder_id (String) ID of the folder default Log group of which should be used to collect logs.

  • kube_apiserver_enabled (Boolean) Boolean flag that specifies if kube-apiserver logs should be sent to Yandex Cloud Logging.

  • log_group_id (String) ID of the Yandex Cloud Logging Log group.

Nested Schema for Nested Schema for master.regional

Read-Only:

  • region (String) Name of availability region (e.g. ru-central1), where master instances will be allocated.

Nested Schema for Nested Schema for master.scale_policy

Read-Only:

  • auto_scale (Block List, Max: 1) Autoscaled master instance resources. (see below for nested schema)

Nested Schema for Nested Schema for master.scale_policy.auto_scale

Read-Only:

  • min_resource_preset_id (String) Minimal resource preset ID.

Nested Schema for Nested Schema for master.version_info

Read-Only:

  • current_version (String)
  • new_revision_available (Boolean)
  • new_revision_summary (String)
  • version_deprecated (Boolean)

Nested Schema for Nested Schema for master.zonal

Read-Only:

  • zone (String) ID of the availability zone.

Nested Schema for Nested Schema for network_implementation

Read-Only:

  • cilium (Block List, Max: 1) Cilium network implementation configuration. No options exist. (see below for nested schema)

Nested Schema for Nested Schema for network_implementation.cilium

Read-Only:

  • routing_mode (String)

Nested Schema for Nested Schema for workload_identity_federation

Read-Only:

  • enabled (Boolean) Identifies whether Workload Identity Federation is enabled.

  • issuer (String) Issuer URI for Kubernetes service account tokens.

  • jwks_uri (String) JSON Web Key Set URI used to verify token signatures.

Was the article helpful?

Previous
mdb_greenplum_user
Next
kubernetes_node_group
© 2025 Direct Cursus Technology L.L.C.