Cloud Native 7 min read

Cluster Scaling, Backup, and Upgrade Using Sealer Clusterfile

This article explains how to scale, back up, and upgrade Kubernetes clusters with Sealer by modifying the Clusterfile, using join/delete commands for both ALI_CLOUD and BAREMETAL providers, and configuring backup plugins and upgrade workflows.

政采云技术
政采云技术
政采云技术
Cluster Scaling, Backup, and Upgrade Using Sealer Clusterfile

The previous article introduced the Clusterfile in detail; this follow‑up focuses on cluster scaling, backup, and upgrade operations using Sealer.

1. Scaling

1.1 ALI_CLOUD mode scaling

In ALI_CLOUD mode the provider is set to ALI_CLOUD . You can adjust the count fields in the masters and nodes sections of the Clusterfile to increase or decrease the number of instances, then apply the file with the sealer apply command.

apiVersion: sealer.aliyun.com/v1alpha1
kind: Cluster
metadata:
  name: my-cluster
spec:
  # Cluster image
  image: registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.9
  # Provider
  provider: ALI_CLOUD
  network:
    interface: eth0
    cniName: calico
    podCIDR: 100.64.0.0/10
    svcCIDR: 10.96.0.0/22
    withoutCNI: false
  certSANS:
    - aliyun-inc.com
    - 10.0.0.2
  masters:
    cpu: 4
    memory: 4
    count: 3
    systemDisk: 100
    dataDisks:
      - 100
  nodes:
    cpu: 4
    memory: 4
    count: 3
    systemDisk: 100
    dataDisks:
      - 100

1.1.2 Using join and delete commands

You can also scale the cluster with the sealer join command for expansion and sealer delete for reduction.

# Expand
sealer join --masters 2 --nodes 3

# Reduce
sealer delete --masters 2 --nodes 3

1.2 BAREMETAL mode scaling

In BAREMETAL mode the provider is BAREMETAL . Scaling is performed by editing the ipList of masters and nodes in the Clusterfile and applying the changes.

apiVersion: sealer.aliyun.com/v1alpha1
kind: Cluster
metadata:
  name: my-cluster
spec:
  # Cluster image
  image: registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.9
  provider: BAREMETAL
  ssh:
    passwd:
    pk: xxx
    pkPasswd: xxx
    user: root
  network:
    interface: eth0
    cniName: calico
    podCIDR: 100.64.0.0/10
    svcCIDR: 10.96.0.0/22
    withoutCNI: false
  certSANS:
    - aliyun-inc.com
    - 10.0.0.2
  masters:
    ipList:
      - 172.20.126.4
      - 172.20.126.5
      - 172.20.126.6
  nodes:
    ipList:
      - 172.20.126.8
      - 172.20.126.9
      - 172.20.126.10

1.2.2 Using join and delete commands

# Expand
sealer join --masters 192.168.0.2 --nodes 192.168.0.3

# Reduce
sealer delete --masters 192.168.0.2 --nodes 192.168.0.3

2. Backup and Restore

Backup is implemented via a Plugin resource. If an OSS address is specified in the YAML, the backup file is uploaded to OSS; otherwise it is stored locally under $(rootfs)/plugin/ETCD_BACKUP .

---
apiVersion: sealer.aliyun.com/v1alpha1
kind: Plugin
metadata:
  name: ETCD_BACKUP
spec:
  action: Manual
  data: |
    alioss:
      ossendpoint: oss-cn-hangzhou.aliyuncs.com
      accesskeyid: *****
      accesskeysecrets: ****
      bucketname: etcdbackup
      objectpath: /sealos/

3. Upgrade

Cluster image upgrades are performed with the sealer upgrade command.

sealer upgrade

The upgrade workflow parses command arguments, runs Apply() , computes a diff to generate a todo list, executes each task, updates the cluster image, and completes the upgrade.

For detailed source analysis, refer to the official Sealer documentation on the upgrade command.

Conclusion

The article covered Clusterfile‑based scaling, backup, and upgrade procedures. For more information, visit the official Sealer Git repository.

cloud-nativekubernetesupgradeBackupCluster ScalingSealer
政采云技术
Written by

政采云技术

ZCY Technology Team (Zero), based in Hangzhou, is a growth-oriented team passionate about technology and craftsmanship. With around 500 members, we are building comprehensive engineering, project management, and talent development systems. We are committed to innovation and creating a cloud service ecosystem for government and enterprise procurement. We look forward to your joining us.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.