yandex_kubernetes_cluster (Data Source)
- 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.
Важно
One of cluster_id or name should be specified.
Example 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
}
Schema
Optional
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 providerfolder-idis used.name(String) The resource name.
Read-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 tocluster_ipv4_rangebut 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 haveeditrole 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 kms_provider
Read-Only:
key_id(String) KMS key ID.
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 withzonalorregional. Currently, supports either one, for zonal master, or three instances ofmaster_location. Can be updated in place. When creating regional cluster (three master instances), itsregionwill 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) Whentrue, 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 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_timeandduration. Please seezonal_cluster_resource_nameconfig example. (see below for nested schema)
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 master.master_location
Read-Only:
-
subnet_id(String) ID of the subnet. -
zone(String) ID of the availability zone.
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 master.regional
Read-Only:
region(String) Name of availability region (e.g.ru-central1), where master instances will be allocated.
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 master.scale_policy.auto_scale
Read-Only:
min_resource_preset_id(String) Minimal resource preset ID.
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 master.zonal
Read-Only:
zone(String) ID of the availability zone.
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 network_implementation.cilium
Read-Only:
routing_mode(String)
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.