Processes kubectl outputs to enable vim-like navigation in a buffer for your cluster.
- Navigate your cluster in a buffer, using hierarchy where possible (backspace for up, enter for down) e.g. root -> deplyoment -> pod -> container
- Colored output and smart highlighting
- Floating windows for contextual stuff such as logs, description, containers..
- kubectl
- neovim >= 0.10
Install the plugin with your preferred package manager:
return {
{
"ramilito/kubectl.nvim",
keys = {
{
"<leader>k",
function()
require("kubectl").open()
end,
desc = "Kubectl",
},
},
config = function()
require("kubectl").setup()
end,
},
}
{
auto_refresh = {
enabled = false,
interval = 3000, -- milliseconds
},
namespace = "All",
notifications = {
enabled = true,
verbose = false,
blend = 100,
},
hints = true,
context = true,
float_size = {
-- Almost fullscreen:
-- width = 1.0,
-- height = 0.95, -- Setting it to 1 will cause bottom to be cutoff by statuscolumn
-- For more context aware size:
width = 0.9,
height = 0.8,
-- Might need to tweak these to get it centered when float is smaller
col = 10,
row = 5,
},
obj_fresh = 0, -- highlight if creation newer than number (in minutes)
mappings = {
exit = "<leader>k",
}
}
No startup impact since we load on demand.
By moving the cursor to a header word and pressing s
In the pod view, select a pod by pressing <cr>
and then again <cr>
on the container you want to exec into
Warning
As we have not yet reached v1.0.0, we may have some breaking changes in cases where it is deemed necessary.
This plugins main purpose is to browse the kubernetes state using vim like navigation and keys, similar to oil.nvim for filebrowsing. I might add a way to act on the cluster (delete resources, edit) in the future, not sure yet.