IBM Support

How to create a DaemonSet to automatically apply a change to worker nodes?

Question & Answer


Question

How to create a DaemonSet to automatically apply a change to worker nodes?

Answer

Answer

This DaemonSet updates each worker node in your cluster to enable "no_root_squash" as described in the Accessing File Storage on Linux topic within the documentation. The deployment is configured to allow the pods to run in privileged mode, which is necessary to update the host file system. As always, be very careful when you allow privileged access.

Because it is a DaemonSet, new worker nodes that are added when the DaemonSet is running automatically have the changes applied.

Complete the following steps:

  1. Create the DaemonSet to enable "no_root_squash" using the following command:
    kubectl apply -f norootsquash.yaml

  2. List the worker nodes in your cluster to view the worker IDs using the following command:
    bx cs workers <cluster-name>

  3. Reboot all of the worker nodes to apply the changes using the following command:
    bx cs worker-reboot <cluster-name> <worker-id1> <worker-id2>


To delete the DaemonSet, run the following command:
kubectl delete -f norootsquash.yaml

Deleting the DaemonSet will not back out changes that are made to the underlying nodes. Worker nodes that are added after this DaemonSet is removed will not have the changes applied.


Reference example: kube-sample-daemonset

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSJTBP","label":"IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB21","label":"Public Cloud Platform"}}]

Document Information

More support for:
IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud

Software version:
All Versions

Document number:
963500

Modified date:
01 August 2019

UID

ibm1KB0011038

Manage My Notification Subscriptions