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

No acces to Kubernetes cluster depite of rbac authorization #12

Open
chaosdudu opened this issue Feb 7, 2019 · 13 comments
Open

No acces to Kubernetes cluster depite of rbac authorization #12

chaosdudu opened this issue Feb 7, 2019 · 13 comments

Comments

@chaosdudu
Copy link

I have followed the instructions and created rbac but still can not see any kubernetes data in ui. Is there anyone have a solution on that.

@saargrin
Copy link

same here

did you find any solutions?

@aadamovich
Copy link

same for me

@aadamovich
Copy link

In my case it seems to be related to the fact that I'm accessing spekt8 on a different DNS name, but it assumes that it runs on localhost:3000 for some reason:

image

@aadamovich
Copy link

Even when I switched to proxy and localhost:3000 access, there is still an error:

image

@chaosdudu
Copy link
Author

@aadamovich and @saargrin I think it is related with the bug which namespaces is hardcoded in the app server.

@chaosdudu
Copy link
Author

@aadamovich and @saargrin it is working only when I deploy it as in the default namespace.

@tanrobotix
Copy link

tanrobotix commented May 23, 2019

Even when I switched to proxy and localhost:3000 access, there is still an error:

image

I have a solution, let exec into kube pod, then edit the main.js to NodePort you expose.
Example: kubectl exec -it -n [namespace] [pod-name] bash
Then edit the dist/main.js localhost -> NodePort you expose. Then refresh browser

@stafot
Copy link

stafot commented Jun 20, 2019

I am getting the following.

Access to fetch at 'http://localhost:3000/pod' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
127.0.0.1/:1 Access to fetch at 'http://localhost:3000/service' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
127.0.0.1/:1 Access to fetch at 'http://localhost:3000/ingress' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
127.0.0.1/:1 Access to fetch at 'http://localhost:3000/daemonset' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Any ideas how to fix?

@stafot
Copy link

stafot commented Jun 20, 2019

When I am using 3000 having same error as @aadamovich

@tanrobotix
Copy link

I am getting the following.

Access to fetch at 'http://localhost:3000/pod' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
127.0.0.1/:1 Access to fetch at 'http://localhost:3000/service' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
127.0.0.1/:1 Access to fetch at 'http://localhost:3000/ingress' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
127.0.0.1/:1 Access to fetch at 'http://localhost:3000/daemonset' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Any ideas how to fix?

I recommend you use WeaveScope instead of, it's support more things.

@jayaramcloud
Copy link

It worked for me now on my google cloud shell for my GKE servers -
jayaram_linux1@cloudshell:~/1307 (dbconn01)$ k port-forward spekt8-6f6c885897-92x8c 3000
Forwarding from 127.0.0.1:3000 -> 3000

Then I clicked on Web Preview > Preview on port 3000 and it worked!
opened

https://3000-dot-4982326-dot-devshell.appspot.com/?authuser=1

@ammerzon
Copy link

ammerzon commented Aug 1, 2019

I had the same problem (minikube). Using port forwarding I managed to avoid these errors with this command:

kubectl port-forward svc/spekt8 3000:3000 &

@jharris-tc
Copy link

jharris-tc commented Sep 4, 2019

just want to say I have the same issue. I have setup an ingress to access it, and was getting those permission denied errors because it is hardcoded to localhost and that is getting denied.

I tried changing the localhost references to spekt8-service.spekt8.svc.cluster.local

where spet8-service is the svc name, in namespace spekt8

and after rebuilding and redepploying the docker image it still didnt work, getting erorr

Failed to load resource: net::ERR_NAME_NOT_RESOLVED

this despite the fact that I could run curl http://spekt8-service.spekt8.svc.cluster.local and get a valid response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants