Skip to main content

AI Chat Use Cases

Overview​

AI Chat gives you an interactive way to query your Kubernetes clusters. Here are the most common use cases.

Investigating Active Issues​

When something is wrong and you need to understand what's happening:

  • "Why is pod payment-api-xyz failing?"
  • "Show me the logs for the crashing container in namespace production"
  • "What events happened in the last hour for deployment api-gateway?"
  • "Are there any pods with high restart counts?"

Why it helps: Get answers in seconds instead of chaining together kubectl commands across multiple terminals.

Checking Cluster Health​

Proactive health checks without writing scripts:

  • "Are there any pods in CrashLoopBackOff across all namespaces?"
  • "What's the status of namespace production?"
  • "Show me any pods that are not in Running state"
  • "Are all services in production-payments healthy?"

Why it helps: One question replaces a series of kubectl get/describe commands.

Inspecting Resources​

Quickly review resource configurations:

  • "Show me the resource limits for deployment worker"
  • "What are the environment variables for the api-gateway deployment?"
  • "What's the ingress configuration for the frontend service?"
  • "Show me the HPA settings for the checkout service"

Why it helps: No need to remember exact kubectl syntax or YAML paths.

Understanding Dependencies​

Map service relationships:

  • "What services depend on database-service?"
  • "Show me the topology for the payment processing flow"
  • "What ingress routes to the api-gateway service?"
  • "Which pods are backing the user-service endpoints?"

Why it helps: Visualize dependencies that aren't obvious from individual resource specs.

Correlating Changes​

When integrated with GitHub or GitLab:

  • "What PRs were merged in the last 24 hours?"
  • "Who changed the deployment config for api-gateway recently?"
  • "Show me recent commits that modified Kubernetes manifests"

Why it helps: Quickly identify if a recent change caused an issue.

Querying Metrics​

When integrated with Grafana MCP (Prometheus via a Grafana datasource):

  • "What's the error rate for service api-gateway?"
  • "Show me the CPU usage trend for namespace production"
  • "Run a PromQL query for p99 latency on the checkout service"

Why it helps: Access metrics without leaving the OpsWorker portal. Time-series results are charted inline.

Right-Sizing and Cost​

When the cluster has both Kubernetes Agent access and Grafana MCP metrics, the resource optimizer can recommend right-sizing:

  • "Is the worker deployment over-provisioned?"
  • "Which deployments in production request far more CPU than they use?"
  • "Suggest right-sized requests and limits for the api-gateway deployment"

Why it helps: Combines live requests/limits with actual Prometheus usage to flag waste. The optimizer can open a Git pull request with the proposed manifest change for a human to review and merge.

Generating Diagrams​

Ask for a visual instead of a wall of text:

  • "Draw me a topology diagram of the payment processing flow"
  • "Show me a flow diagram of how traffic reaches the checkout service"
  • "Diagram the dependencies of database-service"

Why it helps: Chat auto-generates Mermaid topology and flow diagrams so you can grasp relationships at a glance.

Next Steps​