For AI agents: the complete documentation index is available at /docs/llms.txt, the full documentation bundle is available at /docs/llms-full.txt, and this page is available as Markdown at /docs/cncf/kubernetes/env/panel/kubesphere/kubekey.md.
  • 简体中文
  • 2026
  • KubeKey

    KubeKey 是一个开源的轻量级工具,用于部署 Kubernetes 集群。它提供了一种灵活、快速、方便的方式来安装 Kubernetes/K3s、Kubersphere。它也是扩展和升级集群的有效工具。

    通过 KubeKey 可以实现如下功能:

    • 仅安装 Kubernetes
    • 同时安装 Kubernetes 和 Kubesphere
    • 使用 KubeKey 安装 Kubernetes 中,使用 ks-installer 在Kubernetes 中安装 KubeSphere。

    本文主要描述使用 KubeKey 同时安装 Kubernetes 和 Kubesphere,Kubernetes 为 K3s。

    文档链接:

    安装依赖

    yum install socat conntrack -y

    如果是中国地区,可以设置为中国地区,从国内镜像下载,否则就只能从 github 下载

    export KKZONE=cn

    下载 KubeKey

    curl -sfL https://get-kk.kubesphere.io | sh -

    安装 k3s 和 kubersphere

    ./kk create cluster --with-kubernetes v1.23.13-k3s --with-kubesphere v3.3.2

    kubekey 是支持很多 k3s 版本的,但是如果设置了中国区域,在国内镜像就只支持 v1.21.6-k3s 版本。如果要使用其他版本,则需取消中国区域设置。

    安装完成后即可访问 kubersphere:

    Console: http://myserver:30880
    Account: admin
    Password: P@88w0rd