Docs
uk8s
Node Management
Custom Data and Initialization Scripts

Custom Data and Initialization Scripts

Custom Data

Custom data refers to the configuration scripts that the system automatically runs at the first start-up or every start-up of the host. This script can be passed into the metadata server by the console/API, and fetched by the cloud-init program inside the host. The script follows the standard CloudInit syntax. This script will block the installation script of UK8S, that is, only after this script is completely executed, the installation of K8S related components such as Kubelet, Scheduler, etc., will begin.

Initialization Script

This script is only executed once after UK8S starts, and it is executed after the installation of K8S related components is successful. It follows the standard shell syntax, and the execution results are stored in the /var/log/message/ directory.

Users can customize the installation of their own services to the cluster at creation time through custom data and initialization scripts, such as kernel modification, disk monitoring, etc.. Detailed usage methods

Precautions

When using the initialization script to modify /etc/sysctl.conf, please do not modify the following parameters, which will affect the normal use of the created cluster.

net.ipv4.tcp_tw_reuse = 1
net.ipv4.conf.eth0.proxy_arp = 1
net.ipv4.ip_forward = 1
vm.max_map_count = 262144
net.netfilter.nf_conntrack_max = 1048576
kernel.unknown_nmi_panic = 0
kernel.sysrq = 1
fs.file-max = 1000000
vm.swappiness = 10
fs.inotify.max_user_watches = 10000000
net.core.wmem_max = 327679
net.core.rmem_max = 327679
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
fs.inotify.max_queued_events = 327679
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.ipv4.neigh.default.gc_thresh1 = 2048
net.ipv4.neigh.default.gc_thresh2 = 4096
net.ipv4.neigh.default.gc_thresh3 = 8192
net.ipv6.conf.all.disable_ipv6 = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.conf.all.arp_ignore = 0
net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 6
kernel.pid_max = 1024000
net.ipv4.ip_local_port_range = 32768 60999
net.ipv4.tcp_tw_reuse = 1