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 node-role.kubernetes.io/master:NoSchedule-

Add OpenEBS LocalPV repository to helm

helm repo add openebs-localpv https://openebs.github.io/dynamic-localpv-provisioner

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
NAME               PROVISIONER        RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
openebs-device     openebs.io/local   Delete          WaitForFirstConsumer   false                  109s
openebs-hostpath   openebs.io/local   Delete          WaitForFirstConsumer   false                  109s

Set default sc

kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

Install KubeSphere

give the uninstall method first after installation error, create kubesphere-delete.sh file

sh kubesphere-delete.sh

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

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/kubesphere-installer.yaml

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/cluster-configuration.yaml

Check the installation log:

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -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   10.99.39.85   <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

admin

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