<p>I have successfully deployed</p>
<ul>
<li>prometheus via helm chart <strong>kube-prometheus-stack</strong> (<a href="https://prometheus-community.github.io/helm-charts" rel="nofollow noreferrer">https://prometheus-community.github.io/helm-charts</a>)</li>
<li>prometheus-adapter via helm chart <strong>prometheus-adapter</strong> (<a href="https://prometheus-community.github.io/helm-charts" rel="nofollow noreferrer">https://prometheus-community.github.io/helm-charts</a>)</li>
</ul>
<p>using default configuration with slight customization.</p>
<p>I can access prometheus, grafana and alertmanager, query metrics and see fancy charts.</p>
<p>But prometheus-adapter keeps complaining on startup that it can't access/discover metrics:</p>
<pre><code>I0326 08:16:52.266095       1 adapter.go:98] successfully using in-cluster auth
I0326 08:16:52.330094       1 dynamic_serving_content.go:111] Loaded a new cert/key pair for &quot;serving-cert::/var/run/serving-cert/tls.crt::/var/run/serving-cert/tls.key&quot;
E0326 08:16:52.334710       1 provider.go:227] unable to update list of all metrics: unable to fetch metrics for query &quot;{namespace!=\&quot;\&quot;,__name__!~\&quot;^container_.*\&quot;}&quot;: bad_response: unknown response code 404
</code></pre>
<p>I've tried various prometheus URLs in the prometheus-adapter Deployment command line argument but  the problem is more or less the same.</p>
<p>E.g. some of the URLs I've tried are</p>
<pre><code>--prometheus-url=http://prometheus-operated.prom.svc:9090

--prometheus-url=http://prometheus-kube-prometheus-prometheus.prom.svc.cluster.local:9090                                                                                                                                                                                                              
</code></pre>
<p>There are the following services / pods running:</p>
<pre><code>$ kubectl -n prom get pods
NAME                                                     READY   STATUS    RESTARTS   AGE
alertmanager-prometheus-kube-prometheus-alertmanager-0   2/2     Running   0          16h
prometheus-adapter-76fcc79b7b-7xvrm                      1/1     Running   0          10m
prometheus-grafana-559b79b564-bh85n                      2/2     Running   0          16h
prometheus-kube-prometheus-operator-8556f58759-kl84l     1/1     Running   0          16h
prometheus-kube-state-metrics-6bfcd6f648-ms459           1/1     Running   0          16h
prometheus-prometheus-kube-prometheus-prometheus-0       2/2     Running   1          16h
prometheus-prometheus-node-exporter-2x6mt                1/1     Running   0          16h
prometheus-prometheus-node-exporter-bns9n                1/1     Running   0          16h
prometheus-prometheus-node-exporter-sbcjb                1/1     Running   0          16h

$ kubectl -n prom get services
NAME                                      TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                      AGE
alertmanager-operated                     ClusterIP   None           &lt;none&gt;        9093/TCP,9094/TCP,9094/UDP   16h
prometheus-adapter                        ClusterIP   10.0.144.45    &lt;none&gt;        443/TCP                      16h
prometheus-grafana                        ClusterIP   10.0.94.160    &lt;none&gt;        80/TCP                       16h
prometheus-kube-prometheus-alertmanager   ClusterIP   10.0.0.135     &lt;none&gt;        9093/TCP                     16h
prometheus-kube-prometheus-operator       ClusterIP   10.0.170.205   &lt;none&gt;        443/TCP                      16h
prometheus-kube-prometheus-prometheus     ClusterIP   10.0.250.223   &lt;none&gt;        9090/TCP                     16h
prometheus-kube-state-metrics             ClusterIP   10.0.135.215   &lt;none&gt;        8080/TCP                     16h
prometheus-operated                       ClusterIP   None           &lt;none&gt;        9090/TCP                     16h
prometheus-prometheus-node-exporter       ClusterIP   10.0.70.247    &lt;none&gt;        9100/TCP                     16h

kubectl -n kube-system get deployment/metrics-server
NAME             READY   UP-TO-DATE   AVAILABLE   AGE
metrics-server   1/1     1            1           15d
</code></pre>
<p>Prometheus-adapter helm chart gets deployed using the following values:</p>
<pre><code>prometheus:
  url: http://prometheus-kube-prometheus-prometheus.prom.svc.cluster.local
certManager:
  enabled: true
</code></pre>
<p>What is the correct value for <code>--prometheus-url</code> for <strong>prometheus-adapter</strong> in my setup ?</p>

<p>I'm using both helm charts (<em>kube-prometheus-stack</em> and <em>prometheus-adapter</em>).</p>
<p>additional path prefix that works for me is &quot;/&quot;, but, prometheus url must be with the name of your helm-install parameter for stack (&quot;helm install &quot;).  I'm using &quot;<strong>prostack</strong>&quot; as stack name. So finally, it works for me:</p>
<pre><code>helm install &lt;adapter-name&gt; -n &lt;namespace&gt; --set prometheus.url=http://prostack-kube-prometheus-s-prometheus.monitoring.svc.cluster.local --set prometheus.port=9090 --set prometheus.path=/
</code></pre>
