Needs More Capabilities?

KubeVela is programmable, it can be extended easily with definition. You have the following ways to discover and extend the platform.

Learn more built-in capabilities

There’re many out-of-box capabilities installed along with KubeVela controller, refer to the following links to learn more details:

Extend by Managing Addons

Installing addon from the community is also one of the most important way to discover more capabilities.

List Addons

KubeVela community has maintained a growing catalog of addons which will be synced to the default addon registry (https://addons.kubevela.net). You can use vela command line to list all available addons by:

  1. vela addon list

The command will show the basic addon info along with all available versions and installed versions.

  1. NAME REGISTRY DESCRIPTION AVAILABLE-VERSIONS STATUS
  2. rollout KubeVela Provides basic batch publishing capability. [1.3.0, 1.2.4, 1.2.3] disabled
  3. terraform KubeVela Terraform Controller is a Kubernetes Controller for Terraform. [1.0.6] disabled
  4. terraform-aws KubeVela Kubernetes Terraform Controller for AWS [1.0.1, 1.0.0] disabled
  5. dex KubeVela Enable dex for login [0.6.5] disabled
  6. fluxcd KubeVela Extended workload to do continuous and progressive delivery [1.1.0, 1.0.0] disabled
  7. velaux KubeVela KubeVela User Experience (UX). An extensible, application-oriented delivery and management Dashboard. [v1.3.0, v1.3.0-beta.2, 1.2.4] enabled (v1.3.0)
  8. terraform-alibaba KubeVela Kubernetes Terraform Controller for Alibaba Cloud [1.0.2, 1.0.1] disabled
  9. ...snip...

Install Addon

Install with CLI

The simplest command for installing one addon is:

  1. vela addon enable fluxcd

The expected output.

  1. I0111 21:45:24.553174 89345 apply.go:106] "creating object" name="addon-fluxcd" resource="core.oam.dev/v1beta1, Kind=Application"
  2. I0111 21:45:25.258914 89345 apply.go:106] "creating object" name="helm" resource="core.oam.dev/v1beta1, Kind=ComponentDefinition"
  3. I0111 21:45:25.342731 89345 apply.go:106] "creating object" name="kustomize-json-patch" resource="core.oam.dev/v1beta1, Kind=TraitDefinition"
  4. I0111 21:45:25.382201 89345 apply.go:106] "creating object" name="kustomize-patch" resource="core.oam.dev/v1beta1, Kind=TraitDefinition"
  5. I0111 21:45:25.411723 89345 apply.go:106] "creating object" name="kustomize" resource="core.oam.dev/v1beta1, Kind=ComponentDefinition"
  6. I0111 21:45:25.625815 89345 apply.go:106] "creating object" name="kustomize-strategy-merge" resource="core.oam.dev/v1beta1, Kind=TraitDefinition"
  7. I0111 21:45:25.660129 89345 apply.go:106] "creating object" name="component-uischema-helm" resource="/v1, Kind=ConfigMap"
  8. Addon: fluxcd enabled Successfully.

You can also install addons with some advanced flags.

Install addon with specified version

  • Choose one specific version by adding --version flag in this command. e.g:
  1. vela addon enable fluxcd --version=1.0.0
  • Choose specific clusters for installation. You can use --cluster flag to choose specific clusters. e.g:
  1. vela addon enable <addon-name> --clusters={cluster1,cluster2}

By default, the place for installation is specified as control plane cluster or managed cluster inside the metadata of addon.

  • Some addons support setting parts of parameter while enabling. For example velaux addon supports change image repository by setting repo parameter, then you can change the repo address to your own. e.g:
  1. vela addon enable velaux repo=<your repo address>

Air-Gapped Installation for Addon

If your cluster network cannot connect to the community addon registry you can:

  • build your custom addon registry. Please refer to Build your Own Registry for details.
  • enable an addon from a local directory. Example:
  1. $ tree velaux -L 1
  2. velaux
  3. ├── metadata.yaml
  4. ├── readme_cn.md
  5. ├── readme.md
  6. ├── resources
  7. ├── schemas
  8. └── template.yaml
  9. 2 directories, 4 files
  • Enable the addon from local directory.
  1. vela addon enable ./velaux

expected output

  1. Addon: velaux enabled successfully

Needs More Capabilities? - 图1caution

Please notice that, while an addon is being installed in a cluster, it maybe still need pull some images or Helm Charts. If your cluster cannot reach these resources please refer docs to complete installation without Internet access.

Install addon with UI Console

If you have installed VelaUX which is also one of the addon, you can manage it directly on the UI console with admin privileges.

addon list

In the addon list, you can get the status of the addon and other info. Click the addon name could open the addon detail page, you can get the version list, definitions provided by the addon, and the readme message.

addon detail

Select a version and deployed clusters, you can click the enable button to install this addon. You can check detail information in this section include:

  • Definitions: The extension capabilities provided by the addon may include component, trait, etc.
  • README: Addon description, explain the capabilities and related information.

Install addon by kubectl

When you want to deploy addon in the format of YAML or using kubectl instead of using vela CLI, you can render the yaml out by:

  1. vela addon enable velaux --dry-run

