Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • 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
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Tutorials
    • All tutorials
    • Architecture and protection of a basic web service
    • Cost analysis by resource using Object Storage
    • Obtaining the information you need to request the Russian Ministry of Digital Development to whitelist a resource
      • Configuring a local caching DNS resolver
      • Migrating DNS zones from Yandex 360 to Cloud DNS
      • Configuring Cloud DNS to access a Managed Service for ClickHouse® cluster from other cloud networks
      • Integrating Cloud DNS and a corporate DNS service
      • Creating an ACME resolver webhook for responses to DNS01 challenges

In this article:

  • Getting started
  • Required paid resources
  • Set up your environment
  • Prepare your Managed Service for Kubernetes cluster
  • Create a Managed Service for Kubernetes cluster
  • Add credentials to the kubectl configuration file
  • Create a node group
  • Install and run a webhook in a Managed Service for Kubernetes cluster
  • Test the webhook
  • Prepare configuration files
  • Issue a certificate using the webhook
  • Delete the resources you created
  1. Basic infrastructure
  2. Cloud DNS
  3. Creating an ACME resolver webhook for responses to DNS01 challenges

Creating an ACME resolver webhook for responses to DNS01 challenges

Written by
Yandex Cloud
Updated at February 24, 2026
  • Getting started
    • Required paid resources
  • Set up your environment
  • Prepare your Managed Service for Kubernetes cluster
    • Create a Managed Service for Kubernetes cluster
    • Add credentials to the kubectl configuration file
    • Create a node group
  • Install and run a webhook in a Managed Service for Kubernetes cluster
  • Test the webhook
    • Prepare configuration files
    • Issue a certificate using the webhook
  • Delete the resources you created

Install the cert-manager application with the DNS01 webhook resolver to automatically pass domain ownership checks for domains registered in Yandex Cloud DNS.

To run a webhook in a Managed Service for Kubernetes cluster:

  1. Set up the Managed Service for Kubernetes cluster.
  2. Install and run a webhook in a Managed Service for Kubernetes cluster.
  3. Test the webhook.
  4. Delete the resources you created.

Note

The certificate manager with the ACME webhook for Yandex Cloud DNS supports Wildcard certificates.

Getting startedGetting started

Sign up for Yandex Cloud and create a billing account:

  1. Navigate to the management console and log in to Yandex Cloud or create a new account.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and it has the ACTIVE or TRIAL_ACTIVE status. If you do not have a billing account, create one and link a cloud to it.

If you have an active billing account, you can navigate to the cloud page to create or select a folder for your infrastructure.

Learn more about clouds and folders here.

Required paid resourcesRequired paid resources

The support cost for this solution includes:

  • Fee for using the master and outgoing traffic in a Managed Service for Kubernetes cluster (see Managed Service for Kubernetes pricing).
  • Fee for using computing resources, OS, and storage in cluster nodes (VMs) (see Compute Cloud pricing).
  • Fee for a public IP address for the cluster nodes (see Virtual Private Cloud pricing).

Set up your environmentSet up your environment

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

  2. Install kubectl, which is the command line interface for Kubernetes.

  3. Make sure you have enough resources available in the cloud.

  4. If you do not have a network yet, create one.

  5. If you do not have any subnets yet, create them in the availability zones where the new Managed Service for Kubernetes cluster and node group will reside.

  6. Create these service accounts:

    • sa-kubernetes with the following roles:

      • k8s.clusters.agent and vpc.publicAdmin for the folder where you will create the Managed Service for Kubernetes cluster.
      • container-registry.images.puller for the folder containing a Docker image registry.

      This service account will be used to create the resources your cluster needs, and Managed Service for Kubernetes nodes will pull the required Docker images from the registry.

    • sa-dns-editor with the dns.editor role for the folder containing the public zone. This service account will be used to create DNS resource records.

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

    Warning

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

  8. Add the following rules to your security groups:

    • Add to the cluster security group an outbound traffic rule allowing certificate checks via a cert-manager webhook:
      • Port range: 10250.
      • Protocol: TCP.
      • Destination name: CIDR.
      • CIDR blocks: 0.0.0.0/0.
    • Add to the node group security group an outbound traffic rule allowing connection to Let's Encrypt® servers for certificates:
      • Port range: 443.
      • Protocol: TCP.
      • Destination name: CIDR.
      • CIDR blocks: 0.0.0.0/0.

