Version: v26.03

Command Reference

This document is a command reference for Cluster-API installation and deployment.

Build Installation Package

  • Command

    shell
    bke build
  • Command Function

    Build the installation package, collect binary files, rpm packages, chart packages, etc. for deployment package construction.

  • Command Format

    1. Build deployment package based on yaml.

      shell
      bke build -f <yaml file path, eg: offline-artifacts.yaml> -t <target file path, eg: bke.tar.gz>
    2. View command help.

      shell
      bke build -h
  • Parameter Description

    Parameter NameDescription
    -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

    shell
    bke init
  • Command Function

    Initialize the bootstrap node, including node checking, repository startup, cluster installation, and other operations.

  • Command Format

    1. Initialize bootstrap node.

      shell
      bke init
    2. Initialize bootstrap node and deploy management cluster.

      shell
      bke init --file <cluster configuration file path, eg: /root/openfuyao/bkecluster.yaml>
    3. Specify installation image and use default image source.

      shell
      bke init --onlineImage <deploy image, eg: harbor.openfuyao.com/openfuyao/bke-online-installed:latest>
    4. Customize image source and software source.

      shell
      bke init --otherRepo <other repo, eg: harbor.openfuyao.com/openfuyao> --otherSource <other source, eg: https://192.168.1.120:40080>
    5. View command help.

      shell
      bke init -h
  • Parameter Description

    Parameter NameDescription
    -f, --fileSpecify the bkecluster.yaml configuration file path (required).
    -h, --helpDisplay command help information.
    --chartRepoPortSet Helm Chart repository port (default: 38080).
    --clusterAPISpecify cluster-api-bke version (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, local indicates 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 (docker or containerd, default: containerd).
    -s, --runtimeStorageSet container runtime storage directory (default: /var/lib/docker or /var/lib/containerd).
    --yumRepoPortSet YUM repository port (default:40080).
  • Executing User

    This command is executed by the root user.

  • Prerequisites

    1. bkeadm has been installed.
    2. The cluster configuration file has been prepared.
  • Precautions

    None.

Cluster Installation

  • Command

    shell
    bke cluster
  • Command Function

    Cluster lifecycle management.

  • Command Format

    1. Cluster installation and deployment.

      shell
      bke cluster create -f <cluster configuration file path, eg: /root/openfuyao/master.yaml> -n <node configuration file path, eg: /root/openfuyao/nodes.yaml>
    2. View command help.

      shell
      bke cluster -h
  • Parameter Description

    Parameter NameDescription
    -f, --fileSpecify the bkecluster.yaml configuration file path (required).
    -n, --nodeSpecify the bkenode.yaml configuration file path (required).
    -h, --helpCommand help.
  • Executing User

    This command is executed by the root user.

  • Prerequisites

    1. bkeadm has been installed.
    2. The cluster configuration file has been prepared.
  • Precautions

    None.

Cluster Uninstallation

  • Command

    shell
    bke reset
  • Command Function

    Clean up bootstrap node service and restore the node to bare metal state.

  • Command Format

    1. Delete local kubernetes service.

      shell
      bke reset
    2. Clear bootstrap node and mount directory.

      shell
      bke reset --mount
    3. Clear node containers and runtime environment.

      shell
      bke reset --all
    4. Clear node service and skip delete confirmation.

      shell
      bke reset --all --confirm
    5. View command help.

      shell
      bke reset -h
  • Parameter Description

    Parameter NameDescription
    --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

    1. bkeadm has been installed.
    2. The cluster has been prepared.
  • Precautions

    None.