expected output

  1. apiVersion: core.oam.dev/v1beta1
  2. kind: Application
  3. metadata:
  4. creationTimestamp: null
  5. labels:
  6. addons.oam.dev/name: velaux
  7. addons.oam.dev/registry: KubeVela
  8. addons.oam.dev/version: v1.5.8
  9. name: addon-velaux
  10. namespace: vela-system
  11. spec:
  12. components:
  13. - name: apiserver
  14. properties:
  15. cmd:
  16. - apiserver
  17. - --datastore-type=kubeapi
  18. image: oamdev/vela-apiserver:v1.5.8
  19. ports:
  20. - expose: true
  21. port: 8000
  22. protocol: TCP
  23. traits:
  24. - properties:
  25. name: kubevela-vela-core
  26. type: service-account
  27. - properties:
  28. replicas: 1
  29. type: scaler
  30. type: webservice
  31. - dependsOn:
  32. - apiserver
  33. name: velaux
  34. properties:
  35. env:
  36. - name: KUBEVELA_API_URL
  37. value: apiserver.vela-system:8000
  38. exposeType: ClusterIP
  39. image: oamdev/velaux:v1.5.8
  40. ports:
  41. - expose: true
  42. port: 80
  43. protocol: TCP
  44. traits:
  45. - properties:
  46. replicas: 1
  47. type: scaler
  48. type: webservice
  49. status: {}
  50. ---
  51. apiVersion: v1
  52. data:
  53. ui-schema: '[{"jsonKey":"selector","sort":100,"uiType":"ComponentSelect"},{"jsonKey":"components","sort":101,"uiType":"ComponentPatches"}]'
  54. kind: ConfigMap
  55. metadata:
  56. creationTimestamp: null
  57. name: policy-uischema-override
  58. namespace: vela-system
  59. ... snip ...

You can install the addon by one command like:

  1. vela addon enable velaux --dry-run | kubectl apply -f -

Needs More Capabilities? - 图4caution

Use dry-run can render YAML results and you will also lose the validation such as vela-core version check, dependency, etc. Make sure the version you used can match to your Kubernetes clusters.

Get addon info

If you want to check the detail status of an addon, or get more available parameters and other useful info of an addon, you can use command addon status. For example:

  1. vela addon enable velaux --verbose

expected output

  1. velaux: disabled
  2. KubeVela User Experience (UX). An extensible, application-oriented delivery and management Dashboard.
  3. ==> Registry Name
  4. KubeVela
  5. ==> Available Versions
  6. [v1.4.3, v1.4.2, v1.4.0, v1.4.0-beta.2, v1.3.6, v1.3.4, v1.3.3, v1.3.2, ...]
  7. ==> Dependencies
  8. []
  9. ==> Parameters
  10. -> dbType: Specify the database type, current support KubeAPI(default) and MongoDB.
  11. default: "kubeapi"
  12. required:
  13. -> dbURL: Specify the MongoDB URL. it only enabled where DB type is MongoDB.
  14. -> gatewayDriver: Specify the gateway type.
  15. default: "nginx"
  16. required:
  17. -> imagePullSecrets: Specify the names of imagePullSecret for private image registry, eg. "{a,b,c}"
  18. -> serviceType: Specify the service type.
  19. default: "ClusterIP"
  20. required:
  21. -> database: Specify the database name, for the kubeapi db type, it represents namespace.
  22. -> dex: Specify whether to enable the dex
  23. default: "false"
  24. required:
  25. -> domain: Specify the domain, if set, ingress will be created if the gateway driver is nginx.
  26. -> repo: Specify the image hub of velaux, eg. "acr.kubevela.net"
  27. -> serviceAccountName: Specify the serviceAccountName for apiserver
  28. default: "kubevela-vela-core"
  29. required:

As above shows, these infos contain the available parameters, available versions, dependent addons and description of and addon.

Discover the capabilities installed

Needs More Capabilities? - 图5tip

Once addon installed, end user can discover and use these capabilities immediately.

  • Generally, end user can list the new component or trait types added by vela component or vela trait. Refer to Lifecycle of a Definition for more usage details.

  • You can also check the capability details of community addon docs.

Uninstall Addon

Needs More Capabilities? - 图6danger

Please make sure the addon along with its capabilities is no longer used in any of your applications before uninstalling it.

  1. vela addon disable fluxcd

expected output

  1. Successfully disable addon:fluxcd

Manage Addon Registry

You can also manage the addon registries, such as adding/deleting your private addon registry. Let’s take the experimental community registry as example.

  • List your current registries
  1. vela addon registry list

expected output

  1. Name Type URL
  2. KubeVela helm https://addons.kubevela.net
  • Add a new registry
  1. vela addon registry add experimental --type=helm --endpoint=https://addons.kubevela.net/experimental/

expected output

  1. Successfully add an addon registry experimental
  • Delete one registry
  1. vela addon registry delete experimental

expected output

  1. Successfully delete an addon registry experimental
  • Build custom registry

    You can use ChartMuseum to build your custom addon registry. We have a ChartMuseum addon available. Please refer to Build your Own Registry for details.

Make your own addon

If you’re a system infra or operator, you can refer to extension documents to learn how to make your own addon and registry, including extend cloud resources by addon.

Needs More Capabilities? - 图7tip

Here’s a blog introduces how to build addon from scratch using redis operator as example, you can read it as an end to end tutorial!

Extend KubeVela as a Developer

If you’re extremely interested in KubeVela, you can also extend more features as a developer.

Welcome to join the KubeVela community! We’re eager to see you to contribute your extension.