Linux command
skaffold 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Initialize skaffold
skaffold init
Development mode
skaffold dev
Build images
skaffold build
Deploy to cluster
skaffold deploy
Run once
skaffold run
Delete deployment
skaffold delete
Debug mode
skaffold debug
Render manifests
skaffold render
说明
Skaffold automates the Kubernetes development workflow by handling the build, push, and deploy cycle for containerized applications. The dev command watches source files for changes and automatically rebuilds images and redeploys to the cluster on each save, providing a rapid inner development loop. The tool integrates with multiple build systems including Docker, Jib, and Cloud Native Buildpacks, and supports deployment via kubectl, Helm, and kustomize. Profiles allow customizing the pipeline for different environments such as development, staging, and production, each with different image registries, build configurations, and deployment targets. Port forwarding automatically exposes deployed services on localhost, and the debug command configures remote debugging for supported languages.
参数
- init
- Create config.
- dev
- Continuous development.
- build
- Build images.
- deploy
- Deploy to cluster.
- run
- Build and deploy once.
- delete
- Remove deployment.
- debug
- Debug mode.
- -f, --filename _FILE_
- Config file.
- -p, --profile _NAME_
- Use profile.
- -n, --namespace _NS_
- Kubernetes namespace.
- --default-repo _REPO_
- Default image repository (overrides global config).
- --kube-context _CTX_
- Deploy to specified Kubernetes context.
- --tail
- Stream logs from deployed objects (default: true in dev mode).
- --port-forward
- Port-forward exposed container ports within pods.
- --trigger _MODE_
- Change detection trigger: polling, notify, or manual (default: notify).
FAQ
What is the skaffold command used for?
Skaffold automates the Kubernetes development workflow by handling the build, push, and deploy cycle for containerized applications. The dev command watches source files for changes and automatically rebuilds images and redeploys to the cluster on each save, providing a rapid inner development loop. The tool integrates with multiple build systems including Docker, Jib, and Cloud Native Buildpacks, and supports deployment via kubectl, Helm, and kustomize. Profiles allow customizing the pipeline for different environments such as development, staging, and production, each with different image registries, build configurations, and deployment targets. Port forwarding automatically exposes deployed services on localhost, and the debug command configures remote debugging for supported languages.
How do I run a basic skaffold example?
Run `skaffold init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does init do in skaffold?
Create config.