💡
Hey — It's Sandip Das 👋

Let's learn about KubeVela, which abstracts the complexity of Kubernetes while enabling consistent, multi-cloud application delivery, making deployments faster and more reliable.

It also integrates seamlessly with GitOps and modern workflows, helping teams scale operations, enforce best practices, and focus more on business logic than infrastructure plumbing.

⚡ Quick Reference

Keep the momentum going — everything you need on LearnXOps in one place:


What is KubeVela?

KubeVela is a modern application delivery platform that simplifies deploying and managing microservices on Kubernetes. It builds on the Open Application Model (OAM) to provide an application-centric, developer-friendly experience, with extensible components and traits for things like scaling, routing, and multi-environment deployments.

Why KubeVela?

KubeVela provides an application‑centric abstraction over Kubernetes. It lets platform teams define reusable capabilities (via definitions) and lets application teams compose those capabilities declaratively (via a single Application spec), with built‑in workflows, policies, and multi‑cluster support.

KubeVela Architecture

1) Application (The contract developers write)

A single YAML that declares what to run, where, and how to operate it.

Key fields:

  • spec.components[]: one or more components
  • spec.policies[]: topology, override, garbage-collect and other policy types
  • spec.workflow: orchestrated steps referencing policies/targets

Hello‑web example:

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: hello-web
spec:
  components:
    - name: web
      type: webservice           # a ComponentDefinition provided by the platform
      properties:
        image: ghcr.io/acme/hello:1.0.0
        ports:
          - port: 8080
      traits:
        - type: scaler            # built-in trait: sets the replica count
          properties:
            replicas: 2
        - type: gateway           # ingress/route trait
          properties:
            domain: hello.example.com
            http:
              "/": 8080             # path → container port
  policies:
    - name: prod-placement
      type: topology
      properties:
        clusters: ["prod-cluster-a"]
  workflow:
    steps:
      - name: deploy
        type: deploy
        properties:
          policies: ["prod-placement"]

2) Definitions (Reusable capabilities)

Definitions are CRDs authored by platform engineers that expose opinionated, safe interfaces.

  • ComponentDefinition → describes a workload template (Deployment/StatefulSet/Job/Helm chart/Terraform module, etc.)
  • TraitDefinition → operational concerns (autoscaling, rollout, gateway, monitoring)
  • WorkflowStepDefinition → custom workflow steps (notifications, webhooks, custom checks)
  • PolicyDefinition → reusable policies (placement, per-environment overrides, garbage collection)

Example: ComponentDefinition (webservice)

apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
  name: webservice
spec:
  workload:
    definition:
      apiVersion: apps/v1
      kind: Deployment
  schematic:
    cue:
      template: |
        output: {
          apiVersion: "apps/v1"
          kind:       "Deployment"
          metadata: name: context.name
          spec: {
            replicas: parameter.replicas
            selector: matchLabels: app: context.name
            template: {
              metadata: labels: app: context.name
              spec: containers: [{
                name:  context.name
                image: parameter.image
                ports: [{containerPort: parameter.ports[0].port}]
              }]
            }
          }
        }
        parameter: {
          image: string
          replicas: *1 | int
          ports: [{port: int}]
        }

Example: TraitDefinition (gateway)

apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
  name: gateway
spec:
  appliesToWorkloads:
    - deployments.apps
  schematic:
    cue:
      template: |
        outputs: route: {
          apiVersion: "networking.k8s.io/v1"
          kind:       "Ingress"
          metadata: name: context.name + "-ing"
          spec: {
            rules: [{
              host: parameter.domain
              http: paths: [{
                path: "/"
                pathType: "Prefix"
                backend: service: {
                  name: context.name
                  port: number: 8080
                }
              }]
            }]
          }
        }
        parameter: {
          domain: string
          http:   *true | bool
        }

3) Workflow Engine (Delivery orchestration)

  • Declarative steps run in order: deploy, suspend (manual approval), apply-component, step-group, notification, webhook and more
  • Conditions (if), step groups, inputs/outputs between steps and timeouts; rollback returns to an earlier ApplicationRevision
  • Integrates with policies for placement and rollout strategies

