Getting Started with VMware Event Broker 0.5.0 (VEBA) on Kubernetes

Deploying VMware Event Broker (VEBA) on Kubernetes for Event-Driven Automation

In this article, we will explore how to deploy the VMware Event Broker (VEBA) services within an existing Kubernetes (K8S) cluster and use it to add/edit custom attributes information to virtual machines. We will also update the deployment to be applicable to the new 0.5.0 release of VEBA, including support for Helm chart deployment.

Background and Requirements

VEBA stands for “VMware Event Broker Appliance”: a Photon OS based virtual machine, available in OVA format, with an embedded small K8S cluster to support the “VMware Event Broker” services. VEBA can listen for events in the VMware vCenter infrastructure and run specific tasks when filtered events occur, providing event-driven automation.

In this article, we will use an existing K8S cluster to support the “VMware Event Broker” services, but we will not use the appliance deployment method. Instead, we will use Helm charts to simplify the deployment process.

Prerequisites:

* An existing Kubernetes (K8S) cluster

* VMware vCenter infrastructure with custom attributes support

* VEBA 0.5.0 release or later

* Familiarity with Helm charts and K8S concepts

Deploying VEBA on Kubernetes

To deploy VEBA on K8S, we can use the official Helm chart provided by the VEBA team. Here are the steps to follow:

1. Install Helm on your system if it’s not already installed.

2. Clone the VEBA Helm chart repository using the following command:

“`bash

git clone https://github.com/vmware/veba-helm-chart.git

“`

3. Change into the cloned repository directory and run the following command to install the chart:

“`bash

helm install –name veba –namespace=veba vmware/veba-helm-chart

“`

4. Once the installation is complete, we can create a new namespace for our VEBA deployment:

“`yaml

kubectl create namespace veba

“`

5. Now we are ready to deploy our VEBA instance:

“`yaml

helm upgrade –namespace=veba veba vmware/veba-helm-chart

“`

6. To access the VEBA web interface, we can use the following command:

“`bash

kubectl port-forward service/veba 8080:8080 &

“`

7. Once the deployment is complete, we can check the status of our VEBA instance using the following command:

“`yaml

kubectl get pods -n veba

“`

8. Finally, we can create a new secret to store our local configuration:

“`yaml

kubectl create secret generic vc-config –from-literal=vc-username=,vc-password=

“`

Configuring Our Function

Now that we have deployed VEBA, we can configure our function to use the VMware custom attributes. We will need to create a new file named `custom-attributes.yaml` in the `functions` directory of our Helm chart repository:

“`yaml

apiVersion: event.beta.vmware.com/v1

kind: CustomAttributes

metadata:

name: my-custom-attribute

spec:

type: string

value: MyCustomAttributeValue

“`

This file defines a new custom attribute named `MyCustomAttribute` with the value `MyCustomAttributeValue`. We will need to add this file to our Helm chart repository so that it is included in our VEBA deployment.

Invoking Our Function

Now that we have deployed our VEBA instance and configured our function, we can invoke our function using the following command:

“`bash

faas-cli invocate –name my-function –namespace=veba

“`

This command will power on a VM in our vCenter infrastructure and populate the custom attribute `MyCustomAttribute` with the value `MyCustomAttributeValue`.

Conclusion

In this article, we have explored how to deploy VEBA on Kubernetes for event-driven automation. We have also updated the deployment to be applicable to the new 0.5.0 release of VEBA, including support for Helm chart deployment. With VEBA, we can easily add/edit custom attributes information to virtual machines in our VMware vCenter infrastructure, providing a powerful event-driven automation capability.