kubebox and other console shells for Kubernetes

 3r33478. 3r3-31. kubebox and other console shells for Kubernetes  3r33478.
 3r33478. We are already wrote 3r36363. about “console helpers” for Kubernetes a year ago, and even earlier
did a review 3r33463. other useful utilities. However, with the development of K8s and its community, the associated ecosystem is also changing. Therefore, we again have something to tell console lovers. Go! 3r311. 3r33434.
 3r33478.
 3r33478. 3r33427. kubebox
 3r33478.
 3r33478. 3rr3461.
GitHub
3r3403. (400+ stars) 3r3404. 3r33464.  3r33478. 3rr3461. Language: jаvascript (Node.js)
 3r33478. 3rr3461. License: MIT
 3r33478. 3r33466.
 3r33478. This project was the reason for writing a review. On the one hand, he is a bright representative of the software category "geeks do for geeks", but on the other hand, he has grown to a state where he is not only pleasing to the eye, but also brings practical benefits 3r34337.  3r33478.
 3r33478. So, the purpose of kubebox is to fully work with Kubernetes within the framework of a convenient console interface, presented in the style of pseudographics: 3r3437.  3r33478.
 3r33478.
 3r33478.
 3r33478. Work implies such opportunities as navigation through files through namespaces, viewing logs and even graphs of consumption of key resources (CPU, memory, network), remote execution of commands in containers. Settings for connecting to clusters can be taken from the environment variable. KUBECONFIG or configs in $ HOME /.kube .
 3r33478.
 3r33478. Future plans of developers include support for editing configurations and performing CRUD operations, as well as significant 3–3–360. Redesigning the interface to support new types of primitives (Services, Deployments, etc.) and to easily navigate through them with additional information (in particular, kubectl describe pod ).
 3r33478.
 3r33478. An important feature is the presence of r3r368. online version (to connect to the Kubernetes API server, the required will be required. cors-allowed-origins ). In addition, kubebox can run as a separate executable file, as client 3r3403. in-cluster [/i] (via kubectl), as well as from the service deployed in the Kubernetes or OpenShift cluster (3r374. Xterm.js is used to emulate the terminal).
 3r33478.
 3r33478. For almost 2 years, the Red Hat employee from France has been working on kubebox (to be exact, even less than 10% of commits are made by his colleague). The project received quite wide publicity only in the past month (on 3-3380. Reddit 3-333463. And a number of other resources), so we can expect that this will give a new impetus to its development.
 3r33478.
 3r33478. 3r33427. kube-shell and kube-prompt
 3r33478.

kube-shell


 3r33478.
  •  3r33478. 3rr3461. GitHub 3r3403. (950+ stars) 3r3404. 3r33464.  3r33478. 3rr3461. Language: Python  3r33478. 3rr3461. License: Apache ???r3r3464.  3r33478. 3r33466.
     3r33478. 3r33112.
     3r33478. 3r3403. (Attention, this GIF is ~ 2 MB!) 3r3404.
     3r33478.
     3r33478.

    kube-prompt


     3r33478.
KUBECONFIG . One way or another, the prolonged lack of response from developers to requests that are relevant to users (see 3r3174. Issues ) Does not inspire good prospects.
 3r33478.
 3r33478. The situation with the development of kube-prompt looks slightly better. Although this project scored fewer stars on GitHub (if a year ago it was a little ahead of its Python competitor, it is now noticeably lagging behind), commits appear more or less regularly, and the latest release (3r33180. ??? 3r36363.) Dates back to October 18. However, there are not many significant changes over the past year - we note the support for Kubernetes version ??? and the possibility of autocompletion for the namespace. The main thing is that the author himself recognizes the inability to devote sufficient time to the kube-prompt development and is looking for helpers.
 3r33478.
 3r33478. Summing up on these two projects, it can be said that the kube-shell retained its leadership in terms of its supported capabilities and went ahead in popularity, but with the prospects for both shells, not everything is clear. However, if you are satisfied with the way they work now, there is no reason not to adopt them, because other alternatives in the same performance did not appear.
 3r33478.
 3r33478. 3r33427. Click
 3r33478. cycle REPL which simplifies life by maintaining a constant environment. The last is that Click "remembers" the current context, namespace, under, etc., prompting the user to execute the necessary command for this resource without having to re-specify the entire "path".
 3r33478.
 3r33478.  3r33478.
 3r33478. The idea of ​​the project originated in the company Databricks, where Kubernetes are actively using and are tired of seeing the same type of work with kubectl, requiring the constant introduction of previous data. At the same time, the engineers themselves love the kubectl utility itself - just like the console in general. So this add-on appeared, which does not claim to replace kubectl, but only helps in working with it. An example usage scenario for Click is as follows:
 3r33478.
 3r33478. 3r33411. pods //request a list of pods for the current context and namespace
 3r33478. 2 //select the second one from the list
 3r33478. describe //display a description of this pod
 3r33478. events //see recent events
 3r33478. logs -c foo> /tmp/podfoo.log //save logs to a file
 3r33478. delete //delete under (with a request to confirm the operation) 3r33412.
 3r33478.
 3r33478. If you are interested - see also small screencast Demonstrating the work of Click with text comments.
 3r33478.
 3r33478. 3r33427. Work with logs
 3r33478. As a bonus - not shells, but console tools for working with logs in Kubernetes. A year ago, we mentioned only those as such. k8stail but the past tense has shown that the problem is relevant, and there are other worthy solutions to solve it.
 3r33478.
 3r33478.

