Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeconfig using server paths does not work with tap #3558

grampelberg opened this issue Oct 10, 2019 · 4 comments


Copy link

@grampelberg grampelberg commented Oct 10, 2019

What is the issue?

Given a kubeconfig with clusters[0].cluster.server = https://localhost:8443/k8s/clusters/c-c6rsk, linkerd tap always fails with a 404. The URL being fetched is /apis/ and should be /k8s/clusters/c-c6rsk/apis/

How can it be reproduced?

Stand up a rancher cluster with all default settings.


This comment has been minimized.

Copy link

@ihcsim ihcsim commented Oct 10, 2019

fwiw, I remember helping a user with a similar problem. kubectl proxy won't work if clusters[0].cluster.server = https://<hostname>:<port>/<some-path> where <some-path> needs to be prepended to /apis/ An issue was raised at kubernetes/kubectl#715, as it didn't look like a Linkerd issue.


This comment has been minimized.

Copy link
Member Author

@grampelberg grampelberg commented Oct 10, 2019

It definitely works for APIServices and kubectl (at least 1.16) as that's how I figured out how it was broken to begin with.


This comment has been minimized.

Copy link

@pietervogelaar pietervogelaar commented Oct 10, 2019

A possible related problem. I have Rancher v2.2.8 and installed a default Kubernetes cluster with Rancher.

With helm 3, I installed linkerd2 edge-19.9.4. Installation works great. After running helm upgrade --install I get:

Release "linkerd" has been upgraded. Happy Helming!
NAME: linkerd
LAST DEPLOYED: Thu Oct 10 17:59:20 2019
NAMESPACE: linkerd
STATUS: deployed
The Linkerd control plane was successfully installed 🎉

To help you manage your Linkerd service mesh you can install the Linkerd CLI by running:

  curl -sL | sh

Alternatively, you can download the CLI directly via the Linkerd releases page:

Looking for more? Visit

However after this, it never works again. Every time I execute helm upgrade --install I get:

Error: UPGRADE FAILED: could not get apiVersions from Kubernetes: unable to retrieve the complete list of server APIs: the server is currently unable to handle the request

This comment has been minimized.

Copy link

@pietervogelaar pietervogelaar commented Oct 24, 2019

This line

url.Path = protohttp.TapReqToURL(req)
must be:

url.Path = path.Join(url.Path, protohttp.TapReqToURL(req))

After that it says:

./bin/go-run cli tap -n ambassador deploy/ambassador --verbose
DEBU[0000] Response from [https://rancher.localdev/k8s/clusters/c-wwnf8/apis/] had headers: map[Content-Length:[45] Content-Type:[application/octet-stream] Date:[Thu, 24 Oct 2019 15:45:04 GMT] Linkerd-Error:[Internal Server Error] Server:[openresty/] Strict-Transport-Security:[max-age=15724800; includeSubDomains]]
Error: no pods found for deployment/ambassador
  linkerd tap [flags] (RESOURCE)

However kubectl get pods -n ambassador says:

NAME                          READY   STATUS    RESTARTS   AGE
ambassador-589cd96449-7zdns   2/2     Running   0          3h1m
ambassador-589cd96449-l8drp   2/2     Running   0          3h1m
ambassador-589cd96449-v8fzv   2/2     Running   0          3h1m
pietervogelaar added a commit to pietervogelaar/linkerd2 that referenced this issue Oct 25, 2019
…with tap

Signed-off-by: Pieter Vogelaar <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2.7 - Backlog
To do
3 participants
You can’t perform that action at this time.