Installing KubeSphere on Minikube
In addition to installing KubeSphere on a Linux machine, you can also deploy it on minikube cluster. This tutorial demonstrates the general steps of completing a minimal KubeSphere installation on Minikube.
Prerequisites
- To install KubeSphere 3.2.1 on Minikube, your Minikube version must be v1.23.x, v1.24.x, v1.25.x.
- Make sure your machine meets the minimal hardware requirement: CPU > 2 Core, Memory > 2 GB, 20GB free disk space, Container or virtual machine manager, such as: Docker, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation.
- A default Storage Class in your Minikube cluster needs to be configured before the installation.
Pre-checks
Make sure your minikube version is compatible by running
minikube version
in your terminal. The output may look as below:β― minikube version minikube version: v1.24.0 commit: 76b94fb3c4e8ac5062daf70d60cf03ddcc0a741b
Check if the available resources in your cluster meet the minimum requirements.
β― free -g total used free shared buff/cache available Mem: 6 2 2 0 1 3 Swap: 0 0 0 ## Memory > 2GB β― lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 40 bits physical, 48 bits virtual CPU(s): 4 ## More than 2 CPUs β― df -h Filesystem Size Used Avail Use% Mounted on udev 3.4G 0 3.4G 0% /dev tmpfs 694M 2.6M 692M 1% /run /dev/sda3 198G 116G 73G 62% / ## Available more than 20GB free disk space
Make sure your Kubectl version is compatible by running
kubectl version
in your minikube cluster node. The output may look as below:β― kubectl version Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:35:25Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}
Note
Pay attention to theServer Version
line. IfGitVersion
shows an older one, you need to upgrade Kubectl first.Check if there is a default StorageClass in your cluster. An existing default StorageClass is a prerequisite for KubeSphere installation.
$ kubectl get sc NAME PROVISIONER AGE glusterfs (default) kubernetes.io/glusterfs 3d4h
If your Minikube cluster environment meets all the requirements above, then you are ready to deploy KubeSphere on your Minikube.
Note
- The CSR signing feature is activated in
kube-apiserver
when it is started with the--cluster-signing-cert-file
and--cluster-signing-key-file
parameters. See RKE installation issue.
Video Demonstration
Deploy KubeSphere
After you make sure your machine meets the conditions, perform the following steps to install KubeSphere.
Start minikube.
β― minikube start π minikube v1.24.0 on Debian 10.1 π minikube 1.25.2 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.25.2 π‘ To disable this notice, run: 'minikube config set WantUpdateNotification false' β¨ Using the docker driver based on existing profile π Starting control plane node minikube in cluster minikube π Pulling base image ... π Restarting existing docker container for "minikube" ... π³ Preparing Kubernetes v1.22.3 on Docker 20.10.8 ... π Verifying Kubernetes components... βͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5 π Enabled addons: storage-provisioner, default-storageclass π Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
Run the following commands to start installation:
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/kubesphere-installer.yaml kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/cluster-configuration.yaml
After KubeSphere is successfully installed, you can run the following command to view the installation logs:
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f
Use
kubectl get pod --all-namespaces
to see whether all Pods are running normally in relevant namespaces of KubeSphere. If they are, check the port (30880
by default) of the console by running the following command:kubectl get svc/ks-console -n kubesphere-system
Make sure port
30880
is opened in your security group and access the web console through the NodePort (IP:30880
) with the default account and password (admin/P@88w0rd
).After logging in to the console, you can check the status of different components in System Components. You may need to wait for some components to be up and running if you want to use related services.
Enable Pluggable Components (Optional)
This guide is used only for the minimal installation by default. For more information about how to enable other components in KubeSphere, see Enable Pluggable Components.
Code Demonstration
Uninstall KubeSphere from Minikube
You can uninstall KubeSphere from your existing Minikube cluster by using kubesphere-delete.sh. Copy it from the GitHub source file and execute this script on your local machine.
Warning
Feedback
Was this page Helpful?
Receive the latest news, articles and updates from KubeSphere
Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.