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:
From cargo (recommended for now):
sh
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
```yaml system: cstar imagetag: "{{version}}" blockbase_dir: services/
blocks: - common - webserver - agent - redisqueue - db - name: web dir: frontends/web/ - name: web-server dependencies: ['common','web'] # build dependency for when running dbuild (no effect on build).
realms:
base:
webexternalports: 8080
dev: yamldir: k8s/dev/ # for dev, we override the yamlDir context: docker-desktop devstuff: Some dev stuff confirm_delete: false
aws: yamldir: 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/ defaultconfigurations: ['agent', 'db', 'queue', 'web-server'] confirm_delete: false
builders: - name: npminstall whenfile: ./package.json exec: cmd: npm cmdtype: global # basedir | blockdir args: ["install", "--color"] - name: tsc whenfile: ./tsconfig.json exec: cmd: nodemodules/.bin/tsc - name: rollup whenfile: ./rollup.config.js replace: tsc # rollup has rollup-ts, so no need to do it twice exec: cmd: nodemodules/.bin/rollup args: ["-c"] - name: pcss whenfile: ./pcss.config.js exec: cmd: node_modules/.bin/pcss ```
Command examples:
```sh
kdd realm dev
kdd dbuild
kdd dbuild agent,web-server
kdd dpush
kdd dpush agent,web-server
kdd kapply
kdd kapply web-server,agent
```
(mac / linux only for now)
Install binst first.
sh
binst install -r https://binst.io/jc-repo kdd