Kubernetes
Connect your Kubernetes clusters to enable Kai (Kubernetes Engineer) to analyze workloads, optimize resources, and manage cluster operations.Supported Platforms
| Platform | Support |
|---|---|
| Amazon EKS | All versions |
| Google GKE | Standard, Autopilot |
| Azure AKS | All versions |
| Self-managed | Kubernetes 1.24+ |
| Rancher | RKE, RKE2 |
| OpenShift | 4.x |
Setup Methods
- Via Cloud Provider (Recommended)
- Direct Kubeconfig
Auto-Discovery from Cloud Connections
If you’ve already connected AWS, GCP, or Azure, your managed Kubernetes clusters are automatically discovered.Kubeconfig Format
Required Permissions
Minimum (Read-Only)
Recommended (Full Analysis)
Agent Capabilities
Once connected, Kai can:| Capability | Description |
|---|---|
| Resource Analysis | Pod CPU/memory usage, requests vs limits |
| Node Health | Node status, capacity, allocatable resources |
| Workload Optimization | Right-sizing recommendations, HPA tuning |
| Troubleshooting | CrashLoopBackOff, OOMKilled, pending pods |
| Security Audit | RBAC review, pod security, network policies |
Example Prompts
Prerequisites
For full functionality, ensure:| Component | Purpose |
|---|---|
| Metrics Server | Required for resource metrics |
| kube-state-metrics | Enhanced cluster metrics (optional) |
| Network access | CloudThinker must reach API server |
Install Metrics Server
Troubleshooting
Cannot connect to cluster
Cannot connect to cluster
- Verify API server endpoint is accessible from internet
- Check firewall/security groups allow CloudThinker IPs
- For private clusters: Set up VPN or bastion access
- Confirm API server certificate is valid
Unauthorized errors
Unauthorized errors
No metrics data
No metrics data
- Verify Metrics Server is installed:
kubectl top nodes - Check Metrics Server pods are running
- Ensure
metrics.k8s.ioAPI is available
Missing namespaces
Missing namespaces
- Verify ClusterRole has namespace list permission
- Check if RBAC restricts access to certain namespaces
- Confirm service account binding is cluster-wide
Security Best Practices
- Read-only access - Never grant write permissions to CloudThinker
- Namespace isolation - Keep service account in dedicated namespace
- Token rotation - Rotate service account tokens periodically
- Network policies - Restrict API server access to CloudThinker IPs
- Audit logging - Enable Kubernetes audit logs