Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh: adds karmadactl flags for proper display #764

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ spec:

部署完成后,您可以检查 Pod 和 Service 的分发情况:
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
sample-app member1 ClusterIP 10.11.29.250 <none> 80/TCP 3m53s Y
```
Expand Down Expand Up @@ -407,7 +407,7 @@ sample-app Deployment sample-app 1 10 1 1

部署完成后,您可以检查多集群 Service:
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
```
Expand All @@ -426,14 +426,14 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 首先检查 Pod 的分发情况。
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
```

* 检查多集群 Service ip。
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
```
Expand All @@ -445,7 +445,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 等待 15 秒,副本将扩容,然后您可以再次检查 Pod 分发状态。
```sh
$ karmadactl get po -l app=sample-app
$ karmadactl get po --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-454vz member2 1/1 Running 0 84s
sample-app-9b7d8c9f5-7fjhn member2 1/1 Running 0 69s
Expand All @@ -463,7 +463,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

1 分钟后,负载测试工具将停止运行,然后您可以看到工作负载在多个集群中缩容。
```sh
$ karmadactl get pods -l app=sample-app
$ karmadactl get pods --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 91m
```
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ spec:

部署完成后,您可以检查 Pod 和 Service 的分发情况:
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 9h
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
nginx-service member1 ClusterIP 10.11.216.215 <none> 80/TCP 9h Y
nginx-service member2 ClusterIP 10.13.46.61 <none> 80/TCP 9h Y
Expand Down Expand Up @@ -272,7 +272,7 @@ nginx Deployment nginx 1 10 1 9h

部署完成后,您可以检查多集群 Service:
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-nginx-service member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
```
Expand All @@ -291,13 +291,13 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 首先检查 Pod 的分发情况。
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 61m
```
* 检查多集群 Service ip。
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-nginx-service member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
```
Expand All @@ -309,7 +309,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 等待 15 秒,副本将扩容,然后您可以再次检查 Pod 分发状态。
```sh
$ karmadactl get pods -l app=nginx
$ karmadactl get pods --operation-scope members -l app=nginx
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-c2cfv member1 1/1 Running 0 22s
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 62m
Expand All @@ -328,7 +328,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

1 分钟后,负载测试工具将停止运行,然后您可以看到工作负载在多个集群中缩容。
```sh
$ karmadactl get pods -l app=nginx
$ karmadactl get pods --operation-scope members -l app=nginx
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 64m
```
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ spec:

部署完成后,您可以检查 Pod 和 Service 的分发情况:
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
sample-app member1 ClusterIP 10.11.29.250 <none> 80/TCP 3m53s Y
```
Expand Down Expand Up @@ -407,7 +407,7 @@ sample-app Deployment sample-app 1 10 1 1

部署完成后,您可以检查多集群 Service:
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
```
Expand All @@ -426,14 +426,14 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 首先检查 Pod 的分发情况。
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
```

* 检查多集群 Service ip。
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
```
Expand All @@ -445,7 +445,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 等待 15 秒,副本将扩容,然后您可以再次检查 Pod 分发状态。
```sh
$ karmadactl get po -l app=sample-app
$ karmadactl get po --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-454vz member2 1/1 Running 0 84s
sample-app-9b7d8c9f5-7fjhn member2 1/1 Running 0 69s
Expand All @@ -463,7 +463,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

1 分钟后,负载测试工具将停止运行,然后您可以看到工作负载在多个集群中缩容。
```sh
$ karmadactl get pods -l app=sample-app
$ karmadactl get pods --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 91m
```
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ spec:

部署完成后,您可以检查 Pod 和 Service 的分发情况:
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 9h
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
nginx-service member1 ClusterIP 10.11.216.215 <none> 80/TCP 9h Y
nginx-service member2 ClusterIP 10.13.46.61 <none> 80/TCP 9h Y
Expand Down Expand Up @@ -272,7 +272,7 @@ nginx Deployment nginx 1 10 1 9h

部署完成后,您可以检查多集群 Service:
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-nginx-service member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
```
Expand All @@ -291,13 +291,13 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 首先检查 Pod 的分发情况。
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 61m
```
* 检查多集群 Service ip。
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-nginx-service member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
```
Expand All @@ -309,7 +309,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 等待 15 秒,副本将扩容,然后您可以再次检查 Pod 分发状态。
```sh
$ karmadactl get pods -l app=nginx
$ karmadactl get pods --operation-scope members -l app=nginx
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-c2cfv member1 1/1 Running 0 22s
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 62m
Expand All @@ -328,7 +328,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

