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.
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>" })
- Neovim 0.9.0 or higher
- Helm
- kubectl
- k9s
No additional configuration is required. Simply install the plugin and start using the commands.
This plugin is licensed under the MIT License. See the LICENSE file for details., also feel free to submit a PR
h4ckm1n ๐ป |
This project follows the all-contributors specification. Contributions of any kind welcome!