Skip to content

BeLeap/k8s-lua.nvim

Repository files navigation

k8s-lua.nvim

Test Format

This Neovim plugin is a work in progress

This Neovim plugin is still under development, and many things could change. Please do not rely on it for production use, and report any bugs or issues you find to the issue tracker.

Thank you for your understanding!

Installation

Requirements

  • kubectl should be installed.
{
  "BeLeap/k8s-lua.nvim",
  dependencies = {
   "nvim-treesitter/nvim-treesitter",
   "rcarriga/nvim-notify", -- Optional
  },
  cmd = { "Kube" },
  config = true,
}

Screenshot

k8s-lua.nvim screenshot

Available Commands

Kube

Kube <api_group> <kind>

For example, following commands work.

  • Kube core pods
  • Kube networking.istio.io/v1beta1 virtualservices

Additionally, I treated context as a config api_group. If there is any better idea, please let me know.

Therefore, following command works.

  • Kube config contexts

All commands address above show a list view. The list view has following keymaps.

mode key action note
n e Edit resource under cursor if available
n d Request deletion under cursor if available
v d Request deletion under selection if available
n s Select under cursor Works for contexts, namespaces
n r Reload list view
n l Show logs Works for pods

KubeApply

It runs kubectl apply -f <buffer> instead of you.

Contributing

All contributions are welcome. Please open a pull request.

See CONTRIBUTING.md