Skip to content

Commit

Permalink
add some notice for deploy.
Browse files Browse the repository at this point in the history
Signed-off-by: jsdu <[email protected]>
  • Loading branch information
root authored and jsdu committed Oct 28, 2024
1 parent e2c5898 commit 5a681dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ In the following steps, we assumed that you follow this tutorial to set up a min

1.Switch user-context to karmada-host

> karmada-host means that you are deploying Karmada with the kubeconfig for the Karmada host cluster.
```bash
export KUBECONFIG="$HOME/.kube/karmada.config"
kubectl config use-context karmada-host
Expand All @@ -37,20 +39,20 @@ You still need the jwt token to login to the dashboard.

3.Create Service Account

switch user-context to karmada-apiserver:
switch user-context to karmada-apiserver, it is important to note the configuration switching of kubeconfig:
```bash
kubectl config use-context karmada-apiserver
kubectl config use-context karmada-apiserver --kubeconfig=/etc/karmada/karmada-apiserver.config
```
Create Service Account:
```bash
kubectl apply -f artifacts/dashboard/karmada-dashboard-sa.yaml
kubectl apply -f artifacts/dashboard/karmada-dashboard-sa.yaml --kubeconfig=/etc/karmada/karmada-apiserver.config
```

4.Get jwt token

Execute the following code to get the jwt token:
```bash
kubectl -n karmada-system get secret/karmada-dashboard-secret -o go-template="{{.data.token | base64decode}}"
kubectl -n karmada-system get secret/karmada-dashboard-secret -o go-template="{{.data.token | base64decode}}" --kubeconfig=/etc/karmada/karmada-apiserver.config
```

it should print results like this:
Expand All @@ -61,7 +63,7 @@ eyJhbGciOiJSUzI1NiIsImtpZCI6InZLdkRNclVZSFB6SUVXczBIRm8zMDBxOHFOanQxbWU4WUk1VVVp
### 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.
copy the token you just generated and paste it into the Enter token field on the login page.
![image](docs/images/readme-login-en.png)
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.

Expand All @@ -77,7 +79,7 @@ Resources:
- [Meeting Link](https://zoom.us/j/97070047574?pwd=lXha0Sqngw4mwtmArP1sjsLMMXk34z.1)

## 💻Contributing
Karmada dashboard is still catching up with the features of Karmada, we have only implemented the basic functionalities currently.
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.

Expand Down
11 changes: 7 additions & 4 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Karmada是一个多云多集群管理的项目,Karmada Dashboard 是一个通

1.在kubeconfig中把user-context切换到karmada-host

> karmada-host, 部署karmada的host的kubeconfig
```bash
export KUBECONFIG="$HOME/.kube/karmada.config"
kubectl config use-context karmada-host
Expand All @@ -35,20 +37,21 @@ kubectl apply -k artifacts/overlays/nodeport-mode

3.创建Service-Account资源

在kubeconfig中把user-context切换到karmada-apiserver
在kubeconfig中把user-context切换到karmada-apiserver, 这里需要注意kubeconfig的配置切换

```bash
kubectl config use-context karmada-apiserver
kubectl config use-context karmada-apiserver --kubeconfig=/etc/karmada/karmada-apiserver.config
```
执行下面的命令创建一个service-account的资源
```bash
kubectl apply -f artifacts/dashboard/karmada-dashboard-sa.yaml
kubectl apply -f artifacts/dashboard/karmada-dashboard-sa.yaml --kubeconfig=/etc/karmada/karmada-apiserver.config
```

4.获取 jwt token:

执行下面的命令生成jwt token:
```bash
kubectl -n karmada-system get secret/karmada-dashboard-secret -o go-template="{{.data.token | base64decode}}"
kubectl -n karmada-system get secret/karmada-dashboard-secret -o go-template="{{.data.token | base64decode}}" --kubeconfig=/etc/karmada/karmada-apiserver.config
```

jwt token的形式如下所示:
Expand Down

0 comments on commit 5a681dc

Please sign in to comment.