Install KubeSphere on Kubernetes

This section describes how to quickly deploy Kubernetes and KubeSphere on a single node. This installation method is only suitable for testing. For installing KubeSphere in a production environment, please refer to Install Kubernetes and KubeSphere.

Prerequisites

  • Your linux machine meets the minimum hardware requirements: CPU > 2 cores, memory > 2 GB, disk space > 40 GB.

  • Helm should have been installed in advance. For specific instructions, please refer to Helm Installation.

Steps

  1. (Optional) If you don’t have an available Kubernetes cluster, run the following command to quickly create one.

    1. If you are accessing GitHub/Googleapis from a restricted location, please log in to any cluster node and run the following command to set the download region.

      1. export KKZONE=cn
    2. Run the following command to install KubeKey.

      After the download is complete, a KubeKey binary file kk will be generated in the current directory.

      1. curl -sfL https://get-kk.kubesphere.io | sh -
    3. Run the following command to install dependencies.

      1. apt install socat conntrack -y
    4. Run the following command to quickly create a Kubernetes cluster.

      1. ./kk create cluster --with-local-storage --with-kubernetes v1.31.0 --container-manager containerd -y
  2. If you already have an available Kubernetes cluster, run the following command to install KubeSphere Core (the core component of KubeSphere) using helm.

    1. helm upgrade --install -n kubesphere-system --create-namespace ks-core https://charts.kubesphere.io/main/ks-core-1.1.2.tgz --debug --wait
    Note

    If you are accessing Docker Hub from a restricted location, add the following configuration after the above command to modify the default image pull address.

    1. set global.imageRegistry=swr.cn-southwest-2.myhuaweicloud.com/ks
    1. set extension.imageRegistry=swr.cn-southwest-2.myhuaweicloud.com/ks
  3. After the installation is complete, the output will display the IP address and port of the web console, with the default NodePort being 30880.

    1. NOTES:
    2. Thank you for choosing KubeSphere Helm Chart.
    3. Please be patient and wait for several seconds for the KubeSphere deployment to complete.
    4. 1. Wait for Deployment Completion
    5. Confirm that all KubeSphere components are running by executing the following command:
    6. kubectl get pods -n kubesphere-system
    7. 2. Access the KubeSphere Console
    8. Once the deployment is complete, you can access the KubeSphere console using the following URL:
    9. http://192.168.6.10:30880
    10. 3. Login to KubeSphere Console
    11. Use the following credentials to log in:
    12. Account: admin
    13. Password: P@88w0rd
    14. NOTE: It is highly recommended to change the default password immediately after the first login.
    15. For additional information and details, please visit https://kubesphere.io.

    Run the following command to check the status of the pods.

    1. kubectl get pods -n kubesphere-system

    When the pod status is Running, you can access the KubeSphere web console at <NodeIP>:30880 using the default account and password (admin/P@88w0rd).

    Note

    Depending on your network environment, you may need to configure traffic forwarding rules and allow port 30880 in the firewall.