Skip to main content

skyhook port-forward

Forward local port to a pod

Synopsis

Forward one or more local ports to a pod. Automatically detects the service port from the service configuration. If no port is specified, prompts to use the same local port or a random one. Uses your current kubectl context. Environment variables: SKYHOOK_ORG Default organization SKYHOOK_SERVICE Default service (or use .koala.toml) SKYHOOK_ENV Default environment (or use ‘skyhook config set env’)
skyhook port-forward [LOCAL_PORT:]REMOTE_PORT [flags]

Examples

  skyhook port-forward                   # Auto-detect port, prompt for local port
  skyhook port-forward 8080              # Forward local 8080 to pod 8080
  skyhook port-forward 8080:80           # Forward local 8080 to pod 80
  skyhook port-forward --env prod        # Forward to production pod
  skyhook port-forward --random          # Use random local port
  skyhook port-forward --first --random  # Non-interactive: first pod, random port

Options

      --address string   Address to listen on (default "localhost")
      --context string   Kubernetes context to use
  -e, --env string       Environment
      --first            Auto-select first available pod (non-interactive)
  -h, --help             help for port-forward
  -p, --pod string       Specific pod name
      --random           Use a random local port
  -s, --service string   Service to forward to

Options inherited from parent commands

      --debug        Enable debug mode (shows full API requests/responses)
  -o, --org string   Organization name
  -v, --verbose      Enable user-friendly verbose output

SEE ALSO

  • skyhook - skyhook is a CLI tool to help you create and manage k8s services