Skip to main content

kubedev

DevOps command line tool that standardizes workflows for Microservices in Kubernetes for teams: Build, Develop, CI/CD.

It builds on:

kubedev Principles

  • kubedev wants to help you quickly and easily build microservices that are independent, but at the same time follow a common pattern in regards to building, documenting and deploying. This makes it easier to add new services, and to onboard new developers.
  • kubedev aims to be a thin wrapper around the commands it builds on, and just wants to make it easier for teams to call them appropriately.
  • kubedev always prints the commands that it executes, so that you know what is going on.
  • kubedev heavily relies on environment variables for service configuration.

Current state of development

kubedev is in early development. Currently, the following commands are implemented:

  • None yet

Synopsis

kubedev commands are based on the definitions found in kubedev.json, which include the minimum necessary information that is required to execute common cloud-dev related tasks.

A kubedev.json describes an "App", which in turn can contain "Sub-Apps" that may be deployments, daemonsets or cronjobs.

Schema of kubedev.json:

{
    "name": "myservice",
    "ci-provider": "gitlab",
    "deployments": {
        "mydeploy": { # A Sub-App `mydeploy' of type deployment
            "used-frameworks": ["python", "pipenv", "npm", "vue"], # used-frameworks are used to e.g. fill in Tiltfile live_update, ignore, etc.
            "dev-only": true, # default: false. Specifies whether this service must only be deployed on local development machines
            "port": 5000,
            "dev-port": 8081, # The port that tilt  up forwards
            "required-envs": {
                "MYDEPLOY_FLASK_ENV": {
                    "documentation": "...",
                    "encoding": "base64"
                }
            }
        }
    },
    "daemonsets": {
       …
    },
    "cronjobs": {
        "mycronjob": {  # A Sub-App mycronjob of type cronjobs
            … # Includes necessary definitions for CronJobs
        }
    }
}

kubedev init [deployment:name, …][cronjob:name, …] [daemonset:name, …]

NOT IMPLEMENTED, YET

Creates:

  • Directories for each deployment, daemonset or cronjob
  • Empty Dockerfiles in these directories
  • A template kubedev.json
  • A README.md template

kubedev generate [--overwrite]

NOT IMPLEMENTED, YET

Creates a helm-chart (with Deployment/DaemonSet/CronJob and optionally Services), Tiltfile and .gitlab-ci.yml from the definitions in ./kubedev.json. If ./kubedev.json does not exist, instructions are printed (referencing the "kubedev init" command).

kubedev generate helm-chart <template>

NOT IMPLEMENTED, YET

Creates a helm-chart for this service, according to kubedev.json, consisting of:

  • A Chart.yaml
  • A deployment, daemonset or a cronjob, depending on "type".
  • For deployments and daemonsets: Adds a Service (type ClusterIP).

kubedev generate Tiltfile <template>

NOT IMPLEMENTED, YET

Creates a Tiltfile with some sensible defaults.

kubedev generate gitlab-ci

NOT IMPLEMENTED, YET

Creates a .gitlab-ci.yml file containing the build-push and deploy states:

  • build-push: Runs kubedev build and then kubedev push
  • deploy: Runs kubedev deploy

It uses the latest stable dev-baseimage.

kubedev check

NOT IMPLEMENTED, YET

Reads kubedev.json and checks whether all environment variables from the configuration is set in the current environment. It prints missing variables, including it's documentation.

For used-frameworks "pipenv", it runs bandit. For used-frameworks "npm", it runs npm audit.

kubedev print env-doc

NOT IMPLEMENTED, YET

Prints out a Markdown table with all environment variables declared in kubedev.json and their documentation.

kubedev up [--clean]

NOT IMPLEMENTED, YET

Checks the current environment and runs tilt up when the configuration is OK.

For "used-frameworks" "vue", it runs npm run build -- --watch --mode development in parallel.

The --clean switch runs tilt down before running tilt up.

kubedev down

NOT IMPLEMENTED, YET

Runs tilt down.

kubedev test-ci <job>

NOT IMPLEMENTED, YET

Creates a temporary branch, commits all local changes and uncommited files to this branch, then runs gitlab-runner exec shell <job> and then restores the previous git state.

kubedev build <sub-app>

NOT IMPLEMENTED, YET

Runs docker build with all docker build args as defined in kubedev.json and tags it with a temporary, unique development tag.

The docker image name is deducted from the git repository name, thus this command must be run in a git working copy.

Is used inside the CI/CD build jobs.

kubedev push <sub-app>

NOT IMPLEMENTED, YET

When kubedev build has been run before, it runs docker push with the last successful build's unique development tag.

The docker image name is deducted from the git repository name, thus this command must be run in a git working copy.

Is used inside the CI/CD build jobs.

kubedev run-local [args…]

NOT IMPLEMENTED, YET

Runs kubedev build and runs the new docker image with all envs set and ports forwarded, optionally with [args…].

kubedev deploy

NOT IMPLEMENTED, YET

Reads the .kube/conf from an environment variable, auto-increases the helm-chart/Chart.yaml's version and then runs helm install with appropriate arguments and env vars from kubedev.json.

Is used inside the CI/CD build jobs.

kubedev template

NOT IMPLEMENTED, YET

Basically runs helm template with appropriate arguments and env vars from kubedev.json.

Is used inside the Tiltfile.

Release files for kubedev 0.5.691346073

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kubedev 0.5.691346073
File Size Uploaded
kubedev-0.5.691346073.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kubedev 0.5.691346073
File Interpreter ABI Platform
kubedev-0.5.691346073-py3-none-any.whl Python 3 none any Details

Total release size: 25.0 kB

Release files / kubedev-0.5.691346073.tar.gz

Download URL kubedev-0.5.691346073.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
17781dd0ccfc0762d88d48837dd813a415bd835d54bc1416981647c672c4fb7e
BLAKE2b-256 checksum
How to use checksums
6e2346ff8d68d6ce8a3d0ba4b66786c53a28b0d0ef718c65154378f40abd52ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.7

Release files / kubedev-0.5.691346073-py3-none-any.whl

Download URL kubedev-0.5.691346073-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb33b976d2728aeecb4f818a96d71041adcebb9d8ad5f7b2c8c411493974f0fd
BLAKE2b-256 checksum
How to use checksums
09146ad2173ddedf7722c385be1aa5b812d196657a85a73e6fa497202efb7792
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.7

Release history Release notifications | RSS feed

0.23.7

2 release files

This release

0.5.691346073 This release

2 release files

0.5.99

2 release files

0.0.84

2 release files

0.0.81

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page