预期行为
不应显示声明的警告。
实际行为
每次我进行更改并触发重新部署时,都会收到如下错误:
WARN[0064] image [gcr.io/wired-benefit-XXXXX/demoapp] 没有被部署使用
然而,图像已通过更新的更改进行了修改,所以我不确定错误表示什么,
信息
- Skaffold版本:版本... v1.15.0
- 操作系统:... MacOS Catilina 10.15.16
- skaffold.yaml 的内容:
apiVersion: skaffold/v2beta8
kind: Config
metadata:
name: demoapp
build:
artifacts:
- image: gcr.io/wired-benefit-293406/demoapp
deploy:
kubectl:
manifests:
- k8*.yml
K8s manifest 的内容:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: demoapp
name: demoapp
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: demoapp
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: demoapp
spec:
containers:
- image: gcr.io/wired-benefit-293406/demoapp
imagePullPolicy: IfNotPresent
name: demoapp
restartPolicy: Always
apiVersion: v1
kind: Service
metadata:
labels:
app: demoapp
name: demoapp-svc
spec:
ports:
- port: 80
protocol: TCP
targetPort: 3000
selector:
app: demoapp
type: LoadBalancer
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: demoapp
spec:
maxReplicas: 5
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: demoapp
targetCPUUtilizationPercentage: 80
重现行为的步骤
- 一个非常基本的入门演示应用程序
skaffold dev
- 任何更改... docker build 通过 skaffold 甚至推送到注册表成功
但是,变化并没有体现出来。可能是标签相关的问题。当我手动将映像名称设置为最新的部署时,应用程序更改工作。