| name | kagenti:deploy |
| description | Deploy or redeploy the Kagenti Kind cluster using the Python installer - quick redeploy, manual steps, and troubleshooting |
Deploy Cluster Skill
This skill guides you through deploying or redeploying the Kagenti Kind cluster using the Python installer.
Context-Safe Execution (MANDATORY)
Deploy scripts produce hundreds of lines. Always redirect to files:
export LOG_DIR=/tmp/kagenti/deploy/$(basename $(git rev-parse --show-toplevel))
mkdir -p $LOG_DIR
./.github/scripts/local-setup/kind-full-test.sh ... > $LOG_DIR/deploy.log 2>&1; echo "EXIT:$?"
When to Use
- Setting up new local development cluster
- Full cluster redeploy after major changes
- Cluster is corrupted or unstable
- Testing clean deployment
- Running E2E tests locally
Resource Requirements
Minimum (from CLAUDE.md):
- 12GB RAM
- 4 CPU cores
- Docker Desktop, Rancher Desktop, or Podman
Recommended for development:
- 16GB RAM
- 6 CPU cores
- 50GB free disk space
Multiple Clusters
You can run multiple Kind clusters:
- agent-platform - Created by kagenti-installer (default)
- kagenti-demo - Your existing cluster
- Each cluster runs independently with its own name
Check existing clusters:
kind get clusters
Quick Redeploy (Full Installation)
cp kagenti/installer/app/.env_template kagenti/installer/app/.env
cd kagenti/installer
uv run kagenti-installer
Use Existing Cluster
cd kagenti/installer
uv run kagenti-installer --use-existing-cluster
Cleanup and Fresh Install
kind delete cluster --name agent-platform
docker system prune -a
cd kagenti/installer
uv run kagenti-installer
Selective Component Installation
Skip components you don't need for faster deployment:
cd kagenti/installer
uv run kagenti-installer \
--skip-install ui \
--skip-install addons \
--skip-install keycloak \
--skip-install spire
uv run kagenti-installer \
--skip-install tekton \
--skip-install operator \
--skip-install gateway \
--skip-install mcp_gateway
uv run kagenti-installer \
--skip-install addons \
--skip-install ui \
--skip-install keycloak \
--skip-install agents
Available components to skip:
registry - Internal container registry
tekton - Tekton Pipelines (build system)
cert_manager - Certificate management
operator - Platform Operator (deprecated, being replaced by kagenti-operator)
istio - Service mesh
gateway - Kubernetes Gateway API
spire - Workload identity
mcp_gateway - MCP Gateway
addons - Observability (Prometheus, Kiali, Phoenix)
ui - Kagenti UI
keycloak - Authentication
agents - Demo agents
metrics_server - Metrics server
inspector - MCP inspector
toolhive - ToolHive operator
Deploy Weather Agents (Demo)
kubectl apply -f kagenti/examples/components/
This creates:
- weather-tool in team1 namespace
- weather-service in team1 namespace
Check Deployment Health
Quick Health Check
chmod +x .github/scripts/verify_deployment.sh
.github/scripts/verify_deployment.sh
Manual Health Checks
kubectl get pods -A
kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded
kubectl get pods -n team1
kubectl get pods -n keycloak
kubectl get pods -n kagenti-system
kubectl get deployments -A
kubectl get svc -A
Run E2E Tests Locally
After platform is deployed:
cd kagenti
uv pip install -r tests/requirements.txt
uv run pytest tests/e2e/test_deployment_health.py -v
uv run pytest tests/e2e/test_deployment_health.py -v --only-critical
uv run pytest tests/e2e/test_deployment_health.py::TestWeatherToolDeployment::test_weather_tool_deployment_ready -v
uv run pytest tests/e2e/test_deployment_health.py -v --exclude-app=keycloak
uv run pytest tests/e2e/test_deployment_health.py -v --app-timeout=600
Run Full CI Workflow Locally
Simulate what runs in CI:
cd kagenti/installer
uv run kagenti-installer --silent
cd ../..
kubectl apply -f kagenti/examples/components/
kubectl wait --for=condition=available --timeout=300s deployment/weather-tool -n team1
kubectl wait --for=condition=available --timeout=300s deployment/weather-service -n team1
chmod +x .github/scripts/verify_deployment.sh
.github/scripts/verify_deployment.sh
cd kagenti
uv pip install -r tests/requirements.txt
uv run pytest tests/e2e/test_deployment_health.py -v \
--timeout=300 \
--tb=short
Troubleshooting Deployment
Issue: Installer Timeout or Slow
docker info | grep -E "CPUs|Total Memory"
cd kagenti/installer
uv run kagenti-installer --use-existing-cluster
Issue: "Error loading config file" or kubectl errors
kubectl config current-context
kubectl config use-context kind-agent-platform
Issue: Pods stuck in ImagePullBackOff
docker exec agent-platform-control-plane crictl images
kind load docker-image <image-name> --name agent-platform
kubectl describe pod <pod-name> -n <namespace>
Issue: Keycloak Connection Issues
kubectl delete -n keycloak -f kagenti/installer/app/resources/keycloak.yaml
kubectl apply -n keycloak -f kagenti/installer/app/resources/keycloak.yaml
kubectl rollout restart daemonset -n istio-system ztunnel
kubectl rollout restart -n kagenti-system deployment http-istio
Issue: Need to Update Secrets
kubectl -n <namespace> delete secret github-token-secret
cd kagenti/installer
uv run kagenti-installer --use-existing-cluster
Issue: Blank UI on macOS
Issue: GitHub Token Errors
docker logout ghcr.io
Access Platform Services
After deployment, access these services:
open http://kagenti-ui.localtest.me:8080
open http://keycloak.localtest.me:8080
kubectl get secret -n keycloak keycloak-initial-admin -o jsonpath='{.data.password}' | base64 -d
kubectl port-forward -n observability svc/prometheus 9090:9090
open http://localhost:9090
kubectl port-forward -n observability svc/grafana 3000:3000
open http://localhost:3000
kubectl port-forward -n kiali svc/kiali 20001:20001
open http://localhost:20001
Platform Configuration
Environment Variables (.env file)
Required in kagenti/installer/app/.env:
GITHUB_USER=your-username
GITHUB_TOKEN=ghp_xxx
OPENAI_API_KEY=sk-xxx
AGENT_NAMESPACES=team1,team2
SLACK_BOT_TOKEN=xoxb-xxx
Cluster Configuration
Edit kagenti/installer/app/config.py:
CLUSTER_NAME = "agent-platform"
DOMAIN_NAME = "localtest.me"
CONTAINER_ENGINE = "docker"
Manual Step-by-Step Deployment (Advanced)
For debugging or understanding the installer:
cat <<EOF | kind create cluster --name agent-platform --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30080
hostPort: 8080
- containerPort: 30443
hostPort: 9443
EOF
kubectl config use-context kind-agent-platform
cd kagenti/installer
kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.66.0/release.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.2/cert-manager.yaml
Related Skills
- k8s:health: Check comprehensive platform health
- k8s:logs: Query logs for debugging
- k8s:pods: Debug pod issues
Pro Tips
- Use --use-existing-cluster: Faster reinstalls without recreating cluster
- Skip components: Use --skip-install for faster iteration
- Multiple clusters: Use different cluster names for parallel testing
- Resource allocation: Ensure Docker/Podman has enough RAM (16GB recommended)
- Cache images: Pulled images are cached - subsequent installs are faster
- Silent mode: Use --silent to skip interactive prompts
- Check logs: If installer fails, check pod logs in kagenti-system namespace
Common Workflows
Daily Development
cd kagenti/installer
uv run kagenti-installer --use-existing-cluster \
--skip-install addons \
--skip-install keycloak
Full Test Before PR
kind delete cluster --name agent-platform
cd kagenti/installer
uv run kagenti-installer --silent
kubectl apply -f kagenti/examples/components/
.github/scripts/verify_deployment.sh
cd kagenti && uv run pytest tests/e2e/test_deployment_health.py -v
Quick Agent Testing
cd kagenti/installer
uv run kagenti-installer \
--skip-install addons \
--skip-install ui \
--skip-install keycloak
kubectl apply -f kagenti/examples/components/