Kubernetes Port Forward Service
A Visual Studio Code extension that simplifies port forwarding for Kubernetes services with an interactive UI.
Features
- List all available services across namespaces or in a specific namespace
- Select services and environments (dev, qa, stg, default) through an intuitive UI
- Automatic port detection for Kubernetes services
- Custom local and remote port configuration
- Real-time status updates with spinner animations
- Dedicated output channel for each port-forwarding session
- Option to view real-time logs for the selected service
Requirements
- Kubernetes CLI (
kubectl ) installed and configured
- Access to a Kubernetes cluster
- Kubernetes pods following the naming convention described below
Service Naming Convention
This extension expects Kubernetes pods to follow a specific naming pattern:
<service-name>-<deployment-id>
Where:
<service-name> : The actual service name
<deployment-id> : The deployment identifier (typically auto-generated by Kubernetes)
Example:
dev-identity-services-auth-claim-store-66ff887974-hg8td
In this example:
- Service name:
dev-identity-services-auth-claim-store
- Deployment ID:
66ff887974-hg8td
The extension will extract the service name from this pattern and group services by name across environments.
Usage
- Open the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P )
- Type "Kubernetes: Port-Forward Service" and select the command
- Select a namespace from the list (or choose "All namespaces" to search across all)
- Select a service from the list
- Choose an environment (dev, qa, stg, default)
- Enter a local port (default: 3000)
- Confirm or modify the detected destination port
- The extension will start port forwarding in a dedicated terminal
- Choose whether to view real-time logs for the service (Yes/No)
- If you select "Yes", logs will appear in a separate terminal window
Extension Settings
This extension does not contribute any settings yet.
Known Issues
Please report issues on the GitHub repository.
Release Notes
0.0.7
- Initial release
- Port forwarding functionality
- Service discovery across namespaces
- Environment selection (dev, qa, stg, default)
- Real-time logs for the selected service
License
This extension is licensed under the MIT License.
| |