A Flow Launcher plugin that allows you to quickly switch between Kubernetes contexts using a simple search interface.
- View current Kubernetes context
- List all available contexts
- Search and filter contexts by name
- Quick context switching with visual feedback
- Automatic kubectl detection in common installation paths
- Flow Launcher - Download and install from https://www.flowlauncher.com/
- kubectl - Make sure kubectl is installed and available in your PATH
- .NET 7.0 Runtime - Required to run the plugin
- Open Flow Launcher
- Type
pm
to open the Plugin Manager - Search for "Kubernetes Context Switcher"
- Click Install
- Clone or download this repository
- Build the project:
cd KubernetesContextSwitcher dotnet build -c Release
- Run
.\deploy-plugin.ps1
to copy the entireKubernetesContextSwitcher
folder to your Flow Launcher plugins directory:- Default location:
%APPDATA%\FlowLauncher\Plugins\
- Default location:
- Restart Flow Launcher
- Open Flow Launcher (default:
Alt + Space
) - Type
k8s
to activate the plugin - You'll see:
- Your current Kubernetes context at the top
- All available contexts below
- Use arrow keys to navigate and
Enter
to switch to a context
- Type
k8s
followed by a search term - The plugin will filter contexts that match your search
- Example:
k8s prod
will show only contexts containing "prod"
Enter
- Switch to the selected contextTab
- Navigate through results
The plugin automatically detects kubectl in the following locations:
- System PATH
- Docker Desktop installation
- WinGet installation
If kubectl is installed in a different location, you can modify the _kubectlPath
variable in Main.cs
.
-
Check kubectl installation:
kubectl version --client
-
Check Flow Launcher logs:
- Open Flow Launcher
- Type
log
to view logs - Look for any error messages related to the plugin
-
Check your kubeconfig:
kubectl config view
-
Verify contexts exist:
kubectl config get-contexts
-
Check kubeconfig location:
echo $env:KUBECONFIG
If you encounter permission issues:
- Run Flow Launcher as Administrator
- Check that your kubeconfig file has proper permissions
- Verify kubectl has access to your kubeconfig
- Clone the repository
- Install .NET 7.0 SDK
- Build the project:
dotnet build -c Release
Flow.Launcher.Plugin.KubernetesContextSwitcher/
├── Main.cs # Main plugin logic
├── plugin.json # Plugin manifest
├── KubernetesContextSwitcher.csproj # Project file
├── Images/ # Plugin icons
│ ├── k8s.png # Kubernetes icon
│ └── error.png # Error icon
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Flow Launcher - The amazing launcher framework
- Kubernetes - The container orchestration platform
- Flow.Launcher.Plugin - The plugin SDK
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Search existing issues on GitHub
- Create a new issue with detailed information about your problem
- Initial release
- Basic context switching functionality
- Search and filter capabilities
- Automatic kubectl detection
- Visual feedback for context switching