CCE Node CDS Expansion
Node Service Migration
Here take the node 192.168.16.27 as an example for explanation. Execute the drain eviction node service.
# kubectl drain 192.168.16.27 --ignore-daemonsets
Check that the node status is SchedulingDisabled:
# kubectl get nodes
NAME STATUS ROLES AGE VERSION
192.168.16.27 Ready,SchedulingDisabled <none> 47m v1.13.10
Check that the business Pod eviction on the node is completed:
# kubectl get pods --all-namespaces=true -o wide |grep 192.168.16.27
Stop Node Service
Stop kube-proxy
# systemctl stop kube-proxy
# Check that the component is stopped successfully.
# systemctl status kube-proxy
Stop kubelet
# systemctl stop kubelet
# Check that the component is stopped successfully.
# systemctl status kubelet
Stop docker
# systemctl stop docker
# Check that the component is stopped successfully.
# systemctl status docker
CDS Expansion
Enter the page of node BCC details, select the corresponding CDS data disk, and operate expansion on the console:
Refer to the CDS expansion document for details: https://cloud.baidu.com/doc/CDS/s/Lk0629a17
When the CDS Console displays that the disk status is "Mounted", it means that the expansion is completed.
Unloading/Data Directory
The CCE uses the /data directory as the docker and kubelet data disks. Before the scaling up of partition, you should first unload the disk mounting:
# Unload docker and kubelet mount directories
# for dir in $(df -h |grep -e docker -e kubelet); do umount $dir; done
# Unload /data mount directory
# umount /data
After unloading, when the /data directory is not seen by df-h, it means success.
Expand the Existing Disk Partition
Refer to the CDS expansion steps:
- [Expand the existing mbr disk partition](https://cloud.baidu.com/doc/CDS/s/Lk0629a17# Expand the existing-mbr-disk partition.).
- [Expand the existing gpt disk partition](https://cloud.baidu.com/doc/CDS/s/Lk0629a17# Expand the existing-gpt-disk partition.).
After the expansion and file system mounting are completed, the /dev/vdb1 is mounted to /data:
# mount /dev/vdb1 /data
Check the partition size, and consistent sizes means to meet expectations.
# df -h| grep data
/dev/vdb1 99G 1.3G 93G 2% /data
Restart the Node Service
Start kube-proxy
# systemctl start kube-proxy
# Check that the component is started successfully.
# systemctl status kube-proxy
Enable kubelet
# systemctl start kubelet
# Check that the component is started successfully.
# systemctl status kubelet
Start docker
# systemctl start docker
# Check that the component is started successfully.
# systemctl status docker
Recover the Node Scheduling
Here take the node 192.168.16.27 as an example for explanation. Execute the kubectl uncordon to recover the node scheduling:
# kubectl uncordon 192.168.16.27
At this time, the node CDS expansion is completed.