Introduction

kube-script is a infrastructure as code solution to k8s ops.

Status

Proof of Concept

Features

  • No yaml files.
  • Type safe with Typescript.
  • Safe sandbox with Deno.

Quickstart

Prerequisites

  1. Install deno by following the official guide.

  2. Install kube-script by running the following command.

    deno install --unstable -A --root /usr/local -n ks https://cdn.jsdelivr.net/gh/in-fun/kube-script@main/main.ts

Quick demo

You can try kube-script without writing any code.

ks https://cdn.jsdelivr.net/gh/in-fun/kube-script/example/nginx/mod.ts

Deploy Nginx

  1. Checkout this project.

    git clone https://github.com/in-fun/kube-script.git
  2. Generate k8s yaml files.

    ks example/nginx
  3. Show diff from current settings.

    env=production ks example/nginx | kubectl diff -f -
  4. Apply k8s resources.

    env=production ks example/nginx | kubectl apply -f -