#cli #kubernetes #docker #aws #gcp

app kdd

A command-line utility to streamline Kubernetes-driven development and deployment

12 releases

Uses new Rust 2021

0.1.9 Jul 18, 2022
0.1.8 Apr 6, 2022
0.1.7 Mar 21, 2022
0.1.6 Jan 21, 2022
0.0.1 Jun 6, 2021

#52 in Command-line interface

Download history 12/week @ 2022-04-24 29/week @ 2022-05-01 121/week @ 2022-05-08 188/week @ 2022-05-15 46/week @ 2022-05-22 82/week @ 2022-05-29 77/week @ 2022-06-05 2/week @ 2022-06-19 11/week @ 2022-06-26 22/week @ 2022-07-03 11/week @ 2022-07-10 59/week @ 2022-07-17 31/week @ 2022-07-24 30/week @ 2022-07-31 1/week @ 2022-08-07

121 downloads per month

MIT license

2.5K SLoC

Intro and Concepts

kdd is a command-line utility to streamline Kubernetes-driven development and deployment. It does NOT have any runtime components or even builds ones. kdd is just a way to structure a cloud application into a multi-service Kubernetes oriented system and streamline docker, kubectl, and cloud cli into a single command line set.

Each system have one kdd.yaml file, with two main constructs:

  • blocks are things that get build
  • realms are places (i.e., k8s cluster) to where parts get deployed
  • builds are one or more command instructions to build blocks given files in their directory


From cargo (recommended for now):

cargo install kdd

Advanced: Install from Binary


The kdd.yaml is at the root of the sytem with the following model.

Full example at Cloud Starter

system: cstar
image_tag: "{{__version__}}"
block_base_dir: services/ 

  - _common
  - web_server
  - agent
  - redis_queue
  - db
  - name: web 
    dir: frontends/web/
  - name: web-server
    dependencies: ['_common','web'] # build dependency for when running dbuild (no effect on build).  

    web_external_ports: 8080
    yaml_dir: k8s/dev/ # for dev, we override the yamlDir
    context: docker-desktop
    dev_stuff: Some dev stuff
    confirm_delete: false

    yaml_dir: k8s/aws/
    context: arn:aws:eks:us-west-2:843615417314:cluster/cstar-cluster
    profile: jc-root
    registry: 843615417314.dkr.ecr.us-west-2.amazonaws.com/
    default_configurations: ['agent', 'db', 'queue', 'web-server']
    confirm_delete: false

  - name: npm_install
    when_file: ./package.json
      cmd: npm
      cmd_type: global # base_dir | block_dir
      args: ["install", "--color"]
  - name: tsc
    when_file: ./tsconfig.json
      cmd: node_modules/.bin/tsc
  - name: rollup
    when_file: ./rollup.config.js
    replace: tsc # rollup has rollup-ts, so no need to do it twice
      cmd: node_modules/.bin/rollup
      args: ["-c"]
  - name: pcss
    when_file: ./pcss.config.js
      cmd: node_modules/.bin/pcss

Command examples:

# Change realms to dev
kdd realm dev

# Build docker blocks (and their dependencies)
kdd dbuild
# build per block name (no space)
kdd dbuild agent,web-server

# docker push docker images to the current realm to the registry
kdd dpush
# push only some docker images
kdd dpush agent,web-server

# execute a kubectl apply for all default configurations
kdd kapply 
# selectively doing kubectl apply (push image before)
kdd kapply web-server,agent

# kdd kdelete, kdd kcreate, kdd kexec ... for the kubectl equivalents

Install with binst

(mac / linux only for now)

Install binst first.

binst install -r https://binst.io/jc-repo kdd 


~268K SLoC