What's New
Added native Kubernetes transport support with a new @k8s directive in .http files. You can annotate requests directly in Resterm and it will manage Kubernetes port-forward setup, reuse, and lifecycle for you.
- Kubernetes profiles in all scopes: global, file, and request.
- Reusing named profiles with use=..., just like SSH profiles.
- Targets by resource type, not only pods:
- pod
- service
- deployment
- statefulset
- Both numeric and named ports are supported.
- You can set context and kubeconfig per profile.
- Container selection for pod/deployment/statefulset cases.
- Port-forward session reuse (persist) and retry behavior.
- Runtime diagnostics for k8s tunnel failures and trace output.
- Timeline/trace visibility for k8s connection details.
- Added parser/hint and updated docs.
Simple .http example (Kubernetes)
# @k8s global dev-api namespace=default service=api port=http context=kind-dev persist
### Health check through k8s tunnel
# @k8s use=dev-api
GET http://api/health
### One-off request (inline profile)
# @k8s namespace=payments deployment=payments-api port=https container=api
GET https://payments/ready
This keeps the request flow familiar (just like @ssh derective): you still write normal requests and Resterm automatically routes the connection through the active Kubernetes port-forward profile.
What Changed (Non-Kubernetes)
Did a larger internal refactor to share tunnel/profile utilities between SSH and k8s. Most of this is structural, but there are a few important behavior changes:
- Proxy + tunnel is now rejected explicitly.
- If you configure proxy and also use
@sshor@k8s, Resterm now returns an error instead of silently ignoring proxy behavior.
- If you configure proxy and also use
- Missing env: variables in profile fields now fail early.
- env:VAR_NAME in SSH/k8s profile resolution now errors if the variable does not exist.
- SSH and k8s are now mutually exclusive on the same request.
- Validate and reject mixed
@ssh+@k8son the same request path. - This applies in parser and runtime validation.
- Validate and reject mixed
- Request-scoped persist for SSH/k8s is intentionally ignored, and Resterm now emits a warning.