Web UI for Karmada
Go to file
karmada-bot 3ac08d9a87
Merge pull request #223 from warjiang/feat/karmada-web-terminal-api
add api for karmada web terminal
2025-07-23 14:54:27 +08:00
.github feat(docker): rm duplicate action file 2025-07-11 16:24:06 +08:00
artifacts optimize readme file 2025-01-13 10:47:09 +08:00
charts/karmada-dashboard fix: create sa resource in control-plane with helm chart (#196) 2025-02-17 19:40:13 +08:00
cluster/images build(deps): bump alpine from 3.22.0 to 3.22.1 in /cluster/images 2025-07-21 01:59:29 +00:00
cmd feat(api): add terminal backend api 2025-07-23 11:12:29 +08:00
deploy Update karmada-dashboard-secret.yaml 2024-08-27 15:07:07 +08:00
docs Add: add proposal of i18n tool which is developed for ospp 2024 project 2024-09-10 20:26:45 +08:00
hack bump golangci-lint to v2.0.2 (#225) 2025-07-10 19:36:14 +08:00
pkg feat(api): add terminal backend api 2025-07-23 11:12:29 +08:00
ui feat(terminal): add wsUrl option 2025-07-07 14:14:37 +08:00
.gitignore update Makefile, make development simpler 2025-01-20 16:24:50 +08:00
.golangci.yml bump golangci-lint to v2.0.2 (#225) 2025-07-10 19:36:14 +08:00
CODE_OF_CONDUCT.md add Code of Conduct 2023-12-02 20:01:34 +08:00
DEVELOPMENT.md a few enhancements according to the suggestion 2025-07-16 18:18:59 -04:00
LICENSE Initial commit 2021-12-13 16:04:24 +08:00
Makefile Merge pull request #174 from warjiang/ci/build-multi-platforms 2025-05-12 09:43:23 +08:00
OWNERS add wenjiang and samzong onto the owner list 2024-06-26 15:13:05 +08:00
README.md optimize readme file 2025-01-13 10:47:09 +08:00
go.mod feat(api): expose GetCurrentUser method 2025-07-23 10:52:12 +08:00
go.sum feat(api): expose GetCurrentUser method 2025-07-23 10:52:12 +08:00
todos.md doc: add todos and doc for developer 2024-06-12 12:03:58 +08:00

README.md

Karmada-dashboard

License

Karmada Dashboard is a general-purpose, web-based control panel for Karmada which is a multi-cluster management project. image

🚀QuickStart

Prerequisites

You need to have a Karmada installed on Kubernetes(aka. host cluster) and the karmadactl or kubectl command-line tool must be configured to communicate with your host cluster and Karmada control plane.

If you don't already have the Karmada, you can launch one by following this tutorial.


Install Karmada-dashboard

In the following steps, we are going to install Karmada Dashboard on the host cluster where running the Karmada control plane components. We assume that Karmada was installed in namespace karmada-system and Karmada config is located at $HOME/.kube/karmada.config, if this differs from your environment, please modify the following commands accordingly.

  1. Switch user-context of your Karmada config to karmada-host.
export KUBECONFIG="$HOME/.kube/karmada.config"
kubectl config use-context karmada-host

Now, you should be able to see Karmada control plane components by following command:

kubectl get deployments.apps -n karmada-system

If everything works fine, you will get similar messages as following:

NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
karmada-aggregated-apiserver          2/2     2            2           3d
karmada-apiserver                     1/1     1            1           3d
karmada-controller-manager            1/1     1            1           3d
karmada-kube-controller-manager       1/1     1            1           3d
karmada-scheduler                     2/2     2            2           3d
karmada-webhook                       2/2     2            2           3d
  1. Deploy Karmada Dashboard

Clone this repo to your machine:

git clone https://github.com/karmada-io/dashboard.git

Change to the dashboard directory:

cd dashboard

Create the secret based on your Karmada config, the Karmada Dashboard will use this config to talk to the Karmada API server.

kubectl create secret generic kubeconfig --from-file=kubeconfig=$HOME/.kube/karmada.config -n karmada-system

Deploy Karmada Dashboard:

kubectl apply -k artifacts/overlays/nodeport-mode

This will deploy two components in karmada-system namespace:

kubectl get deployments.apps -n karmada-system                                                                                                                karmada-dev-linux-renhongcai: Fri Jan 10 16:08:38 2025

NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
karmada-dashboard-api                 1/1     1            1           2m
karmada-dashboard-web                 1/1     1            1           2m
...

Then you will be able to access the Karmada Dashboard by http://your-karmada-host:32000. Note that, the Karmada Dashboard service type is NodePort, this exposes the dashboard on a specific port on each node of your host cluster, allowing you to access it via any node's IP address and that port.

You also can use kubectl port-forward to forward a local port to the Dashboard's backend pod:

kubectl port-forward -n karmada-system services/karmada-dashboard-web --address 0.0.0.0 8000:8000

Then you can access it via http://localhost:8000.

You still need the jwt token to login to the dashboard.

  1. Create Service Account

switch user-context to karmada-apiserver:

kubectl config use-context karmada-apiserver

Create Service Account:

kubectl apply -f artifacts/dashboard/karmada-dashboard-sa.yaml
  1. Get jwt token

Execute the following code to get the jwt token:

kubectl -n karmada-system get secret/karmada-dashboard-secret -o go-template="{{.data.token | base64decode}}"

it should print results like this:

eyJhbGciOiJSUzI1NiIsImtpZCI6InZLdkRNclVZSFB6SUVXczBIRm8zMDBxOHFOanQxbWU4WUk1VVVpUzZwMG8ifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrYXJtYWRhLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrYXJtYWRhLWRhc2hib2FyZC10b2tlbi14NnhzcCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJrYXJtYWRhLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6ImE5Y2RkZDc3LTkyOWYtNGM0MS1iZDY4LWIzYWVhY2E0NGJiYiIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprYXJtYWRhLXN5c3RlbTprYXJtYWRhLWRhc2hib2FyZCJ9.F0BqSxl0GVGvJZ_WNwcEFtChE7joMdIPGhv8--eN22AFTX34IzJ_2akjZcWQ63mbgr1mVY4WjYdl7KRS6w4fEQpqWkWx2Dfp3pylIcMslYRrUPirHE2YN13JDxvjtYyhBVPlbYHSj7y0rvxtfTr7iFaVRMFFiUbC3kVKNhuZtgk_tBHg4UDCQQKFALGc8xndU5nz-BF1gHgzEfLcf9Zyvxj1xLy9mEkLotZjIcnZhwiHKFYtjvCnGXxGyrTvQ5rgilAxBKv0TcmjQep_TG_Q5M9r0u8wmxhDnYd2a7wsJ3P3OnDw7smk6ikY8UzMxVoEPG7XoRcmNqhhAEutvcJoyw

Login Dashboard

Now open Karmada-dashboard with url http://your-karmada-host:32000

copy the token you just generated and paste it into the Enter token field on the login page. image Once the process of authentication passed, you can use karmada dashboard freely. You can follow the Usage of karmada-dashboard to have a quick experience of karmada dashboard.

Meeting

Regular Meeting For dashboard:

Resources:

💻Contributing

Karmada dashboard is still catching up with the features of Karmada, we have only implemented the basic functionalities currently. If you want to contribute to the development of the Karmada dashboard, you can refer to the document of development, we are happy to see more contributors join us. Please feel free to submit issues or pull requests to our repository.

License

Karmada-dashboard is under the Apache 2.0 license. See the LICENSE file for details.