Skip to main content

Get

Returns the specified Kubernetes cluster.

To get the list of available Kubernetes cluster, make a List request.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetClusterRequest = cloudApi.dataproc.cluster_service.GetClusterRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ClusterServiceClient);

const result = await client.get(
GetClusterRequest.fromPartial({
clusterId: "clusterId",
})
);
console.log(result);
})();

GetClusterRequest​

clusterId : string​

ID of the Kubernetes cluster to return.

Cluster​

A Kubernetes cluster.

Status​

  • STATUS_UNSPECIFIED

  • PROVISIONING

    Kubernetes cluster is waiting for resources to be allocated.

  • RUNNING

    Kubernetes cluster is running.

  • RECONCILING

    Kubernetes cluster is being reconciled.

  • STOPPING

    Kubernetes cluster is being stopped.

  • STOPPED

    Kubernetes cluster stopped.

  • DELETING

    Kubernetes cluster is being deleted.

  • STARTING

    Kubernetes cluster is being started.

Health​

  • HEALTH_UNSPECIFIED

  • HEALTHY

    Kubernetes cluster is alive and well.

  • UNHEALTHY

    Kubernetes cluster is inoperable.

id : string​

ID of the Kubernetes cluster.

folderId : string​

ID of the folder that the Kubernetes cluster belongs to.

createdAt : google.protobuf.Timestamp​

Creation timestamp.

name : string​

Name of the Kubernetes cluster.

description : string​

Description of the Kubernetes cluster. 0-256 characters long.

labels : string​

Resource labels as key:value pairs. Maximum of 64 per resource.

status : Status​

Status of the Kubernetes cluster.

health : Health​

Health of the Kubernetes cluster.

networkId : string​

ID of the network the Kubernetes cluster belongs to.

master : Master​

Properties of the master for the Kubernetes cluster.

ipAllocationPolicy : IPAllocationPolicy​

Allocation policy for IP addresses of services and pods inside the Kubernetes cluster in different availability zones.

One of internetGateway​

  • gatewayIpv4Address : string​

    Gateway IPv4 address.

serviceAccountId : string​

Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster.

nodeServiceAccountId : 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.

releaseChannel : ReleaseChannel​

When creating a Kubernetes cluster, you should specify one of three release channels. The release channel contains several Kubernetes versions. Channels differ in the set of available versions, the management of auto-updates, and the updates received. You can't change the channel once the Kubernetes cluster is created, you can only recreate the Kubernetes cluster and specify a new release channel. For more details see documentation.

networkPolicy : NetworkPolicy​
kmsProvider : KMSProvider​

KMS provider configuration.

logGroupId : string​

Log group where cluster stores cluster system logs, like audit, events, or controlplane logs.

One of networkImplementation​

  • cilium : Cilium​

Master​

One of masterType​

  • zonalMaster : ZonalMaster​

    Parameters of the availability zone for the master.

  • regionalMaster : RegionalMaster​

    Parameters of the region for the master.

locations : Location​

Locations specification for Kubernetes control-plane (master) instances.

etcdClusterSize : int64​

Number of etcd nodes in cluster.

version : string​

Version of Kubernetes components that runs on the master.

endpoints : MasterEndpoints​

