@@ -192,10 +192,10 @@ spec:
192
192
193
193
After deploying, you can check the distribution of the pods and service :
194
194
` ` ` sh
195
- $ karmadactl get pods
195
+ $ karmadactl get pods --operation-scope members
196
196
NAME CLUSTER READY STATUS RESTARTS AGE
197
197
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
198
- $ karmadactl get svc
198
+ $ karmadactl get svc --operation-scope members
199
199
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
200
200
sample-app member1 ClusterIP 10.11.29.250 <none> 80/TCP 3m53s Y
201
201
` ` `
@@ -409,7 +409,7 @@ As mentioned before, you need a multi-cluster service to route the requests to t
409
409
410
410
After deploying, you can check the multi-cluster service :
411
411
` ` ` sh
412
- $ karmadactl get svc
412
+ $ karmadactl get svc --operation-scope members
413
413
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
414
414
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 9h Y
415
415
` ` `
@@ -428,14 +428,14 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey
428
428
429
429
* Check the pod distribution firstly.
430
430
` ` ` sh
431
- $ karmadactl get pods
431
+ $ karmadactl get pods --operation-scope members
432
432
NAME CLUSTER READY STATUS RESTARTS AGE
433
433
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 111s
434
434
` ` `
435
435
436
436
* Check multi-cluster service ip.
437
437
` ` ` sh
438
- $ karmadactl get svc
438
+ $ karmadactl get svc --operation-scope members
439
439
NAME CLUSTER TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ADOPTION
440
440
derived-sample-app member1 ClusterIP 10.11.59.213 <none> 80/TCP 20m Y
441
441
` ` `
@@ -447,7 +447,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey
447
447
448
448
* Wait 15s, the replicas will be scaled up, then you can check the pod distribution again.
449
449
` ` ` sh
450
- $ karmadactl get po -l app=sample-app
450
+ $ karmadactl get po --operation-scope members - l app=sample-app
451
451
NAME CLUSTER READY STATUS RESTARTS AGE
452
452
sample-app-9b7d8c9f5-454vz member2 1/1 Running 0 84s
453
453
sample-app-9b7d8c9f5-7fjhn member2 1/1 Running 0 69s
@@ -465,7 +465,7 @@ docker cp hey_linux_amd64 member1-control-plane:/usr/local/bin/hey
465
465
466
466
After 1 minute, the load testing tool will be stopped, then you can see the workload is scaled down across clusters.
467
467
` ` ` sh
468
- $ karmadactl get pods -l app=sample-app
468
+ $ karmadactl get pods --operation-scope members - l app=sample-app
469
469
NAME CLUSTER READY STATUS RESTARTS AGE
470
470
sample-app-9b7d8c9f5-xrnfx member1 1/1 Running 0 91m
471
471
` ` `
0 commit comments