https://github.com/kezhenxu94/telescope-kubectl.nvim
An wrapper around kubectl for telescope.nvim. Allowing you to interact with your kubernetes cluster from within neovim, using the power of telescope.
https://github.com/kezhenxu94/telescope-kubectl.nvim
kubernetes neovim nvim nvim-telescope
Last synced: 3 months ago
JSON representation
An wrapper around kubectl for telescope.nvim. Allowing you to interact with your kubernetes cluster from within neovim, using the power of telescope.
- Host: GitHub
- URL: https://github.com/kezhenxu94/telescope-kubectl.nvim
- Owner: kezhenxu94
- Created: 2024-05-06T13:28:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-11T10:15:55.000Z (about 1 year ago)
- Last Synced: 2025-03-25T13:15:42.253Z (7 months ago)
- Topics: kubernetes, neovim, nvim, nvim-telescope
- Language: Lua
- Homepage:
- Size: 35.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# telescope-kubectl.nvim
An wrapper around `kubectl` for [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim).
Allowing you to interact with your kubernetes cluster from within neovim, using the power of telescope.# Features
- [x] List Kubernetes resources, Pods, Deployments, Services, etc.
- [x] Load the YAML of a resource into a buffer, and edit it.
- [x] Delete or update resources, including scale deployments, set images, etc.
- [x] Load logs of Pod containers into a buffer, with live updates.
- [x] Port-forward to a Pod, and delete the port-forwards on exit neovim.
- [x] Exec into a Pod container.# Requirements
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)# Installation
Here are my own sample installation instructions, you can use your own plugin manager and adjust the configurations as needed.
```lua
return {
{
'nvim-telescope/telescope.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
'kezhenxu94/telescope-kubectl.nvim',
},
config = function()
require('telescope').setup {
-- Your telescope configuration
}
require("telescope").load_extension("kubectl")require('which-key').register({
[''] = {
k = {
name = "+kubectl",
c = {
name = "+contexts, configmaps, cronjobs, etc",
t = { require('telescope').extensions.kubectl.contexts, 'Kubernetes Contexts' },
m = { require('telescope').extensions.kubectl.configmaps, 'Kubernetes Configmaps' },
j = { require('telescope').extensions.kubectl.cronjobs, 'Kubernetes CronJobs' },
},
d = { require('telescope').extensions.kubectl.deployments, 'Kubernetes Deployments' },
j = { require('telescope').extensions.kubectl.jobs, 'Kubernetes Jobs' },
k = { require('telescope').extensions.kubectl.api_resources, 'Kubernetes Resources' },
n = {
name = "+namespaces, nodes, etc",
s = { require('telescope').extensions.kubectl.namespaces, 'Kubernetes Namespaces' },
o = { require('telescope').extensions.kubectl.nodes, 'Kubernetes Nodes' },
},
s = {
name = "+secrets, services, statefulsets, etc",
ec = { require('telescope').extensions.kubectl.secrets, 'Kubernetes Secrets' },
vc = { require('telescope').extensions.kubectl.services, 'Kubernetes Services' },
ts = { require('telescope').extensions.kubectl.statefulsets, 'Kubernetes StatefulSets' },
},
p = {
name = "+pods, port-forwards",
o = { require('telescope').extensions.kubectl.pods, 'Kubernetes Pods' },
f = { require('telescope').extensions.kubectl.port_forwards, 'Kubernetes Port Forwards' },
},
},
},
})
end
},
}
```