Simple deploy → approve → promote, using built-in step types (canary traffic shifting needs the Kruise Rollout addon):

spec:
  workflow:
    steps:
      - name: deploy-staging
        type: deploy
        properties:
          policies: ["staging"]      # topology policy targeting the staging cluster/namespace
      - name: manual-approval
        type: suspend               # pauses until someone runs: vela workflow resume <app>
      - name: deploy-prod
        type: deploy
        properties:
          policies: ["prod"]

4) Policies (Placement, health, rollout)

Policies are referenced by the workflow/renderer to decide where and how to place resources.

Common policy types:

  • topology – choose the clusters and namespaces to deploy to
  • override – change component properties or traits per environment
  • garbage-collect, apply-once, shared-resource – control how resources are cleaned up, re-applied or shared

5) Controllers, Revisions & Resource Tracking

  • Application Controller – renders definitions, applies manifests, manages status
  • ResourceTracker – records all resources owned by an Application for safe GC and drift detection
  • ApplicationRevision – immutable snapshot of an Application at a point in time; enables rollback & audit
  • Garbage Collector – prunes orphaned/old resources safely (revision‑aware)

6) Addon System

KubeVela can be extended via add‑ons (Helm/CUE packages). Examples: KEDA, Kruise Rollout, FluxCD, Terraform, Observability stack. Add‑ons usually introduce new Definitions and Workflow steps.

7) Tooling

  • Vela CLI – vela up, vela ls, vela status, vela show, vela logs, vela exec, vela port-forward
  • VelaUX (optional) – graphical topology, release view, logs/metrics integrations

How It All Fits Together

Sequence of vela up: the CLI creates the Application through the Kubernetes API, vela-core reads the definitions, renders them with CUE, records an ApplicationRevision, runs the workflow, applies Deployments, Services and Ingresses, updates the ResourceTracker and writes the Application status that vela status reads back.

In short:

  • Application – The app spec authored by developers; references components/traits/policies/workflow.
  • Component – A unit of workload created by a ComponentDefinition (e.g., web service, worker).
  • Trait – Operational feature attached to a component (e.g., scaler, gateway, rollout).
  • Workflow – Orchestrated set of steps controlling deployment and operations.
  • Policy – Reusable rules for placement, per-environment overrides and garbage collection.
  • Definition – Platform‑authored CRD encapsulating templates and interfaces.
  • ApplicationRevision – Versioned snapshot enabling rollback/audit.
  • ResourceTracker – Tracks owned resources for lifecycle & GC.
  • Addon – Packaged set of capabilities (definitions + dependencies).

KubeVela CLI (vela) Quick Reference

# List installed component and trait types
vela component
vela trait

# Inspect a capability/definition
vela show webservice

# Apply an application
vela up -f app.yaml

# Get status & topology
vela status hello-web

# List apps and revisions
vela ls
vela revision list hello-web

# Roll back to the last successful revision
vela workflow rollback hello-web

Now, let's go hands-on with KubeVela. We will use a local Kubernetes cluster created with KinD:

kind create cluster --name vela-demo

kubectl get nodes

Expected output:

NAME                      STATUS   ROLES           AGE   VERSION
vela-demo-control-plane   Ready    control-plane   24s   v1.32.2

Installing the KubeVela CLI (vela)

First, install the KubeVela CLI (vela). It installs KubeVela into the cluster and manages applications. On Linux or macOS, you can install it with the convenience script:

curl -fsSL https://kubevela.io/script/install.sh | bash

Expected output:

vela installed into /usr/local/bin successfully.
CLI Version: 1.10.3
Core Version:
GitRevision: git-ef9b6f3c
GolangVersion: go1.23.8

Installing KubeVela in the Cluster

vela install

This will install the KubeVela control plane components into the cluster. You’ll see the CLI applying various resources. Wait for the process to finish with a success message. For example, the output should end with:

KubeVela control plane has been successfully set up on your cluster.
If you want to enable dashboard, please run "vela addon enable velaux"

Enable the KubeVela Dashboard (VelaUX)


KubeVela provides an optional GUI called VelaUX. To install it, you can enable the addon:

vela addon enable velaux

