Open jone opened 2 weeks ago
hi @jone
thanks for raising this issue. I checked a little, I think it would be possible to derive the cluster domain from the search domains in /etc/resolv.conf
, but I think it could be too easy to break 😅
I will implement an env variable that permits setting it!
can you try with this container ? https://github.com/users/clementnuss/packages/container/kubenurse/274375776?tag=issue-158-fix
you can set the DNS name of the APIServer with the KUBERNETES_SERVICE_DNS
env var
Hi
I've tried to install kubenurse on exoscale SKS. Exoscale SKS modifies the standard kubernetes cluster domain to be
[uuid].cluster.local
.This causes this error:
The DNS entry
kubernetes.default.svc.cluster.local
does not exist; it should be something likekubernetes.default.svc.4ea3d352-64ed-41f7-ba54-3d181c211d19.cluster.local
.This value seems to be hard coded here: https://github.com/postfinance/kubenurse/blob/754b407ce768dc220984b8cb8afcba2a4f1d5c11/internal/servicecheck/servicecheck.go#L155
Is it possible to make that configurable or use another strategy to find the correct domain? I'm not very familiar with the k8s internas, but I would assume that the API domain can be looked up somewhere.
The kubenurse service domain is already configurable and when I understand it correctly, I can configure it in helm with the
service_url
value.Exoscale has plans to switch to the standard domain, but this is only for newly created clusters. I could also circumvent the problem by adding coredns alias entries, but having it configurable would be more convenient and less intrusive, I think 😉