Kong-Ingress-Controller in Cloud-Native Engineering
Category: kubernetes
Status: Active
Stars: 2,380
Last Updated: 2026-04-20
Primary Language: Go
Documentation: https://github.com/Kong/kubernetes-ingress-controller
Purpose and Use Cases
Kong-Ingress-Controller is a cloud-native project that provides kubernetes functionality for modern distributed systems.
What Problem Does It Solve?
Kong-Ingress-Controller addresses the challenges of kubernetes in cloud-native environments, enabling teams to implement kubernetes features without embedding them in application code.
When to Use This Project
Use kong-ingress-controller when you need kubernetes capabilities in your Kubernetes or cloud-native infrastructure. It's ideal when you require kubernetes with minimal application code changes.
Key Use Cases
- kubernetes for microservices
- Integration with Kubernetes and CNCF ecosystem
- kubernetes with declarative configuration
- kubernetes for observability and monitoring
- kubernetes for security and compliance
Architecture Design Patterns
Core Components
- Primary Component: Core functionality
- Controller: Cluster management
- Agent: Node-level execution
- API Server: Management interface
- Storage: Configuration persistence
Component Interactions
- Client → Core: Request routing
- Core → Storage: Configuration persistence
- Controller → Agents: Command distribution
- Agents → Controller: Status reporting
- Storage → Controllers: Configuration sync
Data Flow Patterns
- Request Flow: Client → Core → Backend
- Configuration Flow: API → Storage → Nodes
- State Flow: Nodes → Control Plane → Dashboard
- Telemetry Flow: Data → Collector → Storage
Design Principles
- Declarative Configuration: YAML/CRD-based configuration
- Kubernetes-Native: Leverages Kubernetes APIs
- Extensible: Plugin/adapter architecture
- Observability First: Built-in metrics, tracing, logging
- High Availability: Multi-node clustering
- Secure by Default: TLS, authentication, authorization
Integration Approaches
Integration with Other CNCF Projects
- Kubernetes: Native integration with K8s APIs
- Prometheus: Metrics collection integration
- Grafana: Dashboard visualization
- Jaeger/Zipkin: Distributed tracing
- CoreDNS: Service discovery integration
- Envoy: Service mesh integration
- Istio: Service mesh control plane
API Patterns
- RESTful API: Management endpoints
- gRPC API: Internal communication
- WebSocket API: Real-time updates
- Admin API: Configuration management
Configuration Patterns
- YAML Manifests: Human-readable configs
- JSON: Machine-readable format
- Environment Variables: Runtime configuration
- ConfigMaps: Kubernetes config storage
- CRDs: Kubernetes custom resources
Extension Mechanisms
- Plugins: Extend functionality
- Filters: Process requests
- Hooks: Event callbacks
- Modules: Add features
Common Pitfalls and How to Avoid Them
Misconfigurations
- Endpoint Configuration: Wrong API endpoints
- Authentication: Missing or incorrect auth
- Resource Limits: Insufficient resource allocation
- SSL/TLS: Certificate validation issues
- Network Policy: Incorrect network rules
- Scaling: Under/over-provisioned resources
Performance Issues
- Request Latency: High latency
- Throughput: Low throughput
- Memory Usage: High memory consumption
- CPU Usage: High CPU usage
- Connection Pooling: Pool exhaustion
- Cache Misses: High cache miss rate
Operational Challenges
- Configuration Management: Config drift
- Upgrade Management: Rolling upgrades
- Monitoring: Metrics collection
- Logging: Log aggregation
- Troubleshooting: Issue diagnosis
- Security: Security audits
Security Pitfalls
- Authentication: Missing authentication
- Authorization: Overly permissive ACLs
- TLS Configuration: Weak TLS settings
- Secrets Management: Exposed secrets
- RBAC: Insufficient access control
- Vulnerabilities: Outdated dependencies
Coding Practices
Idiomatic Configuration
- YAML: Configuration files
- JSON: API payloads
- Environment Variables: Runtime config
- ConfigMaps: Kubernetes config
API Usage Patterns
- REST API: Management endpoints
- gRPC API: Internal communication
- WebSocket API: Real-time updates
Observability Best Practices
- Prometheus Metrics: Custom metrics
- Tracing: Distributed tracing
- Access Logs: Request logging
- Alerting: Health checks
Testing Strategies
- Unit Tests: Component tests
- Integration Tests: Service tests
- E2E Tests: Full stack tests
- Load Tests: Performance tests
Development Workflow
- Development: Local dev setup
- Testing: Unit and integration tests
- Debugging: Logging, tracing
- Deployment: Docker, Kubernetes
- CI/CD: GitHub Actions
- Tools: Project CLI tools
Fundamentals
Essential Concepts
- Cluster: Node group
- Node: Individual server
- Pod: Container unit
- Service: Network service
- Config: Configuration data
- Secret: Sensitive data
- Volume: Storage volume
- Namespace: Logical partition
Terminology Glossary
- Cluster: Cluster of nodes
- Node: Individual node
- Service: Service endpoint
- Config: Configuration data
- Secret: Secret data
- Volume: Storage
- Namespace: Namespace
- Pod: Pod unit
Data Models and Types
- Config: Config spec
- Secret: Secret spec
- Service: Service spec
- Deployment: Deployment spec
- Pod: Pod spec
- Volume: Volume spec
- Namespace: Namespace spec
Lifecycle Management
- Service Lifecycle: Create → Deploy → Scale → Delete
- Pod Lifecycle: Pending → Running → Succeeded/Failed
- Config Lifecycle: Create → Apply → Update → Delete
- Secret Lifecycle: Create → Encrypt → Decrypt → Delete
State Management
- Config State: Applied config
- Service State: Service state
- Pod State: Pod state
- Volume State: Volume state
- Secret State: Encrypted data
- Namespace State: Namespace data
Scaling and Deployment Patterns
Horizontal Scaling
- Node Scaling: Add/remove nodes
- Container Scaling: Pod replicas
- Database Scaling: Database clusters
- Cache Scaling: Cache clusters
- Load Balancing: Frontend balancing
High Availability
- Multiple Instances: Redundant instances
- Load Balancing: Frontend balancing
- Health Checking: Automatic failover
- Graceful Shutdowns: Clean shutdown
- Data Replication: HA storage
Production Deployments
- Configuration: Production config
- Load Balancing: Frontend HA
- Monitoring: Metrics setup
- Alerting: Alerting setup
- Logging: Centralized logging
- Security: Security hardening
Upgrade Strategies
- Rolling Update: Rolling deployment
- Blue-Green: Blue-green deployment
- Canary: Canary release
- Backup: Pre-upgrade backup
- Validation: Post-upgrade validation
Resource Management
- Memory Configuration: Memory limits
- CPU Configuration: CPU limits
- Storage Configuration: Storage limits
- Network Configuration: Network limits
- Connection Limits: Connection limits
Additional Resources
- Official Documentation: {repo_info['html_url']}
- GitHub Repository: {repo_info['html_url']}
- CNCF Project Page: cncf.io/projects/{project_info['name']}/
- Community: Check the GitHub repository for community channels
- Versioning: Refer to project's release notes for version-specific features
Troubleshooting
Common Issues
Deployment Failures
- Check pod logs for errors
- Verify configuration values
- Ensure network connectivity
Performance Issues
- Monitor resource usage
- Adjust resource limits
- Check for bottlenecks
Configuration Errors
- Validate YAML syntax
- Check required fields
- Verify environment-specific settings
Integration Problems
- Verify API compatibility
- Check dependency versions
- Review integration documentation
Getting Help
- Check official documentation
- Search GitHub issues
- Join community channels
- Review logs and metrics
Content generated automatically. Verify against official documentation before production use.
Examples
Kong Ingress Controller with Plugins
# Kong Ingress Controller configuration with plugins
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-ingress
annotations:
kubernetes.io/ingress.class: kong
konghq.com/strip-path: "true"
spec:
rules:
- host: api.example.com
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: myapp-service
port:
number: 80
---
# KongPlugin for rate limiting
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: rate-limiting
config:
minute: 100
policy: local
limit_by: consumer
plugin: rate-limiting
---
# KongPlugin for request transformation
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: request-transformer
config:
add:
headers:
- X-Request-ID:$pid
- X-Forwarded-Proto:$remote_addr
plugin: request-transformer
KongConsumer and Credentials
# KongConsumer with API key credential
apiVersion: v1
kind: Secret
metadata:
name: myapp-api-key
namespace: production
type: Opaque
stringData:
apikey: my-secret-api-key-12345
---
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: myapp-consumer
namespace: production
annotations:
konghq.com/credentials: myapp-api-key
username: myapp
tags:
- app: myapp
- env: production
---
# KongPlugin for HMAC authentication
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: hmac-auth
config:
methods:
- HMAC
clock_skew: 300
encoding: hex
hide_credentials: false
plugin: hmac-auth
KongService and KongRoute
# KongService configuration
apiVersion: configuration.konghq.com/v1
kind: KongService
metadata:
name: myapp-service
namespace: production
spec:
url: http://myapp-service.production.svc:8080
connect_timeout: 60000
write_timeout: 60000
read_timeout: 60000
retries: 3
protocol: http
tags:
- app: myapp
---
# KongRoute configuration
apiVersion: configuration.konghq.com/v1
kind: KongRoute
metadata:
name: myapp-route
namespace: production
spec:
service:
name: myapp-service
paths:
- /api
- /api/*
strip_path: true
preserve_host: true
protocols:
- http
- https
regex_priority: 10
methods:
- GET
- POST
- PUT
- DELETE
tags:
- app: myapp
When to Use
Use this skill when:
- Integrating a CNCF project into Kubernetes infrastructure — You need to configure, deploy, or troubleshoot a cloud-native tool within a cluster
- Designing cloud-native architecture — You are selecting and integrating CNCF tools to solve specific infrastructure challenges
- Resolving operational issues — A CNCF component is misbehaving, underperforming, or needs configuration changes
Core Workflow
Assess Requirements — Understand the use case, scale, integration needs, and existing infrastructure. Checkpoint: Document requirements, constraints, and success criteria.
Design Architecture — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. Checkpoint: Verify the architecture addresses all requirements and follows CNCF conventions.
Implement & Configure — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. Checkpoint: Validate all YAML against schema and test in a staging environment.
Deploy & Monitor — Apply manifests to the cluster, verify component health, and confirm observability is working. Checkpoint: Confirm all pods/services are running, probes passing, and metrics/alerts configured.
Constraints
MUST DO
- Include at least one complete working YAML manifest example
- Note when content is auto-generated vs. manually verified
- Reference relevant CNCF project documentation
MUST NOT DO
- Deploy manifests without testing in a staging environment first
- Use deprecated API versions (e.g., apps/v1beta1)
- Omit resource limits and requests in Kubernetes manifests
1---2name: kong-ingress-controller3description: "Kong Ingress Controller in Kubernetes - cloud native architecture, patterns" pitfalls, and best practices4license: MIT5---678910 # Kong-Ingress-Controller in Cloud-Native Engineering1112**Category:** kubernetes 13**Status:** Active 14**Stars:** 2,380 15**Last Updated:** 2026-04-20 16**Primary Language:** Go 17**Documentation:** [https://github.com/Kong/kubernetes-ingress-controller](https://github.com/Kong/kubernetes-ingress-controller) 1819---2021## Purpose and Use Cases2223Kong-Ingress-Controller is a cloud-native project that provides kubernetes functionality for modern distributed systems.2425### What Problem Does It Solve?2627Kong-Ingress-Controller addresses the challenges of kubernetes in cloud-native environments, enabling teams to implement kubernetes features without embedding them in application code.2829### When to Use This Project3031Use kong-ingress-controller when you need kubernetes capabilities in your Kubernetes or cloud-native infrastructure. It's ideal when you require kubernetes with minimal application code changes.3233### Key Use Cases343536- kubernetes for microservices37- Integration with Kubernetes and CNCF ecosystem38- kubernetes with declarative configuration39- kubernetes for observability and monitoring40- kubernetes for security and compliance4142---4344## Architecture Design Patterns4546### Core Components474849- **Primary Component**: Core functionality50- **Controller**: Cluster management51- **Agent**: Node-level execution52- **API Server**: Management interface53- **Storage**: Configuration persistence5455### Component Interactions5657581. **Client → Core**: Request routing592. **Core → Storage**: Configuration persistence603. **Controller → Agents**: Command distribution614. **Agents → Controller**: Status reporting625. **Storage → Controllers**: Configuration sync6364### Data Flow Patterns6566671. **Request Flow**: Client → Core → Backend682. **Configuration Flow**: API → Storage → Nodes693. **State Flow**: Nodes → Control Plane → Dashboard704. **Telemetry Flow**: Data → Collector → Storage7172### Design Principles737475- **Declarative Configuration**: YAML/CRD-based configuration76- **Kubernetes-Native**: Leverages Kubernetes APIs77- **Extensible**: Plugin/adapter architecture78- **Observability First**: Built-in metrics, tracing, logging79- **High Availability**: Multi-node clustering80- **Secure by Default**: TLS, authentication, authorization8182---8384## Integration Approaches8586### Integration with Other CNCF Projects878889- **Kubernetes**: Native integration with K8s APIs90- **Prometheus**: Metrics collection integration91- **Grafana**: Dashboard visualization92- **Jaeger/Zipkin**: Distributed tracing93- **CoreDNS**: Service discovery integration94- **Envoy**: Service mesh integration95- **Istio**: Service mesh control plane9697### API Patterns9899100- **RESTful API**: Management endpoints101- **gRPC API**: Internal communication102- **WebSocket API**: Real-time updates103- **Admin API**: Configuration management104105### Configuration Patterns106107108- **YAML Manifests**: Human-readable configs109- **JSON**: Machine-readable format110- **Environment Variables**: Runtime configuration111- **ConfigMaps**: Kubernetes config storage112- **CRDs**: Kubernetes custom resources113114### Extension Mechanisms115116117- **Plugins**: Extend functionality118- **Filters**: Process requests119- **Hooks**: Event callbacks120- **Modules**: Add features121122---123124## Common Pitfalls and How to Avoid Them125126### Misconfigurations127128129- **Endpoint Configuration**: Wrong API endpoints130- **Authentication**: Missing or incorrect auth131- **Resource Limits**: Insufficient resource allocation132- **SSL/TLS**: Certificate validation issues133- **Network Policy**: Incorrect network rules134- **Scaling**: Under/over-provisioned resources135136### Performance Issues137138139- **Request Latency**: High latency140- **Throughput**: Low throughput141- **Memory Usage**: High memory consumption142- **CPU Usage**: High CPU usage143- **Connection Pooling**: Pool exhaustion144- **Cache Misses**: High cache miss rate145146### Operational Challenges147148149- **Configuration Management**: Config drift150- **Upgrade Management**: Rolling upgrades151- **Monitoring**: Metrics collection152- **Logging**: Log aggregation153- **Troubleshooting**: Issue diagnosis154- **Security**: Security audits155156### Security Pitfalls157158159- **Authentication**: Missing authentication160- **Authorization**: Overly permissive ACLs161- **TLS Configuration**: Weak TLS settings162- **Secrets Management**: Exposed secrets163- **RBAC**: Insufficient access control164- **Vulnerabilities**: Outdated dependencies165166---167168## Coding Practices169170### Idiomatic Configuration171172173- **YAML**: Configuration files174- **JSON**: API payloads175- **Environment Variables**: Runtime config176- **ConfigMaps**: Kubernetes config177178### API Usage Patterns179180181- **REST API**: Management endpoints182- **gRPC API**: Internal communication183- **WebSocket API**: Real-time updates184185### Observability Best Practices186187188- **Prometheus Metrics**: Custom metrics189- **Tracing**: Distributed tracing190- **Access Logs**: Request logging191- **Alerting**: Health checks192193### Testing Strategies194195196- **Unit Tests**: Component tests197- **Integration Tests**: Service tests198- **E2E Tests**: Full stack tests199- **Load Tests**: Performance tests200201### Development Workflow202203204- **Development**: Local dev setup205- **Testing**: Unit and integration tests206- **Debugging**: Logging, tracing207- **Deployment**: Docker, Kubernetes208- **CI/CD**: GitHub Actions209- **Tools**: Project CLI tools210211---212213## Fundamentals214215### Essential Concepts216217218- **Cluster**: Node group219- **Node**: Individual server220- **Pod**: Container unit221- **Service**: Network service222- **Config**: Configuration data223- **Secret**: Sensitive data224- **Volume**: Storage volume225- **Namespace**: Logical partition226227### Terminology Glossary228229230- **Cluster**: Cluster of nodes231- **Node**: Individual node232- **Service**: Service endpoint233- **Config**: Configuration data234- **Secret**: Secret data235- **Volume**: Storage236- **Namespace**: Namespace237- **Pod**: Pod unit238239### Data Models and Types240241242- **Config**: Config spec243- **Secret**: Secret spec244- **Service**: Service spec245- **Deployment**: Deployment spec246- **Pod**: Pod spec247- **Volume**: Volume spec248- **Namespace**: Namespace spec249250### Lifecycle Management251252253- **Service Lifecycle**: Create → Deploy → Scale → Delete254- **Pod Lifecycle**: Pending → Running → Succeeded/Failed255- **Config Lifecycle**: Create → Apply → Update → Delete256- **Secret Lifecycle**: Create → Encrypt → Decrypt → Delete257258### State Management259260261- **Config State**: Applied config262- **Service State**: Service state263- **Pod State**: Pod state264- **Volume State**: Volume state265- **Secret State**: Encrypted data266- **Namespace State**: Namespace data267268---269270## Scaling and Deployment Patterns271272### Horizontal Scaling273274275- **Node Scaling**: Add/remove nodes276- **Container Scaling**: Pod replicas277- **Database Scaling**: Database clusters278- **Cache Scaling**: Cache clusters279- **Load Balancing**: Frontend balancing280281### High Availability282283284- **Multiple Instances**: Redundant instances285- **Load Balancing**: Frontend balancing286- **Health Checking**: Automatic failover287- **Graceful Shutdowns**: Clean shutdown288- **Data Replication**: HA storage289290### Production Deployments291292293- **Configuration**: Production config294- **Load Balancing**: Frontend HA295- **Monitoring**: Metrics setup296- **Alerting**: Alerting setup297- **Logging**: Centralized logging298- **Security**: Security hardening299300### Upgrade Strategies301302303- **Rolling Update**: Rolling deployment304- **Blue-Green**: Blue-green deployment305- **Canary**: Canary release306- **Backup**: Pre-upgrade backup307- **Validation**: Post-upgrade validation308309### Resource Management310311312- **Memory Configuration**: Memory limits313- **CPU Configuration**: CPU limits314- **Storage Configuration**: Storage limits315- **Network Configuration**: Network limits316- **Connection Limits**: Connection limits317318---319320## Additional Resources321322- **Official Documentation:** [{repo_info['html_url']}]({repo_info['html_url']})323- **GitHub Repository:** [{repo_info['html_url']}]({repo_info['html_url']})324- **CNCF Project Page:** [cncf.io/projects/{project_info['name']}/](https://www.cncf.io/projects/{project_info['name']}/)325- **Community:** Check the GitHub repository for community channels326- **Versioning:** Refer to project's release notes for version-specific features327328---329330## Troubleshooting331332### Common Issues3333341. **Deployment Failures**335 - Check pod logs for errors336 - Verify configuration values337 - Ensure network connectivity3383392. **Performance Issues**340 - Monitor resource usage341 - Adjust resource limits342 - Check for bottlenecks3433443. **Configuration Errors**345 - Validate YAML syntax346 - Check required fields347 - Verify environment-specific settings3483494. **Integration Problems**350 - Verify API compatibility351 - Check dependency versions352 - Review integration documentation353354### Getting Help355356- Check official documentation357- Search GitHub issues358- Join community channels359- Review logs and metrics360*Content generated automatically. Verify against official documentation before production use.*361362## Examples363364### Kong Ingress Controller with Plugins365366367```yaml368# Kong Ingress Controller configuration with plugins369apiVersion: networking.k8s.io/v1370kind: Ingress371metadata:372 name: myapp-ingress373 annotations:374 kubernetes.io/ingress.class: kong375 konghq.com/strip-path: "true"376spec:377 rules:378 - host: api.example.com379 http:380 paths:381 - path: /api382 pathType: Prefix383 backend:384 service:385 name: myapp-service386 port:387 number: 80388389---390# KongPlugin for rate limiting391apiVersion: configuration.konghq.com/v1392kind: KongPlugin393metadata:394 name: rate-limiting395config:396 minute: 100397 policy: local398 limit_by: consumer399plugin: rate-limiting400401---402# KongPlugin for request transformation403apiVersion: configuration.konghq.com/v1404kind: KongPlugin405metadata:406 name: request-transformer407config:408 add:409 headers:410 - X-Request-ID:$pid411 - X-Forwarded-Proto:$remote_addr412plugin: request-transformer413```414415### KongConsumer and Credentials416417418```yaml419# KongConsumer with API key credential420apiVersion: v1421kind: Secret422metadata:423 name: myapp-api-key424 namespace: production425type: Opaque426stringData:427 apikey: my-secret-api-key-12345428429---430apiVersion: configuration.konghq.com/v1431kind: KongConsumer432metadata:433 name: myapp-consumer434 namespace: production435 annotations:436 konghq.com/credentials: myapp-api-key437username: myapp438tags:439- app: myapp440- env: production441442---443# KongPlugin for HMAC authentication444apiVersion: configuration.konghq.com/v1445kind: KongPlugin446metadata:447 name: hmac-auth448config:449 methods:450 - HMAC451 clock_skew: 300452 encoding: hex453 hide_credentials: false454plugin: hmac-auth455```456457### KongService and KongRoute458459460```yaml461# KongService configuration462apiVersion: configuration.konghq.com/v1463kind: KongService464metadata:465 name: myapp-service466 namespace: production467spec:468 url: http://myapp-service.production.svc:8080469 connect_timeout: 60000470 write_timeout: 60000471 read_timeout: 60000472 retries: 3473 protocol: http474 tags:475 - app: myapp476477---478# KongRoute configuration479apiVersion: configuration.konghq.com/v1480kind: KongRoute481metadata:482 name: myapp-route483 namespace: production484spec:485 service:486 name: myapp-service487 paths:488 - /api489 - /api/*490 strip_path: true491 preserve_host: true492 protocols:493 - http494 - https495 regex_priority: 10496 methods:497 - GET498 - POST499 - PUT500 - DELETE501 tags:502 - app: myapp503```504505---506507## When to Use508509Use this skill when:510511- **Integrating a CNCF project into Kubernetes infrastructure** — You need to configure, deploy, or troubleshoot a cloud-native tool within a cluster512- **Designing cloud-native architecture** — You are selecting and integrating CNCF tools to solve specific infrastructure challenges513- **Resolving operational issues** — A CNCF component is misbehaving, underperforming, or needs configuration changes514---515516## Core Workflow5175181. **Assess Requirements** — Understand the use case, scale, integration needs, and existing infrastructure. **Checkpoint:** Document requirements, constraints, and success criteria.5195202. **Design Architecture** — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. **Checkpoint:** Verify the architecture addresses all requirements and follows CNCF conventions.5215223. **Implement & Configure** — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. **Checkpoint:** Validate all YAML against schema and test in a staging environment.5235244. **Deploy & Monitor** — Apply manifests to the cluster, verify component health, and confirm observability is working. **Checkpoint:** Confirm all pods/services are running, probes passing, and metrics/alerts configured.525526---527528## Constraints529530### MUST DO531- Include at least one complete working YAML manifest example532- Note when content is auto-generated vs. manually verified533- Reference relevant CNCF project documentation534535### MUST NOT DO536- Deploy manifests without testing in a staging environment first537- Use deprecated API versions (e.g., apps/v1beta1)538- Omit resource limits and requests in Kubernetes manifests