This will deploy the VelaUX service (which you can later access via NodePort or port-forward). This step is not required for using KubeVela via CLI, but it offers a nice web interface.

vela port-forward -n vela-system addon-velaux 8000:8000

This will look like this:

Deploying a Sample Web Application with KubeVela

Let’s deploy a simple web application to demonstrate how KubeVela works. We will use KubeVela’s OAM Application CRD to define our app. KubeVela allows you to declare an application with one or more components (each component is like a microservice or workload) and attach traits (operational characteristics like scaling or networking) to them.

Define the Application

Create a YAML file (e.g., webservice-app.yaml) with the following content:

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: webservice-app
spec:
  components:
    - name: frontend                # Component name
      type: webservice              # Workload type (built-in) for long-running services
      properties:
        image: oamdev/testapp:v1    # Container image to deploy
        cmd: ["node", "server.js"]  # (Optional) command to run in container
        ports:
          - port: 8080
            expose: true           # Expose this port outside the cluster
        exposeType: NodePort       # Use NodePort service to expose (for local cluster)
        cpu: "0.5"                 # Request 0.5 CPU
        memory: "512Mi"            # Request 512 MiB of memory
      traits:
        - type: scaler
          properties:
            replicas: 1           # Run 1 replica of the frontend

Let’s break down what this configuration means:

  • We define an Application named webservice-app. Under spec.components, we have one component called frontend.
  • Component type is webservice – a built-in component type in KubeVela for deploying a long-running service (it will create a Deployment behind the scenes). We provide properties for this component:
    • image: the Docker image to run (here we use a sample Node.js app image oamdev/testapp:v1 provided by KubeVela).
    • cmd: the start command for the container (optional, override the image’s default command).
    • ports: we expose port 8080 from the container. Setting expose: true tells KubeVela to create a Service for this component. We also specify exposeType: NodePort to make it accessible outside the cluster (useful since this is a local KinD cluster without LoadBalancer). By default, if you expose a port in a KubeVela webservice, it creates a Service (ClusterIP by default) for internal access; specifying NodePort or LoadBalancer changes how it’s exposed externally.
    • cpu and memory: resource requests for the container (optional, for demonstration).
  • Traits: We attach a scaler trait to the component. This built-in trait allows scaling the number of replicas. We set replicas: 1 for now (one instance).

Overall, this application will deploy a single-container web service. It will be exposed via a NodePort service on the cluster, and we can scale it with the scaler trait. (There are many other traits available, such as ingress for domain routing, autoscaling, etc., but we keep it simple here.)

Deploy the Application

Now deploy this application using the KubeVela CLI:

vela up -f webservice-app.yaml

Expected output:

vela up -f webservice-app.yaml

Applying an application in vela K8s object format...
✅ App has been deployed 🚀🚀🚀
    Port forward: vela port-forward webservice-app
             SSH: vela exec webservice-app
         Logging: vela logs webservice-app
      App status: vela status webservice-app
        Endpoint: vela status webservice-app --endpoint
Application /webservice-app applied.

Verify the Deployment

Once vela up succeeds, check that the application’s components are running:

  • Check pods: Use kubectl get pods -n default (assuming the app deployed to the default namespace) to see the pod created. It should show a pod for the frontend component (e.g., frontend-xxxx with status Running).
  • Check application status: Run vela status webservice-app. This will show the status of the Application, including components and traits. For example, you should see that frontend is Healthy with 1/1 Ready replicas and the scaler trait applied
  • Access the application: Since we exposed the frontend via NodePort, we can access it. With KinD, the NodePort is accessible on the host (through the KinD node’s port). Easiest way is to use the vela port-forward command, which will port-forward and open the app in your browser:
vela port-forward webservice-app -n default 8080:8080

This forwards port 8080 from the cluster to localhost:8080. After running this, you can open http://127.0.0.1:8080 in your browser. You should see the sample app's response (for the oamdev/testapp:v1 image, it’s a simple web page or message).

(Alternatively, you could get the NodePort number via vela status webservice-app --endpoint to see the assigned port, but port-forward is simpler for local use.)

You have now deployed your first application with KubeVela! Next, we’ll see how to manage it and other microservices via KubeVela’s features.


