Setting the Startup Script of a Node

Last updated: 2019-08-12 19:57:23

PDF

Operation Scenario

Setting the startup script of a node can help you initialize the node before the node is ready, i.e., running the configured script when the node starts. If you purchase multiple CVM instances at a time, the custom data will run on all of them.

Usage Restrictions

  • It is recommended that you restrain yourself from modifying configurations such as Kubelet, kube-proxy, and docker on the TKE node through the startup script.
  • If the startup script fails to run, it will not be retried. You should ensure the executability and retry mechanism of the script.
  • The script and its generated log files can be viewed in /data/ccs_userscript/.

Steps

You can set the node startup script in the following three scenarios:

Setting the Node Startup Script When Creating a Cluster or Node

  • When creating a cluster, on the "CVM configuration" page, click Advanced settings and enter the custom data as startup script. See the figure below:
  • When creating a node, on the "CVM configuration" page, click Advanced settings and enter the custom data as startup script. See the figure below:

Setting the Node Startup Script When Adding an Existing Node

  • When adding an existing node, on the "CVM configuration" page, click Advanced settings and enter the custom data as startup script. See the figure below:

Setting the Node Startup Script When Creating a Scaling Group

  • When creating a scaling group, on the "CVM configuration" page, click Advanced settings and enter the custom data as startup script. See the figure below: