Command Reference
This document is a command reference for Cluster-API installation and deployment.
Build Installation Package
Command
shellbke buildCommand Function
Build the installation package, collect binary files, rpm packages, chart packages, etc. for deployment package construction.
Command Format
Build deployment package based on yaml.
shellbke build -f <yaml file path, eg: offline-artifacts.yaml> -t <target file path, eg: bke.tar.gz>View command help.
shellbke build -h
Parameter Description
Parameter Name Description -f,--fileSpecify the configuration file path. -h,--helpDisplay command help information. -s,--strategySet image sync strategy (registry/docker, default registry). -t,--targetSpecify the output path for the packaged BKE file. Executing User
This command is executed by the root user.
Prerequisites
bkeadm has been installed.
Precautions
None
Initialize Bootstrap Node
Command
shellbke initCommand Function
Initialize the bootstrap node, including node checking, repository startup, cluster installation, and other operations.
Command Format
Initialize bootstrap node.
shellbke initInitialize bootstrap node and deploy management cluster.
shellbke init --file <cluster configuration file path, eg: /root/openfuyao/bkecluster.yaml>Specify installation image and use default image source.
shellbke init --onlineImage <deploy image, eg: harbor.openfuyao.com/openfuyao/bke-online-installed:latest>Customize image source and software source.
shellbke init --otherRepo <other repo, eg: harbor.openfuyao.com/openfuyao> --otherSource <other source, eg: https://192.168.1.120:40080>View command help.
shellbke init -h
Parameter Description
Parameter Name Description -f,--fileSpecify the bkecluster.yamlconfiguration file path (required).-h,--helpDisplay command help information. --chartRepoPortSet Helm Chart repository port (default: 38080).--clusterAPISpecify cluster-api-bkeversion (default:v25.03).--confirmSkip confirmation prompts and execute directly. --hostIPSpecify the IP address of the local Kubernetes API Server (required). --kubernetesPortSet local Kubernetes API port (default: 36443).--ntpServerConfigure NTP server (default: cn.pool.ntp.org:123,localindicates using local service).--otherRepoSpecify image repository address (such as Helm Chart, container images, etc.). --otherSourceCustomize private source address for system package installation. --runtimeSelect container runtime ( dockerorcontainerd, default:containerd).-s,--runtimeStorageSet container runtime storage directory (default: /var/lib/dockeror/var/lib/containerd).--yumRepoPortSet YUM repository port (default: 40080).Executing User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The cluster configuration file has been prepared.
Precautions
None.
Cluster Installation
Command
shellbke clusterCommand Function
Cluster lifecycle management.
Command Format
Cluster installation and deployment.
shellbke cluster create -f <cluster configuration file path, eg: /root/openfuyao/master.yaml> -n <node configuration file path, eg: /root/openfuyao/nodes.yaml>View command help.
shellbke cluster -h
Parameter Description
Parameter Name Description -f,--fileSpecify the bkecluster.yamlconfiguration file path (required).-n,--nodeSpecify the bkenode.yamlconfiguration file path (required).-h,--helpCommand help. Executing User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The cluster configuration file has been prepared.
Precautions
None.
Cluster Uninstallation
Command
shellbke resetCommand Function
Clean up bootstrap node service and restore the node to bare metal state.
Command Format
Delete local kubernetes service.
shellbke resetClear bootstrap node and mount directory.
shellbke reset --mountClear node containers and runtime environment.
shellbke reset --allClear node service and skip delete confirmation.
shellbke reset --all --confirmView command help.
shellbke reset -h
Parameter Description
Parameter Name Description --allRestore node. --confirmSkip all delete confirmations. -h,--helpDisplay reset command help information. --mountRemove extraction directory and related services. Executing User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The cluster has been prepared.
Precautions
None.