SUSE Support

Here When You Need Us

How to change the kubelet root directory when provisioning a Kubernetes cluster with the Rancher Kubernetes Engine (RKE) CLI or Rancher v2.x

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

Environment

Situation

This article details how to change the path of the kubelet root directory, which defaults to /var/lib/kubelet, when provisioning a Kubernetes cluster via the Rancher Kubernetes Engine (RKE) CLI or SUSE Rancher v2.x.

N.B. Updating the kubelet root directory is only supported on new cluster provisioning, and changing this path after initial cluster provisioning is not supported.

Resolution

If you wish to use a separate filesystem for the kubelet root directory, you will need to ensure that this is mounted at the desired path on nodes prior to provisioning.
 

Provisioning via SUSE Rancher v2.x
 

  1. Click Edit as YAML when configuring the cluster in the Add Cluster view.
  2. Under kubelet in the services block, add the desired kubelet root directory path to the root-dir argument of the extra_args block, and in extra_binds, per the following example:

    services:
      kubelet:
        extra_args:
          root-dir: "/my/new/folder"
        extra_binds:
        - "/my/new/folder:/my/new/folder:shared,z"
  3. After configuring other cluster options as desired, click Create or Next, respectively for Node Driver or Custom clusters, to save the new cluster configuration.

Provisioning via the RKE CLI

  1. Open the cluster configuration YAML file for the new cluster.
  2. Under kubelet in the services block, add the desired kubelet root directory path to the root-dir argument of the extra_args block, and in extra_binds, per the following example:

    services:
      kubelet:
        extra_args:
          root-dir: "/my/new/folder"
        extra_binds:
        - "/my/new/folder:/my/new/folder:shared,z"
  3. After configuring other cluster options as desired, provision the cluster by invoking rke up --config <cluster configuration YAML file>.

Status

Top Issue

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:000020058
  • Creation Date: 06-May-2021
  • Modified Date:29-Jul-2024
    • SUSE Rancher

< Back to Support Search

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

tick icon

SUSE Support Forums

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

tick icon

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.

tick icon

Open an Incident

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