Sep 28, 2018

[k8s][admin] k8s skaffold

skaffold is an automation tool for deploying bits to k8s in a pipeline fashion.

Act as watchman for k8s deployment by monitoring the changes of files depicted
inside the Dockerfile's "COPY/ADD" commands. (skaffold does honor .dockerignore [file format])

Once the files stats' last time modification changed, skaffold will kick off image build(docker build) and deploy the built images to k8s.
(either through kubectl / helm / kustomize)

The tool is relatively new and not well documented, here's the example I created for future reference. (Some hidden yaml key/value features can only be seen through the source code :-D )

It supports bazel build as well, will add example for that later(WIP).
It supports kaniko build which could build Dockerfile without docker daemon(With gVisor).

https://github.com/buddhavs/k8s_skaffold_example

Reference:
official skaffold.yaml annotation

Update:
Turns out a better document for skaffold is here (for devs :-D ):
https://skaffold.dev/

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.