Prepare your Managed Service for Kubernetes clusterPrepare your Managed Service for Kubernetes cluster

Create a Managed Service for Kubernetes clusterCreate a Managed Service for Kubernetes cluster

Management console
  1. In the management console, select the folder where you want to create a Managed Service for Kubernetes cluster.
  2. Select Managed Service for Kubernetes.
  3. Click Create cluster.
  4. Enter the name for the cluster: kubernetes-cluster-wh.
  5. Service account for resources: Specify the sa-kubernetes service account that will be used to create resources.
  6. Service account for nodes: Specify the sa-kubernetes service account the Managed Service for Kubernetes nodes will use to access the Docker image registry.
  7. Specify the release channel. You will not be able to edit this setting once you create the Managed Service for Kubernetes cluster.
  8. Under Master configuration:
    • Kubernetes version: Select the Kubernetes version to install on the Managed Service for Kubernetes master. It must match the Kubernetes command line version.
    • Public address: Select the IP address assignment method:
      • Auto: Assign a random IP address from the Yandex Cloud IP address pool.
    • Type of master: Select the master type:
      • Basic: To create a single master host in the selected availability zone. Specify the cloud network and select the subnet for the master host.
      • Highly available: To create a single master host in each availability zone. Specify the cloud network and subnet for each availability zone.
    • Select security groups for the Managed Service for Kubernetes cluster's network traffic.
  9. Under Cluster network settings:
    • CIDR cluster: Specify the IP address range to allocate addresses to pods from.
    • CIDR services: Specify the IP address range to allocate IP addresses to services from.
    • Set the subnet mask for the Managed Service for Kubernetes nodes and the maximum number of pods per node.
  10. Click Create.
  11. Wait until the cluster status switches to Running and its state, to Healthy.

Add credentials to the kubectl configuration fileAdd credentials to the kubectl configuration file

CLI
  1. Run this command:

    yc managed-kubernetes cluster get-credentials kubernetes-cluster-wh --external
    

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

  2. Check the kubectl configuration after adding the credentials:

    kubectl config view
    

    Result:

    apiVersion: v1
    clusters:
      - cluster:
        certificate-authority-data: DATA+OMITTED
    ...
    

Create a node groupCreate a node group

Management console
  1. In the management console, select the folder where you created the required Managed Service for Kubernetes cluster.

  2. From the list of services, select Managed Service for Kubernetes.

  3. Select kubernetes-cluster-wh.

  4. On the cluster page, navigate to the Node manager tab.

  5. Click Create a node group.

  6. Enter a name and description for the Managed Service for Kubernetes node group.

  7. In the Kubernetes version field, select the Kubernetes version for the Managed Service for Kubernetes nodes.

  8. Under Scaling, select its type:

    • Fixed, to keep a fixed number of nodes in the Managed Service for Kubernetes group. Specify the number of nodes in the Managed Service for Kubernetes group.
    • Automatic, to manage the number of nodes in the Managed Service for Kubernetes group using Managed Service for Kubernetes cluster autoscaling.
  9. Under Changes during creation and updates, specify the maximum number of VMs by which you can exceed or reduce the Managed Service for Kubernetes group size.

  10. Under Computing resources:

    • Select a platform.
    • Specify the required number of vCPUs, guaranteed vCPU performance, and the amount of RAM.
  11. Under Storage:

    • Specify the Disk type for the Managed Service for Kubernetes group nodes:

      • HDD: Standard network drive; HDD network block storage.
      • SSD: Fast network drive; SSD network block storage.
      • Non-replicated SSD: Network drive with enhanced performance achieved by eliminating redundancy. You can only change the size of this disk type in 93 GB increments.
      • SSD IO: Network drive with the same performance specifications as Non-replicated SSD, plus redundancy. You can only change the size of this disk type in 93 GB increments.

      For more information about disk types, see this Yandex Compute Cloud guide.

    • Specify the disk size for the Managed Service for Kubernetes group nodes.

  12. Under Network settings:

    • In the Public address field, select an IP address assignment method:
      • Auto: Assign a random IP address from the Yandex Cloud IP address pool.
    • Select security groups.
    • Select the availability zone and subnet to place the Managed Service for Kubernetes group nodes in.
  13. Under Access, specify the access credentials for the Managed Service for Kubernetes group nodes over SSH:

    • Login: Enter the username.
    • SSH key: Paste the contents of the public key file.
  14. Click Create.

  15. Wait until the node group status switches to Running.

