Skip to content

Local Kubernetes development workflow

The Local Kubernetes development workflow outlines the cycle of developing containerized applications by modifying source code, building container images, and deploying them to a local Kubernetes environment^[本地開發_Kubernetes_應用程式流程.md].

Workflow Steps

The standard workflow consists of the following sequential steps^[本地開發_Kubernetes_應用程式流程.md]:

  1. Modify Source Code: Make changes to the application source code.
  2. Build Image: Use a Dockerfile to generate a Docker Container Image.
  3. Deploy: Deploy the new version of the application to Kubernetes.
  4. Update Resources: Kubernetes provisions new compute resources based on the new image.

Automation with Skaffold

While the manual process is functional, tools like Skaffold are designed to automate the local development of Kubernetes applications^[skaffold.md]. Skaffold acts as an automation tool that handles the building and deployment processes^[skaffold.md].

When executed in development mode (e.g., skaffold dev), it can automatically detect changes in the source code, rebuild the container image, and deploy it to the local cluster^[skaffold.md]. It can also work with tools like pack to build images from source code without a Dockerfile^[skaffold.md].

Local Cluster Environments

Development can be performed on various local Kubernetes environments. Common choices include Minikube or Kind (Kubernetes in Docker)^[skaffold.md].

Sources

  • 本地開發_Kubernetes_應用程式流程.md
  • skaffold.md