VelaD
Lightweight KubeVela that runs as Daemon in single node with k3s
English | 简体中文
Introduction
VelaD helps to set up KubeVela in one step. With the help of k3s, VelaD can build KubeVela control plane of higher availability, which consist of multiple node and one load balancer typically.
Features
- Set up KubeVela air-gapped
- Build KubeVela control plane with higher availability (Optional)
Prerequisites
- Linux
Quickstart
Installation
curl -Lo velad.tar.gz https://github.com/oam-dev/velad/releases/download/v1.3.1/velad-v1.3.1-linux-amd64.tar.gz
tar -xzvf velad.tar.gz
cp linux-amd64/velad /usr/local/bin/velad
Setup
Only one command to setup KubeVela
velad install
Preparing cluster setup script...
Preparing k3s binary...
Successfully place k3s binary to /usr/local/bin/k3s
Preparing k3s images
Successfully prepare k3s image
Setting up cluster...
...
Successfully install KubeVela control plane! Try: vela components
There you go! You have set up a KubeVela. See available components:
vela comp
NAME DEFINITION
k8s-objects autodetects.core.oam.dev
my-stateful statefulsets.apps
raw autodetects.core.oam.dev
ref-objects autodetects.core.oam.dev
snstateful statefulsets.apps
task jobs.batch
webservice deployments.apps
worker deployments.apps
uninstall
velad uninstall
More Options
Setup with database
If you run velad install
, all metadata will be lost when velad uninstall
. You may need to keep the metadata for migration This section describes how to setup a KubeVela control plane with an external database.
- Prepare a database, MySQL/MariaDB, PostgreSQL, ETCD are both OK. Choose one as you like.
- Run velad with database connection string.
Make sure you keep the token. It is required when restart KubeVela using this database
velad install --database-endpoint="mysql://USER:[email protected](HOST:3306)/velad" --token="TOKEN"
You can find more database endpoint format in this doc
- Now you have a KubeVela control plane which keeps all the data in database.
If this machine is shut down for some reason, or you run velad uninstall
, you can restart it with --start
flag and the same token.
velad install --database-endpoint="mysql://USER:[email protected](HOST:3306)/velad" --token="TOKEN" --start
Access from remote
By default, you can only access this control plane on this node. Typically, you run export KUBECONFIG=$(velad kubeconfig --internal)
to access the control plane.
You can also make it accessible outside the machine.
- add
--bind-ip=NODE_IP
whenvelad install
, which helps to generate the kubeconfig that can be used outside.NODE_IP
is IP of machine where run thevelad
。 velad kubeconfig
(note without--internal
) will print the kubeconfig position.- copy this file to other machine, setup
KUBECONFIG
, and you can access KubeVela control plane remotely.
Build
You could build velad yourself. This requires:
- docker
- go >= 1.17
git clone https://github.com/oam-dev/velad.git
cd velad
make
See more options here