TrustyAI operator
The TrustyAI Kubernetes Operator aims at simplifying the deployment and management of the TrustyAI service, LM-Eval and EvalHub on Kubernetes and OpenShift clusters by watching for custom resources in the trustyai.opendatahub.io API group and managing the deployments, services, and optionally, routes and ServiceMonitors corresponding to these resources.
The operator ensures the service is properly configured, is discoverable by Prometheus for metrics scraping (on both Kubernetes and OpenShift), and is accessible via a Route on OpenShift. It also sets the network policy posture of everything it deploys; see Network Policies for what that means in practice.
What the operator manages
The operator is delivered in two parts. The module operator is installed once per cluster and renders the manifests for the workload operator, which then reconciles the individual resources:
| Custom resource | Creates | Notes |
|---|---|---|
|
|
The fairness, drift and explainability API described in TrustyAI service. |
|
One evaluation |
Benchmark runs driven by LM-Eval. |
|
API and MCP `Deployment`s with their `Service`s and `Route`s |
The evaluation platform described in EvalHub. |
Every one of those workloads is selected by a NetworkPolicy the operator owns, so a cluster running with a default-deny baseline still works. The rules are described in Network Policies.
Installation
OpenShift installation
Please refer to the Installing on Open Data Hub page.
Kubernetes installation
|
TrustyAI’s operator is designed and supported for OpenShift. Although not officially supported, it is however possible to install it on Kubernetes with a few modifications. |
TrustyAI Service
If installing the TrustyAI operator in Kubernetes, you will need to create the secrets necessary for each TrustyAI’s service authenticated Service.
OpenShift will automatically create the required secrets for you, whereas in Kubernetes you will need to create them manually.
Assuming you have the TrustyAI operator already installed and wanted to install a TrustyAI service, called $TRUSTYAI_SERVICE in an already existing namespace $NAMESPACE, you’ll need to:
-
(Optional) If you don’t have the certificate and key in a file, you can create them (just an example):
openssl req -x509 -newkey rsa:4096 \ -keyout trustyai.pem \ -out trustyai.pem \ -days 365 -nodes \ -subj "/CN=$TRUSTYAI_SERVICE" \ -addext "subjectAltName=DNS:$TRUSTYAI_SERVICE.$NAMESPACE.svc,DNS:$TRUSTYAI_SERVICE.$NAMESPACE.svc.local" -
Create the secrets in the destination namespace, one for each service (
${TRUSTYAI_SERVICE}-tlsand${TRUSTYAI_SERVICE}-internal):kubectl create secret tls ${TRUSTYAI_SERVICE}-tls \ --cert=trustyai.pem \ --key=trustyai.pem \ --namespace $NAMESPACE kubectl create secret tls ${TRUSTYAI_SERVICE}-internal \ --cert=trustyai.pem \ --key=trustyai.pem \ --namespace $NAMESPACE
The TrustyAI service can now be created as usual.