Deploy TrustyAI Service
TrustyAI Service (TAS) deploys alongside KServe models and collects their inference data, which is
what drift detection and bias metrics are computed from. This page creates the TrustyAIService
resource; for ingesting data and registering metrics against it, see
Bias and Drift Monitoring in the Monitor chapter.
Prerequisites
- TrustyAI Operator installed (see Install TrustyAI).
- If
storage.format: DATABASEis used, a MySQL 8.x database is required. - If
storage.format: PVCis used, ensure the cluster has a working defaultStorageClass(backed by a CSI driver) for dynamic volume provisioning, so the operator-created PVC can be bound.
Deploy TrustyAIService
Choose one storage layout: DATABASE (MySQL) or PVC (local file storage on a volume). The following two subsections are alternatives, not steps in a single flow.
DATABASE mode
MySQL credentials Secret
Create a secret that contains the keys required for the TAS deployment when using storage.format: DATABASE:
Notes:
- The MySQL schema (database) referred to by
databaseNamemust be created in advance. TAS does not create the database itself. - The database must be reachable from the TAS pod.
databaseGenerationcontrols how schema changes are handled when TAS starts.
TrustyAIService CR
Example:
In DATABASE mode, storage.databaseConfigurations must be set to the name of the MySQL credentials Secret created above in the same namespace as the TrustyAIService.
metadata.annotations are optional and are used to let the operator create a ServiceMonitor for Prometheus scraping (so the platform can automatically collect monitoring data).
- When
trustyai.cpaas.io/monitor-enable: "true"is set, the operator generates aServiceMonitor. trustyai.cpaas.io/monitor-intervalandtrustyai.cpaas.io/monitor-metric-regexare optional; when not provided, the operator uses default values.
trustyai.cpaas.io/monitor-interval controls how frequently Prometheus scrapes TAS metrics (default: 30s).
trustyai.cpaas.io/monitor-metric-regex controls which metric names are kept after scraping (default: ^trustyai_.*).
spec.metrics fields:
schedule(required): how often TAS runs the metric computation (for example, every5s). The value is a duration string.batchSize(optional): how many inference records TAS includes in each metric computation run (a larger value uses more data per run). If not set, the operator uses a default value of5000.
PVC mode
Use this path when storage.format is PVC (no MySQL Secret). Example:
In PVC mode:
storage.folder: the path inside the mounted PVC where TAS stores and reads its data.storage.size: the requested PVC capacity (for example,1Gi).- The operator creates a PVC named
<tas-name>-pvcautomatically in the same namespace as theTrustyAIService. Since the PVC uses the cluster defaultStorageClass(no explicitstorageClassNameis set), the cluster should provide a working defaultStorageClass(otherwise the PVC may stay inPending).
When the TrustyAIService manifest for the chosen mode is ready, apply it (the same command applies to DATABASE or PVC YAML):
Verify deployment readiness
The expected status.phase should be Ready.
Also check the pods:
Next
With the service Ready, continue with Bias and Drift Monitoring
to ingest reference and live inference data, register drift and bias metrics, and expose them to Prometheus.