You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use the `hack/local-up-karmada.sh` script to deploy Karmada, `karmada-metrics-adapter` will be installed by default.
119
116
120
117
## Deploy workload in `member1` and `member2` cluster
121
118
@@ -222,13 +219,14 @@ spec:
222
219
- port: http
223
220
```
224
221
225
-
```
222
+
```sh
226
223
kubectl create -f sample-app.monitor.yaml
227
224
```
228
225
229
226
Now, you should see your metrics (http_requests_total) appear in your Prometheus instance. Look them up via the dashboard, and make sure they have the namespace and pod labels. If not, check the labels on the service monitor match the ones on the Prometheus CRD.
230
227
231
228
## Launch you adapter in `member1` and `member2` cluster
229
+
232
230
After you deploy `prometheus-adapter`, you need to update to the adapter config which is necessary in order to expose custom metrics.
## Registry metrics API in `member1` and `member2` cluster
262
+
## Register metrics API in `member1` and `member2` cluster
265
263
266
264
You also need to register the custom metrics API with the API aggregator (part of the main Kubernetes API server). For that you need to create an APIService resource.
267
265
@@ -281,20 +279,40 @@ spec:
281
279
versionPriority: 100
282
280
```
283
281
284
-
```
282
+
```sh
285
283
$ kubectl create -f api-service.yaml
286
284
```
287
285
288
286
The API is registered as `custom.metrics.k8s.io/v1beta2`, and you can use the following command to verify:
289
287
290
-
```
288
+
```sh
291
289
$ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/namespaces/default/pods/*/http_requests?selector=app%3Dsample-app"
0 commit comments