Cluster Code
AI-powered CLI tool for Kubernetes and OpenShift cluster management with intelligent diagnostics, multi-cloud support, and GitOps workflows.
What is Cluster Code?
Cluster Code is a comprehensive CLI tool that revolutionizes how you build, maintain, and troubleshoot Kubernetes and OpenShift clusters. Built on Claudeβs agentic framework and enhanced with K8sGPT analyzers, it provides:
- π€ AI-Powered Diagnostics - Intelligent troubleshooting with root cause analysis
- βοΈ Multi-Cloud Support - Seamless cluster management across AWS, Azure, GCP, and on-premises
- π§ GitOps Integration - Automated deployments with Helm, Kustomize, ArgoCD, and Flux
- π Cluster Lifecycle - Create, upgrade, scale, backup, and delete clusters
- π Deep Inspection - Advanced diagnostics for pods, services, routes, operators, and more
- π Local LLM Support - Use self-hosted models for privacy and cost control
Key Features
AI-Powered Cluster Diagnostics
Cluster Code integrates advanced AI capabilities to automatically detect and diagnose cluster issues:
# Run comprehensive cluster diagnostics
cluster-code diagnose
# Analyze specific pod issues
cluster-code analyze pod my-app-pod-xyz
# Troubleshoot OpenShift Routes
cluster-code routes-analyze --namespace production
What it does:
- Identifies common Kubernetes/OpenShift issues (CrashLoopBackOff, ImagePullBackOff, etc.)
- Analyzes resource constraints, networking problems, and configuration errors
- Provides step-by-step remediation instructions
- Correlates events across resources for root cause analysis
Multi-Cloud Cluster Provisioning
Create production-ready clusters on any cloud platform with best practices built-in:
Azure (AKS & ARO)
# Create Azure Kubernetes Service cluster
cluster-code azure-cluster-create \
--type aks \
--name prod-aks \
--resource-group production-rg \
--region eastus \
--nodes 5
# Create Azure Red Hat OpenShift cluster
cluster-code azure-cluster-create \
--type aro \
--name prod-aro \
--resource-group production-rg \
--region eastus2
AWS (EKS & ROSA)
# Create Elastic Kubernetes Service cluster
cluster-code aws-cluster-create \
--type eks \
--name prod-eks \
--region us-east-1 \
--nodes 3
# Create Red Hat OpenShift Service on AWS
cluster-code aws-cluster-create \
--type rosa \
--name prod-rosa \
--region us-west-2 \
--multi-az
GCP (GKE)
# Create Google Kubernetes Engine cluster
cluster-code gcp-cluster-create \
--name prod-gke \
--region us-central1 \
--nodes 4
OpenShift-Specific Features
Enhanced support for OpenShift with specialized commands:
# Analyze Routes for TLS and connectivity issues
cluster-code routes-analyze --namespace production
# Install and manage Operators
cluster-code operator-install --operator openshift-gitops-operator
# Troubleshoot BuildConfigs (coming soon)
cluster-code buildconfig-analyze --namespace ci-cd
OpenShift Features:
- Routes analysis with certificate expiration checking
- Operator lifecycle management (install, upgrade, list)
- BuildConfig and DeploymentConfig support
- Project management and RBAC configuration
GitOps Workflows
Automate deployments with popular GitOps tools:
Helm Charts
# Deploy with Helm
cluster-code helm-deploy \
--chart ./my-app-chart \
--release my-app \
--namespace production \
--values prod-values.yaml
Kustomize Overlays
# Apply Kustomize configuration
cluster-code kustomize-apply \
--path ./overlays/production \
--wait
ArgoCD Sync
# Synchronize ArgoCD application
cluster-code argocd-sync \
--app my-production-app \
--prune
Flux (coming soon)
# Reconcile Flux kustomization
cluster-code flux-reconcile \
--kustomization my-app-stack
β‘ Quick Start
# 1. Install
npm install -g cluster-code
# 2. Configure LLM Provider
export ANTHROPIC_API_KEY=your-api-key
# or use OpenAI, Google, or local Ollama
# 3. Connect & Go
cluster-code init
cluster-code
Thatβs it! Start chatting with your cluster in plain English.
View detailed installation guide β Configure LLM providers β
Architecture
Cluster Code is built on a modular plugin architecture:
cluster-code/
βββ plugins/
β βββ cluster-core/ # Core Kubernetes operations
β βββ k8sgpt-analyzers/ # AI-powered diagnostics
β βββ cloud-azure/ # Azure (AKS/ARO) integration
β βββ cloud-aws/ # AWS (EKS/ROSA) integration
β βββ cloud-gcp/ # GCP (GKE) integration
β βββ cluster-openshift/ # OpenShift-specific features
β βββ gitops/ # GitOps workflows
βββ .claude/
β βββ commands/ # Slash commands
β βββ agents/ # Specialized AI agents
β βββ cluster-config.json # Configuration
βββ examples/
βββ cluster-templates/ # Production cluster templates
Key Components:
- Commands - Markdown-based command definitions with frontmatter
- Agents - Specialized AI agents for complex operations
- MCP Servers - Standardized cloud provider integrations
- Plugins - Modular extensions for different capabilities
Supported Platforms
Kubernetes Distributions
- β Kubernetes 1.28+ (all distributions)
- β Azure Kubernetes Service (AKS)
- β Amazon Elastic Kubernetes Service (EKS)
- β Google Kubernetes Engine (GKE)
- β kind, minikube, k3s (local development)
OpenShift
- β OpenShift 4.15+
- β Azure Red Hat OpenShift (ARO)
- β Red Hat OpenShift Service on AWS (ROSA)
- β OpenShift Local (formerly CodeReady Containers)
Cloud Providers
- β Azure - Full AKS and ARO support
- β AWS - Full EKS and ROSA support
- β GCP - Full GKE support
- π§ On-Premises - Bare metal, VMware, KVM (planned)
Use Cases
For DevOps Engineers
- Quickly diagnose and fix cluster issues
- Automate cluster provisioning across clouds
- Streamline GitOps deployments
- Monitor cluster health proactively
For SREs (Site Reliability Engineers)
- Reduce MTTR (Mean Time To Resolution) by 70%
- Intelligent troubleshooting with AI assistance
- Comprehensive cluster observability
- Automated backup and disaster recovery
For Platform Engineers
- Standardize cluster configurations
- Multi-cloud cluster management
- Self-service cluster provisioning
- Policy enforcement and compliance
For Developers
- Easy cluster access and context switching
- Deploy applications with Helm/Kustomize
- Interactive troubleshooting assistant
- Local LLM support for privacy
Whatβs New
Version 1.2.0 (Phase 3) - Latest
New Cloud Providers:
- β¨ AWS integration (EKS and ROSA)
- β¨ GCP integration (GKE)
Enhanced GitOps:
- β¨ ArgoCD synchronization
- β¨ Flux reconciliation (coming soon)
Cluster Lifecycle:
- β¨ Cluster deletion with safety checks
- β¨ Cluster upgrades with validation
- β¨ Node pool management
- β¨ Backup and restore workflows
Documentation:
- π Complete GitHub Pages site
- π Comprehensive user guides
- π API reference documentation
- π Step-by-step tutorials
Community & Support
Get Help
- π Documentation
- π GitHub Issues
- π¬ GitHub Discussions
Contributing
We welcome contributions! See our Contributing Guide.
Stay Updated
License
Cluster Code is open source software licensed under the MIT License.
Next Steps
Ready to get started? Check out our guides:
- Installation Guide - Set up Cluster Code
- LLM Provider Setup - Configure AI providers
- Getting Started - Your first steps
- First Cluster Tutorial - Create your first cluster
Or explore the documentation:
- User Guides - Comprehensive guides for all features
- Tutorials - Hands-on learning
- API Reference - Complete command reference