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

v2.0.0-rc5 failed to create storageclass with "the server could not find the requested resource"" #4999

Closed
Wade201801 opened this issue Mar 12, 2020 · 3 comments · Fixed by #5002
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Wade201801
Copy link

kubernetes-dashboard version: v2.0.0-rc5
kubelet version: v1.17.1

Issue Description:
On web ui of kubernetes-dashboard, create deployment/daemonset/pod successfully; But failed to create storage class.
Error Info is "the server could not find the requested resource"

Kubernetes-dashboard log:
2020/03/12 03:27:25 [2020-03-12T03:27:25Z] Incoming HTTP/1.0 POST /api/v1/appdeploymentfromfile request from 192.168.166.12:24162: {"name":"","namespace":"default","content":"kind: StorageClass\napiVersion: storage.k8s.io/v1\nmetadata:\n name: common\nprovisioner: kubernetes.io/cinder\nparameters:\n availability: nova","validate":true} 2020/03/12 03:27:25 Namespace for deploy from file: default 2020/03/12 03:27:25 [2020-03-12T03:27:25Z] Outcoming response to 192.168.166.12:24162 with 404 status code 2020/03/12 03:27:28 [2020-03-12T03:27:28Z] Incoming HTTP/1.0 GET /api/v1/namespace request from 192.168.166.12:45698:

Kube-apiserver log: (I tried on web ui of kubernetes-dashboard with different namespaces ncms/kube-system/default)
{"log":"I0312 03:23:56.196778 1 **httplog.go:90] POST /apis/storage.k8s.io/v1/namespaces/ncms/storageclasses: (578.79µs) 404** [dashboard/v2.0.0-rc5 192.168.166.10:55177]\n","stream":"stderr","time":"2020-03-12T03:23:56.196834569Z"} {"log":"I0312 03:25:48.735927 1 **httplog.go:90] POST /apis/storage.k8s.io/v1/namespaces/kube-system/storageclasses: (934.56µs) 404** [dashboard/v2.0.0-rc5 192.168.166.10:55177]\n","stream":"stderr","time":"2020-03-12T03:25:48.735982752Z"} {"log":"I0312 03:27:25.298302 1 **httplog.go:90] POST /apis/storage.k8s.io/v1/namespaces/default/storageclasses: (452.581µs) 404** [dashboard/v2.0.0-rc5 192.168.166.10:55177]\n","stream":"stderr","time":"2020-03-12T03:27:25.298390889Z"}

I think the root cause it kubernetes-dashboard take namespaces info when calling k8s api but storageclass belong to no namespaces.
The correct log when creating storage class by kubectl with the same yaml data.
{"log":"I0312 03:30:42.105435 1 handler.go:153] kube-aggregator: GET \"/apis/storage.k8s.io/v1/storageclasses/common\" satisfied by nonGoRestful\n","stream":"stderr","time":"2020-03-12T03:30:42.105606781Z"} {"log":"I0312 03:30:42.105468 1 pathrecorder.go:247] kube-aggregator: \"/apis/storage.k8s.io/v1/storageclasses/common\" satisfied by prefix /apis/storage.k8s.io/v1/\n","stream":"stderr","time":"2020-03-12T03:30:42.105640595Z"} {"log":"I0312 03:30:42.105484 1 handler.go:143] kube-apiserver: GET \"/apis/storage.k8s.io/v1/storageclasses/common\" satisfied by gorestful with webservice /apis/storage.k8s.io/v1\n","stream":"stderr","time":"2020-03-12T03:30:42.105661713Z"} {"log":"I0312 03:30:42.114796 1 httplog.go:90] GET /apis/storage.k8s.io/v1/storageclasses/common: (9.778701ms) 404 [kubectl/v1.17.1 (linux/amd64) kubernetes/d224476 192.168.166.7:54102]\n","stream":"stderr","time":"2020-03-12T03:30:42.115100639Z"} {"log":"I0312 03:30:42.116257 1 handler.go:153] kube-aggregator: POST \"/apis/storage.k8s.io/v1/storageclasses\" satisfied by nonGoRestful\n","stream":"stderr","time":"2020-03-12T03:30:42.116652269Z"} {"log":"I0312 03:30:42.116280 1 pathrecorder.go:247] kube-aggregator: \"/apis/storage.k8s.io/v1/storageclasses\" satisfied by prefix /apis/storage.k8s.io/v1/\n","stream":"stderr","time":"2020-03-12T03:30:42.116667722Z"} {"log":"I0312 03:30:42.116295 1 handler.go:143] kube-apiserver: POST \"/apis/storage.k8s.io/v1/storageclasses\" satisfied by gorestful with webservice /apis/storage.k8s.io/v1\n","stream":"stderr","time":"2020-03-12T03:30:42.116672208Z"} {"log":"I0312 03:30:42.228260 1 **httplog.go:90] POST /apis/storage.k8s.io/v1/storageclasses: (112.329049ms) 201** [kubectl/v1.17.1 (linux/amd64) kubernetes/d224476 192.168.166.7:54102]\n","stream":"stderr","time":"2020-03-12T03:30:42.228591767Z"}

@Wade201801
Copy link
Author

Also create namespace failed with the same error.

@Wade201801
Copy link
Author

Is it designed to this limit? Since there's word "Enter YAML or JSON content specifying the resources to create to the namespace specified in the file"

@floreks
Copy link
Member

floreks commented Mar 12, 2020

This is a bug on our side. I'll fix that shortly, together with couple of other issues and push a release later today.

@floreks floreks added the kind/bug Categorizes issue or PR as related to a bug. label Mar 12, 2020
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants