Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for Managed Service for Kubernetes
    • Fixing the "timed out waiting for the condition" error when mounting a PVC
    • Resolving the "timed out waiting for the condition" error when mounting a volume with a large number of files
    • Hosts of the Managed Service for Kubernetes node groups stay in the Reconciling status for a long time
    • Constant restarts of the kube-dns-autoscaler pod
    • Number of nodes in the group fails to decrease
    • Resolving the "Multi-Attach error for volume" error
    • Resolving the "DEADLINE_EXCEEDED" error
    • Adding and updating Linux SSH keys on Managed Services for Kubernetes node group hosts
    • Assigning static external IP addresses for Managed Service for Kubernetes cluster nodes
    • Granting internet access to Kubernetes nodes
    • How to change the network or subnet for an MDB cluster
    • How to create an internal Ingress controller

In this article:

  • Issue description
  • Solution
  1. Managed Kubernetes
  2. Adding and updating Linux SSH keys on Managed Services for Kubernetes node group hosts

Adding and updating Linux SSH keys on Managed Services for Kubernetes node group hosts

Written by
Yandex Cloud
Updated at September 12, 2023
  • Issue description
  • Solution

Issue descriptionIssue description

  • When running a Managed Service for Kubernetes cluster, you need to add a new Linux user on hosts of a cluster node of your Managed Service for Kubernetes cluster.
  • When running a Managed Service for Kubernetes cluster, your need to update an SSH key for an existing Linux user on hosts of a cluster node of your Managed Service for Kubernetes cluster.

SolutionSolution

To add a user or update an SSH key for the current user, update the node group keys.
Before running this operation, prepare a file with SSH keys for your users in the following format:

username:ssh-ed25519 AAAAB3NzaC***********zo/lP1ww== username
username2:ssh-ed25519 ONEMOREkey***********88OavEHw== username2

Then use YC CLI to execute the command:

yc managed-kubernetes node-group add-metadata \
  --name <node_group_name> \
  --metadata-from-file ssh-keys=<path_to_file_with_public_ssh_keys>

As a result of this command, the following operations will be applied to the cluster's node group:

  • SSH keys of existing users will be updated with the new ones.
  • New users will be created with the given SSH keys.

When updating SSH keys, the node group will switch to Reconciling, because the VMs belonging to this group will run metadata update.

Alert

In the process of metadata update for a Managed Services for Kubernetes cluster node group, the nodes in the affected group might become fully or partially unavailable for up to 20 minutes.

Was the article helpful?

Previous
Resolving the "DEADLINE_EXCEEDED" error
Next
Assigning static external IP addresses for Managed Service for Kubernetes cluster nodes
© 2025 Direct Cursus Technology L.L.C.