Version: v1.3

Installation

For upgrading existing KubeVela, please read the upgrade guide.

Requirements:

  • Kubernetes cluster >= v1.19 && <= v1.22
  • Kubectl

KubeVela relies on Kubernetes as a control plane. The control plane could be any managed Kubernetes offering or your cluster.

For local deployment and test, you could use kind or minikube.

For production usage, you could use your Kubernetes cluster or Kubernetes services provided by cloud providers. For offline installation, please refer to KubeVela Offline Installation Guide.

  • Kind
  • Minikube
  • K3s
  • RKE
  • Cloud Provider

Minikube is NOT RECOMMENDED for production.

Follow the minikube installation guide.

Then spins up a minikube cluster

  1. minikube start

Install ingress to enable service route:

  1. minikube addons enable ingress

The k3s is great for: Edge、IoT、Development.

  1. Install k3s

K3s provides an installation script that is a convenient way to install it as a service on systemd or openrc based systems.

Follow this guide to get more support.

  1. curl -sfL https://get.k3s.io | sh -
  1. Copy kubeconfig
  1. make ~/.kube
  2. cp /etc/rancher/k3s/k3s.yaml ~/.kube/config

This installation applies to the production environment. Please prepare 1~N servers or VMs.

This section guides to install a RKE Kubernetes cluster, you can refer to their installation guides for more details.

(1) Docker

The RKE depends on docker, Please install Docker on all servers or virtual machines, if not installed follow the docker installation guide.

(2)Install RKE:

Download RKE binary from RKE release page.

If your internet access was limited, try using the binary cached by KubeVela team:

  1. wget https://static.kubevela.net/binary/rke/rke_linux-amd64 -O /usr/bin/rke
  2. chmod +x /usr/bin/rke

(3)Install RKE cluster

Please switch to a non-root user who has permission to operate docker and execute the following commands.

  1. mkdir ~/rkeinit && cd ~/rkeinit
  2. # Wizard-style configuration
  3. rke config
  4. # Kubernetes Cluster Installation
  5. rke up
  6. # Install kubectl Command
  7. mkdir ~/.kube
  8. cp kube_config_cluster.yml ~/.kube/config
  9. docker cp kubelet:/usr/local/bin/kubectl /usr/local/bin/kubectl

Kind is NOT RECOMMENDED for production.

Follow this guide to install kind.

Then spins up a kind cluster:

  1. cat <<EOF | kind create cluster --image=kindest/node:v1.20.7 --config=-
  2. kind: Cluster
  3. apiVersion: kind.x-k8s.io/v1alpha4
  4. nodes:
  5. - role: control-plane
  6. kubeadmConfigPatches:
  7. - |
  8. kind: InitConfiguration
  9. nodeRegistration:
  10. kubeletExtraArgs:
  11. node-labels: "ingress-ready=true"
  12. extraPortMappings:
  13. - containerPort: 80
  14. hostPort: 80
  15. protocol: TCP
  16. - containerPort: 443
  17. hostPort: 443
  18. protocol: TCP
  19. EOF

Using for production environment

Please make sure one of the ingress controllers is available.

KubeVela CLI provides an easy to engage and manage your application delivery in command lines.

  • Script
  • Homebrew
  • Download directly from releases

MacOS/Linux

  1. curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.3.6

Windows

Only the official release version is supported.

  1. powershell -Command "iwr -useb https://kubevela.io/script/install.ps1 | iex"

macOS/Linux

Update your brew first. Please note that the brew method only supports the installation of the official release version.

  1. brew update

Then install KubeVela CLI

  1. brew install kubevela
  • Download the latest vela binary file via release log.
  • Unzip the binary file, and configure the environment variables in $PATH, and you’re done.
  1. sudo mv ./vela /usr/local/bin/vela

Installation Tips: If you are using a Mac system, it will pop up a warning that “vela” cannot be opened because the package from the developer cannot be verified.

MacOS imposes stricter restrictions on the software that can run in the system. You can temporarily solve this problem by opening System Preference ->Security & Privacy -> General and clicking on Allow Anyway.

  • Default
  • Helm

The version of vela CLI >= 1.2.3.

  1. vela install --version v1.3.6

check out the outcome

  1. ...
  2. Watching for changes to Job kubevela-vela-core-cluster-gateway-tls-secret-patch with timeout of 18m0s
  3. Add/Modify event for kubevela-vela-core-cluster-gateway-tls-secret-patch: ADDED
  4. kubevela-vela-core-cluster-gateway-tls-secret-patch: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
  5. Add/Modify event for kubevela-vela-core-cluster-gateway-tls-secret-patch: MODIFIED
  6. kubevela-vela-core-cluster-gateway-tls-secret-patch: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
  7. Add/Modify event for kubevela-vela-core-cluster-gateway-tls-secret-patch: MODIFIED
  8. kubevela-vela-core-cluster-gateway-tls-secret-patch: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
  9. Add/Modify event for kubevela-vela-core-cluster-gateway-tls-secret-patch: MODIFIED
  10. Starting delete for "kubevela-vela-core-admission" ServiceAccount
  11. Starting delete for "kubevela-vela-core-admission" ClusterRole
  12. Starting delete for "kubevela-vela-core-admission" ClusterRoleBinding
  13. Starting delete for "kubevela-vela-core-admission" Role
  14. Starting delete for "kubevela-vela-core-admission" RoleBinding
  15. Starting delete for "kubevela-vela-core-admission-patch" Job
  16. Starting delete for "kubevela-vela-core-cluster-gateway-admission" ServiceAccount
  17. Starting delete for "kubevela-vela-core-cluster-gateway-admission" Role
  18. Starting delete for "kubevela-vela-core-cluster-gateway-admission" RoleBinding
  19. Starting delete for "kubevela-vela-core-cluster-gateway-tls-secret-patch" Job
  20. KubeVela control plane has been successfully set up on your cluster.
  21. If you want to enable dashboard, please run "vela addon enable velaux"

If you are helm user, you can also use helm to install kubevela core:

helm v3.2.0+ required

  1. helm repo add kubevela https://charts.kubevela.net/core
  2. helm repo update
  3. helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.3.6 --wait

This is optional if you don’t use UI console of KubeVela.

VelaUX is a dashboard including UI+API services, it enables you to do everything around application delivery and management.

  1. vela addon enable velaux --version v1.3.6

expected output:

  1. Addon: velaux enabled Successfully.

By default, velaux didn’t have any exposed port, you can view it by:

  1. vela port-forward addon-velaux -n vela-system 8080:80

Choose > Cluster: local | Namespace: vela-system | Component: velaux | Kind: Service for visit.

If you have loadbalaner or ingress, please refer to VelaUX addon docs for more advanced installation ways.

VelaUX need authentication. Default username is admin and get default password as below

  1. vela logs -n vela-system --name apiserver addon-velaux | grep "initialized admin username"

If there is no password in logs, you can get it from secret with the name admin in the vela-system namespace.

Before uninstalling kubevela, you must delete all applications and disable all addons.

  1. Uninstall VelaUX
  1. vela addon disable velaux
  1. Uninstall KubeVela Core
  1. vela uninstall
  1. Uninstall CRD

Before deleting, you must delete all CR resources.

  1. kubectl get crd |grep oam | awk '{print $1}' | xargs kubectl delete crd

Last updated on Nov 1, 2022 by Tianxin Dong