SUSE Support

Here When You Need Us

How to configure the CoreDNS Autoscaler in a Rancher Kubernetes Engine (RKE) CLI or Rancher v2.x provisioned Kubernetes cluster

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

Situation

Task

During the life of a cluster, you may need to adjust the scaling parameters for the CoreDNS autoscaler. The autoscaler runs as an independent Deployment in the cluster, using the cluster-proportional-autoscaler container to scale up and down the related CoreDNS Deployment, using a linear or ladder pattern.

Pre-requisites

  • A Rancher Kubernetes Engine (RKE) CLI or Rancher v2.x provisioned Kubernetes cluster
  • The cluster is configured with the coredns addon (enabled by default)

Note When running rke up commands, ensure the .rkestate file for the cluster is present in the working directory as per the documentation here.

Steps

Note: When making the changes, the coredns-autoscaler pod will be restarted with updated command arguments, this will not cause any disruption to DNS resolution. Check the logs of the coredns-autoscaler pod after making changes to confirm they have taken effect.

Rancher provisioned cluster managed by Rancher

  1. Navigate to Cluster Management in the Rancher UI and click 'Edit Config' for the cluster.
  2. Click 'Edit as YAML'.
  3. Locate or add the dns field, using the below as an example to add the desired parameters below:
  4. rancher_kubernetes_engine_config:
      [...]
      dns:
        linear_autoscaler_params:
          cores_per_replica: 128
          max: 5
          min: 1
          nodes_per_replica: 4
          prevent_single_point_failure: true
  5. Click 'Save' to update the cluster with the new configuration.

RKE provisioned cluster managed by RKE

  1. Edit the cluster configuration YAML file to configure the dns field, using the below as an example to add the desired parameters below:

    dns:
      linear_autoscaler_params:
        cores_per_replica: 128
        max: 5
        min: 1
        nodes_per_replica: 4
        prevent_single_point_failure: true
  2. Invoke rke up --config <cluster configuration YAML file> to update the cluster.

Additional Information

RKE documentation: https://rke.docs.rancher.com/upgrades/configuring-strategy#replicas-for-dns-and-monitoring-addons

Disclaimer

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:000020133
  • Creation Date: 06-May-2021
  • Modified Date:26-Jun-2024
    • SUSE Rancher

< Back to Support Search

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

SUSE Support Forums

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

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.

Open an Incident

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