Easily manage Docker images and Kubernetes manifests for deployment from your machine or CI. Inspired by a custom Ruby tool built by the LiveRamp DevOps team.
npm install knube-deploy``bash`
$ npm i --save-dev knube-deploy
\- OR -
`bash`
$ yarn add --dev knube-deploy
TODO
#### deploy.yamldeploy.yaml
Most global configuration is defined in a that should be in the root directory of your project. knube-deploy operates on the concept of "target clusters," and each command described in "Usage" will iterate on each context item defined.
`yaml`minimal deploy.yaml
contexts:
- name: production
context: gke_my-app-project_us-west1_prod-cluster
image: myapp-prod
imageRegistry: gcr.io/my-app-project
- name: staging
context: gke_my-app-project_us-west1_staging-cluster
image: myapp-staging
imageRegistry: gcr.io/my-app-project
- name: local
context: minikube
image: myapp
imageRegistry: local-registry
#### docker
TODO
#### kubectl
TODO
#### Archive Storage
Multiple backends are available for storing the archive tarballs during the kube:publish step. Options include:devnull
1. : No-op storage-- rendered manifests must be available locally for kube:deploy to succeedlocalstorage
1. : Uses a configurable directory on the local filesystemgcs
1. : Use a Google Cloud Storage bucket (not yet implemented)s3
1. : Use an AWS S3 bucket (not yet implemented)azure
1. : Use Azure cloud storage (not yet implemented)github
1. : Use Github Artifact storage (not yet implemented)gitlab
1. : Use Gitlab Artifact storage (not yet implemented)artifactory
1. : Use Artifactory artifact storage (not yet implemented)
#### docker:build
Build a docker image with the specified configuration.
##### args
TODO
#### kube:generate
Render manifests from the input directory of EJS templates.
##### args
TODO
#### kube:publish
Push the built docker image to the configured registry, then create a tarball archive of rendered manifests and push it to the configured archive storage backend.
##### args
TODO
#### kube:deploykubectl apply
Fetch and unzip the manifest tarball for the specified version, then its contents in the configured context(s).
##### args
TODO
#### fortytwo`
Answer to the Ultimate Question of Life, the Universe and Everything
Runs all of the above in order.
##### args
Takes all arguments from the above commands.