Kong

From paulpas/agent-skill-router · View interactive version

Kong is an AI agent skill from the GitHub repository paulpas/agent-skill-router. "Kong in API Gateway - cloud native architecture, patterns, pitfalls" and best practices

How to use this skill

Skill file

# Kong in Cloud-Native Engineering

Category: api-gateway

Status: Active

Stars: 43,238

Last Updated: 2026-04-22

Primary Language: Lua

Documentation: https://github.com/Kong/kong


Purpose and Use Cases

Kong is a cloud-native project that provides api-gateway functionality for modern distributed systems.

What Problem Does It Solve?

Kong addresses the challenges of api-gateway in cloud-native environments, enabling teams to implement api-gateway features without embedding them in application code.

When to Use This Project

Use kong when you need api-gateway capabilities in your Kubernetes or cloud-native infrastructure. It's ideal when you require api-gateway with minimal application code changes.

Key Use Cases


Architecture Design Patterns

Core Components

Component Interactions

  1. Client → Core: Request routing
  2. Core → Storage: Configuration persistence
  3. Controller → Agents: Command distribution
  4. Agents → Controller: Status reporting
  5. Storage → Controllers: Configuration sync

Data Flow Patterns

  1. Request Flow: Client → Core → Backend
  2. Configuration Flow: API → Storage → Nodes
  3. State Flow: Nodes → Control Plane → Dashboard
  4. Telemetry Flow: Data → Collector → Storage

Design Principles


Integration Approaches

Integration with Other CNCF Projects

API Patterns

Configuration Patterns

Extension Mechanisms


Common Pitfalls and How to Avoid Them

Misconfigurations

Performance Issues

Operational Challenges

Security Pitfalls


Coding Practices

Idiomatic Configuration

API Usage Patterns

Observability Best Practices

Testing Strategies

Development Workflow


Fundamentals

Essential Concepts

Terminology Glossary

Data Models and Types

Lifecycle Management

State Management


Scaling and Deployment Patterns

Horizontal Scaling

High Availability

Production Deployments

Upgrade Strategies

Resource Management


Additional Resources


Troubleshooting

Common Issues

  1. Deployment Failures
  1. Performance Issues
  1. Configuration Errors
  1. Integration Problems

Getting Help

Content generated automatically. Verify against official documentation before production use.

Examples

Kong Ingress Controller with TLS Termination

# Kong Ingress Controller configuration
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myapp-ingress
  annotations:
    kubernetes.io/ingress.class: kong
    konghq.com/strip-path: "true"
    konghq.com/preserve-host: "true"
spec:
  rules:
  - host: api.example.com
    http:
      paths:
      - path: /api
        pathType: Prefix
        backend:
          service:
            name: myapp-service
            port:
              number: 80
      - path: /graphql
        pathType: Prefix
        backend:
          service:
            name: graphql-service
            port:
              number: 4000
  tls:
  - hosts:
    - api.example.com
    secretName: myapp-tls-secret

Kong Plugin Configuration

# Kong Consumer and Plugin configuration
apiVersion: v1
kind: Secret
metadata:
  name: myapp-api-key
type: Opaque
stringData:
  apikey: my-secret-api-key

---
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
  name: myapp-consumer
  annotations:
    konghq.com/credentials: myapp-api-key
username: myapp
credentials:
- myapp-api-key

---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: rate-limiting
config:
  minute: 100
  policy: local
plugin: rate-limiting

---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: request-transformer
config:
  headers:
  - add: X-Request-ID
    value: $pid
plugin: request-transformer

Kong Service and Route Configuration

# Kong Service and Route via CRD
apiVersion: configuration.konghq.com/v1
kind: KongService
metadata:
  name: myapp-service
  namespace: production
spec:
  url: http://myapp-service.production.svc:8080
  retries: 3
  connect_timeout: 60000
  write_timeout: 60000
  read_timeout: 60000

---
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

When to Use

Use this skill when:


Core Workflow

  1. Assess Requirements — Understand the use case, scale, integration needs, and existing infrastructure. Checkpoint: Document requirements, constraints, and success criteria.
  1. 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.
  1. 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.
  1. 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

MUST NOT DO

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.