Custom Configuration Installation
- Run
sealos gen
to generate a Clusterfile, for example:
$ sealos gen labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.1 \
--masters 192.168.0.2,192.168.0.3,192.168.0.4 \
--nodes 192.168.0.5,192.168.0.6,192.168.0.7 --passwd 'xxx' > Clusterfile
Notice: labring/helm should be set before labring/calico.
The generated Clusterfile is as follows:
Clusterfile
- After generating the Clusterfile, update the cluster configuration. For example, to modify the CIDR range of pods,
you can modify the
networking.podSubnet
andspec.data.spec.calicoNetwork.ipPools.cidr
fields. The final Clusterfile would look like this:
Clusterfile
- Run
sealos apply -f Clusterfile
to start the cluster. After the cluster is successfully running, the Clusterfile will be saved in the.sealos/default/Clusterfile
file. You can modify the fields in it to reapply changes to the cluster.
Note:
- You can refer to
the official documentation or run the
kubeadm config print init-defaults
command to print the kubeadm configuration.