https://github.com/hectorm/k3s-json-schemas
JSON schemas for every object of K3s.
https://github.com/hectorm/k3s-json-schemas
Last synced: about 1 year ago
JSON representation
JSON schemas for every object of K3s.
- Host: GitHub
- URL: https://github.com/hectorm/k3s-json-schemas
- Owner: hectorm
- License: mit
- Created: 2024-02-10T15:49:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-03T07:42:08.000Z (about 1 year ago)
- Last Synced: 2025-05-03T08:43:25.319Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 11.5 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# K3s JSON schemas
JSON schemas for every object of K3s.
## Usage
This repository contains a `schemas/*` branch for each version of K3s, each of which has multiple flavors:
* `local`: schemas with relative references.
* `local-strict`: schemas with relative references that prohibit additional properties.
* `standalone`: de-referenced schemas.
* `standalone-strict`: de-referenced schemas that prohibit additional properties.
Just use your favorite JSON schema validation tool for your Kubernetes definitions, such as Red Hat's [YAML Language Support extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) for VSCode.
```yaml
---
# yaml-language-server: $schema=https://github.com/hectorm/k3s-json-schemas/raw/schemas///deployment-apps-v1.json
apiVersion: "apps/v1"
kind: "Deployment"
# [...]
---
# yaml-language-server: $schema=https://github.com/hectorm/k3s-json-schemas/raw/schemas///service-v1.json
apiVersion: "v1"
kind: "Service"
# [...]
```
## Prior-art
This project is inspired by [instrumenta/kubernetes-json-schema](https://github.com/instrumenta/kubernetes-json-schema) and uses its own fork of [openapi2jsonschema](https://github.com/hectorm/openapi2jsonschema) with some improvements.