K9s install windows 10

K9s install windows 10

K9s is a terminal based UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your deployed applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with your observed resources.

  • Information At Your Finger Tips!
    • Tracks in real-time activities of resources running in your Kubernetes cluster.
  • Standard or CRD?
    • Handles both Kubernetes standard resources as well as custom resource definitions.
  • Cluster Metrics
    • Tracks real-time metrics associates with resources such as pods, containers and nodes.
  • Power Users Welcome!
    • Provides standard cluster management commands such as logs, scaling, port-forwards, restarts…
    • Define your own command shortcuts for quick navigation via command aliases and hotkeys.
    • Plugin support to extend K9s to create your very own cluster commands.
    • Powerful filtering mode to allow user to drill down and view workload related resources.
  • Error Zoom
    • Drill down directly to what’s wrong with your cluster’s resources.
  • Skinnable and Customizable
    • Define your very own look and feel via K9s skins.
    • Customize/Arrange which columns to display on a per resource basis.
  • Narrow or Wide?
    • Provides toggles to view minimal or full resource definitions
  • MultiResources Views
    • Provides for an overview of your cluster resources via Pulses and XRay views.
  • We’ve got your RBAC!
    • Supports for viewing RBAC rules such as cluster/roles and their associated bindings.
    • Reverse lookup to asserts what a user/group or ServiceAccount can do on your clusters.
  • Built-in Benchmarking
    • You can benchmark your HTTP services/pods directly from K9s to see how your application fare and adjust your resources request/limit accordingly.
  • Resource Graph Traversals
    • K9s provides for easy traversal of Kubernetes resources and their associated resources.

If you dig this effort and feel K9s is improving your Kubernetes experience and productivity for you or your team, please join our sponsorship program! K9s is complex and and a lot of work, by clicking the Sponsor button you can help show your support and appreciation. Alternatively, just simply give us a shoot-out on social as these go a long way in keeping our batteries charged up!

    InstallationCommands Customizations
    • Feel
      • K9s
      • Aliases
      • HotKeys
      • Plugins
      • Node Shell
    • Look
      • Skins
      • Resource Columns

    BenchmarkingRBACTutorials

  • Pulses — A top level dashboard of the state of affairs of your cluster
  • XRay — Dig in your cluster resources and view their dependencies
  • Pods — List out your pods status and resource consumption
  • Logs — View and interact with your container logs
  • RBAC — View the who/what/how of authorizations on your cluster

K9s sits on top of many open source projects and libraries. Our sincere appreciations to all the OSS contributors that work nights and weekends to make this project a reality!

© 2020 Imhotep Software LLC. All materials licensed under Apache v2.0

K9s install windows 10

K9s — Kubernetes CLI To Manage Your Clusters In Style!

K9s provides a terminal UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with your observed resources.

K9sAlpha RC-0 Is Out!

Fresh off the press K9sAlpha is now available! Please read the details in the docs and checkout the new repo.

NOTE: Upon purchase, in order to activate your license, please send us a valid user name so we can generate your personalized license key. All licenses are valid for a whole year from the date of purchase.

For all other cases, please reach out to us so we can discuss your needs:

  • Corporate licenses
  • Education
  • Non Profit
  • Active K9s sponsors
  • Long term K9s supporters and contributors
  • Can’t afford it
  • Others.

Please refer to our K9s documentation site for installation, usage, customization and tips.

Wanna discuss K9s features with your fellow K9sers or simply show your support for this tool?

K9s is available on Linux, macOS and Windows platforms.

Binaries for Linux, Windows and Mac are available as tarballs in the release page.

Via Homebrew for macOS or LinuxBrew for Linux

On OpenSUSE Linux distribution

Via Scoop for Windows

Via Chocolatey for Windows

Via a GO install

Via Webi for Linux and macOS

Via Webi for Windows

Building From Source

K9s is currently using go v1.14 or above. In order to build K9 from source you must:

Build and run the executable

Running with Docker

Running the official Docker image

You can run k9s as a Docker container by mounting your KUBECONFIG :

For default path it would be:

Building your own Docker image

You can build your own Docker image of k9s from the Dockerfile with the following:

You can get the latest stable kubectl version and pass it to the docker build command with the —build-arg option. You can use the —build-arg option to pass any valid kubectl version (like v1.18.0 or v1.19.1 ).

Run your container:

K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set accordingly.

In order to issue manifest edit commands make sure your EDITOR env is set.

K9s prefers recent kubernetes versions ie 1.16+

