Giter VIP home page Giter VIP logo

kpad's Introduction

kpad

A Kubernetes manifests editor.

Kpad is a simple multiplatform terminal editor born to edit kubernetes declarative manifest yaml files.

It has syntax highlighting and provides a handy auto-complete that pops up a list of possible context-aware fields at the cursor position.

To show the auto-complete list, press CTRL+SPACE on Linux/Mac or press CTRL+K on Windows

Screenshot

autocompletion configuration

If you work using the plain "kubectl" CLI from your console, then kpad should work on the fly.

Behind the scenes, kpad calls "kubectl explain" to populate the auto-complete list, so it is also aware of your custom kubernetes objects in your cluster, and provides autocompletion for them.

If in your cluster you use something different from the plain "kubectl" CLI command, you can configure it in kpad launching kpad -c and change the configuration there.

For example if you use "MicroK8s", then launch kpad -c and change like this:

kubectl: microk8s kubectl

kpad honours your KUBECONFIG

If you wish to use kpad to edit kubernetes manifests from other clusters, and you have the "kubeconfig" file for those clusters, you can point to that cluster by setting the KUBECONFIG environment variable to the path of that file, and then kpad would connect to that cluster to provide auto-completion.

make kpad the default kubernetes manifests editor

To make kpad your default kubernetes manifests editor, set the "KUBE_EDITOR" environment variable to the path where kpad is. In linux, for example: export KUBE_EDITOR=/<path>/<to>/kpad

Screenshot

Kpad is still work-in-progress, although it is pretty stable and quite fast.

  • It is written in go.
  • It's pretty lightweight.
  • It compiles for Mac, Win, Linux.
  • It also supports wide characters (2x width on the terminal).
  • It even runs on my phone.

(using kpad from termux, editing a deployment on my remote cluster, with the remote kubeconfig)

building the kpad binary

There could be bugs, and you are welcome to contribute with fixes,enhancements,features,etc.

Requirement

Building

  • Clone this repo, then from the main directory of this repo, build with:

go build .

The executable will be created in that directory.

You can download the kpad binary for Ubuntu here : https://github.com/mrqzzz/kpad/actions/runs/6377365694

missing/TODO features

  • Undo
  • Replace text

kpad's People

Contributors

mrqzzz avatar

Stargazers

Sergio Soares avatar devdivision avatar daniel avatar Alexander Miroshnichenko avatar Francesco Cheinasso avatar Johnson Masilla Vino avatar dy avatar Eugene Klimov avatar  avatar  avatar Marco Iorio avatar  avatar Juan Manuel Carreira avatar Kürşad Çayır avatar Timotej Avsec avatar Fabio Tielen avatar R. Mathieu Landvreugd avatar Sabyrzhan Tynybayev avatar Ali Ghanbarzadeh avatar Nicola Moro avatar Se7en avatar  avatar  avatar Mark Kogan avatar Chad Moon avatar Tim Schrumpf avatar Woojay Poynter avatar Rachid Zarouali avatar Willian T. avatar Phil Evans avatar null data avatar  avatar Mohammed Mohiuddin avatar Igor Assunção avatar Rodrigo Cosme avatar Daniel Alvarez avatar Tim Kersey avatar Sven Sackers avatar  avatar John Mitchell avatar Richard Metzler avatar Andrei Surugiu avatar Piotr Wera avatar Rock Sun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.