This document describes how to use kubectl and Helm to install and delete PorterLB in a Kubernetes cluster.
NOTE
You need to prepare a Kubernetes cluster, and ensure that the Kubernetes version is 1.15 or later. PorterLB requires CustomResourceDefinition (CRD) v1, which is only supported by Kubernetes 1.15 or later. You can use the following methods to deploy a Kubernetes cluster:
PorterLB is designed to be used in bare-metal Kubernetes environments. However, you can also use a cloud-based Kubernetes cluster for learning and testing.
If you use Helm to install porter, ensure that the Helm version is Helm 3.
Log in to the Kubernetes cluster over SSH and run the following command:
kubectl apply -f https://raw.githubusercontent.com/kubesphere/porter/master/deploy/porter.yamlRun the following command to check whether the status of porter-manager is READY: 1/1 and STATUS: Running. If yes, PorterLB has been installed successfully.
kubectl get po -n porter-system
To delete PorterLB, log in to the Kubernetes cluster and run the following command:
kubectl delete -f https://raw.githubusercontent.com/kubesphere/porter/master/deploy/porter.yamlNOTE
Before deleting PorterLB, you must first delete all Services that use PorterLB.
Run the following command to check the result. If the porter-system namespace does not exist, PorterLB has been deleted successfully.
kubectl get ns
Log in to the Kubernetes cluster over SSH and run the following commands:
helm repo add test https://charts.kubesphere.io/testhelm repo updatehelm install porter test/porterRun the following command to check whether the status of porter-manager is READY: 1/1 and STATUS: Running. If yes, PorterLB has been installed successfully.
kubectl get po -A
To delete PorterLB, run the following command:
helm delete porterNOTE
Before deleting PorterLB, you must first delete all Services that use PorterLB.
Run the following command to check the result. If the PorterLB application does not exist, PorterLB has been deleted successfully.
helm ls
Last modified March 31, 2021: Relocated files to adapt to localization and changed links. (6b5fcb1)