About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
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:
- Create the DaemonSet to enable "no_root_squash" using the following command:
kubectl apply -f norootsquash.yaml - List the worker nodes in your cluster to view the worker IDs using the following command:
bx cs workers <cluster-name> - 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"}}]
Was this topic helpful?
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