How kong/kubernetes-ingress-controller works
Main Components
a. Control Plane Components:
• Kubernetes API Server (external component)
• Kong Ingress Controller (main controller)
• Webhook Server (for validation and mutation)
• Metrics Server (for Prometheus metrics)
• Diagnostics Server
• Configuration Synchronizer
b. Data Plane Components:
• Kong Gateway Instances (managed by the controller)
• Admin API Interface
• Proxy Interface
• Database (optional, supports DB-less mode)
c. Custom Resources:
• Gateway API Resources (GatewayClass, Gateway, HTTPRoute, etc.)
• Kong-specific CRDs (KongPlugin, KongConsumer, etc.)
• Ingress Resources
Relationships and Interactions
• Controller watching Kubernetes resources
• Configuration flow from controller to Kong instances
• Traffic flow from clients through Kong proxy
• Webhook validation flow
• Metrics collection paths
Specific Implementation Details
• The separation between control plane (controller) and data plane (Kong gateways)
• Multiple Kong gateway support (multi-gateway architecture)
• Support for both Gateway API and Ingress resources
• Plugin management system
• Health checking and load balancing capabilities
Key Architectural Patterns
Highlight:
• Kubernetes operator pattern
• Controller-runtime based implementation
• Webhook-based validation
• Event-driven architecture
• Configuration translation pipeline
Top Layer: Client Traffic
Middle Layer: Kong Gateway Instances (Data Plane)
Bottom Layer: Controller Components (Control Plane)
• Kubernetes API Server and Resources
Essential Labels
• Version information
• Protocol support (TCP, UDP, HTTP, gRPC)
• Feature gates
• Enterprise vs. OSS components
• API versioning (v1, v1beta1, v1alpha1)
Additional Elements
Include:
• Notes about optional components (database, enterprise features)
• Scaling indicators for components that can be replicated
• Security boundaries and communication protocols
Technical Details to Capture
Show:
• Admission webhook paths
• Configuration update flows
• Status reporting paths
• Health check mechanisms
• Plugin injection points
Remember to include a reference to the Gateway API conformance level and supported Kubernetes versions, as these are critical aspects of the system's compatibility matrix.
This system design should help developers understand both the high-level architecture and the detailed interactions between components, facilitating both development and operational understanding of the Kong Ingress Controller.