@kosko/yaml v5.1.0
kosko
Write Kubernetes manifests in JavaScript.
kosko is inspired by ksonnet but use JavaScript instead of jsonnet. Unlike ksonnet, kosko neither touchs Kubernetes clusters nor supports Helm. It's focus on building and organizing Kubernetes manifests in JavaScript.
Features
- Use JavaScript or any languages compiled to JavaScript. (e.g. TypeScript)
- Manage multiple environments.
- Validate against Kubernetes OpenAPI definitions.
- Reuse variables and functions across components.
Installation
Install kosko globally with npm.
npm install -g koskoGetting Started
Setup
First, run kosko init to set up a new kosko directory and npm install to install dependencies.
kosko init example
cd example
npm installCreate a Component
Create a new component with @kosko/template-deployed-service template.
npx @kosko/template-deployed-service --name nginx --image nginxThis template creates a new file named nginx.js in components folder.
Generate Kubernetes Manifests
Run kosko generate to print Kubernetes manifests in the console.
kosko generatePipe the output to kubectl to apply to a cluster.
kosko generate | kubectl apply -f -Documentation
Learn more on the official site.
Packages
Core
- @kosko/cli - CLI.
- @kosko/config - Load kosko configuration.
- @kosko/env - Manage environemnts in kosko.
- @kosko/generate - Find and print components.
- @kosko/migrate - Migrate Kubernetes YAML into kosko components.
- @kosko/require - Import and resolve modules.
- @kosko/template - Utilities for templates.
Templates
- @kosko/template-deployed-service - Create a new component including a deployment and a service.
- @kosko/template-environment - Create a new environment.
Related
- kubernetes-models-ts - Kubernetes models in TypeScript.
Contributing
See CONTRIBUTING.md.
License
MIT
11 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago