Connect Kubernetes to Digital Tap AI
1 Prerequisites
- Kubernetes cluster — K8s, EKS, GKE, or AKS (v1.24+)
- kubectl access with cluster-admin or equivalent
- Helm 3 installed
- Digital Tap AI account — sign up free
2 RBAC Requirements
The Digital Tap AI agent needs a ClusterRole with these permissions:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: digitaltap-agent
rules:
# Read cluster state
- apiGroups: [""]
resources: ["nodes", "pods", "services", "namespaces", "resourcequotas"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get"]
# Read metrics
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes", "pods"]
verbs: ["get", "list"]
# Read deployments, statefulsets, daemonsets
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets", "daemonsets", "replicasets"]
verbs: ["get", "list", "watch"]
# Optimization actions (remove for monitor-only)
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets"]
verbs: ["patch", "update"]
- apiGroups: ["autoscaling"]
resources: ["horizontalpodautoscalers"]
verbs: ["get", "list", "watch", "patch", "update"]
# Read events for anomaly detection
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch"]
💡 Monitor-only mode: Remove the
patch and update verbs to run in read-only mode. The agent will generate recommendations without making changes.
3 Install via Helm (Recommended)
# Add the Digital Tap Helm repo
helm repo add digitaltap https://charts.digitaltap.ai
helm repo update
# Install the agent
helm install digitaltap-agent digitaltap/agent \
--set apiKey="your-digital-tap-api-key" \
--set platform="kubernetes" \
--set clusterName="my-production-cluster" \
--namespace digitaltap \
--create-namespace
Custom values.yaml
# values.yaml
apiKey: "your-digital-tap-api-key"
platform: kubernetes
clusterName: my-production-cluster
# Scan interval (seconds)
scanInterval: 180
# Start in dry-run mode
dryRun: true
# Resource limits for the agent itself
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
# Namespaces to monitor (empty = all)
namespaces: []
# Namespaces to exclude
excludeNamespaces:
- kube-system
- kube-public
helm install digitaltap-agent digitaltap/agent \
-f values.yaml \
--namespace digitaltap --create-namespace
4 Verify Installation
# Check agent is running
kubectl get pods -n digitaltap
# Check agent logs
kubectl logs -n digitaltap -l app=digitaltap-agent --tail=50
# Expected output:
# [INFO] Connected to Digital Tap AI
# [INFO] Discovered 42 pods across 8 namespaces
# [INFO] First scan complete — 12 optimization opportunities found
5 K8s-Specific Agents & Features
- Pod Right-Sizing — Analyzes actual CPU/memory usage vs requests/limits and recommends optimal values
- Node Optimization — Identifies under-utilized nodes and recommends consolidation or instance type changes
- Bin Packing — Improves pod placement to maximize node utilization and reduce node count
- HPA Tuning — Optimizes HorizontalPodAutoscaler targets based on actual scaling patterns
- Spot Node Detection — Identifies workloads safe for spot/preemptible nodes and recommends migration
- Idle Namespace Detection — Finds namespaces with low or zero resource utilization
- Resource Quota Optimization — Recommends namespace quota adjustments based on actual usage
Namespace-Level Cost Attribution
Digital Tap AI automatically breaks down costs by namespace, providing:
- Per-namespace compute cost (CPU + memory)
- Per-namespace storage cost (PV/PVC)
- Per-namespace network cost (where available)
- Team-level rollup via namespace labels
- Daily/weekly/monthly trend analysis
6 Troubleshooting
Agent CrashLoopBackOff
- Check logs:
kubectl logs -n digitaltap -l app=digitaltap-agent - Verify API key is correct
- Ensure RBAC ClusterRole and ClusterRoleBinding are applied
Metrics unavailable
- Ensure metrics-server is installed:
kubectl top nodes - For EKS, install metrics-server:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml