diff --git a/lua/custom/keymaps.lua b/lua/custom/keymaps.lua index 12a30e47..66788a5e 100644 --- a/lua/custom/keymaps.lua +++ b/lua/custom/keymaps.lua @@ -38,3 +38,8 @@ end) -- In your keybindings configuration (e.g., lua/config/keymaps.lua or init.lua) vim.keymap.set('n', 'w', 'NvimTreeToggle', { desc = 'Toggle NvimTree' }) + +-- Insert Kubernetes Deployment template below the cursor +vim.keymap.set('n', 'kd', function() + vim.cmd 'read ~/.config/nvim/lua/custom/templates/k8s-deployment.yaml' +end, { desc = 'Insert K8s Deployment template' }) diff --git a/lua/custom/templates/k8s-deployment.yaml b/lua/custom/templates/k8s-deployment.yaml new file mode 100644 index 00000000..4722ce54 --- /dev/null +++ b/lua/custom/templates/k8s-deployment.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: +spec: + replicas: 1 + selector: + matchLabels: + app: + template: + metadata: + labels: + app: + spec: + containers: + - name: + image: nginx:latest + ports: + - containerPort: 80 +