Install OpenELB on Kubernetes
This document describes how to use kubectl and Helm to install and delete OpenELB in a Kubernetes cluster.
NOTE
- In a Kubernetes cluster, you only need to install OpenELB once. After the installation is complete, a openelb-manager Deployment that contains a openelb-manager Pod is installed in the cluster. The openelb-manager Pod implements the functionality of OpenELB for the entire Kubernetes cluster.
- After the installation is complete, you can scale the openelb-manager Deployment and assign multiple OpenELB replicas (openelb-manager Pods) to multiple cluster nodes to ensure high availability. For details, see Configure Multiple OpenELB Replicas.
Prerequisites
-
You need to prepare a Kubernetes cluster, and ensure that the Kubernetes version is 1.15 or later. OpenELB 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:
- Use KubeKey (recommended). You can use KubeKey to deploy a Kubernetes cluster with or without KubeSphere.
- Follow official Kubernetes guides.
OpenELB 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 OpenELB, ensure that the Helm version is Helm 3.
Install OpenELB Using kubectl
-
Log in to the Kubernetes cluster over SSH and run the following command:
We recommend using the stable release version in a production environment. Please use the following command to download the installation script for the stable version:
wget https://raw.githubusercontent.com/openelb/openelb/release-0.5/deploy/openelb.yaml kubectl apply -f openelb.yaml
If you are interested in the latest features of the master branch and want to use the development version, use the following command to download the deployment script:
wget https://raw.githubusercontent.com/openelb/openelb/master/deploy/openelb.yaml kubectl apply -f openelb.yaml
-
Run the following command to check whether the status of
openelb-manager
is READY: 1/1 and STATUS: Running. If yes, OpenELB has been installed successfully.kubectl get po -n openelb-system
The following is an example of the expected command output:
NAME READY STATUS RESTARTS AGE openelb-admission-create-tjsqm 0/1 Completed 0 41s openelb-admission-patch-n247f 0/1 Completed 0 41s openelb-manager-74c5467674-bx2wg 1/1 Running 0 41s
Delete OpenELB Using kubectl
-
To delete OpenELB, log in to the Kubernetes cluster and run the following command:
kubectl delete -f openelb.yaml
NOTE
Before deleting OpenELB, you must first delete all Services that use OpenELB. -
Run the following command to check the result. If the
openelb-system
namespace does not exist, OpenELB has been deleted successfully.kubectl get ns
Install OpenELB Using Helm
-
Log in to the Kubernetes cluster over SSH and run the following commands:
helm repo add kubesphere-stable https://charts.kubesphere.io/stable helm repo update kubectl create ns openelb-system helm install openelb kubesphere-stable/openelb -n openelb-system
-
Run the following command to check whether the status of
openelb-manager
is READY: 1/1 and STATUS: Running. If yes, OpenELB has been installed successfully.kubectl get po -n openelb-system
The following is an example of the expected command output:
NAMESPACE NAME READY STATUS RESTARTS AGE openelb-system openelb-admission-create-m2p52 0/1 Completed 0 32s openelb-system openelb-admission-patch-qmvnq 0/1 Completed 0 31s openelb-system openelb-manager-74c5467674-pgtmh 1/1 Running 0 32s ... ...
Delete OpenELB Using Helm
-
To delete OpenELB, run the following command:
helm delete openelb -n openelb-system
NOTE
Before deleting OpenELB, you must first delete all Services that use OpenELB. -
Run the following command to check the result. If the OpenELB application does not exist, OpenELB has been deleted successfully.
helm ls -n openelb-system
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.