Configuration
Many forwards, one file
Group forwards by context and namespace. Each forward names a resource, a remote port and a local port.
service/<name>forwards to a service.pod/<name>matches an exact pod name or a name prefix.podwithselectorpicks a pod by label.protocolis optional. Onlytcpis accepted.
contexts:
- name: production
namespaces:
- name: default
forwards:
- resource: service/api
protocol: tcp
port: 8080
localPort: 8080
alias: prod-api
httpLog: true
- resource: service/postgres
protocol: tcp
port: 5432
localPort: 5432
alias: prod-db
- name: monitoring
forwards:
- resource: pod
selector: app=prometheus
protocol: tcp
port: 9090
localPort: 9090
alias: prometheus
- name: staging
namespaces:
- name: default
forwards:
- resource: pod/myapp # prefix match survives pod restarts
protocol: tcp
port: 8080
localPort: 8081
alias: staging-http