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

Kubectl Proxy to Dashboard broken in 1.7.6 #52729

Closed
discostur opened this issue Sep 19, 2017 · 8 comments · Fixed by #52933
Closed

Kubectl Proxy to Dashboard broken in 1.7.6 #52729

discostur opened this issue Sep 19, 2017 · 8 comments · Fixed by #52933
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cli Categorizes an issue or PR as relevant to SIG CLI.

Comments

@discostur
Copy link

/kind bug

What happened:
Deployed a new cluster v1.7.6 with kubeadm and tried to access dashboard via kubectl proxy. I tested two links, but only one works:

broken:
http://localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy

works:
http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/

What you expected to happen:

Should work, because with kubernetes 1.7.5 it works without any problem.

How to reproduce it (as minimally and precisely as possible):

deploy new cluster 1.7.6 with kubeadm (centos 7.4) and calico network provider

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.6", GitCommit:"4bc5e7f9a6c25dc4c03d4d656f2cefd21540e28c", GitTreeState:"clean", BuildDate:"2017-09-14T06:36:08Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration**:
on prem
  • OS (e.g. from /etc/os-release):
CentOS 7.4
  • Kernel (e.g. uname -a):
Linux k8s-play01.customer-virt.eu 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
kubeadm 1.7.5

Already discussed the problem at the dashboard repository and it seems to be a problem with kube proxy
kubernetes/dashboard#2368

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 19, 2017
@k8s-github-robot
Copy link

@discostur
There are no sig labels on this issue. Please add a sig label by:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <label>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. You can find the group list here and label list here.
The <group-suffix> in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Sep 19, 2017
@jenciso
Copy link

jenciso commented Sep 19, 2017

I have the same problem

@recyard
Copy link

recyard commented Sep 20, 2017

Same issue here, the fact is if I add a trailing "/" to the following url, the dashboard will show.

http://localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy

@TomskDiver
Copy link

@kubernetes/sig-network-bugs

@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. kind/bug Categorizes issue or PR as related to a bug. labels Sep 20, 2017
@k8s-ci-robot
Copy link
Contributor

@TomskDiver: Reiterating the mentions to trigger a notification:
@kubernetes/sig-network-bugs

In response to this:

@kubernetes/sig-network-bugs

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cmluciano
Copy link

/remove-sig network

/sig cli

@k8s-ci-robot k8s-ci-robot added sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed sig/network Categorizes an issue or PR as relevant to SIG Network. labels Sep 21, 2017
k8s-github-robot pushed a commit that referenced this issue Sep 23, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Preserve leading and trailing slashes on proxy subpaths

subresource parsing was not populating path parameters correctly (leading and trailing slashes were being stripped)

this caused bad locations to be sent to the proxy, causing #52022. the first attempt to fix that (#52065) unconditionally prefixed '/', which broke the redirect case (#52813 #52729)

fixes #52813, fixes #52729

needs to be picked to 1.7 and 1.8

```release-note
Restores redirect behavior for proxy subresources
```
@emwalker
Copy link
Contributor

emwalker commented Dec 8, 2017

For anyone running into this issue with v1.8.0, see this link, and if you're using the proxy, try:

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

@pfalomorblab
Copy link

the wiki page has been removed. How can i see the link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
None yet
9 participants