maqpna port-forward
Forward local ports to a session's sandbox, the gateway or the console (kubectl port-forward)
Synopsis#
maqpna port-forward SESSION | sess/NAME [LOCAL:]REMOTE... [-n NS] [--address 127.0.0.1]
maqpna port-forward gateway|console [LOCAL:]REMOTE... [--operator-namespace NS]Description#
gateway forwards to the gateway Service (label app.kubernetes.io/component=gateway) in the control-plane namespace; console to the console Service. A session target needs pods/portforward (checked, and recorded as a PrivilegedAccess event).
Flags#
| Flag | Type | Description | Default |
|---|---|---|---|
--address | string | local addresses to listen on (comma-separated) | 127.0.0.1 |
-n, --namespace | string | namespace | default |
--operator-namespace | string | namespace of the gateway and console Services | maqpna-system |
The global flags (--context, -o, --no-color, ...) work with every command.
Examples#
maqpna port-forward gateway 8080:8080
maqpna port-forward sess/coder-x1 -n team-a 6080:6080Exit codes#
| Code | Meaning |
|---|---|
0 | success |
1 | error (the message says what failed, with a hint when there is one) |
2 | usage error: unknown flag, missing argument or bad value; the synopsis is printed |
3 | a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command) |