What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): localhost "the server could not find the requested resource"
Is this a BUG REPORT or FEATURE REQUEST? (choose one): bug report (cc @kubernetes/sig-cli-bugs)
Kubernetes version (use kubectl version):
> kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.4", GitCommit:"7243c69eb523aa4377bce883e7c0dd76b84709a1", GitTreeState:"clean", BuildDate:"2017-03-07T23:53:09Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"darwin/amd64"}
Error from server (NotFound): the server could not find the requested resource
Environment: N/A
uname -a): N/AWhat happened:
Having some service accepting HTTP requests on localhost:8080 and trying to run kubectl without a configuration file results in somewhat obscure error messages:
> kubectl run nginx --image=nginx --dry-run NAME DESIRED CURRENT READY AGE nginx 1 0 0 <unknown>
The above is confusing, it seems like kubectl was almost able to do something, but it really hasn't.
> kubectl run nginx --image=nginx Error from server (NotFound): the server could not find the requested resource (post replicationcontrollers)
This one is probably the most reasonable one, as it actually says "could not find the requested resource", although it'd be much better if it said "this is not a Kubernetes API".
> kubectl run nginx --image=nginx --dry-run --output yaml | kubectl create -f - error: error validating "STDIN": error validating data: the server could not find the requested resource; if you choose to ignore these errors, turn validation off with --validate=false
This is the most obscure, it should really say "this is not a Kubernetes API".
What you expected to happen:
Clearer error messages.
How to reproduce it (as minimally and precisely as possible):
Ensure there is no configuration (i.e. rm -f ~/.kube/config; unset KUBECONFIG), and run some HTTP service on localhost:8080, then try any of the commands shown above.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
/sig cli
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale
/lifecycle frozen
/remove-lifecycle stale
/kind bug
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
As far as I know, this has been fixed and instead kubectl errors out connection refused or something like that.
/close
Feel free to reopen it, if I'm missing something.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.![]()
Closed #44025 as completed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.![]()