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

Internal error occurred: Authorization error #3547

Closed
dealancer opened this issue Jul 2, 2020 · 4 comments
Closed

Internal error occurred: Authorization error #3547

dealancer opened this issue Jul 2, 2020 · 4 comments

Comments

@dealancer
Copy link

I am seeing following error message for all containers run with Tilt. Not sure if it is Tilt or a Kubernetes problem:

Error streaming web-deployment logs: Internal error occurred: Authorization error (user=kube-apiserver-kubelet-client, verb=get, resource=nodes, subresource=proxy)

I am using recent version of the Tilt and Kubernetes.

@nicks
Copy link
Member

nicks commented Jul 2, 2020

Googling around a bit, this error means that Kubernetes itself is having problems fetching logs because the permissions are set up incorrectly:
kubernetes/kops#5706
https://stackoverflow.com/questions/54572775/kubectl-logs-f-gets-authorization-error

i.e., using kubectl logs -f [YOUR POD] would also fail with this error

The github ticket suggests adding this ClusterRoleBinding

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: kubelet-api-admin
subjects:
- kind: User
  name: kubelet-api
  apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: ClusterRole
  name: system:kubelet-api-admin
  apiGroup: rbac.authorization.k8s.io

does that help?

@dealancer
Copy link
Author

dealancer commented Jul 17, 2020

@nicks

After applying this role and restarting Kubernetes, it seems like this solution fixed my issue. Thank you!

@MohamedSalah97
Copy link

how can i add this ??
in a separate yaml file or with my deployment file

@dealancer
Copy link
Author

@MohamedSalah97 this is should be a separate file or part of your manifest.

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

3 participants