Awesome
<p align="center"> <img src="https://github.com/KubeHelper/kubehelper/blob/main/src/main/resources/web/img/logo-full.png" width="500" /> </p>KubeHelper - simplifies many daily Kubernetes cluster tasks through a web interface. Search, analysis, run commands, cron jobs, reports, filters, git synchronization and many more.
Features
- Dashboard - common cluster information.
- Search - search, filter, view resources in a cluster.
- Ips and Ports - search, filter, view services and pods ips, ports and detailed information.
- Security - search, filter, view roles, rules, RBAC, pod and container security contexts, service accounts, pod security policies.
- Labels Annotations Selectors - search, filter, view, group of labels, annotations and selectors in resources.
- Commands - commands execution, management, creation, history.
- Cron Jobs - creating, execution, control of cron jobs and view reports.
- Configurations - configure KubeHelper, change config, push, pull config commands, cron jobs from repository.
- Versions - KubeHelper utils, shells and plugins versions.
Motivation
Kubernetes is a great and revolutionary product. I have been studying it and using it for many years, but very often there was a need to have many different functions and commands at hand. Each time you type long commands in the command line, search in history, write aliases, and so on. Of course you can do so if you wish. I like consoles and I understand that no product can replace the console. But sometimes there is no way to login into the console, or history has not been saved, or you are under the new host. Or many other reasons.
Some companies have strict rules and very often you need to forward several ssh tunnels to login into the console. Or generally you have very limited console access.
Many desktop clients requires a certificate to connect to the server. And keeping the certificate from the cluster on the local machine is not 100% secure.
And what if there is no way to install the client on the local machine for access to the cluster, again you need to create aliases or copy commands from snippets. Very often I see that people are looking for certain kubectl commands, articles are published with several different commands, but there are hundreds of them, and thousands of variations. Of course, all these tasks can be automated, and surely every user / administrator of the cluster has already solved these tasks in one or another way for himself/herself, but I am sure that there are some who have not done it yet.
The same with search in Kubernetes cluster, sometimes you need to know where to look, and if there are a lot of resources, then it is not so easy to find what you need. I don't want to write a long commands, so I decided to create a "search" for many frequently used resources. As a result, KubeHelper appeared, together with ideas that came during development.
I also tried to look at the resources from the other point of view. Many GUI solutions show resources by namespace, a few more useful functions, and this is where the flexibility of graphical interfaces ends, and to do something different than just showing a list of resources in the namespace, again you have to turn to the console. For example group labels, find selector, view RBACs and so on ...
Then I got the idea to help the community organize many commands in a single interface, install kubectl, plugins, utilities and make a web interface for using the command line and also implemented other functions that will be useful in daily work with the Kubernetes cluster.
Quick start
Before installing KubeHelper in your cluster, you can configure the installation such that the KubeHelper is visible through the NodePort
otherwise by default KubeHelper creates Service with
ClusterIP
and you need to specify service http://kubehelper-svc.YOUR-NAMESPACE/
in your ingress or proxy.
KubeHelper has basic protection with a username and password. You can customize/replace them by replacing the environment variables in the deployment. By default, you can login with these
credentials (username/password) kube/helper
.
After deployment, KubeHelper is visible in the container at port 8080
. This means that you can refer to the container by the service name. KubeHelper responds to 2 Urls /home
and /kubehelper
.
If you are not logged in, you will be redirected to the login /home
page. If you are logged in, then the KubeHelper will be available to you on /kubehelper
.
The interface consists of two parts, the control panel on the left and content area. KubeHelper combines a lot of different functionality that are divided into sections. Everyone will find something for themselves.
For your safety, KubeHelper is installed with read rights. Using the KubeHelper with default settings means you cannot modify, create, or delete resources. Therefore, you can only execute commands intended for reading and viewing resources.
But KubeHelper is very flexible in this regard, you can change the ClusterRole rights up to the cluster administrator πͺ . Be careful with these rightsβ
In this case, you can execute any commands and perform any actions with the cluster from web GUI.
Read more about fine-tuning and customization in the installation section.
Your support
βΒ If you have a wonderful command that will be useful to the community and you want to share it. Please write a message in the discussions, or even better, add a message with a command and description in accordance with the KubeHelper format. You can see how the command looks like here.
βΒ Which new features would you add at first? Which new feature will make your daily work easier? I composed a list of possible new features, I would appreciate for your opinions and votes.
It is enough to leave a comment with just a list of numbers sorted by priority, or feel free to leave your own suggestion. Here is a corresponding Issue for a new feature request.
π π π Β βββ Β Thank you in advance for your support, repost, fork, star, donation. Β βββ Β πππ
π₯ π₯ π₯ Β Happy using. Β π₯π₯π₯
Installation
Helm
KubeHelper can be installed using Helm. It is highly recommended to change the default username and password. You can find a detailed description of all customized properties in file values.yaml.
To install a Helm Chart you have many different options. Here are some of them.
#Download kubehelper.tar.gz with curl. Replace Version with last Version nummer
curl -O https://github.com/KubeHelper/kubehelper/blob/main/installers/helm/kubehelper-1.0.0.tar.gz
#Download kubehelper.tar.gz with wget. Replace Version with last Version nummer
wget https://github.com/KubeHelper/kubehelper/blob/main/installers/helm/kubehelper-1.0.0.tar.gz
#or simply clone repo, and go to sources folder.
cd /tmp && git clone https://github.com/KubeHelper/kubehelper.git
#Install KubeHelper with your myvals.yaml file from tar.gz
helm install -f myvals.yaml -n YOURNAMESPACE kubehelper ./kubehelper-1.0.0.tar.gz
#Install KubeHelper with default file and change some values(username and password)
helm install --set kubehelper.username=myusername --set kubehelper.password=mypassword -n YOURNAMESPACE kubehelper ./kubehelper-1.0.0.tar.gz
#Install KubeHelper with default values from tar.gz
helm install -n YOURNAMESPACE kubehelper ./kubehelper-1.0.0.tar.gz
#Install KubeHelper from cloned github repo with default values.
helm install -n infra kubehelper /tmp/kubehelper/installers/helm/kubehelper/
Remove KubeHelper with Helm.
helm uninstall kubehelper -n YOURNAMESPACE
Troubleshooting:
Wget and Curl can download tar.gz files as html documents. Then during installation you will receive the following error.
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
or something like this
... does not appear to be a gzipped archive; got 'text/html; charset=utf-8'
#You can check the file type as follows.
file kubehelper-1.0.0.tar.gz
There are 2 solutions, download the archive correctly or use the git clone and install the helm chart from the sources.
Terraform
The Terraform module is ready for installation. You need to connect it to your modules and specify the namespace in which the KubeHelper should be installed. Don't forget to change default username and password in variables.tf.
- Add a module to your main.tf. Change the name and path to the module.
module "infra_kube_helper" {
source = "./namespaces/infra/kubehelper"
}
- Refresh terraform state.
terraform init
- Install module with terraform.
terraform apply -auto-approve -compact-warnings -target=module.infra_kube_helper
- Remove the KubeHelper module with Terraform.
terraform destroy -auto-approve -compact-warnings -target=module.infra_kube_helper
kubectl
Replace YOUR_NAMESPACE_NAME with your namespace name. βΒ Run order is important.
KUBE_HELPER_NAMESPACE="YOUR_NAMESPACE_NAME"
kubectl create clusterrolebinding kubehelper-crb --clusterrole=kubehelper-cr --serviceaccount=$KUBE_HELPER_NAMESPACE:kubehelper-sa
kubectl apply -f https://raw.githubusercontent.com/KubeHelper/kubehelper/main/installers/kubectl/kubehelper-clusterrole.yaml -n=$KUBE_HELPER_NAMESPACE
kubectl apply -f https://raw.githubusercontent.com/KubeHelper/kubehelper/main/installers/kubectl/kubehelper-deployment.yaml -n=$KUBE_HELPER_NAMESPACE
The above method will install KubeHelper with the default user and password. To change the user and password, download the file to your computer, change the password and install from a local file. You can also change role rules, other parameters and names.
KUBE_HELPER_NAMESPACE="YOUR_NAMESPACE_NAME"
#download
curl -o kubehelper-deployment.yaml https://raw.githubusercontent.com/KubeHelper/kubehelper/main/installers/kubectl/kubehelper-deployment.yaml
#change username and password
vi kubehelper-deployment.yaml
#create ClusterRoleBinding
kubectl create clusterrolebinding kubehelper-crb --clusterrole=kubehelper-cr --serviceaccount=$KUBE_HELPER_NAMESPACE:kubehelper-sa
#download
curl -o kubehelper-clusterrole.yaml https://raw.githubusercontent.com/KubeHelper/kubehelper/main/installers/kubectl/kubehelper-clusterrole.yaml
#change Role Rules if needed
vi kubehelper-clusterrole.yaml
#install KubeHelper and ClusterRole
kubectl apply -f kubehelper-clusterrole.yaml -n=$KUBE_HELPER_NAMESPACE
kubectl apply -f kubehelper-deployment.yaml -n=$KUBE_HELPER_NAMESPACE
Remove KubeHelper with kubectl.
kubectl delete deploy,sa,po,svc,clusterrole -l app=kubehelper -n $KUBE_HELPER_NAMESPACE
kubectl delete clusterrolebinding kubehelper-crb
Comes soon
KubeHelper as Terraform Module
KubeHelper as Helm Chart
Usage
For detailed instructions on how to configure, customize, use, and more read the KubeHelper Wiki.
Support
π₯ Β Enhancement Request
π Β New Feature Request
π Β Bug Report
β Β Support Request
β Β Help the project => RATE US
π’ Β Slack
License
Licensed GPL-3.0, see LICENSE.