Install KubeSphere in Kubernetes

created at 08-25-2021 views: 3

Install helm

Create a helm folder, manually download the helm installation package, and put it into the helm folder

tar -zxf helm-v3.2.1-linux-amd64.tar.gz && mv linux-amd64/helm . && rm -rf *linux-amd64*
mv helm /usr/local/bin/

View the helm version

[root@k8s-master01 3.1.1]# helm version
version.BuildInfo{Version:"v3.2.1", GitCommit:"fe51cd1e31e6a202cba7dead9552a6d418ded79a", GitTreeState:"clean", GoVersion:"go1.13.10"}

Install OpenEBS

Check the Taint of the master

kubectl describe node k8s-master01 | grep Taint

Remove taint on the master

kubectl taint nodes k8s-master01

Add OpenEBS LocalPV repository to helm

helm repo add openebs-localpv

Install OpenEBS

helm install openebs openebs-localpv/localpv-provisioner --namespace openebs --create-namespace

Wait for the openebs related pod to be created

kubectl get pods -n openebs

View storageclass

[root@k8s-master01 helm]#  kubectl get sc
openebs-device   Delete          WaitForFirstConsumer   false                  109s
openebs-hostpath   Delete          WaitForFirstConsumer   false                  109s

Set default sc

kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"":"true"}}}'

Install KubeSphere

give the uninstall method first after installation error, create file


Execute on the master node of the k8s cluster. If there is no response, download the corresponding file manually

kubectl apply -f

kubectl apply -f

Check the installation log:

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0]}') -f

Check whether all pods in kubesphere have started successfully

kubectl get pods --all-namespaces

After the installation is complete, use the following command to check the port of the console (the default is 30880)

[root@k8s-master01 kubesphere]# kubectl get svc/ks-console -n kubesphere-system
NAME         TYPE       CLUSTER-IP    EXTERNAL-IP   PORT(S)        AGE
ks-console   NodePort   <none>        80:30880/TCP   35m

netstat -lntp

Make sure that port 30880 is opened in the security group, and access the Web console through NodePort (IP:30880) with the default account and password (admin/P@88w0rd)

Account: admin
Password: P@88w0rd


created at:08-25-2021
edited at: 08-25-2021: