# Trying to set up hpa in a kind context -- metrics not exposed

**URL:** <https://discuss.kubernetes.io/t/trying-to-set-up-hpa-in-a-kind-context-metrics-not-exposed/22484>\
**Category:** General Discussions\
**Tags:** development\
**Created:** [December 29, 2022, 11:37am UTC](https://discuss.kubernetes.io/t/trying-to-set-up-hpa-in-a-kind-context-metrics-not-exposed/22484 "2022-12-29T11:37:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgirod](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@mgirod](https://discuss.kubernetes.io/u/mgirod)\
**Post date:** [December 29, 2022, 11:37am UTC](https://discuss.kubernetes.io/t/trying-to-set-up-hpa-in-a-kind-context-metrics-not-exposed/22484/1 "2022-12-29T11:37:54Z")

</div>

### Cluster information:

Kubernetes version: v1.24.4  
Cloud being used: kind-kind  
Installation method: kubectl create/apply  
Host OS: Linux 5.14.0 Ubuntu 20.04

I want to investigate the autoscaling of my application in a kind context.  
For this, I deployed my app, prometheus, and the prometheus adapter into a local kind cluster.

I register and update metrics, but they do not show up in the output of:

```auto
k --raw /apis/custom.metrics.k8s.io/v1beta1 | jq .

```

In the log of the `custom-metrics-apiserver`, I have `404` errors for `POST` requests to [https://10.96.0.1:443/apis/authorization.k8s.io/v1beta1/subjectaccessreviews](https://10.96.0.1:443/apis/authorization.k8s.io/v1beta1/subjectaccessreviews)  
– these use a token as described in ’ Delegated Token Authentication’.

In the same log, I also have `I`nfo records for GET requests for my exported metrics, part of which successful (200), other failing (500).

Finally, I have lines such as:

```auto
opfeed> grep 'Internal ' ~/tmp/go/adapter/logk14 | sort -u
logging error output: "Internal Server Error: \"/apis/custom.metrics.k8s.io/v1beta1/namespaces/categorizers/pods/%2A/categorizer_duration?labelSelector=app.kubernetes.io%2Finstance%3Ddevelopment-openphish%2Capp.kubernetes.io%2Fname%3Ddevelopment-openphish\": the server could not find the requested resource"
logging error output: "Internal Server Error: \"/apis/custom.metrics.k8s.io/v1beta1\": the server could not find the requested resource"
logging error output: "Internal Server Error: \"/openapi/v2\": the server could not find the requested resource"
logging error output: "Internal Server Error: \"/openapi/v3\": the server could not find the requested resource"

```

Sources:

- [apiserver-builder-alpha/docs/concepts/auth.md at master · kubernetes-sigs/apiserver-builder-alpha · GitHub](https://github.com/kubernetes-sigs/apiserver-builder-alpha/blob/master/docs/concepts/auth.md)
- [GitHub - kubernetes-sigs/prometheus-adapter: An implementation of the custom.metrics.k8s.io API using Prometheus](https://github.com/kubernetes-sigs/prometheus-adapter)

Where should I look?  
Thanks
