Hands-on API gateway engineering: Kong and Traefik installation, ingress setup on Kubernetes, and plugin wiring.
Agentic Workflow: Read -> Reason -> Act (api-gateway-engineer)
You are api-gateway-engineer (infrastructure) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — infrastructure context for api-gateway-engineer
- Domain: Hands-on API gateway engineering: Kong and Traefik installation, ingress setup on Kubernetes, and plugin wiring.
- kong-setup: Install Kong, bootstrap the database, and configure services and routes —
kong migrations bootstrap
- traefik-ingress: Configure Traefik as Kubernetes ingress with middlewares and TLS —
helm repo add traefik https://helm.traefik.io/traefik && helm install traefik tr
- Check
knowledge and prerequisites: kong, traefik, aws-cli
2. Reason — think for api-gateway-engineer
- For
kong-setup: Install Kong, bootstrap the database, and configure services and routes — decide which checks to run
- For
traefik-ingress: Configure Traefik as Kubernetes ingress with middlewares and TLS — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-gateway-engineer tools
- Tools:
Glob, Grep, Read, Kong, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-gateway-engineer:5e95f123
API Gateway Engineer
Installs and operates API gateways in front of services.
When to Use
- Rolling out a gateway for the first time
- Moving auth/rate limits to the edge
- Kubernetes ingress management
Real Commands
# Kong
kong migrations bootstrap
kong start
curl -s -X POST http://localhost:8001/services -H 'Content-Type: application/json' -d '{"name":"orders","url":"http://orders-service:8080"}'
curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'
# Traefik on K8s
helm repo add traefik https://helm.traefik.io/traefik
helm install traefik traefik/traefik
kubectl apply -f ingressroute.yaml
kubectl get ingressroute -A
IngressRoute Example
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata: {name: api}
spec:
entryPoints: [web]
routes:
- match: Host(`api.example.com`) && PathPrefix(`/orders`)
kind: Rule
services: [{name: orders, port: 8080}]
Testing
Route real traffic through the gateway and verify headers, rate limits, and health checks.
Best Practices
- Run gateway nodes with redundancy
- Enable access logs for auditing
Capabilities
kong-setup
Install Kong, bootstrap the database, and configure services and routes
Parameters:
service (string): Upstream service
upstreamUrl (string): Upstream URL
Commands:
kong migrations bootstrap
kong start
curl -s -X POST http://localhost:8001/services -H 'Content-Type: application/json' -d '{"name":"orders","url":"http://orders-service:8080"}'
curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'
kong health
Examples:
traefik-ingress
Configure Traefik as Kubernetes ingress with middlewares and TLS
Parameters:
namespace (string): Kubernetes namespace
host (string): Ingress host
Commands:
helm repo add traefik https://helm.traefik.io/traefik && helm install traefik traefik/traefik
kubectl apply -f ingressroute.yaml
kubectl get ingressroute -A
kubectl apply -f middleware-rate-limit.yaml
kubectl logs -l app.kubernetes.io/name=traefik -n traefik --tail=50
Examples:
- helm install traefik traefik/traefik -n traefik --create-namespace
- kubectl apply -f ingressroute.yaml && kubectl get ingressroute -A
- kubectl logs -l app.kubernetes.io/name=traefik -n traefik --tail=50
References
1---2name: "api-gateway-engineer"3description: "Hands-on API gateway engineering: Kong and Traefik installation, ingress setup on Kubernetes, and plugin wiring. Use when working with kong setup, traefik ingress or when the user mentions kong setup, traefik ingress."4license: "MIT"5compatibility: "Requires kong, traefik, aws-cli, docker, kubernetes. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-gateway-engineer8 author: Kdesk9 version: 2.0.010 category: infrastructure11allowed-tools: "Glob Grep Read Bash(curl:*) Bash(helm:*) Bash(kong:*) Bash(kubectl:*)"12---1314Hands-on API gateway engineering: Kong and Traefik installation, ingress setup on Kubernetes, and plugin wiring.1516## Agentic Workflow: Read -> Reason -> Act (api-gateway-engineer)1718You are **api-gateway-engineer** (infrastructure) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — infrastructure context for `api-gateway-engineer`21- Domain: Hands-on API gateway engineering: Kong and Traefik installation, ingress setup on Kubernetes, and plugin wiring.22- **kong-setup**: Install Kong, bootstrap the database, and configure services and routes — `kong migrations bootstrap`23- **traefik-ingress**: Configure Traefik as Kubernetes ingress with middlewares and TLS — `helm repo add traefik https://helm.traefik.io/traefik && helm install traefik tr`24- Check `knowledge` and `prerequisites: kong, traefik, aws-cli`2526### 2. Reason — think for `api-gateway-engineer`27- For `kong-setup`: Install Kong, bootstrap the database, and configure services and routes — decide which checks to run28- For `traefik-ingress`: Configure Traefik as Kubernetes ingress with middlewares and TLS — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-gateway-engineer` tools32- Tools: `Glob`, `Grep`, `Read`, `Kong`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-gateway-engineer:5e95f123`3536# API Gateway Engineer3738Installs and operates API gateways in front of services.3940## When to Use41- Rolling out a gateway for the first time42- Moving auth/rate limits to the edge43- Kubernetes ingress management4445## Real Commands4647```bash48# Kong49kong migrations bootstrap50kong start51curl -s -X POST http://localhost:8001/services -H 'Content-Type: application/json' -d '{"name":"orders","url":"http://orders-service:8080"}'52curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'5354# Traefik on K8s55helm repo add traefik https://helm.traefik.io/traefik56helm install traefik traefik/traefik57kubectl apply -f ingressroute.yaml58kubectl get ingressroute -A59```6061## IngressRoute Example6263```yaml64apiVersion: traefik.io/v1alpha165kind: IngressRoute66metadata: {name: api}67spec:68 entryPoints: [web]69 routes:70 - match: Host(`api.example.com`) && PathPrefix(`/orders`)71 kind: Rule72 services: [{name: orders, port: 8080}]73```7475## Testing76Route real traffic through the gateway and verify headers, rate limits, and health checks.7778## Best Practices79- Run gateway nodes with redundancy80- Enable access logs for auditing8182## Capabilities8384### kong-setup85Install Kong, bootstrap the database, and configure services and routes8687**Parameters:**88- `service` (string): Upstream service89- `upstreamUrl` (string): Upstream URL9091**Commands:**92- `kong migrations bootstrap`93- `kong start`94- `curl -s -X POST http://localhost:8001/services -H 'Content-Type: application/json' -d '{"name":"orders","url":"http://orders-service:8080"}'`95- `curl -s -X POST http://localhost:8001/services/orders/routes -H 'Content-Type: application/json' -d '{"paths":["/orders"]}'`96- `kong health`9798**Examples:**99- kong migrations bootstrap && kong start100- curl -s -X POST http://localhost:8001/services -H 'Content-Type: application/json' -d '{"name":"orders","url":"http://orders-service:8080"}'101- curl -s http://localhost:8001/services | python -m json.tool102103### traefik-ingress104Configure Traefik as Kubernetes ingress with middlewares and TLS105106**Parameters:**107- `namespace` (string): Kubernetes namespace108- `host` (string): Ingress host109110**Commands:**111- `helm repo add traefik https://helm.traefik.io/traefik && helm install traefik traefik/traefik`112- `kubectl apply -f ingressroute.yaml`113- `kubectl get ingressroute -A`114- `kubectl apply -f middleware-rate-limit.yaml`115- `kubectl logs -l app.kubernetes.io/name=traefik -n traefik --tail=50`116117**Examples:**118- helm install traefik traefik/traefik -n traefik --create-namespace119- kubectl apply -f ingressroute.yaml && kubectl get ingressroute -A120- kubectl logs -l app.kubernetes.io/name=traefik -n traefik --tail=50121122## References123- [Kong Gateway Install](https://docs.konghq.com/gateway/latest/install/)124- [Traefik Kubernetes Ingress](https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/)