Managing Microservices with KubeVela (Scaling, Updating, etc.)

One of the key benefits of KubeVela is making day-2 operations (like scaling, updates, and configuration changes) straightforward and consistent across microservices. Here are common management tasks and how to perform them in KubeVela:

  • Scaling Up/Down: To scale a component, you adjust its scaler trait (replicas count) and reapply the application. For example, to scale our frontend component to 3 replicas, edit the Application YAML and change the scaler trait properties to replicas: 3. Then run vela up -f webservice-app.yaml again. KubeVela will detect the change and update the underlying Deployment to 3 replicas (Kubernetes will do a rolling scale-up). In the KubeVela UI, the Set Replicas trait can be adjusted and then you click deploy to apply the change. After scaling, vela status will show the component has 3/3 Ready replicas.
  • Rolling Updates (Updating an Application): Updating a microservice (for example, deploying a new version of an image) is as simple as changing the component properties and re-applying. If you have a new image tag for your service, update the image field in the Application spec and run vela up again. KubeVela will orchestrate the update on Kubernetes (which typically means a rolling update for Deployment-type components). This way, developers can push a new version by editing a single line in the app config, without worrying about Kubernetes Deployment details. In the VelaUX console, you would edit the component’s image or environment variables in the “Baseline Config” and deploy the changes.
  • Environment Variables and Config: You can manage config for your microservices by specifying environment variables in the Application YAML. For example, you might add an env section under a component’s properties to set database connection strings or feature flags. KubeVela supports referencing Kubernetes Secrets or ConfigMaps via env.valueFrom as well. This means you can externalize sensitive info and still deploy through the same app definition.
  • Observing Logs and Health: KubeVela CLI provides shortcuts to get logs and exec into pods. For instance, vela logs <app-name> will fetch logs from all components of the app (you can specify a component if needed). vela exec <app-name> opens a shell into a running container (useful for debugging). These commands wrap kubectl functionalities, scoping them to your application. Additionally, vela status <app> gives a high-level health summary of the application and its services.
  • Autoscaling and Advanced Traits: KubeVela can integrate with Kubernetes HPA or KEDA for autoscaling. You could attach an autoscaler trait to a component (if provided), or use KEDA through an addon. For example, the KubeVela docs demonstrate integrating KEDA to auto-scale based on metrics. This is more advanced, but know that KubeVela’s trait mechanism is very extensible – you can add traits for canary releases, ingress routing, circuit breakers, etc., as needed.
  • Deleting an Application: To remove an app, you can delete the Application object and let KubeVela clean up the resources. For example, kubectl delete application webservice-app (in the correct namespace) will remove the app and all associated components it created. In VelaUX, you’d use the “Recycle” (undeploy) button on each environment, then delete the app. KubeVela by default handles garbage collection of resources when an application is deleted or updated (outdated resources are recycled once new ones are confirmed healthy).

Use Cases of KubeVela in Microservices Management