1 分钟后,负载测试工具将停止运行,然后您可以看到工作负载在多个集群中缩容。
```sh
$ karmadactl get pods -l app=nginx
$ karmadactl get pods --operation-scope members -l app=nginx
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 64m
```
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ spec:

部署完成后,您可以检查 Pod 和 Service 的分发情况:
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
sample-app member1 ClusterIP 10.11.29.250 <none> 80/TCP 3m53s Y
```
Expand Down Expand Up @@ -407,7 +407,7 @@ sample-app Deployment sample-app 1 10 1 1

部署完成后,您可以检查多集群 Service:
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
```
Expand All @@ -426,14 +426,14 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 首先检查 Pod 的分发情况。
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
```

* 检查多集群 Service ip。
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
```
Expand All @@ -445,7 +445,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 等待 15 秒,副本将扩容,然后您可以再次检查 Pod 分发状态。
```sh
$ karmadactl get po -l app=sample-app
$ karmadactl get po --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-454vz member2 1/1 Running 0 84s
sample-app-9b7d8c9f5-7fjhn member2 1/1 Running 0 69s
Expand All @@ -463,7 +463,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

1 分钟后,负载测试工具将停止运行,然后您可以看到工作负载在多个集群中缩容。
```sh
$ karmadactl get pods -l app=sample-app
$ karmadactl get pods --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 91m
```
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ spec:

部署完成后,您可以检查 Pod 和 Service 的分发情况:
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 9h
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
nginx-service member1 ClusterIP 10.11.216.215 <none> 80/TCP 9h Y
nginx-service member2 ClusterIP 10.13.46.61 <none> 80/TCP 9h Y
Expand Down Expand Up @@ -272,7 +272,7 @@ nginx Deployment nginx 1 10 1 9h

部署完成后,您可以检查多集群 Service:
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-nginx-service member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
```
Expand All @@ -291,13 +291,13 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 首先检查 Pod 的分发情况。
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 61m
```
* 检查多集群 Service ip。
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-nginx-service member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
```
Expand All @@ -309,7 +309,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* 等待 15 秒,副本将扩容,然后您可以再次检查 Pod 分发状态。
```sh
$ karmadactl get pods -l app=nginx
$ karmadactl get pods --operation-scope members -l app=nginx
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-c2cfv member1 1/1 Running 0 22s
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 62m
Expand All @@ -328,7 +328,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

1 分钟后,负载测试工具将停止运行,然后您可以看到工作负载在多个集群中缩容。
```sh
$ karmadactl get pods -l app=nginx
$ karmadactl get pods --operation-scope members -l app=nginx
NAME CLUSTER READY STATUS RESTARTS AGE
nginx-777bc7b6d7-mbdn8 member1 1/1 Running 0 64m
```
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ spec:

After deploying, you can check the distribution of the pods and service:
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
sample-app member1 ClusterIP 10.11.29.250 <none> 80/TCP 3m53s Y
```
Expand Down Expand Up @@ -409,7 +409,7 @@ As mentioned before, you need a multi-cluster service to route the requests to t

After deploying, you can check the multi-cluster service:
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
```
Expand All @@ -428,14 +428,14 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* Check the pod distribution firstly.
```sh
$ karmadactl get pods
$ karmadactl get pods --operation-scope members
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
```

* Check multi-cluster service ip.
```sh
$ karmadactl get svc
$ karmadactl get svc --operation-scope members
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
```
Expand All @@ -447,7 +447,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

* Wait 15s, the replicas will be scaled up, then you can check the pod distribution again.
```sh
$ karmadactl get po -l app=sample-app
$ karmadactl get po --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-454vz member2 1/1 Running 0 84s
sample-app-9b7d8c9f5-7fjhn member2 1/1 Running 0 69s
Expand All @@ -465,7 +465,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey

After 1 minute, the load testing tool will be stopped, then you can see the workload is scaled down across clusters.
```sh
$ karmadactl get pods -l app=sample-app
$ karmadactl get pods --operation-scope members -l app=sample-app
NAME CLUSTER READY STATUS RESTARTS AGE
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 91m
```
Loading