Skip to main content
Version: Next

Want More?

Traits in KubeVela are designed as modularized building blocks, they are fully customizable and pluggable.

1. Get from capability canter#

KubeVela allows you to explore capabilities maintained by platform-engineers. There are two commands in kubectl vela plugin: comp and trait.

In case you haven't installed kubectl vela plugin: see this.

1. list#

For example, let's try to list all available traits in registry:

$ kubectl vela trait --discover
Showing traits from registry:
service-account default [webservice worker]
env default [webservice worker]
flagger-rollout default [webservice]
init-container default [webservice worker]
keda-scaler default [deployments.apps]
metrics default [webservice backend task]
node-affinity default [webservice worker]
route default [webservice]
virtualgroup default [webservice worker]

Note that the --discover flag means show all traits not in your cluster.

2. install#

Then you can install a trait like:

$ kubectl vela trait get init-container
Installing component capability init-container
Successfully install trait: init-container


$ kubectl get traitdefinition -n vela-system
init-container ["webservice","worker"] add an init container with a shared volume.
...(other trait definitions)

By default, the two commands will retrieve capabilities from repo maintained by KubeVela.

2. Designed by yourself#

Check this documentation about how to design and enable your own traits in

KubeVela platform.

Last updated on by Wei (段少)