Implements API gateways hands-on: deploy Kong with deck, configure routes/services, and enable auth and rate-limit plugins.
Agentic Workflow: Read -> Reason -> Act (api-gateway-kong)
You are Api Gateway Kong (infrastructure) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — infrastructure context for api-gateway-kong
- Domain: Implements API gateways hands-on: deploy Kong with deck, configure routes/services, and enable auth and rate-limit plugins.
- kong-operations: Deploy and configure Kong gateway with declarative configuration —
docker run -d --name kong-gateway -p 8000:8000 -p 8001:8001 kong/kong-gateway
- plugin-configuration: Enable auth, rate limiting, and logging plugins on routes —
curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: a
- Check
knowledge and prerequisites: kong, traefik, aws-cli
2. Reason — think for api-gateway-kong
- For
kong-operations: Deploy and configure Kong gateway with declarative configuration — decide which checks to run
- For
plugin-configuration: Enable auth, rate limiting, and logging plugins on routes — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-gateway-kong tools
- Tools:
Glob, Grep, Read, Bash, Deck (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-gateway-kong:03d79b49
API Gateway (Implementation)
Deploys and operates Kong API gateways with declarative config.
When to Use
- Centralizing API entry points
- Adding auth and rate limits without app changes
- Multi-service routing
Real Commands
# Run Kong
kong migrations bootstrap
kong start
docker run -d --name kong-gateway -p 8000:8000 -p 8001:8001 kong/kong-gateway
# Declarative config
deck ping
kong config -c kong.yaml
# Add a route
curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'
# Plugins
curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"rate-limiting","config":{"minute":60}}'
Testing
Send requests through the gateway and verify 401/429 behavior after enabling plugins.
Best Practices
- Keep config in Git via deck sync
- Enable rate limiting before going public
- Use health checks on upstreams
Capabilities
kong-operations
Deploy and configure Kong gateway with declarative configuration
Parameters:
service (string): Upstream service name
route (string): Route path or host
Commands:
docker run -d --name kong-gateway -p 8000:8000 -p 8001:8001 kong/kong-gateway
deck ping
deck dump --output-file kong.yaml
deck sync --state kong.yaml
curl -s http://localhost:8001/status
Examples:
plugin-configuration
Enable auth, rate limiting, and logging plugins on routes
Parameters:
plugin (string): Plugin name
config (string): Plugin configuration JSON
Commands:
curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'
curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"rate-limiting","config":{"minute":60}}'
curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"jwt"}'
curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"http-log","config":{"http_endpoint":"http://logs:8080"}}'
curl -s http://localhost:8001/services/orders/plugins | python -m json.tool
Examples:
References
1---2name: "api-gateway-kong"3description: "Implements API gateways hands-on: deploy Kong with deck, configure routes/services, and enable auth and rate-limit plugins. Use when working with kong operations, plugin configuration or when the user mentions kong operations, plugin configuration."4license: "MIT"5compatibility: "Requires kong, traefik, aws-cli, docker, kubernetes. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-gateway-kong8 author: Kdesk9 version: 2.0.010 category: infrastructure11allowed-tools: "Glob Grep Read Bash(curl:*) Bash(deck:*) Bash(docker:*)"12---1314Implements API gateways hands-on: deploy Kong with deck, configure routes/services, and enable auth and rate-limit plugins.1516## Agentic Workflow: Read -> Reason -> Act (api-gateway-kong)1718You are **Api Gateway Kong** (infrastructure) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — infrastructure context for `api-gateway-kong`21- Domain: Implements API gateways hands-on: deploy Kong with deck, configure routes/services, and enable auth and rate-limit plugins.22- **kong-operations**: Deploy and configure Kong gateway with declarative configuration — `docker run -d --name kong-gateway -p 8000:8000 -p 8001:8001 kong/kong-gateway`23- **plugin-configuration**: Enable auth, rate limiting, and logging plugins on routes — `curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: a`24- Check `knowledge` and `prerequisites: kong, traefik, aws-cli`2526### 2. Reason — think for `api-gateway-kong`27- For `kong-operations`: Deploy and configure Kong gateway with declarative configuration — decide which checks to run28- For `plugin-configuration`: Enable auth, rate limiting, and logging plugins on routes — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-gateway-kong` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Deck` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-gateway-kong:03d79b49`3536# API Gateway (Implementation)3738Deploys and operates Kong API gateways with declarative config.3940## When to Use41- Centralizing API entry points42- Adding auth and rate limits without app changes43- Multi-service routing4445## Real Commands4647```bash48# Run Kong49kong migrations bootstrap50kong start51docker run -d --name kong-gateway -p 8000:8000 -p 8001:8001 kong/kong-gateway5253# Declarative config54deck ping55kong config -c kong.yaml5657# Add a route58curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'5960# Plugins61curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"rate-limiting","config":{"minute":60}}'62```6364## Testing65Send requests through the gateway and verify 401/429 behavior after enabling plugins.6667## Best Practices68- Keep config in Git via deck sync69- Enable rate limiting before going public70- Use health checks on upstreams7172## Capabilities7374### kong-operations75Deploy and configure Kong gateway with declarative configuration7677**Parameters:**78- `service` (string): Upstream service name79- `route` (string): Route path or host8081**Commands:**82- `docker run -d --name kong-gateway -p 8000:8000 -p 8001:8001 kong/kong-gateway`83- `deck ping`84- `deck dump --output-file kong.yaml`85- `deck sync --state kong.yaml`86- `curl -s http://localhost:8001/status`8788**Examples:**89- deck ping && deck dump --output-file kong.yaml90- deck sync --state kong.yaml91- curl -s http://localhost:8001/services | python -m json.tool9293### plugin-configuration94Enable auth, rate limiting, and logging plugins on routes9596**Parameters:**97- `plugin` (string): Plugin name98- `config` (string): Plugin configuration JSON99100**Commands:**101- `curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'`102- `curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"rate-limiting","config":{"minute":60}}'`103- `curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"jwt"}'`104- `curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"http-log","config":{"http_endpoint":"http://logs:8080"}}'`105- `curl -s http://localhost:8001/services/orders/plugins | python -m json.tool`106107**Examples:**108- curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"rate-limiting","config":{"minute":60}}'109- curl -s -X POST http://localhost:8001/services/orders/plugins -H 'Content-Type: application/json' -d '{"name":"jwt"}'110- curl -s http://localhost:8001/services/orders/plugins | python -m json.tool111112## References113- [Kong Gateway Docs](https://docs.konghq.com/gateway/)114- [deck CLI](https://docs.konghq.com/deck/)