Kubernetes Pattern Recognition Made Simple

Static analysis tool that identifies architectural patterns and configuration smells in your Kubernetes clusters

Why KubePattern?

Go beyond traditional linting with pattern-oriented validation

Graph-Based Analysis

Builds a complete resource graph to understand relationships and dependencies between Kubernetes resources, enabling deep architectural insights.

Pattern-as-Code

Define patterns using declarative JSON files. Extend KubePattern with custom patterns without modifying the core codebase.

Pattern Recognition

Automatically detect architectural patterns like Sidecar, Health Probe, and Predictable Demands across your entire cluster.

Confidence Scoring

Each detection includes confidence levels, severity ratings, and detailed scores to help you prioritize improvements.

Best Practices

Identify configuration smells and deviations from Kubernetes best practices and corporate policies automatically.

Native CRD Output

Results are exposed as Kubernetes Custom Resources, making them easy to query, monitor, and integrate with existing tools.

Simple Yet Powerful

KubePattern analyzes your cluster and creates K8sPattern CRDs that represent detected patterns with detailed information.

  • Automatic cluster scanning
  • RESTful API for integration
  • Detailed pattern descriptions
  • Resource relationship mapping
Read the Docs
# View detected patterns
kubectl get k8spatterns -A

# Example output:
apiVersion: kubepattern.it/v1
kind: K8sPattern
metadata:
  name: sidecar-2109423650
  namespace: pattern-analysis-ns
spec:
  confidence: HIGH
  severity: INFO
  type: STRUCTURAL
  message: Pod 'frontend' in namespace 'production' appears to be separated from
    its sidecar pod 'logging' in namespace 'production'. These pods share volumes
    and likely have a common lifecycle, suggesting they should be combined into
    a single pod with multiple containers.
  name: sidecar
  referenceLink: https://github.com/GabrieleGroppo/kubepattern-registry/tree/main/doc/sidecar.json
  resources:
  - name: frontend
    namespace: production
    role: main-app
  - name: logging
    namespace: production
    role: sidecar
  scores:
  - category: Relationship
    score: 10

Ready to Improve Your Kubernetes Architecture?

Join the community and start detecting patterns in your cluster today. It's free and open source!

View on GitHub