• Cloud-Native Container ProductsCloud-Native Container Products
    • KubeSphere Enterprisehot
    • KubeSphere Virtualizationhot
    • KubeSphere Enterprise HCI
  • Cloud-Native ServiceCloud-Native Service
    • KubeSphere Backuphot
    • KubeSphere Litenew
    • KubeSphere Inspectornew
  • Public Cloud Container ServicePublic Cloud Container Service
    • KubeSphere on AWS
    • KubeSphere on DigitalOcean

Install KSV in single-node mode

Describes how to install KSV in single-node mode.

This topic describes how to install KubeSphere Virtualization (KSV) in single-node mode.

Precautions

Before you install KSV, carefully read the following precautions and make sure the conditions are met:

  • Before you install KSV, we recommend that you run the following script to clear the disk for Ceph storage. Replace the drive letter in the script with the actual one. After the disk is cleared, restart the server.

    DISK="/dev/sdX" \# Zap the disk to a fresh, usable state (zap-all is important, b/c MBR has to be clean) sgdisk --zap-all $DISK \# Wipe a large portion of the beginning of the disk to remove more LVM metadata that may be present dd if=/dev/zero of="$DISK" bs=1M count=100 oflag=direct,dsync \# SSDs may be better cleaned with blkdiscard instead of dd blkdiscard $DISK \# Inform the OS of partition table changes partprobe $DISK
  • If environment conditions can be met or KSV is to be installed in a production environment, we recommend that you use SSDs in etcd. By default, the data directory of etcd is /var/lib/etcd.

  • If the size of the system disk is small or KSV is to be installed in a production environment, we recommend that you mount a disk of 100 GB or larger to the directory /var/lib/rancher.

  • The server node on which KSV is installed must run on Linux, and the kernel version of Linux must be 4.0 or later. We recommend that you use one of the following OSs: Ubuntu 18.04, Ubuntu 20.04, CentOS 7.9, Unity Operating System (UOS), Kylin V10, and EulerOS. Some unknown issues may exist if you use an OS other than the preceding ones. More OSs will be supported in later versions.

    Query the OS version:

    cat /etc/issue
  • Make sure your server node meets the following conditions:

    HardwareMinimumRecommended
    CPU
    4 cores
    8 cores
    Memory
    8 GB
    16 GB
    System disk
    100 GB
    200 GB

    Query the number of CPU cores of your server:

    cat /proc/cpuinfo | grep "processor" | sort | uniq | wc -l

    Query the memory size:

    cat /proc/meminfo | grep MemTotal

    Query the available disk size:

    df -hl
  • The server node must have at least one disk that is unformatted and unpartitioned, or one unformatted partition. The minimum size of the disk or partition is 100 GB and the recommended size is 200 GB.

    Query the disk partition of the server node:

    lsblk -f

    For example, the following command output indicates that vdb meets the requirements:

    NAME FSTYPE LABEL UUID MOUNTPOINT vda └─vda1 LVM2_member >eSO50t-GkUV-YKTH-WsGq-hNJY-eKNf-3i07IB ├─ubuntu--vg-root ext4 c2366f76-6e21-4f10-a8f3-6776212e2fe4 / └─ubuntu--vg-swap_1 swap 9492a3dc-ad75-47cd-9596-678e8cf17ff9 [SWAP] vdb
  • The server node must support virtualization. If a server node does not support virtualization, an error is reported and KSV cannot be installed.

    Query whether the server node supports virtualization. If the command output is empty, the server node does not support virtualization.

    • x86 architecture
    grep -E '(svm|vmx)' /proc/cpuinfo
    • ARM64 architecture
    ls /dev/kvm

Procedure

  1. Log in to the server node as user root.

  2. Query the architecture of the server node:

    uname -m
  3. Download the installation package based on the architecture of the server node:

    • x86 architecture

    common:Cover Text

    • ARM64 architecture

    common:Cover Text

  4. Decompress the installation package:

    tar -zxvf kubesphere-virtualization-<package name>.tar.gz

    common:NOTE

    In the preceding command, replace <package name> with the name of the installation package you download.

    • x86 architecture: Replace <package name> with x86_64-v1.6.1.

    • ARM64 architecture: Replace <package name> with arm64-v1.6.1.

  5. Go to the directory generated after the installation package is decompressed:

    cd kubesphere-virtualization-<file path>

    common:NOTE

    In the preceding command, replace <file path> with the name of the directory generated.

    • x86 architecture: Replace <file path> with x86_64.

    • ARM64 architecture: Replace <file path> with arm64.

  6. Install KSV:

    ./install.sh -a --ratio <overcommit ratio>

    common:NOTE

    • --ratio is an optional parameter that specifies the overcommit ratio of your KSV cluster. The overcommit ratio specifies the number of vCPUs supported by each physical CPU. You can configure <overcommit ratio> based on business requirements. The value must be an integer ranging from 1 to 10. If you leave this parameter empty, the default value is 2.

    • The overcommit ratio determines the maximum number of VMs that can be created on KSV. Use the following formula to calculate: Maximum number of VMs = Number of CPU cores x Overcommit ratio.

    • You can configure the overcommit ratio only when you install KSV. You cannot modify the overcommit ratio when you upgrade KSV.

    • The installation may require a long period of time. Wait until all processes are complete.

    If the following command output appears, KSV is installed:

    \##################################################### \### Welcome to KubeSphere Virtualization! ### \##################################################### Console: http://172.16.0.59:30880 Username: admin Password: P@88w0rd NOTE: Please change the default password of the admin user after login. \##################################################### https://kubesphere.cloud/ksv/ 2022-12-01 14:03:45 \#####################################################
  7. Obtain the URL of the KSV web console, and the username and password of the system administrator from the Console, Username, and Password parameters.

    common:NOTE

    By default, KSV provides the following users:

    • System administrator: username admin and password P@88w0rd

    • Project administrator: username project-default-admin and password 123456

    • Project operator: username project-default-operator and password 123456

  8. (Optional) After KSV is installed, run the following command to query the installation logs:

    ksv logs

KubeSphere ®️ © QingCloud Technologies 2022