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

kube-proxy" is forbidden: User "system:node:minikube" cannot list resource "configmaps" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object #7613

Closed
veeveksen opened this issue Apr 11, 2020 · 12 comments
Labels
co/apiserver Issues relating to apiserver configuration (--extra-config) co/virtualbox kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. os/macos triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@veeveksen
Copy link

Steps to reproduce the issue:

1.Install minikube and virtualbox.
2. execute command minikube start --force .

:~ vivek$ minikube start --force
πŸ˜„ minikube v1.9.2 on Darwin 10.14.6
✨ Using the virtualbox driver based on user configuration
πŸ‘ Starting control plane node m01 in cluster minikube
πŸ”₯ Creating virtualbox VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
🐳 Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
🌟 Enabling addons: default-storageclass, storage-provisioner
❗ Enabling 'default-storageclass' returned an error: running callbacks: [Error making standard the default storage class: Error listing StorageClasses: Get "https://192.168.99.131:8443/apis/storage.k8s.io/v1/storageclasses": dial tcp 192.168.99.131:8443: i/o timeout]
❌ Problems detected in kubelet:
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.137584 3983 reflector.go:178] object-"kube-system"/"kube-proxy-token-2j4z7": Failed to list *v1.Secret: secrets "kube-proxy-token-2j4z7" is forbidden: User "system:node:minikube" cannot list resource "secrets" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.138044 3983 reflector.go:178] object-"kube-system"/"kube-proxy": Failed to list *v1.ConfigMap: configmaps "kube-proxy" is forbidden: User "system:node:minikube" cannot list resource "configmaps" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object
❌ Problems detected in kubelet:
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.137584 3983 reflector.go:178] object-"kube-system"/"kube-proxy-token-2j4z7": Failed to list *v1.Secret: secrets "kube-proxy-token-2j4z7" is forbidden: User "system:node:minikube" cannot list resource "secrets" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.138044 3983 reflector.go:178] object-"kube-system"/"kube-proxy": Failed to list *v1.ConfigMap: configmaps "kube-proxy" is forbidden: User "system:node:minikube" cannot list resource "configmaps" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object
❌ Problems detected in kubelet:
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.137584 3983 reflector.go:178] object-"kube-system"/"kube-proxy-token-2j4z7": Failed to list *v1.Secret: secrets "kube-proxy-token-2j4z7" is forbidden: User "system:node:minikube" cannot list resource "secrets" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.138044 3983 reflector.go:178] object-"kube-system"/"kube-proxy": Failed to list *v1.ConfigMap: configmaps "kube-proxy" is forbidden: User "system:node:minikube" cannot list resource "configmaps" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object
❌ Problems detected in kubelet:
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.137584 3983 reflector.go:178] object-"kube-system"/"kube-proxy-token-2j4z7": Failed to list *v1.Secret: secrets "kube-proxy-token-2j4z7" is forbidden: User "system:node:minikube" cannot list resource "secrets" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object
Apr 11 06:13:24 minikube kubelet[3983]: E0411 06:13:24.138044 3983 reflector.go:178] object-"kube-system"/"kube-proxy": Failed to list *v1.ConfigMap: configmaps "kube-proxy" is forbidden: User "system:node:minikube" cannot list resource "configmaps" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object

πŸ’£ startup failed: Wait failed: wait for healthy API server: apiserver healthz never reported healthy

@tstromberg
Copy link
Contributor

tstromberg commented Apr 15, 2020

Can you share the output of:

  • minikube start --alsologtostderr
  • minikube logs

Is --force necessary, or is it just something you were trying?

It's possible that minikube delete fixes this issue.

@tstromberg tstromberg changed the title Getting error while executing minikube start --force . virtualbox: apiserver healthz never reported healthy (no relationship found between node "minikube" and this object) Apr 15, 2020
@tstromberg tstromberg added co/apiserver Issues relating to apiserver configuration (--extra-config) co/virtualbox os/macos kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it. labels Apr 15, 2020
@medyagh
Copy link
Member

medyagh commented Apr 16, 2020

I have a feeling this is because the addons are being enabled before default service account is created. we need to add a verification not to enable addons before default service account.

@medyagh
Copy link
Member

medyagh commented Apr 16, 2020

could be related to #7704

