@masoudei/freelens-pod-filebrowser
v0.1.0
Published
Browse, view, edit, upload, and delete files inside running Kubernetes pod containers — directly from Freelens.
Maintainers
Readme
Freelens Pod File Browser
A Freelens extension that provides a full-featured file browser for Kubernetes pod containers. Browse, view, edit, upload, and delete files inside running pods — directly from the Freelens UI.
Features
- Directory browsing — Navigate pod filesystems with a flat file listing and clickable breadcrumb bar
- File viewing & editing — Open files in a Monaco editor with syntax highlighting; edit and save changes back to the pod
- Upload files — Upload local files to the pod via button or drag-and-drop (max 1 MB)
- Download files — Download any file from the pod to your local machine
- Delete files/directories — Remove files or directories with a confirmation dialog
- Binary file detection — Automatically detects binary files and shows a download-only placeholder instead of the editor
- Symlink resolution — Displays symlink targets inline in the file listing
- Context menu — Right-click entries for quick access to Open, Download, Copy Path, and Delete
- Container selector — Switch between containers (including init containers) within a pod
- Search/filter — Filter files by name within the current directory
- Permissions display — Shows file permissions, sizes, and types parsed from
ls -laoutput - Split-panel layout — File tree on top, editor on bottom; works in both the pod detail panel and the dedicated cluster page
- Cluster page — Full-page file browser with namespace, pod, and container selectors
Screenshots
Coming soon — contributions welcome!
Installation
From Release
- Download the latest
.tgzfrom the Releases page - Open Freelens
- Go to Extensions (Ctrl+Shift+E)
- Drag the
.tgzfile into the extensions panel or use the file picker
From Source
git clone https://github.com/masoudei/freelens-pod-filebrowser.git
cd freelens-pod-filebrowser
pnpm install
pnpm build:force
pnpm packThen load the generated .tgz file in Freelens as described above.
Usage
Pod Detail Panel
- Navigate to any pod in Freelens
- Open the pod details drawer
- Scroll to the Filesystem Browser section
- Select a container and start browsing
Cluster Page
- Open the Freelens sidebar
- Click Pod Filesystem in the menu
- Select a namespace, pod, and container from the dropdowns
Keyboard & Mouse
| Action | How |
|--------|-----|
| Open file/directory | Click the entry |
| Navigate up | Click .. or a breadcrumb segment |
| Right-click menu | Right-click any file entry |
| Upload files | Click the Upload button, or drag & drop files onto the file list |
| Filter files | Type in the filter input above the file list |
| Refresh | Click the refresh button in the toolbar |
Requirements
- Freelens >= 1.5.0
kubectlavailable on your system PATH- The target pod must have basic shell utilities (
ls,cat,stat,head,rm)
How It Works
The extension uses kubectl exec through the Freelens proxy kubeconfig to run shell commands inside pod containers. This means:
- It uses the same authentication as your Freelens cluster connection (including EKS SSO, etc.)
- No direct Kubernetes API calls — just standard shell utilities
- File content is transferred as base64 for uploads, and raw text for reads
- Binary detection uses file extension matching + null byte detection in the first 512 bytes
Development
pnpm install # Install dependencies
pnpm build # Compile (with type checking)
pnpm build:force # Compile (skip type checking)
pnpm pack # Create installable .tgz
pnpm pack:dev # Build + pack in one step
pnpm type:check # Type checking only
pnpm clean # Remove build output
pnpm clean:all # Remove build output, node_modules, and .tgz filesProject Structure
freelens-pod-filebrowser/
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
├── electron.vite.config.js # Build configuration
└── src/
├── main/
│ └── index.ts # IPC handlers (kubectl exec commands)
└── renderer/
├── index.tsx # Extension registration
├── components/
│ ├── pod-fs-details.tsx # Pod detail panel integration
│ ├── pod-fs-page.tsx # Full-page cluster page
│ ├── file-tree.tsx # File listing, breadcrumb, upload, context menu
│ ├── file-viewer.tsx # Monaco editor / binary placeholder
│ └── pod-fs-icon.tsx # Extension icon
└── styles/
└── pod-fs.module.scss # Scoped styles (CSS Modules)Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
License
This project is licensed under the MIT License — see the LICENSE file for details.
