cozystack icon indicating copy to clipboard operation
cozystack copied to clipboard

Remove dependency on external DNS configuration for internal kubernetes API requests

Open kvaps opened this issue 1 year ago • 0 comments

When the user does not have the correct DNS record for the tenant Kubernetes API, attempting to read logs from the cluster results in the following error:

Error from server (InternalError): Internal error occurred: Authorization error (user=kube-apiserver-kubelet-client, verb=get, resource=nodes, subresource=proxy)

https://stackoverflow.com/questions/54572775/kubectl-logs-f-gets-authorization-error/68355619#68355619

Current Workaround To address this issue temporarily, I updated the CoreDNS configuration in the management cluster:

rewrite name dashboard.example.org root-ingress-controller.tenant-root.svc.cozy.local
rewrite name grafana.example.org root-ingress-controller.tenant-root.svc.cozy.local
rewrite name kubernetes-test.example.org root-ingress-controller.tenant-root.svc.cozy.local

After restarting Kamaji, the logs started working correctly.

I think we need to find a permanent solution to remove the dependency on correctly configured DNS records, at least for requests originating from within the cluster. This will ensure that internal API requests function correctly regardless of the external DNS configuration.

kvaps avatar Jul 27 '24 12:07 kvaps