This is an Emacs plugin that makes it easier and faster to manage k8s using kubectl.
- 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.
- 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"))
- kubectl get ns
- kubectl get pods -n ns
- kubectl get deployments -n ns
- kubectl get services -n ns
- kubectl get ingresses -n ns
- kubectl get ns ns-name -o yaml
- kubectl get pods -n ns pod-name -o yaml
- kubectl get deployments -n ns deployment-name -o yaml
- kubectl get services -n ns service-name -o yaml
- kubectl get ingresses -n ns ingress-name -o yaml
- apply yaml
When run `k8s-get-ns`, there will show two tables. Left one is k8s namespaces, right one is Keymap help information about namespace table.
You can click selected item, the buffer will show namespaces yaml config.
When you selected a item, you can get pods/deployments/service/configMaps/ingress by keymap in right table.
For example, k8s-get-pods
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.
When you open any resource yaml buffer, you can edit config information and run `k8s-apply-current-yaml-buffer` to apply changes for k8s.
You can get details of k8s’ resource through interactive selections.