Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for Kubernetes
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Connecting to a node over SSH
    • Creating a configuration file
    • Configuring a Kubernetes cluster network
      • Granting access to an app running in a Kubernetes cluster
      • Using Kubernetes cluster network policies
    • Encrypting secrets
    • Using persistent volumes
      • Dynamically preparing volumes
      • Statically preparing volumes
      • Managing storage classes
      • Expanding a volume
      • Mounting a volume in Block mode
    • Managing a Kubernetes cluster
      • Adding Kubernetes cluster credentials to the kubectl configuration file
      • Getting information about a Kubernetes cluster
      • Creating a Kubernetes cluster
      • Editing a Kubernetes cluster
      • Deleting a Kubernetes cluster
    • Managing a node group
      • Getting information about a node group
      • Creating a node group
      • Editing a node group
      • Deleting a node group
  • Solutions
    • All solutions
    • Integration with Container Registry
    • Running workloads with GPUs
    • Installing the NGINX Ingress Controller with Let's Encrypt®
    • Making backups to Object Storage
  • Concepts
    • Relationship between service resources
    • Release channels and updates
    • Using Kubernetes API objects
      • Volume
      • Service
    • Node group
      • Autoscaling node groups
      • Evicting pods from a node
      • Dynamic resource allocation for a node
      • Node groups with GPUs
    • Kubernetes cluster network policies
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ClusterService
      • NodeGroupService
      • VersionService
      • OperationService
    • REST
      • Overview
      • Cluster
        • Overview
        • create
        • delete
        • get
        • list
        • listNodeGroups
        • listNodes
        • listOperations
        • start
        • stop
        • update
      • NodeGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listNodes
        • listOperations
        • update
      • Version
        • Overview
        • list
  • Questions and answers
  1. Step-by-step instructions
  2. Encrypting secrets

Encrypting secrets in Managed Service for Kubernetes

    Use KMS keys to encrypt secrets, that is, confidential information such as passwords, OAuth tokens, and SSH keys, in Yandex Managed Service for Kubernetes. To do this, specify a KMS key when creating a cluster. This key will be used for encryption and decryption.

    Make sure you specify the encryption key when creating a Kubernetes cluster, as you can't add it when updating the cluster.

    Management console
    CLI
    API

    Specify a key when creating a Kubernetes cluster:

    1. In management console, select the folder where you want to create your Kubernetes cluster.
    2. In the list of services, select Managed Service for Kubernetes.
    3. Click Create cluster.
    4. In the Encryption key field, enter the required key or create a new one.
    5. Fill in other parameters for creating your cluster.
    6. Click Create cluster.

    If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

    You can specify a key when creating a Kubernetes cluster in two ways.

    • Using the key ID:

      yc k8s create --kms-key-id <encryption key ID> \
      ...
      
    • Using the key name:

      yc k8s create --kms-key-name <encryption key name> \
      ...
      

    Specify the encryption key when creating a Kubernetes cluster. To do this, use the create method for the Cluster resource.

    Managed Service for Kubernetes interacts with KMS using the KMS provider mechanism. Managed Service for Kubernetes supports the KMS plugin that is used to encrypt and decrypt data encryption keys (DEK) in KMS. Secrets are encrypted using standard Kubernetes tools.

    Language / Region
    Careers
    Privacy policy
    Terms of use
    Brandbook
    © 2021 Yandex.Cloud LLC