This section describes how to build a development environment for extensions. Before you start, make sure KubeSphere and related development tools are installed.
KubeSphere: Deploy KubeSphere in a K8s cluster to provide a base runtime environment for extensions.
Development tools: Install create-ks-project and ksbuilder for initializing the extension project, packaging and publishing extensions, and you may need these development tools Node.js, Helm, kubectl, etc.
Create a Kubernetes Cluster
KubeSphere Luban can be installed on any Kubernetes cluster. Please deploy a Kubernetes cluster with KubeKey.
curl -sfL https://get-kk.kubesphere.io | sh -
./kk create cluster --with-local-storage --with-kubernetes v1.31.0 --container-manager containerd -y
Install Helm in your Kubernetes cluster.
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Install KubeSphere
chart=oci://hub.kubesphere.com.cn/kse/ks-core
version=1.2.2
helm upgrade --install -n kubesphere-system --create-namespace ks-core $chart --debug --wait --version $version --set apiserver.nodePort=30881 --reset-values
More content can be found in Online Installation of Kubernetes and KubeSphere.
Activate KubeSphere
Apply for a free KubeSphere Community Edition license here, and complete the activation after importing the license.
In addition to setting up the environment for K8s and KubeSphere Luban, the following tools are needed on the development host.
Install the following development tools
Node.js and Yarn for frontend development of extensions: install Node.js v16.17+ and Yarn v1.22+.Helm and kubectl for extensions orchestration and K8s cluster management: install Helm v3.8+ and kubectl v1.23+.ksbuilder for packaging and publishing extensions: Download ksbuilder and install it to /usr/local/bin.Configure the development environment
Copy the kubeconfig file of the K8s cluster to the development host, and make sure the K8s cluster can be properly accessed using kubectl.
➜ ~ kubectl -n kubesphere-system get po
NAME READY STATUS RESTARTS AGE
ks-apiserver-7c67b4577b-tqqmd 1/1 Running 0 10d
ks-console-7ffb5954d8-qr8tx 1/1 Running 0 10d
ks-controller-manager-758dc948f5-8n4ll 1/1 Running 0 10d