Is there an automated configuration error-checking tool for Kubernetes?

8/4/2017

Is there a tool that checks for (and preferably automatically fixes) common Kubernetes configuration issues? In particular, it would scan all the Kubernetes objects (deployments, replication controllers, replica sets, pods, persistent storage volumes, claims, ...) and their YAML, then report inconsistencies/mistakes (bonus points for offering suggestions on fixing them).

The tool could be somewhat similar to lint (reporting warnings, hard errors, and poor practices).

A quick search only turned up instructions on manually checking for errors. Considering all the issues I've found with inconsistent Kubernetes documentation, I'm surprised there are no automated error checks for the YAML files.

A Rancher plugin or a web UI would be preferable, although the tool could use the standard command line interface.

-- user1258361
kubernetes

1 Answer

8/22/2017

You can try kubectl create -f your.yaml --validate, it will tell you the error messages and lines.

-- chenzhiwei
Source: StackOverflow