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.
Yandex Managed Service for Kubernetes
  • Comparing with other Yandex Cloud services
  • Getting started
    • All guides
    • Connecting to a node over SSH
    • Connecting to a node via OS Login
    • Updating Kubernetes
    • Configuring autoscaling
    • Activating a Kubernetes Terraform provider
    • Installing applications from Yandex Cloud Marketplace using Terraform
      • Connection method overview
      • Configuring security groups
      • Creating a static configuration file
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Configuring security groups
  • Connecting to a cluster
  • Connecting using a static configuration
  1. Step-by-step guides
  2. Connecting to a cluster
  3. Connection method overview

Connection method overview

Written by
Yandex Cloud
Updated at August 11, 2025
  • Configuring security groups
  • Connecting to a cluster
  • Connecting using a static configuration

You can connect to a Managed Service for Kubernetes cluster using the following methods:

  • Over the internet if you configured public access for the cluster when creating it.
  • From Yandex Cloud virtual machines located in the same cloud network.

To connect to a cluster, you can use:

  • kubectl
  • Static configuration file

To connect to cluster nodes, follow the instructions in Connecting to a node over SSH.

Tip

For integration with GitLab, we recommend using the GitLab Runner application installed in the cluster. For more information, see Continuous deployment of containerized applications using GitLab.

Configuring security groupsConfiguring security groups

Security groups may block cluster connections. To manage a cluster using kubectl, you must have rules in security groups that allow access to the Kubernetes API. If you need a step-by-step guide on setting up rules, see Rules to access the Kubernetes API.

Connecting to a clusterConnecting to a cluster

When connecting to a Kubernetes cluster, the user logs in to Yandex Identity and Access Management and is granted access based on the assigned role. To log in, you must install the Yandex Cloud command-line interface (CLI).

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To connect to your cluster:

  1. Install kubectl.

  2. Add credentials to the kubectl configuration file depending on the type of the IP address of the cluster you are connecting to:

    Public IP address
    Internal IP address

    To get credentials to connect to the cluster's public IP address via the internet, run this command:

    yc managed-kubernetes cluster \
       get-credentials <cluster_name_or_ID> \
       --external
    

    You can also view the connection command in the management console on the cluster page under Access.

    If you created your cluster with no public IP address, this cluster can only be connected to using its internal IP.

    To get credentials to connect to the cluster's internal IP address from a VM located in the same network, run this command:

    yc managed-kubernetes cluster \
       get-credentials <cluster_name_or_ID> \
       --internal
    

    You can also view the connection command in the management console on the cluster page under Access.

    Note

    By default, credentials are added to the $HOME/.kube/config file. If you need to change the configuration location, use the --kubeconfig <file_path> parameter.

  3. Make sure the cluster is accessible:

    kubectl cluster-info
    

    If kubectl is configured correctly, the command will return cluster information.

Connecting using a static configurationConnecting using a static configuration

If you cannot use the Yandex Cloud CLI for some reason, connect to a cluster using static configuration files.

Was the article helpful?

Previous
Installing applications from Yandex Cloud Marketplace using Terraform
Next
Configuring security groups
© 2025 Direct Cursus Technology L.L.C.