Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
/ json2k8s Public archive

json2k8s extracts Kubernetes resources from JSON files (use it with jsonnet)

License

Notifications You must be signed in to change notification settings

vmware-archive/json2k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

json2k8s

json2k8s extracts Kubernetes resources [1] from JSON files.

$ cat examples/file1.json | json2k8s
$ json2k8s examples/file1.json examples/file2.json
$ jsonnet examples/file1.json | json2k8s | kapp deploy -a app1 -f- --yes

Features:

  • extracts Kubernetes resources from arbitrarily nested JSON structures
  • prints result as single v1.List resource
  • no de-duplication of resources is done (expected to be done by downstream tools e.g. kapp)

[1] Kubernetes resource is considered to be a map with kind and apiVersion keys present

Motivation

Above functionality can be useful for defining applications in Jsonnet in a more composable manner. kubecfg bakes this in; however, since k14s tools are written to be composable this was split off into its own binary. It can run on jsonnet result and ultimately passed to k14s/kapp.

About

json2k8s extracts Kubernetes resources from JSON files (use it with jsonnet)

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published