<p>Small Kubernetes API question please.</p>
<p>(This is not helm related btw)</p>
<p>I am just running a basic <code>kubectl get --raw &quot;/apis/custom.metrics.k8s.io/v1beta1&quot;</code></p>
<p>However, I got the following as result: <code>Error from server (NotFound): the server could not find the requested resource</code></p>
<p>I am a bit confused here, hope this technical question is not too much of a trouble.</p>
<p>What does it even mean?</p>
<p>Is it because I failed to create something? (I never created this &quot;custom.metrics.k8s.io&quot; myself)</p>
<p>Maybe some kind of credential issues?</p>
<p>How can I root cause, troubleshoot and fix this please?</p>
<p>Thank you!</p>

PatPanda
<p>You need to create the APIs with for example:</p>
<pre><code>apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
  name: v1beta1.custom.metrics.k8s.io
spec:
  service:
    name: prometheus-adapter
    namespace: monitoring
  group: custom.metrics.k8s.io
  version: v1beta1
  insecureSkipTLSVerify: true
  groupPriorityMinimum: 100
  versionPriority: 100
</code></pre>
<p>This works with kube-prometheus. Maybe you have to change <code>spec.service.name</code> and <code>spec.service.namepsace</code> for whatever you use as a monitoring service.</p>
<p>I found this <a href="https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/deploy/manifests/custom-metrics-apiservice.yaml" rel="nofollow noreferrer">here</a>, but had to change the version of <code>apiregistration.k8s.io</code> from <code>v1beta1</code> to <code>v1</code>.</p>
