All Projects → KubeOperator → Webkubectl

KubeOperator / Webkubectl

Licence: apache-2.0
Run kubectl command in Web Browser.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Webkubectl

Kube Prompt
An interactive kubernetes client featuring auto-complete.
Stars: ✭ 1,614 (+313.85%)
Mutual labels:  command-line-tool, kubectl
Kube Aliases
Kubernetes Aliases and Bash Functions
Stars: ✭ 40 (-89.74%)
Mutual labels:  command-line-tool, kubectl
Kubectl Plugins
A Collection of Plugins for kubectl Integration (exec as any user, context switching, etc).
Stars: ✭ 340 (-12.82%)
Mutual labels:  kubectl
Mongo Seeding
The ultimate solution for populating your MongoDB database.
Stars: ✭ 375 (-3.85%)
Mutual labels:  command-line-tool
Krew
📦 Find and install kubectl plugins
Stars: ✭ 4,354 (+1016.41%)
Mutual labels:  kubectl
Gitui
Blazing 💥 fast terminal-ui for git written in rust 🦀
Stars: ✭ 6,762 (+1633.85%)
Mutual labels:  command-line-tool
Bulksplash
A simple command line tool that lets you bulk download images from Unsplash
Stars: ✭ 362 (-7.18%)
Mutual labels:  command-line-tool
Jwt Cli
A super fast CLI tool to decode and encode JWTs built in Rust
Stars: ✭ 336 (-13.85%)
Mutual labels:  command-line-tool
Jmxterm
Interactive command line JMX client
Stars: ✭ 389 (-0.26%)
Mutual labels:  command-line-tool
Speed Test
Test your internet connection speed and ping using speedtest.net from the CLI
Stars: ✭ 3,654 (+836.92%)
Mutual labels:  command-line-tool
T Rec Rs
Blazingly fast terminal recorder that generates animated gif images for the web written in rust
Stars: ✭ 361 (-7.44%)
Mutual labels:  command-line-tool
Graphaello
A Tool for Writing Declarative, Type-Safe and Data-Driven Applications in SwiftUI using GraphQL
Stars: ✭ 355 (-8.97%)
Mutual labels:  command-line-tool
Tcping
ping over a tcp connection
Stars: ✭ 346 (-11.28%)
Mutual labels:  command-line-tool
Corgi
Corgi is a command-line workflow manager that helps with your repetitive command usages by organizing them into reusable snippet
Stars: ✭ 365 (-6.41%)
Mutual labels:  command-line-tool
All Contributors Cli
Tool to help automate adding contributor acknowledgements according to the all-contributors specification ✨
Stars: ✭ 345 (-11.54%)
Mutual labels:  command-line-tool
Stylesync
A command line tool to extract shared styles from a Sketch document, and generate native code for any platform.
Stars: ✭ 382 (-2.05%)
Mutual labels:  command-line-tool
Zsh Kubectl Prompt
Display information about the kubectl current context and namespace in zsh prompt.
Stars: ✭ 342 (-12.31%)
Mutual labels:  kubectl
Rak8s
Stand up a Raspberry Pi based Kubernetes cluster with Ansible
Stars: ✭ 354 (-9.23%)
Mutual labels:  kubectl
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (-11.54%)
Mutual labels:  command-line-tool
Ledger
Double-entry accounting system with a command-line reporting interface
Stars: ✭ 4,062 (+941.54%)
Mutual labels:  command-line-tool

中文 README.md

Web Kubectl - Run kubectl command in web browser

License Dockerized Version Downloads HitCount

webkubectl

Goal

Web Kubectl helps you manage kubernetes credentials and run kubectl command in web browser, so that you don't have to install kubectl on your local PC or some other servers, furthermore Web Kubectl can be used for a team.

Advantage

  • Support multiple user and multiple Kubernetes clusters:One deployment of Web Kubectl can be used for a team, all of the team members can use Web Kubectl simultaneously although they are connecting different Kubernetes clusters or different privileges.
  • Session isolation:All of the online sessions are isolated, each session has its own namespace and storage which is invisible to the others.
  • Support kubeconfig file and bearer token:You can provide kubeconfig file or bearer token to connect Kubernetes cluster through Web Kubectl.
  • Easy to use and integrate:You can simply use the index page for a quick start, or integrate with your application using api.
  • Manage Kubernetes clusters in VPC:Through Web Kubectl you can manage the Kubernetes clusters in VPC which is unreachable from you laptop.
