HighwayofLife/kubernetes-validation-tools

kubectl --dry-run=server

eyarz opened this issue · 4 comments

eyarz commented

any specific reason why you are covering --dry-run=client and not --dry-run=server?
--dry-run=server will produce better results when trying to validate the Kubernetes files:
https://github.com/datreeio/kubernetes-schema-validation#misconfigurations-coverage-summary

dry-run=client does not need a kube config to run, whereas dry-run=server does. I do agree that server gives much better validation and results than any other validation tool, so to add support for dry-run=server, we need to add support for a kube-config/context.

eyarz commented

dry-run=client also requires a running K8s cluster to work...
Screen Shot 2021-06-10 at 22 52 09

Related issue. kubernetes#51475. --dry-run=client should not require access to the kube API.

eyarz commented

Interesting!
I didn't know that.