KubeVela’s flexibility and higher-level abstractions make it useful in various microservices scenarios. Here are some realistic use cases and capabilities it provides for microservice management:

  • Internal Developer Platforms & Separation of Concerns: Platform engineers can use KubeVela to create a PaaS-like experience for developers. They define reusable components and traits (possibly using CUE or Helm under the hood), abstracting away Kubernetes complexity. Application developers then simply declare which components (microservices, databases, etc.) they need and apply traits without needing deep Kubernetes knowledge. This separation of duties allows an architectural team to encode best practices (e.g., how a “frontend service” or “backend service” is configured) while the dev team focuses on code and high-level config.
  • Multi-Environment Deployments (Dev/Stage/Prod): KubeVela natively supports deploying applications to multiple environments or clusters. You can define policies like topology policies that specify target clusters/namespaces for an app. For example, you might deploy the same app to a “dev” namespace and a “prod” namespace with different sizing. KubeVela workflows can even pause for approvals between promoting to environments (a suspend step, as in the workflow example above). This makes managing multi-stage deployments easier and less error-prone.
  • Multi-Cluster & Hybrid Cloud Management: In a multi-cluster scenario, KubeVela can orchestrate deployments across clusters from one control plane. It treats multiple Kubernetes clusters as targets and can place components accordingly using policies (e.g., deploy service A to cluster1 and service B to cluster2). This is useful for hybrid cloud or edge scenarios where parts of a microservice system run in different locations. KubeVela is essentially a control plane that can coordinate workloads in many clusters/environments from one Application definition.
  • Progressive Delivery (Canary/Blue-Green Deployments): With the Kruise Rollout addon, KubeVela supports canary and blue-green style rollouts to release updates safely. You attach a rollout trait to a component and the new version receives traffic in steps, with pauses you resume or checks you configure. Once the addon is enabled, you declare the strategy in the Application instead of scripting it.
  • GitOps and Continuous Delivery: KubeVela works in tandem with GitOps tools like Argo CD or Flux, and its FluxCD addon lets KubeVela itself watch Git repositories for app configurations. A common pattern is to store your Application manifests in Git and let the FluxCD addon (or Argo CD) apply changes automatically; VelaUX pipelines can add multi-step delivery on top. Developers commit code or config, and the running clusters follow the Git state. The workflow also handles ordering, for example deploying a database before the services that depend on it.
  • Auto-Scaling and Self-Healing Microservices: With traits and addons, KubeVela can integrate tools like KEDA (for event-driven autoscaling) or the observability addon for monitoring. This means you can declare in your app that a service should scale based on a queue length or CPU usage, and KubeVela hooks into the Kubernetes autoscaler or KEDA to make it happen. Similarly, you could declare health checks and recovery policies at the application level (though under the hood Kubernetes handles the actual restarting of failed pods, etc.). KubeVela’s rich trait ecosystem (including community addons) covers a wide range of operational needs.
  • Including Cloud Services & Databases: Microservices often rely on cloud resources like databases, message queues, or caches. KubeVela can manage those too, via addons like the Terraform addon or Crossplane integration. In practice, this means you can define an Application that not only deploys your microservice containers but also provisions (or references) cloud services. For example, a Terraform component could create an AWS RDS database and output its connection info to be consumed by a microservice component. KubeVela treats cloud resources as components in the app model, enabling truly full-stack deployments with one description.

Example Use Case:
Deploying a Multi-Tier Web Application with KubeVela

To tie everything together, let's walk through a detailed example: deploying a multi-tier web application using KubeVela on our KinD cluster. Suppose we have a simple web system with three tiers:

  • Frontend – a user-facing web server (e.g., an Nginx serving a React app or static pages).
  • Backend API – an application server providing APIs (e.g., a Node.js or Python service).
  • Database – a database service (for demo purposes, we can use Redis or MySQL).

We will deploy all three components as part of one Application, showcasing how KubeVela handles multiple services and their configuration.

Application Specification for Multi-Tier App

Create a file multi-tier-app.yaml with the following content:

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: my-multi-tier-app
spec:
  components:
    # 1. Frontend component (Web UI)
    - name: frontend
      type: webservice
      properties:
        image: nginx:stable       # Use an Nginx server for front-end
        ports:
          - port: 80
            expose: true
        exposeType: NodePort      # Expose front-end via NodePort (for external access)
      traits:
        - type: scaler
          properties:
            replicas: 1

    # 2. Backend component (API service)
    - name: backend
      type: webservice
      properties:
        image: oamdev/hello-world        # Sample backend API (Node.js Hello World)
        ports:
          - port: 8000
            expose: true
        exposeType: ClusterIP            # Internal service only (ClusterIP)
        env:
          - name: REDIS_HOST
            value: redis.default.svc.cluster.local:6379  # Backend would use this to connect to Redis
      traits:
        - type: scaler
          properties:
            replicas: 1                 # Start with 1 replica (can scale later)

    # 3. Database component (Redis cache/database)
    - name: redis
      type: webservice
      properties:
        image: redis:8-alpine    # Redis in-memory data store
        ports:
          - port: 6379
            expose: true          # ClusterIP Service (the default exposeType); without expose, no Service is created
      traits:
        - type: scaler
          properties:
            replicas: 1          # Single instance of Redis