Endpoints of the master. Endpoints constitute of scheme and port (i.e. https://ip-address:port) and can be used by the clients to communicate with the Kubernetes API of the Kubernetes cluster.

masterAuth : MasterAuth​

Master authentication parameters are used to establish trust between the master and a client.

versionInfo : VersionInfo​

Detailed information about the Kubernetes version that is running on the master.

maintenancePolicy : MasterMaintenancePolicy​

Maintenance policy of the master.

securityGroupIds : string​

Master security groups.

masterLogging : MasterLogging​

Cloud Logging for master components.

IPAllocationPolicy​

clusterIpv4CidrBlock : 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.

nodeIpv4CidrMaskSize : int64​

Size of the masks that are assigned for each node in the cluster.

If not specified, 24 is used.

serviceIpv4CidrBlock : 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.

clusterIpv6CidrBlock : string​

IPv6 range for allocating pod IP addresses.

serviceIpv6CidrBlock : string​

IPv6 range for allocating Kubernetes service IP addresses

NetworkPolicy​

Provider​
  • PROVIDER_UNSPECIFIED

  • CALICO

provider : Provider​

KMSProvider​

keyId : string​

KMS key ID for secrets encryption. To obtain a KMS key ID use a yandex.cloud.kms.v1.SymmetricKeyService.List request.

Cilium​

RoutingMode​
  • ROUTING_MODE_UNSPECIFIED

  • TUNNEL

routingMode : RoutingMode​

ZonalMaster​

zoneId : string​

ID of the availability zone where the master resides.

internalV4Address : string​

IPv4 internal network address that is assigned to the master.

externalV4Address : string​

IPv4 external network address that is assigned to the master.

RegionalMaster​

regionId : string​

ID of the region where the master resides.

internalV4Address : string​

IPv4 internal network address that is assigned to the master.

externalV4Address : string​

IPv4 external network address that is assigned to the master.

externalV6Address : string​

IPv6 external network address that is assigned to the master.

Location​

zoneId : string​

ID of the availability zone where the master resides.

subnetId : string​

ID of the VPC network's subnet where the master resides.

MasterEndpoints​

internalV4Endpoint : string​

Internal endpoint that can be used to connect to the master from cloud networks.

externalV4Endpoint : string​

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

externalV6Endpoint : string​

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

MasterAuth​

clusterCaCertificate : string​

PEM-encoded public certificate that is the root of trust for the Kubernetes cluster.

VersionInfo​

currentVersion : string​

Current Kubernetes version, format: major.minor (e.g. 1.15).

newRevisionAvailable : bool​

Newer revisions may include Kubernetes patches (e.g 1.15.1 -> 1.15.2) as well as some internal component updates - new features or bug fixes in platform specific components either on the master or nodes.

newRevisionSummary : string​

Description of the changes to be applied when updating to the latest revision. Empty if new_revision_available is false.

versionDeprecated : bool​

The current version is on the deprecation schedule, component (master or node group) should be upgraded.

MasterMaintenancePolicy​

autoUpgrade : bool​

If set to true, automatic updates are installed in the specified period of time with no interaction from the user. If set to false, automatic upgrades are disabled.

maintenanceWindow : MaintenanceWindow​

Maintenance window settings. Update will start at the specified time and last no more than the specified duration. The time is set in UTC.

MasterLogging​

enabled : bool​

Identifies whether Cloud Logging is enabled for master components.

One of destination​

The destination of master components' logs.

  • logGroupId : string​

    ID of the log group where logs of master components should be stored.

  • folderId : string​

    ID of the folder where logs should be stored (in default group).

auditEnabled : bool​

Identifies whether Cloud Logging is enabled for audit logs.

clusterAutoscalerEnabled : bool​

Identifies whether Cloud Logging is enabled for cluster-autoscaler.

kubeApiserverEnabled : bool​

Identifies whether Cloud Logging is enabled for kube-apiserver.

eventsEnabled : bool​

Identifies whether Cloud Logging is enabled for events.

MaintenanceWindow​

One of policy​

Maintenance policy.

  • anytime : AnytimeMaintenanceWindow​

    Updating the master at any time.

  • dailyMaintenanceWindow : DailyMaintenanceWindow​

    Updating the master on any day during the specified time window.

  • weeklyMaintenanceWindow : WeeklyMaintenanceWindow​

    Updating the master on selected days during the specified time window.

AnytimeMaintenanceWindow​

DailyMaintenanceWindow​

startTime : google.type.TimeOfDay​

Window start time, in the UTC timezone.

duration : google.protobuf.Duration​

Window duration.

WeeklyMaintenanceWindow​

daysOfWeek : DaysOfWeekMaintenanceWindow​

Days of the week and the maintenance window for these days when automatic updates are allowed.

DaysOfWeekMaintenanceWindow​

days : google.type.DayOfWeek​

Days of the week when automatic updates are allowed.

startTime : google.type.TimeOfDay​

Window start time, in the UTC timezone.

duration : google.protobuf.Duration​

Window duration.