Custom Installation/Upgrade
Upgrade
If you're trying to upgrade from a big version later (e.g. from 1.2.x to 1.4.x), please refer to version migration for more guides.
1. Upgrade CLI
- Script
- Homebrew
- Download directly from releases
- Docker
** MacOS/Linux **
curl -fsSl https://kubevela.io/script/install.sh | bash
Windows
Pre-release versions will not be listed.
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.
brew update
Then install KubeVela CLI
brew install kubevela
- Download the latest
velabinary file via release log. - Unzip the binary file, and configure the environment variables in
$PATH, and you're done.
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.
Pull the latest image from the docker registry, or specify a version as tag:
docker pull oamdev/vela-cli:latest
2. Upgrade Vela Core
Please make sure you already upgraded the Vela CLI to latest stable version.
vela install
3. Upgrade VelaUX
vela addon enable velaux
You can use advanced parameters provided by addons.
Uninstall
Before uninstalling kubevela, you must delete all applications and disable all addons.
- Uninstall VelaUX
vela addon disable velaux
- Uninstall KubeVela Core
vela uninstall
- Uninstall CRD
Before deleting, you must delete all CR resources.
kubectl get crd |grep oam | awk '{print $1}' | xargs kubectl delete crd
Certificates
From v1.10.10, vela-core makes its own serving certificates. When it starts, it creates a self-signed CA and the certificates for its admission webhooks and for the cluster-gateway, in the Secrets kubevela-vela-core-admission and kubevela-vela-core-cluster-gateway-tls-v2 (for a release named kubevela). It writes the CA into the webhook configurations and the cluster-gateway APIService, checks everything every minute, and renews a certificate 30 days before it expires. Releases before v1.10.10 ran kube-webhook-certgen Jobs instead; on upgrade vela-core reuses the Secrets those Jobs made, so the CA doesn't change.
helm install and helm upgrade keep the failurePolicy that is in the cluster. A tool that renders the chart without reading the cluster, such as Argo CD or helm template piped to kubectl apply, renders the webhooks with failurePolicy: Ignore. vela-core sets the configured policy (admissionWebhooks.failurePolicy, Fail by default) once its webhook server is up and puts it back within a minute when something changes it, but each sync or apply still drops it to Ignore for that minute, and Argo CD shows the Application out of sync. In Argo CD, ignore the field and keep syncs from writing it:
spec:
ignoreDifferences:
- group: admissionregistration.k8s.io
kind: ValidatingWebhookConfiguration
jqPathExpressions:
- .webhooks[]?.failurePolicy
- group: admissionregistration.k8s.io
kind: MutatingWebhookConfiguration
jqPathExpressions:
- .webhooks[]?.failurePolicy
syncPolicy:
syncOptions:
- RespectIgnoreDifferences=true
A Flux HelmRelease runs Helm against the cluster, so it keeps the live policy as helm upgrade does. If you turn on its drift detection, list the field under spec.driftDetection.ignore as JSON pointers, one per webhook: /webhooks/0/failurePolicy to /webhooks/6/failurePolicy on the ValidatingWebhookConfiguration, and /webhooks/0/failurePolicy and /webhooks/1/failurePolicy on the MutatingWebhookConfiguration.
Install KubeVela with cert-manager
You can use cert-manager instead, if it's available. Note that you need to install cert-manager before the KubeVela chart.
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set crds.enabled=true
Install kubevela with enabled certmanager:
vela install --set admissionWebhooks.certManager.enabled=true
Install Pre-release
# List all releases
vela version list -a
# Install the specified version.
vela install --version 1.3.0-beta.2
Install Kubectl Vela Plugin
kubectl-vela provides the same features with vela CLI, it helps you to integrate with kubectl better.
- Krew
- Script
- Install and set up Krew on your machine.
- Discover plugins available on Krew:
kubectl krew update
- install kubectl vela:
kubectl krew install vela
macOS/Linux
curl -fsSl https://kubevela.io/script/install-kubectl-vela.sh | bash
You can also download the binary from release pages ( >= v1.0.3) manually. Kubectl will discover it from your system path automatically.