Command Reference
This document contains the command reference for Cluster-API installation and deployment.
Build Installation Package
Command
shellbke buildCommand Function
Build the installation package, collecting binary files, RPM packages, chart packages, etc. to construct the deployment package.
Command Format
Build the deployment package based on a YAML file.
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,--fileSpecifies the configuration file path. -h,--helpDisplays command help information. -t,--targetSpecifies the output path for the packaged BKE file. --skip-tls-verifyWhen YAML is not configured, image sync skips TLS verification. Execution User
This command is executed by the root user.
Prerequisites
bkeadm has been installed.
Notes
None
Build Incremental Package
Command
shellbke build patchCommand Function
Build a BKE incremental package (images, binaries, Charts, etc.) according to a YAML file, outputting a
tar.gzthat can be distributed offline.Command Format
Build an incremental package in OCI format (can work without Docker).
shellbke build patch -f <yaml, eg: offline-incremental.yaml> -t <output, eg: patch-log.tar.gz> --strategy ociSkip image sync TLS verification when YAML is not configured.
shellbke build patch -f offline-incremental.yaml -t patch-log.tar.gz --strategy oci --skip-tls-verifyView command help.
shellbke build patch -h
Parameter Description
Parameter Name Description -f,--fileIncremental package configuration file path (required). -t,--targetIncremental package output path. -s,--strategyImage sync strategy; specify as ociwhen building an incremental package.--skip-tls-verifySkip source repository TLS verification when YAML is not configured. -h,--helpDisplays command help information. Execution User
This command is executed by the root user.
Prerequisites
bkeadm has been installed.
Notes
bke build patchonly collects binaries, Charts, etc. into the incremental package; it does not import them into the existing system packages/binary repository (HTTP repository) or Chart Registry on the bootstrap node. Importing images requires separately executingbke registry patch, and binaries and Charts must also be manually imported according to their respective procedures.
Image Sync
Command
shellbke registry sync bke registry patchCommand Function
bke registry sync: Sync a single image, batch images, or an entire repository between two image repositories by data block.bke registry patch: Import images from the incremental directory produced bybke build patchand extracted, into the target image repository (typically the bootstrap node40443).
Command Format
Sync a single image (multi-architecture).
shellbke registry sync --source docker.io/library/busybox:1.35 --target 127.0.0.1:40443/library/busybox:1.35 --multi-archSync a single image (specified architecture, mutually exclusive with
--multi-arch).shellbke registry sync --source docker.io/library/busybox:1.35 --target 127.0.0.1:40443/library/busybox:1.35 --arch arm64Batch sync by list.
shellbke registry sync --source docker.io/library -f image-list.txt --target 127.0.0.1:40443/libraryRepository-level sync.
shellbke registry sync --source 192.168.200.240:40443 --target 192.168.200.245:40443 --sync-repoSync the built incremental image directory.
shelltar -xzvf patch-log.tar.gz bke registry patch --source ./patch-log --target 127.0.0.1:40443View command help.
shellbke registry sync -h bke registry patch -h
Parameter Description
bke registry syncParameter Name Description --sourceSource image/repository address (required). --targetTarget image/repository address (required). -f,--fileBatch image list file, one name:tagper line.--multi-archSync multi-architecture manifest. --archSync only the specified architecture; mutually exclusive with --multi-arch.--src-tls-verifySource repository TLS verification. --dest-tls-verifyTarget repository TLS verification. --sync-repoRepository-level full repository sync. -h,--helpDisplays command help information. bke registry patchParameter Name Description --sourceIncremental package extracted directory (required). --targetTarget image repository address, default 127.0.0.1:40443.-h,--helpDisplays command help information. Execution User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The target image repository is accessible (the common port for the bootstrap node local repository is
40443). - Before using
registry patch, you must first complete the incremental package build, transfer, and extraction.
Notes
- Recommended chain:
bke build patch→ transfer and extract →bke registry patch; usebke registry syncto supplement the repository with a single external image. bke registry patchonly imports incremental images; it does not importvolumes/charts/*.tgz, nor does it import binaries/system packages into the HTTP repository.
- Recommended chain:
View Image Repository Contents
Command
shellbke registry viewCommand Function
View information such as image paths, tags, and architectures in the image repository; optionally export the image list.
Command Format
View the image repository (recommended: do not write the protocol, it will automatically use HTTPS and skip certificate verification, suitable for local self-signed repositories).
shellbke registry view 127.0.0.1:40443Filter by prefix and limit the number of tags displayed per image.
shellbke registry view 127.0.0.1:40443 --prefix kubernetes --tags 3Export the image list to the current directory.
shellbke registry view 127.0.0.1:40443 --exportView command help.
shellbke registry view -h
Parameter Description
Parameter Name Description Positional parameter (repository address) Image repository address (required), for example 127.0.0.1:40443.--prefixFilter by image path prefix. --tagsMaximum number of tags to display per image, default 3.--exportExport the image list to the current directory; the file name is automatically generated as {architecture}_image-list.txt(e.g.amd64_image-list.txt), and cannot be customized.-h,--helpDisplays command help information. Execution User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The target image repository is accessible.
Notes
- The repository address for
bke registry viewshould not be written ashttps://127.0.0.1:40443. Whenhttps://is written manually, system certificate verification is performed, and local self-signed repositories will report unauthenticated certificates; when no protocol is specified, the tool automatically addshttps://and skips certificate verification. --tagsdefaults to3; whether or not you write--tags 3, the effect is the same; when you need to view more tags, increase this value.--exportcannot specify the export file name; if you need a custom name after export, you can rename it yourself.
- The repository address for
Initialize Bootstrap Node
Command
shellbke initCommand Function
Initialize the bootstrap node, including node checks, repository startup, cluster installation, and other operations.
Command Format
Initialize the bootstrap node.
shellbke initInitialize the bootstrap node and deploy the management cluster.
shellbke init --file <cluster configuration file path, eg: /root/openfuyao/bkecluster.yaml>Specify the installation image and use the default image source.
shellbke init --onlineImage <deploy image, eg: harbor.openfuyao.com/openfuyao/bke-online-installed:26.9.0>Customize the image source and software source.
shellbke init --otherRepo <other repo, eg: harbor.openfuyao.com/openfuyao> --otherSource <other source, eg: http://192.168.1.120:40080>View command help.
shellbke init -h
Parameter Description
Parameter Name Description -f,--fileSpecifies the bkecluster.yamlconfiguration file path (required).-h,--helpDisplays command help information. --chartRepoPortSets the Helm Chart repository port (default: 38080).--clusterAPISpecifies the cluster-api-bkeversion (default:26.9.0).--confirmSkip confirmation prompts and execute directly. --hostIPSpecifies the IP address of the local Kubernetes API Server (required). --kubernetesPortSets the local Kubernetes API port (default: 36443).--ntpServerConfigures the NTP server (default: cn.pool.ntp.org:123,localmeans use local service).--otherRepoSpecifies the image repository address (e.g. Helm Chart, container images, etc.). --otherSourceCustom private source address for system software package installation. --runtimeSelect the container runtime ( dockerorcontainerd, default:containerd).-s,--runtimeStorageSets the container runtime storage directory (default: /var/lib/dockeror/var/lib/containerd).--yumRepoPortSets the YUM repository port (default: 40080).Execution User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The cluster configuration file has been prepared.
Notes
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,--fileSpecifies the bkecluster.yamlconfiguration file path (required).-n,--nodeSpecifies the bkenode.yamlconfiguration file path (required).-h,--helpCommand help. Execution User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The cluster configuration file has been prepared.
Notes
None.
Cluster Uninstallation
Command
shellbke resetCommand Function
Clean up bootstrap node services and restore nodes to the initial state before BKE installation. For the deletion scope, high-risk impacts, and success criteria of each parameter, see Cluster Uninstallation Overview and Delete Bootstrap Cluster via Backend (Command Line).
Command Format
Delete the local kubernetes service.
shellbke resetClear the bootstrap node and mounted directories.
shellbke reset --mountClear node containers and the runtime environment.
shellbke reset --allClear node services and skip the deletion confirmation.
shellbke reset --all --confirmView command help.
shellbke reset -h
Parameter Description
Parameter Name Description --allRestore nodes. --confirmSkip all deletion confirmations. -h,--helpDisplays reset command help information. --mountRemove the extraction directory and related services. Execution User
This command is executed by the root user.
Prerequisites
- bkeadm has been installed.
- The cluster has been prepared.
Notes
None.