Skip to content

This is an Emacs plugin that makes it easier and faster to manage k8s using kubectl.

Notifications You must be signed in to change notification settings

ginqi7/kubectl-emacs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Kubectl-emacs

This is an Emacs plugin that makes it easier and faster to manage k8s using kubectl.

Prerequisites

  • kubectl

This tool is based on kubectl.

  • ctable

This tool uses the emacs package ctable to show all kubectl issues, you can download it from github or install it using ELPA.

Installing

  • clone the project in your own emacs configuration files directory, like:
git clone git@github.com:ginqi7/kubectl-emacs.git ~/.emacs.d/lisp/kubectl
  • add the path to ‘load-path’
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/kubectl"))

Configuration

Features

  1. kubectl get ns
  2. kubectl get pods -n ns
  3. kubectl get deployments -n ns
  4. kubectl get services -n ns
  5. kubectl get ingresses -n ns
  6. kubectl get ns ns-name -o yaml
  7. kubectl get pods -n ns pod-name -o yaml
  8. kubectl get deployments -n ns deployment-name -o yaml
  9. kubectl get services -n ns service-name -o yaml
  10. kubectl get ingresses -n ns ingress-name -o yaml
  11. apply yaml

Example

k8s-get-ns

When run `k8s-get-ns`, there will show two tables. Left one is k8s namespaces, right one is Keymap help information about namespace table.

images/2022-06-19_12-48-13_screenshot.png

You can click selected item, the buffer will show namespaces yaml config.

images/2022-06-19_12-52-32_screenshot.png

k8s-get-resources

When you selected a item, you can get pods/deployments/service/configMaps/ingress by keymap in right table.

For example, k8s-get-pods

images/2022-06-19_12-55-58_screenshot.png

k8s-get-yaml-config

When you open any resource table buffer, like namespaeces / pods etc, you click any selected item, there will open other yaml buffer to show detail information.

images/2022-06-19_12-58-54_screenshot.png

apply yaml buffer

When you open any resource yaml buffer, you can edit config information and run `k8s-apply-current-yaml-buffer` to apply changes for k8s.

k8s-get-interactive

You can get details of k8s’ resource through interactive selections.

About

This is an Emacs plugin that makes it easier and faster to manage k8s using kubectl.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published