Install and run a webhook in a Managed Service for Kubernetes clusterInstall and run a webhook in a Managed Service for Kubernetes cluster

  1. Clone the webhook repository with the certificate manager configured to issue Let's Encrypt certificates:

    git clone https://github.com/yandex-cloud/cert-manager-webhook-yandex.git
    
  2. Install Helm to manage packages in your Kubernetes cluster.

  3. Install the webhook using Helm:

    helm install \
      --namespace cert-manager \
      --create-namespace \
      yandex-webhook ./cert-manager-webhook-yandex/deploy/cert-manager-webhook-yandex
    
  4. Make sure the webhook is running:

    kubectl get pods -n cert-manager --watch
    

    Make sure the records contain the ACME webhook for Yandex Cloud DNS:

    NAME                                                          READY   STATUS    RESTARTS   AGE
    ... 
    yandex-webhook-cert-manager-webhook-yandex-55********-tw4mq   1/1     Running   1          43m
    

Test the webhookTest the webhook

Prepare configuration filesPrepare configuration files

  1. Create an authorized key for the sa-dns-editor service account and save it to the iamkey.json file:

    yc iam key create iamkey \
      --service-account-id=<service_account_ID> \
      --format=json \
      --output=iamkey.json
    
  2. Create a secret with the service account key:

    kubectl create secret generic cert-manager-secret --from-file=iamkey.json -n cert-manager
    
  3. Create the cluster-issuer.yml file with the ClusterIssuer object manifest that uses the DNS01 webhook resolver for the Cloud DNS domain:

    apiVersion: cert-manager.io/v1
    kind: ClusterIssuer
    metadata:
     name: clusterissuer
     namespace: default
    spec:
     acme:
      email: <email_address_for_notifications_from_Lets_Encrypt>
      server: https://acme-v02.api.letsencrypt.org/directory
      privateKeySecretRef:
       name: secret-ref
      solvers:
       - dns01:
          webhook:
            config:
              folder: <ID_of_folder_with_public_zone>
              serviceAccountSecretRef:
                name: cert-manager-secret
                key: iamkey.json
            groupName: acme.cloud.yandex.com
            solverName: yandex-cloud-dns
    
  4. Create the cluster-certificate.yml file with the Certificate object manifest:

    apiVersion: cert-manager.io/v1
    kind: Certificate
    metadata:
     name: your-site
     namespace: default
    spec:
     secretName: your-site-secret
     issuerRef:
      name: clusterissuer
      kind: ClusterIssuer
     dnsNames:
       - <domain_name>
    

Issue a certificate using the webhookIssue a certificate using the webhook

  1. Create the objects in the Kubernetes cluster:

    kubectl apply -f cluster-issuer.yml && \
    kubectl apply -f cluster-certificate.yml
    
  2. Check the certificate status:

    kubectl get certificate
    

    Result:

    NAME        READY  SECRET            AGE
    your-site   True   your-site-secret  45m
    

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

Delete the resources you createdDelete the resources you created

If you no longer need the resources you created, delete the Managed Service for Kubernetes cluster.

Was the article helpful?

Previous
Integrating Cloud DNS and a corporate DNS service
Next
Running the DeepSeek-R1 language model in a GPU cluster
© 2026 Direct Cursus Technology L.L.C.