Stern


 3r33478.  3r33478. 3rr3461. GitHub 3r3403. (~ 1300 stars) 3r3404. 3r33464.  3r33478. 3rr3461. Language: Go  3r33478. 3rr3461. License: Apache ???r3r3464.  3r33478. 3r33466.
 3r33478. Stern is the undisputed favorite of the category “tail for diving in Kubernetes”. For clarity, when displaying logs, different color notation is used:
 3r33478.
 3r33478.  3r33478.
 3r33478. Its other important feature is the use of regular expressions for convenient filtering of hearths without the need to know specific IDs (for example, select all with the name Web-w + ). Similarly (i.e. regexpami), you can filter certain containers for the requested pods. Among other features stern:
 3r33478.
 3r33478.  3r33478. 3rr3461. support for custom Go-templates for output logs (there are several predefined standard ones); 3r33464.  3r33478. 3rr3461. label selectors support; 3r33464.  3r33478. 3rr3461. restriction of log output to a specified time value of --since and /or a specified number of lines; 3r33464.  3r33478. 3rr3461. support for autocompletion for bash and zsh, as well as dynamic substitution of the values ​​of namespaces and contexts. 3r33464.  3r33478. 3r33466.
 3r33478.

Kubetail


 3r33478.
 3r33478. 3rr3461. GitHub 3r3403. (~ 950 stars) 3r3404. 3r33464.  3r33478. 3rr3461. Language: Shell  3r33478. 3rr3461. License: Apache ???r3r3464.  3r33478. 3r33466.
 3r33478. A similar solution, written in the usual Bash and a little more actively developed in the last year. Like stern, it supports highlighting of the name of the pods (or the entire line that is customizable): 3r3437.  3r33478.
 3r33478. 3r33333.
 3r33478.
 3r33478. It also allows filtering pods and containers both by full names and regular expressions, as well as using selectors, limiting output by time and number of lines, supports auto-completion for Bash, zsh and fish. Among other features:
 3r33478.
 3r33478.  3r33478. 3rr3461. switchable mode --follow to update data from real-time logs (as in 3r33411. tail -f ); 3r33464.  3r33478. 3rr3461. 3r33411. --dry-run to display a list of suitable pods and containers without performing any other actions; 3r33464.  3r33478. 3rr3461. jq selector support for parsing output in JSON. 3r33464.  3r33478. 3r33466.
 3r33478.

Kail


 3r33478.
 3r33478. 3rr3461. 3r33381. GitHub 3r3403. (~ 500 stars) 3r3404. 3r33464.  3r33478. 3rr3461. Language: Go  3r33478. 3rr3461. License: MIT  3r33478. 3r33466.
 3r33478. Another implementation that has the least activity in the code base in the last year. Nevertheless, it has interesting functional features that distinguish it from its competitors, namely: 3r3437.  3r33478.
 3r33478.
  •  3r33478. 3rr3461. The limit on the request of the bases is the names of their Service, ReplicationController, ReplicaSet, Deployment, Node and /or Ingress (i.e. pods belonging to the services to which the specified Ingress leads) ; 3r33464.  3r33478. 3rr3461. opportunity not only to select by selectors, but also to exclude them; 3r33464.  3r33478. 3rr3461. determining the level of logging (
--log-level ). 3r33464.  3r33478. 3r33466.
 3r33478. 3r33418.
 3r33478.
 3r33478. But there are also disadvantages: kail does not highlight colors, does not support regular expressions for filters.
 3r33478.
 3r33478. 3r33427. P.S. 3r33434.
 3r33478. Thank you for your interest and, of course, we will be happy to receive information about your findings in the comments!
 3r33478.
 3r33478. Read also in our blog:
 3r33478.
 3r33478.
 3r33478. 3rr3461. “ Console assistants to work with Kubernetes through kubectl "; 3r33464.  3r33478. 3rr3461. “ Useful utilities when working with Kubernetes "; 3r33464.  3r33478. 3rr3461. “ Acquaintance with kube-spawn - utility for creating local Kubernetes-clusters "; 3r33464.  3r33478. 3rr3461. “ Awless is a powerful alternative CLI utility for working with AWS services. "; 3r33464.  3r33478. 3rr3461. “ An overview of GUI interfaces for managing Docker containers ". 3r33464.  3r33478. 3r33466. 3r37474. 3r33478. 3r33478. 3r33478. 3r33471. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () ();
3r33478. 3r37474. 3r33478. 3r33478. 3r33478. 3r33478.
+ 0 -

Add comment