2

🥤 kele.el: Kubernetes Enablement Layer for Emacs

 1 year ago
source link: https://jonathanj.in/kele.el/how-tos/usage/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Usage

You’ll notice this page is pretty sparse. Kele is an early-stage package with lots of room to grow. Stay tuned for more!

Kele doesn’t have a default keybinding prefix for its commands. All examples documented here assume that you’ve opted for s-k.

For instructions on how to set your own keybinding prefix, see: How-Tos > Customization.

Dispatch

Keybinding Interactive function
s-k ? kele-dispatch

Kele provides kele-dispatch as a launchpad for all subsequent Kele functionality. If you ever forget what the keybinding is for what you’re trying to accomplish, reach for kele-dispatch.

Working with Resources

Interacting with resources in Kele centers around the s-k r prefix, which is bound to kele-resource.

kele-resource allows you to act on specific resource kinds. With kele-resource, you can, for example:

  • Look up a given Kubernetes object by name, fetch its manifest, and display it in a separate buffer;
  • List out all resources of a given type.

kele-resource will first prompt you to select the kind that you’d like to work with, after which you can choose to get a specific object of that kind by name. If the resource is namespaced, you will also be presented with the option to choose the namespace to select from.

Getting a single resource

You can get a single resource of the given kind with:

s-k r <kind name> g <resource name>`

This is bound to kele-get.

kele-resource.gif

Listing all resources of a single kind

You can list all resources of a single kind with:

s-k r <kind name> l

This is bound to kele-list.

kele-list.png

This will list all resources of the specified group-version and kind in a separate buffer in a table. From here, you can:

  • Click any of the header columns to sort the list;
  • Refresh the list with g;
  • Click or hit RET on any of the entries to display its full manifest in a separate buffer.

Refreshing a resource

You can press g in a kele-get buffer to re-fetch and refresh the current resource.

Contexts

context-prefix.png

Kele commands involving Kubernetes contexts center around the s-k c prefix (kele-config).

Keybinding Functionality Interactive function Demo
s-k c s Switching from one context to another kele-context-switch
context-switch.gif
s-k c r Renaming a context kele-context-rename
context-rename.gif
s-k c d Deleting a context kele-context-delete
s-k c n Changing the default namespace kele-namespace-switch-for-current-context

Most context-related Kele functionality can also be done via Embark on any completion candidate in any context-related Kele command.

Managing proxy servers

Kele allows for starting and stopping HTTP proxies for each context. The status of each context’s proxy is displayed in the annotations for each cluster completion candidate.

Demo

kele-proxy.png

Any proxy server created via Kele is ephemeral; they are automatically closed and terminated after a set amount of time. For more details, see kele-proxy-ttl.

Each context can only have one proxy server active at a time. This is an artificial limitation put in place by Kele.

Keybinding Functionality Interactive function
s-k p p Start/stop proxy server process for the current context kele-proxy-toggle
s-k p P Start/stop proxy server process for a specific context kele-proxy-toggle

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK