Google has released Skaffold, an open source command-line tool designed to simplify continuous development of Kubernetes applications. Skaffold entered the increasingly competitive Kubernetes development automation tool space with Draft for Azure, Forge for Datawire, and Flux for Weavework.

Skaffold automates the process of building, pushing, and deploying applications to the Kubernetes cluster. With Skaffold, developers can iterate over application code locally, constantly update it, and release it to local or remote Kubernetes clusters for validation or testing when it’s ready. Skaffold can be run as a background process during development, or it can be used in disposable or automated environments, such as CI/CD pipes. This allows developers to use the same workflow when deploying applications from a local development environment to production.

The Google Cloud Platform blog points out that Kubernetes provides operators/system administrators with apis and methods that add flexibility to reliably deploy software applications. Kubernetes takes a custom deployment approach and “provides a programming approach that implements processes that are at least as robust.” As a result, operators can focus on the part of infrastructure management that is critical to the organization — maintaining speed and service stability.

In some cases, developers may be the last people in the organization to learn about Kubernetes. Developers may have taken steps to create replicable application deployment tools using package management technologies like RPM or DEB or newer Linux container technologies like Docker. Docker lets developers create repeatable operating environments, defining dependencies and application configurations in a simple, repeatable way. This allows developers on the team to keep the development environment in sync, but it does not introduce a common method of deployment verification. Therefore, developers often want to create a similar local integrated QA environment using the Kubernetes API and methods used in production environments.

The following is a typical process for developing an application and deploying it to Kubernetes.

  1. Find or configure the Kubernetes cluster.
    • Cluster initialization can be done using a hosting platform such as GKE, AKS, or (in the future) AWS Fargate, or using a native tool such as KOPS.
  2. Build a Docker image of each service and upload it to the registry provided by the cluster.
    • This is typically done through the Docker Community Edition image builder tool (which now includes a local installation of the Edge version Kubernetes).
  3. Create Kubernetes manifest definitions using the reference documentation and examples.
  4. Deploy the application definition using the Kubectl CLI or Kubernetes Dashboard.
  5. Repeat steps 2-4 until the feature, Bug fix, or change set is complete.
  6. Checking in changes, run through a CI process, includes:
    • Unit testing
    • Integration testing
    • Deploy to test or transition environments
    • Activity and observability tests

Google’s blog post notes that steps 2-5 require developers to update their applications through multiple interfaces using a number of tools:

Skaffold has two operating modes “Skaffold Dev” and “Skaffold run”. In “dev” mode, Skaffold does the following: looks for changes in source code and Docker image dependencies, and builds and deploits when changes are detected; Get the log flow from the deployed container; Run a continuous build-deploy cycle, reporting only errors. In “run” mode, Skaffold runs the pipe once and exits when any errors occur in the pipe. This is useful for continuous integration or continuous deployment of pipelines and “integrity checks after application iterations.”

Google Skaffold execution status (image from Skaffold GitHub)

Skaffold has released the “Alpha” version, which currently includes the following design considerations and features:

  • No server-side components, meaning no cluster overhead;
  • Image label management;
  • Support for multiple application components (only the changing parts of the application stack are built and deployed).

Skaffold has a pluggable architecture that gives developers “access to the tools that best fit the development process.”

As thought leaders in this field like Gareth Rushgrove and Joe Beda have pointed out, currently, A number of tools have emerged in the Kubernetes development workflow automation space – including Draft, Forge, Flux, Gitkube, Heighliner, and Ksync – with subtly different functions.

The Microsoft Azure team released Draft, a tool that targets the “inner loop” of the development workflow: Run “Draft Create” containerized applications based on the Draft Pack; Run “Draft Up” to deploy the application to the Kubernetes development sandbox; Modify the application using the local editor, and the changes are quickly deployed to Kubernetes. Once developers are satisfied with changes made through Draft, they commit and push to version control, and the Continuous integration (CI) system takes over. Draft is built on the Kubernetes Helm and Kubernetes Chart formats, which makes it easier to construct CI pipes for draft-based applications.

Datawire provides Forge as part of its development automation workflow tools, which also include remote debugging tools Telepresence and Ambassador API Gateway (built on Envoy Proxy). With Forge, developers can define how each service is built using Dockerfile, define how each service is run from a Kubernetes manifest file, and use a “service.yaml” file to define the services and dependencies that make up the application. Running “Forge Deploy” automates all build and deployment steps for standard containers for Kubernetes, including detecting changing dependencies and incremental builds. Forge also supports Canary publishing (specified through the version control branch) and CI/CD integration.

Weavework’s Flux tool, an implementation of the organization’s “GitOps” philosophy, automatically ensures that the Kubernetes cluster’s state is consistent with that specified in the version control system (single version truth). The overall goal of Flux is to automate service deployment. A typical application scenario is: developers modify the service to create a GitHub style pull request; A properly functioning cluster is now expired and needs to be upgraded; Flux detects those changes and deploys them to the cluster; Flux maintains the current state of the cluster (for example, in case of a failure). Flux also provides a CLI and a UI (on the Weave cloud) to perform these operations manually and integrate CI/CD tools.

Gitkube is a tool for building and deploying Docker images on Kubernetes using a “Git push” model, much like Cloud Foundry’s “CF Push” model. According to the project’s website, Gitkube is “ideal for developers pushing a WIP branch to a cluster for testing,” and the project’s goal is to provide a reference implementation for writing Git-based automation tools. One example suggests that engineers branch out of the Gitkube library and create a Kubernetes custom resource definition (CRD), Controller, and Git remote hook to automate operations on a Kubernetes cluster.

Heighliner provides GitHub flows for Kubernetes, in which each new GitHub pull Request is automatically deployed to the target Kubernetes cluster, “for ease of review […] Change in the real world. When a developer creates a new GitHub Release, Heighliner automatically dispatchers the changes to a transient or production environment. Ksync is designed to speed up Kubernetes development by transparently updating containers running on clusters from local builds. It is achieved by synchronizing the local file system directory with the cluster storage (this is achieved by running a binary file locally and a remote DaemonSet on each node of the cluster).

The GitHub Project library provides more information about Skaffold. A guide to getting started with GKE is provided, along with a guide to installing it locally (using Minikube) and following the instructions in README. If you want discussion and feedback, join the mailing list or open a question on GitHub.

People taf * * * * * * * * * *, Google Release “Skaffold”, a Tool that Favors Continuous Development with Kubernetes