@medyagh medyagh changed the title virtualbox: apiserver healthz never reported healthy (no relationship found between node "minikube" and this object) enabling addon default-storageclass : (no relationship found between node "minikube" and this object) Apr 16, 2020
@medyagh medyagh added the kind/bug Categorizes issue or PR as related to a bug. label Apr 16, 2020
@medyagh medyagh added this to the v1.10.0 milestone Apr 16, 2020
@medyagh
Copy link
Member

medyagh commented Apr 16, 2020

@veeveksen do you mind trying starting with --wait=true and see if you still have the problem?

(though that might still error, because we still do enabling addons in parallel)

@medyagh
Copy link
Member

medyagh commented Apr 16, 2020

anyone knows why we enble storage addon by default ?

1:15
enbling addons by default takes a toll on the verification start time
1:15
currently we need to verify SA is created but because we are doing it in paraelll we get flakes like this: #7613 (edited)
1:15
could we consider disabling all addons that have cluster role bindings by default
1:16
and only enable them if user uses those features?

@tstromberg
Copy link
Contributor

@medyagh - yes, it is required for PV support, and a rather standard/expected feature of Kubernetes. I believe it may also be required for conformance tests, but I'm not absolutely certain.

Alternatively, we could have the retry for addons occur inside of minikube rather than outside, but then we would not be able to provide signal to users when they are broken.

@tstromberg tstromberg removed this from the v1.10.0 milestone Apr 16, 2020
@medyagh medyagh added this to the v1.10.0 milestone Apr 16, 2020
@medyagh medyagh modified the milestones: v1.10.0, v1.11.0 Apr 20, 2020
@medyagh medyagh changed the title enabling addon default-storageclass : (no relationship found between node "minikube" and this object) refactor bootstrapper to include Enable Addons Apr 20, 2020
@medyagh
Copy link
Member

medyagh commented Apr 20, 2020

for this we need to refactor bootstrapper to include Enable addons
so we can apply kic overaly or enable CNI or enable addons right after the Default SA is created
and also do WaitForNode in parallel

@sharifelgamal sharifelgamal modified the milestones: v1.11.0 May28, v.1.12.0 May 13, 2020
@medyagh
Copy link
Member

medyagh commented May 28, 2020

is anyone still interested in this issue ?

@medyagh medyagh removed this from the v.1.12.0-previous candidate (dumpster fire) milestone Jun 1, 2020
@smhmayboudi
Copy link

I had the same problem and by adjusting my system proxy and let the kubectl have a direct connection, it solved.

@tstromberg tstromberg changed the title refactor bootstrapper to include Enable Addons kube-proxy" is forbidden: User "system:node:minikube" cannot list resource "configmaps" in API group "" in the namespace "kube-system": no relationship found between node "minikube" and this object Jun 24, 2020
@tstromberg
Copy link
Contributor

I'm closing this issue as it hasn't seen activity in awhile, and it's unclear if this issue still exists. If this issue does continue to exist in the most recent release of minikube, please feel free to re-open it by replying /reopen

If someone sees a similar issue to this one, please re-open it as replies to closed issues are unlikely to be noticed.

Thank you for opening the issue!

@eli-halych
Copy link

eli-halych commented Aug 16, 2020

@tstromberg

I had this issue and resolved it in a simple way.

  1. I noticed the keyword forbidden in the error logs and as a rule of thumb ran the Git Bash terminal as an administrator.

  2. Removed the minikube cluster by simply running minikube delete

  3. Then started it again in the terminal as an administrator.

This resolved the issue.

Some system details:
Microsoft Windows 10 Home 10.0.18363 Build 18363
minikube v1.12.3,
Enabled addons: default-storageclass, storage-provisioner
kubectl.exe is version 1.16.8-eks-e16311

@koushikmgithub
Copy link

Hello... I am facing the same issue. I am trying to install minikube on my mac os with M1 chip and following below guideline.

https://minikube.sigs.k8s.io/docs/start/
I am running docker desktop 20.10.8 on my mac and getting the same error when I start minikube. Do I need to do anything for this to work on the new macos chip M1? Already opened an issue : #13265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/apiserver Issues relating to apiserver configuration (--extra-config) co/virtualbox kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. os/macos triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

7 participants