Validate Kubernetes Configuration files(YAML)

8/9/2017

I would like to implement a functionality - that validates Kubernetes deployment files(deployments yaml or service yaml or rc yaml) using k8s JSON schema /Yaml Schema.

Currently I need the setup kubectl and k8s cluster available in order to validate. But without this set up , would like to validate using Go-Client (K8s) api.

Can anyone tell me if there are any libraries that I can use to validate the files?How can I obtains the K8s schemas. are there any tools/libraries to generate schemas ? can you point me the direction, since I am totally new to kubernetes stuff.

Does anyone know how kubectl implements this? I would like to use similar libraries if possible

-- dkat
kubectl
kubernetes
kubernetes-go-client
validation
yaml

1 Answer

8/9/2017
-- Michael Hausenblas
Source: StackOverflow