kubernetes-validation-tools icon indicating copy to clipboard operation
kubernetes-validation-tools copied to clipboard

kubectl --dry-run=server

Open eyarz opened this issue 3 years ago • 4 comments

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

eyarz avatar Jun 06 '21 16:06 eyarz

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.

HighwayofLife avatar Jun 10 '21 18:06 HighwayofLife

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

eyarz avatar Jun 10 '21 19:06 eyarz

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

HighwayofLife avatar Jun 14 '21 17:06 HighwayofLife

Interesting! I didn't know that.

eyarz avatar Jun 14 '21 17:06 eyarz