The Command Line

Given the nature of the ui k9s does produce logs to a specific location. To view the logs and turn on debug mode, use the following commands:

K9s uses aliases to navigate most K8s resources.

Action Command Comment
Show active keyboard mnemonics and help ?
Show all available resource alias ctrl-a
To bail out of K9s :q , ctrl-c
View a Kubernetes resource using singular/plural or short-name : po⏎ accepts singular, plural, short-name or alias ie pod or pods
View a Kubernetes resource in a given namespace : alias namespace⏎
Filter out a resource view given a filter / filter⏎ Regex2 supported ie `fred
Inverse regex filer / ! filter⏎ Keep everything that doesn’t match.
Filter resource view by labels / -l label-selector⏎
Fuzzy find a resource given a filter / -f filter⏎
Bails out of view/command/filter mode
Key mapping to describe, view, edit, view logs. d , v , e , l .
To view and switch to another Kubernetes context : ctx⏎
To view and switch to another Kubernetes context : ctx context-name⏎
To view and switch to another Kubernetes namespace : ns⏎
To view all saved resources : screendump or sd⏎
To delete a resource (TAB and ENTER to confirm) ctrl-d
To kill a resource (no confirmation dialog!) ctrl-k
Launch pulses view : pulses or pu⏎
Launch XRay view : xray RESOURCE [NAMESPACE]⏎ RESOURCE can be one of po, svc, dp, rs, sts, ds, NAMESPACE is optional
Launch Popeye view : popeye or pop⏎ See https://popeyecli.io

K9s keeps its configurations in a .k9s directory in your home directory $HOME/.k9s/config.yml .

NOTE: This is still in flux and will change while in pre-release stage!

By enabling the nodeShell feature gate on a given cluster, K9s allows you to shell into your cluster nodes. Once enabled, you will have a new s for shell menu option while in node view. K9s will launch a pod on the selected node using a special k9s_shell pod. Furthermore, you can refine your shell pod by using a custom docker image preloaded with the shell tools you love. By default k9s uses a BusyBox image, but you can configure it as follows:

In K9s, you can define your very own command aliases (shortnames) to access your resources. In your $HOME/.k9s define a file called alias.yml . A K9s alias defines pairs of alias:gvr. A gvr (Group/Version/Resource) represents a fully qualified Kubernetes resource identifier. Here is an example of an alias file:

Using this alias file, you can now type pp/crb to list pods or ClusterRoleBindings respectively.

Entering the command mode and typing a resource name or alias, could be cumbersome for navigating thru often used resources. We’re introducing hotkeys that allows a user to define their own hotkeys to activate their favorite resource views. In order to enable hotkeys please follow these steps:

Create a file named $HOME/.k9s/hotkey.yml

Add the following to your hotkey.yml . You can use resource name/short name to specify a command ie same as typing it while in command mode.

Not feeling so hot? Your custom hotkeys will be listed in the help view ? . Also your hotkey file will be automatically reloaded so you can readily use your hotkeys as you define them.

You can choose any keyboard shortcuts that make sense to you, provided they are not part of the standard K9s shortcuts list.

NOTE: This feature/configuration might change in future releases!

Resource Custom Columns

You can change which columns shows up for a given resource via custom views. To surface this feature, you will need to create a new configuration file, namely $HOME/.k9s/views.yml . This file leverages GVR (Group/Version/Resource) to configure the associated table view columns. If no GVR is found for a view the default rendering will take over (ie what we have now). Going wide will add all the remaining columns that are available on the given resource after your custom columns. To boot, you can edit your views config file and tune your resources views live!

NOTE: This is experimental and will most likely change as we iron this out!

Here is a sample views configuration that customize a pods and services views.

K9s allows you to extend your command line and tooling by defining your very own cluster commands via plugins. K9s will look at $HOME/.k9s/plugin.yml to locate all available plugins. A plugin is defined as follows:

  • Shortcut option represents the key combination a user would type to activate the plugin
  • Confirm option (when enabled) lets you see the command that is going to be executed and gives you an option to confirm or prevent execution
  • Description will be printed next to the shortcut in the k9s menu
  • Scopes defines a collection of resources names/short-names for the views associated with the plugin. You can specify all to provide this shortcut for all views.
  • Command represents ad-hoc commands the plugin runs upon activation
  • Background specifies whether or not the command runs in the background
  • Args specifies the various arguments that should apply to the command above

K9s does provide additional environment variables for you to customize your plugins arguments. Currently, the available environment variables are as follows:

  • $NAMESPACE — the selected resource namespace
  • $NAME — the selected resource name
  • $CONTAINER — the current container if applicable
  • $FILTER — the current filter if any
  • $KUBECONFIG — the KubeConfig location.
  • $CLUSTER the active cluster name
  • $CONTEXT the active context name
  • $USER the active user
  • $GROUPS the active groups
  • $POD while in a container view
  • $COL- use a given column name for a viewed resource. Must be prefixed by COL- !

This defines a plugin for viewing logs on a selected pod using ctrl-l for shortcut.

NOTE: This is an experimental feature! Options and layout may change in future K9s releases as this feature solidifies.

Benchmark Your Applications

K9s integrates Hey from the brilliant and super talented Jaana Dogan. Hey is a CLI tool to benchmark HTTP endpoints similar to AB bench. This preliminary feature currently supports benchmarking port-forwards and services (Read the paint on this is way fresh!).

To setup a port-forward, you will need to navigate to the PodView, select a pod and a container that exposes a given port. Using SHIFT-F a dialog comes up to allow you to specify a local port to forward. Once acknowledged, you can navigate to the PortForward view (alias pf ) listing out your active port-forwards. Selecting a port-forward and using CTRL-B will run a benchmark on that HTTP endpoint. To view the results of your benchmark runs, go to the Benchmarks view (alias be ). You should now be able to select a benchmark and view the run stats details by pressing . NOTE: Port-forwards only last for the duration of the K9s session and will be terminated upon exit.

Initially, the benchmarks will run with the following defaults:

  • Concurrency Level: 1
  • Number of Requests: 200
  • HTTP Verb: GET
  • Path: /

The PortForward view is backed by a new K9s config file namely: $HOME/.k9s/bench- .yml (note: extension is yml and not yaml ). Each cluster you connect to will have its own bench config file, containing the name of the K8s context for the cluster. Changes to this file should automatically update the PortForward view to indicate how you want to run your benchmarks.

Here is a sample benchmarks.yml configuration. Please keep in mind this file will likely change in subsequent releases!

On RBAC enabled clusters, you would need to give your users/groups capabilities so that they can use K9s to explore their Kubernetes cluster. K9s needs minimally read privileges at both the cluster and namespace level to display resources and metrics.

These rules below are just suggestions. You will need to customize them based on your environment policies. If you need to edit/delete resources extra Fu will be necessary.

NOTE! Cluster/Namespace access may change in the future as K9s evolves. NOTE! We expect K9s to keep running even in atrophied clusters/namespaces. Please file issues if this is not the case!

Cluster RBAC scope

Namespace RBAC scope

If your users are constrained to certain namespaces, K9s will need to following role to enable read access to namespaced resources.

Example: Dracula Skin 😉

You can style K9s based on your own sense of look and style. Skins are YAML files, that enable a user to change the K9s presentation layer. K9s skins are loaded from $HOME/.k9s/skin.yml . If a skin file is detected then the skin would be loaded if not the current stock skin remains in effect.

You can also change K9s skins based on the cluster you are connecting too. In this case, you can specify the skin file name as $HOME/.k9s/mycontext_skin.yml Below is a sample skin file, more skins are available in the skins directory in this repo, just simply copy any of these in your user’s home dir as skin.yml .

Colors can be defined by name or uing an hex representation. Of recent, we’ve added a color named default to indicate a transparent background color to preserve your terminal background color settings if so desired.

NOTE: This is very much an experimental feature at this time, more will be added/modified if this feature has legs so thread accordingly!

NOTE: Please see K9s Skins for a list of available colors.

This is still work in progress! If something is broken or there’s a feature that you want, please file an issue and if so inclined submit a PR!

K9s will most likely blow up if.

  1. You’re running older versions of Kubernetes. K9s works best on Kubernetes latest.
  2. You don’t have enough RBAC fu to manage your cluster.

K9s sits on top of many open source projects and libraries. Our sincere appreciations to all the OSS contributors that work nights and weekends to make this project a reality!

Meet The Core Team!

We always enjoy hearing from folks who benefit from our work!

  • File an issue first prior to submitting a PR!
  • Ensure all exported items are properly commented
  • If applicable, submit a test suite against your PR

© 2020 Imhotep Software LLC. All materials licensed under Apache v2.0

About

🐶 Kubernetes CLI To Manage Your Clusters In Style!

Читайте также:  Поиск dll файлов windows 10
Оцените статью