kube-utils-nvim
                                
                                
                                
                                    kube-utils-nvim copied to clipboard
                            
                            
                            
                        π 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.
π Neovim Kubernetes Plugin π
For the lazy, you can install my full config lazyvim with kube-utils-nvim installed [template]
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
Installation
Install the plugin using your preferred package manager (below is an example using lazy.nvim):
-- ~/.config/nvim/lua/plugins/kube-utils.lua
return {
  {
    "h4ckm1n-dev/kube-utils-nvim",
    dependencies = { "nvim-telescope/telescope.nvim" },
    lazy = true,        -- Enable lazy loading for this plugin
    event = "VeryLazy", -- Load the plugin when Neovim starts
    opts = {},
  },
}
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 π»  | 
      ohdearaugustin π»  | 
    
This project follows the all-contributors specification. Contributions of any kind welcome!