Skip to main content
This cookbook covers the complete setup of the ChatCLI AIOps platform for a real production environment — from installation to validation with chaos engineering.

Prerequisites

  • [x]Kubernetes cluster 1.25+- [x]Helm 3.x installed- [x]Prometheus Operator (for ServiceMonitor)- [x]Grafana (for dashboards)- [x]At least one LLM API key (OpenAI, Claude, Google AI)

1. Install the Operator

1

Install Operator via Helm (CRDs + RBAC + Controllers + Dashboard)

2

Verify installed CRDs

You should see 17 CRDs:
3

Create Secret with API Keys

2. Create ChatCLI Instance

To enable Prometheus metrics collection during incident analysis, add the PROMETHEUS_URL variable via Helm:

TLS Secret: SANs and CA

This is where most installs fail silently. The Instance CR references secretName: chatcli-tls, but the Secret must be generated with two details that openssl req -x509 does not produce by default.

Generate the cert with subjectAltName

Without SANs covering the DNS name the operator uses to dial gRPC, the handshake fails with:
Use an explicit openssl.cnf:
Verify with:

Include ca.crt in the Secret

A self-signed cert is its own CA. If the Secret only contains tls.crt and tls.key, the operator connects but fails with:
The WatcherBridge automatically reads the ca.crt key from the Secret referenced by the Instance and uses it as the trust root — so the Secret needs all three keys:
With ca.crt inside the Secret, you do not need to mount a CA ConfigMap or set SSL_CERT_FILE / CHATCLI_GRPC_TLS_CA on the operator deployment. That env var is a secondary path for multi-Instance setups sharing a CA and requires manual volume mounting (extraEnv + volume).

What if the cert is issued by cert-manager or ACM?

§2.1 above covers the fragile self-signed case. With cert-manager or AWS ACM the setup is simpler, but each issuer has its own gotcha: Key notes:
  • Publicly trusted cert → trust already exists. The operator code (grpc_client.go) only sets RootCAs when a custom CA is provided; without one, Go uses the container’s ca-certificates bundle. That’s why Let’s Encrypt and ACM Public “just work” on the CA side — but spec.server.address must be the public FQDN, not the in-cluster Service, or the SAN won’t match.
  • cert-manager with an internal CA is the cleanest K8s path. The Certificate CR below emits everything ready for WatcherBridge auto-trust — no manual openssl:
    With Certificate.issuerRef.kind: CA, cert-manager automatically writes ca.crt into the generated Secret — WatcherBridge picks it up directly, no extra config.
  • ACM Public does not fit pod-to-pod gRPC. The private key is not exportable; only use when TLS terminates at the ALB/NLB and the operator dials the public endpoint.
  • ACM Private CA — export the Private CA bundle (aws acm-pca get-certificate-authority-certificate) and include it as ca.crt in the Secret. From there on, it follows the auto-trust path.
Link your monitored applications’ source code repositories for code-aware diagnostics. The AI will receive context from recent commits, code snippets from stack traces, and configuration files.

3. Configure Notifications

4. Configure Escalation

5. Define SLOs

6. Define SLAs

7. Configure Approvals

8. Install Grafana Dashboards

9. Validate with Chaos Engineering

Run chaos experiments only in environments with redundancy. Never on single-replica deployments.
1

Run in DryRun

2

Verify result

3

Run for real (after validation)

Edit dryRun: false and reapply.

10. Access the Dashboard

The web dashboard shows:
  • Overview with real-time stats
  • Incidents with filters and actions (acknowledge, snooze)
  • SLOs with error budget and burn rates
  • Pending approvals
  • PostMortems with timeline
  • Federated clusters
  • Searchable audit log

10.1 Expose the Dashboard via Ingress (alternative to port-forward)

To reach the dashboard from outside the cluster, create an Ingress pointing at the operator Service. When mounting under a sub-path, rewrite-target with a capture group is required — the dashboard’s static assets are served from / and would 404 otherwise:

11. Common Troubleshooting

Production Checklist

  • [x]Operator installed with 17 CRDs- [x]Instance created with TLS and auth- [x]Secret chatcli-tls contains tls.crt, tls.key and ca.crt (self-signed: ca.crt=tls.crt)- [x]tls.crt has SANs for <instance>.<ns>.svc.cluster.local, <instance>.<ns>.svc and <instance>- [x]spec.server.address in the Instance matches one of the cert SANs- [x]Operator logs show Connected to Instance with no x509: errors within ~30s of the Instance becoming Ready- [x]Watcher monitoring target deployments- [x]NotificationPolicy with Slack + PagerDuty- [x]EscalationPolicy L1->L2->L3- [x]SLOs with burn rate alerting (Google SRE model)- [x]SLAs with response/resolution time per severity- [x]ApprovalPolicy with auto/quorum for production- [x]Grafana dashboards installed- [x]Chaos experiment validated in dry-run- [x]Web Dashboard accessible- [x]REST API with authentication configured