Skip to content

๐Ÿš€ Neovim Kubernetes Plugin : This Neovim plugin provides seamless integration with Kubernetes and Helm, allowing you to deploy and manage Kubernetes resources directly from your editor.

Notifications You must be signed in to change notification settings

h4ckm1n-dev/kube-utils-nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

76 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Neovim Kubernetes Plugin ๐Ÿš€

For the lazy, you can install my full config lazyvim with kube-utils-nvim installed [template]

GoAll Contributors

This Neovim plugin provides seamless integration with Kubernetes and Helm, allowing you to deploy and manage Kubernetes resources directly from your editor.

in both k9s mode ctl+c is remap to exit insert mode in k9s

Capture dโ€™รฉcran du 2024-05-11 18-31-56 Capture dโ€™รฉcran du 2024-05-11 18-32-41 Capture dโ€™รฉcran du 2024-05-11 18-33-09

Installation

Install the plugin using your preferred package manager (below is an example using lazy.nvim):

return {
    {
        "h4ckm1n-dev/kube-utils-nvim",
        -- dir = "/local/path/to/plugin",
        branch = "main", -- comment to use local folder
        config = function()
            require("init").setup()
        end,
    },
}

Additionaly you can create a witch-key mapping to use the commands (this is also the list of the feature) :

local helm_mappings = {
  k = {
    name = "Kubernetes",
    d = { "<cmd>HelmDeployFromBuffer<CR>", "Helm Deploy Buffer to Context" },
    r = { "<cmd>RemoveDeployment<CR>", "Helm Remove Deployment From Buffer" },
    T = { "<cmd>HelmDryRun<CR>", "Helm DryRun Buffer" },
    a = { "<cmd>KubectlApplyFromBuffer<CR>", "Kubectl Apply From Buffer" },
    D = { "<cmd>DeleteNamespace<CR>", "Kubectl Delete Namespace" },
    u = { "<cmd>HelmDependencyUpdateFromBuffer<CR>", "Helm Dependency Update" },
    b = { "<cmd>HelmDependencyBuildFromBuffer<CR>", "Helm Dependency Build" },
    t = { "<cmd>HelmTemplateFromBuffer<CR>", "Helm Template From Buffer" },
    K = { "<cmd>OpenK9sSplit<CR>", "Split View K9s" },
    k = { "<cmd>OpenK9s<CR>", "Open K9s" },
    l = { "<cmd>ToggleYamlHelm<CR>", "Toggle YAML/Helm" },
  },
}

-- Register the Helm keybindings with a specific prefix
wk.register(helm_mappings, { prefix = "<leader>" })

Requirements

  • Neovim 0.9.0 or higher
  • Helm
  • kubectl
  • k9s

Configuration

No additional configuration is required. Simply install the plugin and start using the commands.

License

This plugin is licensed under the MIT License. See the LICENSE file for details., also feel free to submit a PR

Contributors โœจ

h4ckm1n
h4ckm1n

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

If you have any suggestion on function to add, feel free to create a issue

About

๐Ÿš€ Neovim Kubernetes Plugin : This Neovim plugin provides seamless integration with Kubernetes and Helm, allowing you to deploy and manage Kubernetes resources directly from your editor.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages