How to customize rke2-coredns

This document (000021179) is provided subject to the disclaimer at the end of this document.


RKE2 allows the use of HelmChartConfig resources to customize add-on packages deployed as HelmCharts[1]. This can be used for packages like Canal, CoreDNS, Nginx-Ingress, and so on.


The name and namespace should match the ones used when deploying the package using HelmChart. The valuesContent section contains the values that you want to customize, and they will be processed like when being passed to helm directly.
For our case, we will add a new zone to coreDNS using the zoneFiles directive. You can download the coreDNS package to review the values.yml to find out the directives available for customization [2]. Or you can look at the values.yml available from the rke2-coredns charts for your version [3].

A file /var/lib/rancher/rke2/server/manifests/rke2-coredns-config.yaml should be created with similar content. After that, the rke2-server service should be restarted to apply the change. 

kind: HelmChartConfig
  name: rke2-coredns
  namespace: kube-system
  valuesContent: |-
      - filename:
        contents: |
              cache 30
              forward .

The configmap rke2-coredns-rke2-coredns can be reviewed to determine if the change was successful.

kubectl -n kube-system get configmap rke2-coredns-rke2-coredns -o json


Additional Information



This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021179
  • Creation Date: 21-Aug-2023
  • Modified Date:29-Aug-2023
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center