This step will explore different methods to create a basic KubeVela local environment. The recommended path relies on Kind, while it is also possible to install it with VelaD. Alternatively, you may try Napptive to deploy simple OAM applications.
To start, let's create a kind cluster named kubevela.
kind create cluster --config=installation/basic_cluster/kind_basic_cluster_config.yaml --name=kubevela
kubectl --context kind-kubevela wait --for=condition=Ready nodes --all --timeout=600s
Next, install KubeVela using the official Helm chart.
helm repo add kubevela https://charts.kubevela.net/core
helm repo update
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wait
Once KubeVela has been installed, install an ingress controller for the tests.
kubectl --context kind-kubevela apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl --context kind-kubevela wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
Once everything is installed, we will check the state of the installation with:
kubectl --context kind-kubevela get nodes
kubectl --context kind-kubevela -n vela-system get pods
Finally, let's install the Vela CLI tool. Notice that the tool may require root permissions to copy the binary. For other installation methods, check the official documentation.
curl -fsSl https://kubevela.net/script/install.sh | bash
Once the CLI is available, you should be able to perform OAM related operations such as obtaining the list of available component definitions.
vela comp
Once you no longer require the development cluster, you can delete it with:
kind delete cluster --name=kubevela
VelaD is a lightweight tool to deploy KubeVela, and that relies on K3s. The tool is in active development, and the resulting cluster may be used for the initial part of the tutorial. It is not recommended for the multi-cluster deployment section as it will require reconfiguring the networking.
To install the tool, use the following command. Notice that it may ask for root privileges to install the binary. Check the official documentation for more information.
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash
Once VelaD is installed, you can create a cluster with:
velad install
To access the cluster, export the kubeconfig with:
export KUBECONFIG=$(velad kubeconfig --host)
After that, you will be able to check the installation as in the alternative Kind approach with the following commands. If the vela
CLI is not available refer to the alternate steps to install it.
kubectl get nodes
vela comp
Once the cluster is no longer required, you can delete it with:
velad uninstall