_______________________________________________________________________
|   Local Network     |          DMZ           |      VPC/Datacenter  |
|                     |                        |                      |
|                     |    _______________     |   ----------------   |
|   ---------------   |    |             |  /~~~~~>| Kubernetes A |   |
|   | Your Laptop |~~~~~~~>| Web Kubectl | /   |   ----------------   |
|   ---------------   |    |             | \   |                      |
|                     |    ---------------  \  |   ----------------   |
|                     |                      \~~~~>| Kubernetes B |   |
|                     |                        |   ----------------   |
-----------------------------------------------------------------------

Architecture

Web Kubectl use webkubectl/gotty to run a JavaScript based terminal on web browsers.
When opens a new session, a temporary Linux namespace will be created for the session, this make sure all sessions are isolated, each session has its own namespace and storage, meanwhile .kube/config file is generated for current session.
When session terminated, the provisioned namespace and storage are deleted.

Installation

$ docker run --name="webkubectl" -p 8080:8080 -d --privileged kubeoperator/webkubectl

Advanced environment variables

ENV Type Default Value Description
SESSION_STORAGE_SIZE string 10M Storage size limit for single connection
KUBECTL_INSECURE_SKIP_TLS_VERIFY bool true Whether to skip tls verify
GOTTY_OPTIONS string --port 8080 --permit-write --permit-arguments Gotty options, see more
WELCOME_BANNER string Welcome to Web Kubectl, try kubectl --help. Welcome banner after web terminal opened

Usage

Use index page

Open below url in web browser.

http://<webkubectl-address>:<port>

In the opened page you can manage your own kubeconfig files or bearer tokens which are stored in local storage, then choose a session and click connect to use kubectl command in web terminal.

index

terminal

Use API

Get token by Kubernetes API server address and bearer token

$ curl http://<webkubectl-address>:<port>/api/kube-token -X POST -d '{"name":"gks-hk-dev","apiServer":"https://k8s-cluster:6443","token":"token-content"}'
#response
$ {"success":true,"token":"mkolj4hgbutfgy1thgp1","message":""}

Request Json

key Type Description
name string session name
apiServer string API server address
token string Kubernetes bearer token

Response Json

key Type Description
success bool the request is proceeded successfully or not
token string token used to open terminal
message string error message if success is false

Get token by kubeconfig file

$ curl http://<webkubectl-address>:<port>/api/kube-config -X POST -d '{"name":"k8s-cluster-bj1","kubeConfig":"<kubeconfig file content base64 encoded>"}'
#response
$ {"success":true,"token":"mkolj4hgbutfgy1thgp1","message":""}

Request Json

key Type Description
name string session name
kubeConfig string kubeconfig file content base64 encoded

Response Json

key Type Description
success bool the request is proceeded successfully or not
token string token used to open terminal
message string error message if success is false

Open web terminal with token fetched from API

http://<webkubectl-address>:<port>/terminal/?token=<token fetched from api>

Security

  • Token validation:The token fetched from api will be invalid immediately after it's used once, and it expires after 5 minutes if not used.
  • Authentication:By default all resources can be accessed without any authentication, to restrict anonymous access, you can enable the basic authentication of gotty, see how to.
  • SSL/TLS:By default all traffic between the server and clients are NOT encrypted, we recommend you enable SSL/TLS option of gotty, see how to. Alternatively you can deploy Web Kubectl behind a proxy and enable SSL/TLS for the proxy, please note that the proxy should support WebSocket protocol.

Extensions

Dependencies

License

Copyright (c) 2014-2019 FIT2CLOUD 飞致云

https://www.fit2cloud.com

Web Kubectl is licensed under the Apache License, Version 2.0.


Alternatives

Advertisement

KubeOperator

KubeOperator is an open source project, a web based application enable you to deploy and manage production ready Kubernetes clusters on VMware, Openstack, virtual machines and physical machines in LAN network without internet connectivity.
https://kubeoperator.io
https://github.com/kubeoperator/kubeoperator

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].