本节介绍如何安装 KubeSphere 企业版的核心组件 KubeSphere Core。

KubeSphere Core 为扩展组件提供基础的运行环境。安装完成后,即可使用 KubeSphere 企业版。

安装 KubeSphere Core

前提条件

  • 确保您的机器满足最低硬件要求:CPU > 2 核,内存 > 2 GB。

  • 您需要提前安装 Helm。具体请参阅安装 Helm

操作步骤

  1. (可选)如果您没有可用的 Kubernetes 集群,执行以下命令快速创建一个 Kubernetes 集群。

    1. 执行以下命令安装 KubeKey。

      curl -sfL https://get-kk.kubesphere.io | sh -
    2. 执行以下命令安装依赖项。

      apt install socat conntrack -y
    3. 执行以下命令快速创建一个 Kubernetes 集群。

      ./kk create cluster --skip-pull-images --with-local-storage  --with-kubernetes v1.25.4 --container-manager containerd  -y
  2. 如果您已经拥有可用的 Kubernetes 集群,执行以下命令通过 helm 安装 KubeSphere Core。

    helm upgrade --install -n kubesphere-system --create-namespace ks-core https://charts.kubesphere.io/main/ks-core-0.4.0.tgz --set apiserver.nodePort=30881 --debug --wait
  3. 安装完成后,输出信息会显示 Web 控制台的 IP 地址和端口号,默认的 NodePort 是 30880。

    ,100%

    执行以下命令检查 Pod 状态。当 Pod 状态都为 Running 时,您可以使用默认的账户和密码 (admin/P@88w0rd) 通过 <NodeIP>:30880 访问 KubeSphere 企业版 Web 控制台。

    kubectl get pod -n kubesphere-system
    说明

    默认管理员用户 admin 在 KubeSphere 企业版平台具有所有权限。