Let me explain what’s happening here:

  • We have defined three components under one Application: frontend, backend, and redis. This means KubeVela will deploy three workloads and manage them together as one application.
  • Frontend: Uses the nginx:stable image. We open port 80 and set expose: true with NodePort, so the Nginx service will be accessible from outside the cluster on a NodePort. We attach a scaler trait with 1 replica. (In a real scenario, this could be a container serving a web UI. Here Nginx will just serve the default page, which is fine for demonstration.)
  • Backend: Uses a sample image oamdev/hello-world (which is a simple Node.js app listening on port 8000). We expose port 8000 but only internally (notice exposeType: ClusterIP). This means the backend gets a ClusterIP Service for in-cluster communication, but it’s not exposed outside. The frontend could call this service internally if it were programmed to. We also illustrate setting an environment variable REDIS_HOST for the backend, pointing to the Redis service’s address in the cluster (following the pattern serviceName.namespace.svc.cluster.local:port). This shows how you can wire components together (the backend knows how to reach Redis via this DNS name). We keep 1 replica for now via the scaler trait.
  • Redis: Uses the official Redis Alpine image on port 6379. A webservice only creates a Service for ports marked expose: true, so we set it without an exposeType, which gives a ClusterIP Service named redis that is reachable only inside the cluster. We also scale it to 1 (databases typically aren’t scaled out without special clustering, but we include the trait for completeness). In real use, one might use a StatefulSet for a database, but to keep things simple we treat it as a single Deployment pod.

Deploying the Multi-Tier Application

Ensure your KinD cluster is running and KubeVela is installed (from earlier steps). Then deploy the app:

vela up -f multi-tier-app.yaml

Watch the output as KubeVela creates the application. It will create three components. Once it says “App has been deployed”, verify all components are running:

  • Run kubectl get deploy,pods,svc -n default to see the Kubernetes Deployments, Pods, and Services created. You should see deployments for frontend, backend, and redis. Each should have 1/1 replicas available (check kubectl get deploy). You should also see Services:
    • A NodePort Service for frontend (with a NodePort number on port 80).
    • A ClusterIP Service for backend (port 8000).
    • A ClusterIP Service for redis (port 6379).

For example, below is a sample output:

NAME         TYPE        CLUSTER-IP      PORT(S)          ...  
backend      ClusterIP   10.96.123.45    8000/TCP         ...
frontend     NodePort    10.96.150.21    80:30081/TCP     ...  <- NodePort 30081 in this example
redis        ClusterIP   10.96.200.10    6379/TCP         ...

(Your IPs and NodePort will vary.) The frontend NodePort (e.g., 30081) is the port you can use on localhost to hit the Nginx server. The backend and redis have internal IPs only.

  • Run vela status my-multi-tier-app for a summary. It should list all three components, their type, and health. KubeVela knows these three components are part of one application. If one component fails (e.g., CrashLoopBackoff), the application status will reflect it.

Testing the Application

  • Frontend: Access the frontend in your browser. Since we have a NodePort, you can do a quick port-forward for convenience:
    kubectl port-forward svc/frontend 8080:80 &
    Then browse to http://localhost:8080. You should see the default Nginx welcome page. (If you prefer, you could also use the NodePort directly: find the NodePort number from the kubectl get svc output and open http://127.0.0.1:<NodePort>).
  • Backend: The backend isn’t exposed externally, but we can call it from inside the cluster. The nginx image used by the frontend includes curl, so exec into the frontend pod:
    kubectl exec deploy/frontend -- curl -s http://backend:8000/
    With oamdev/hello-world you get a hello world page back. The point is that the DNS name backend (or backend.default) resolves to our backend service, proving internal connectivity. Similarly, redis.default resolves to Redis, which the backend would reach through the REDIS_HOST env we set.

🧠 Final Thoughts

We have set up KubeVela on a local KinD cluster, deployed a sample application, and explored how to manage microservices (scaling, updating, multi-component apps) through KubeVela. This powerful yet user-friendly tool abstracts Kubernetes primitives into an application-centric model.

It enables platform engineers and developers alike to define and deliver microservices in a consistent way, whether deploying a simple web service or a complex multi-tier application across clouds.


⚡ Quick Reference

Keep the momentum going — everything you need on LearnXOps in one place:

Share this post