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
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Tutorials
    • All tutorials
    • Setting up a Managed Service for PostgreSQL connection from a container in Serverless Containers
    • Creating a VM from a Container Optimized Image
    • Creating a VM from a Container Optimized Image with an additional volume for a Docker container
    • Creating an instance group from a Container Optimized Image with multiple Docker containers
    • Creating an instance group from a Container Optimized Image
    • Creating a VM from a Container Optimized Image with multiple Docker containers
    • Updating a Container Optimized Image VM
    • Configuring data output from a Docker container to a serial port
      • Creating a new Kubernetes project
      • Creating a Kubernetes cluster with no internet access
      • Running workloads with GPUs
      • Using node groups with GPUs and no pre-installed drivers
      • Setting up Time-Slicing GPUs
      • Migrating resources to a different availability zone
      • Encrypting secrets
        • Integrating with a corporate DNS zone
        • DNS autoscaling based on cluster size
        • Setting up NodeLocal DNS Cache
        • DNS Challenge for Let's Encrypt® certificates

In this article:

  • Required paid resources
  • Getting started
  • Create a certificate
  • Check the result
  • Delete the resources you created
  1. Container infrastructure
  2. Managed Service for Kubernetes
  3. Working with DNS
  4. DNS Challenge for Let's Encrypt® certificates

DNS Challenge for Let's Encrypt® certificates in Yandex Managed Service for Kubernetes

Written by
Yandex Cloud
Updated at April 22, 2025
  • Required paid resources
  • Getting started
  • Create a certificate
  • Check the result
  • Delete the resources you created

To add a DNS Challenge when issuing Let's Encrypt® certificates:

  1. Create a certificate.
  2. Check the result.

If you no longer need the resources you created, delete them.

Required paid resourcesRequired paid resources

The support cost includes:

  • Fee for the Managed Service for Kubernetes cluster: using the master and outgoing traffic (see Managed Service for Kubernetes pricing).
  • Cluster nodes (VM) fee: using computing resources, operating system, and storage (see Compute Cloud pricing).
  • Fee for a public IP address assigned to cluster nodes (see Virtual Private Cloud pricing).
  • Fee for a DNS zone and DNS requests (see Cloud DNS pricing).

Getting startedGetting started

  1. Create a service account with the dns.editor role for the folder the domain zone will be in.

  2. Create an authorized key for the service account and save it to JSON file:

    yc iam key create \
      --service-account-name <service_account_name> \
      --format json \
      --output key.json
    
  3. Register a public domain zone and delegate your domain. A Let's Encrypt® certificate will be issued for the domain in this zone after you pass the DNS-01 challenge.

  4. Create security groups for the Managed Service for Kubernetes cluster and its node groups.

    Warning

    The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.

  5. Create a Managed Service for Kubernetes cluster and a node group in any suitable configuration. When creating them, specify the security groups prepared earlier.

  6. Install kubect and configure it to work with the new cluster.

Create a certificateCreate a certificate

  1. Install the cert-manager app with the Yandex Cloud DNS ACME webhook plugin by following this guide.

    During the installation, specify the service account and the authorized key created at the Getting started step.

  2. Create a file named certificate.yaml:

    apiVersion: cert-manager.io/v1
    kind: Certificate
    metadata:
      name: example-com
      namespace: default
    spec:
      secretName: example-com-secret
      issuerRef:
        # The issuer created previously
        name: yc-clusterissuer
        kind: ClusterIssuer
      dnsNames:
        - <domain_name>
    
  3. Provide the certificate to the Managed Service for Kubernetes cluster:

    kubectl apply -f certificate.yaml
    

Check the resultCheck the result

  1. Check if the certificate is available:

    kubectl get certificate example-com
    

    Result:

    NAME         READY  SECRET              AGE
    example-com  True   example-com-secret  24h
    

    The True status in the READY column means that the certificate was issued successfully.

  2. (Optional) Get detailed information about the certificate:

    kubectl -n default describe certificate example-com
    

    The command output will contain similar events:

    Events:
      Type    Reason     Age   From                                       Message
      ----    ------     ----  ----                                       -------
      Normal  Issuing    ...   cert-manager-certificates-trigger          Issuing certificate as Secret does not exist
      Normal  Generated  ...   cert-manager-certificates-key-manager      Stored new private key in temporary Secret resource...
    

    Certificates are used bundled with related Kubernetes secrets, which store key pairs and service information. If there is no secret, the certificate is reissued automatically and a new secret is created – with a notification in the events. For more information on what can cause the reissue of a certificate, see the cert-manager documentation.

    As the certificate is being issued for the first time, it has no such related secret so far. The presence of notification events about the fact should not be considered an error.

Delete the resources you createdDelete the resources you created

Some resources are not free of charge. To avoid paying for them, delete the resources you no longer need:

  1. Delete the Managed Service for Kubernetes cluster.
  2. Delete the public domain zone.
  3. Delete the service account.

Was the article helpful?

Previous
Setting up NodeLocal DNS Cache
Next
Working with Compute Cloud snapshots
Yandex project
© 2025 Yandex.Cloud LLC