我将 skaffold 用于基于 k8s 的微服务应用程序。我进入skaffold dev
并skaffold run
运行并skaffold delete
重新启动所有微服务。
如果我只需要重启一项服务,我该怎么办?
我将 skaffold 用于基于 k8s 的微服务应用程序。我进入skaffold dev
并skaffold run
运行并skaffold delete
重新启动所有微服务。
如果我只需要重启一项服务,我该怎么办?
According to the docs:
1. Deploy your services:
skaffold run --filename=skaffold_test_1.yaml
(in addition you can have multiple workflow configurations).
2. Change your skaffold workflow configuration and run:
skaffold delete --filename=skaffold_test2.yaml
Using this approach your deployments will be not removed like in the skaffold dev command after stopping skaffold.
Basically managing the content of the skaffold workflow configuration (by adding or removing additional entries allows you to deploy or remove particular service).
apiVersion: skaffold/v1
kind: Config
.
.
.
deploy:
kubectl:
manifests:
- k8s-service1.yaml
# - k8s-service2.yaml
您可以使用skaffold dev
'--watch-image
标志来限制要监视的工件。这需要一个逗号分隔的图像列表,由artifact.image指定。