Expected behavior
Stated warning should NOT be displayed.
Actual behavior
Every time I make a change and trigger a re-deployment, I get an error like:
WARN[0064] image [gcr.io/wired-benefit-XXXXX/demoapp] is not used by the deployment
Yet the image is modified with the updated change, so I'm not sure what the error is indicating,
Information
- Skaffold version: version... v1.15.0
- Operating system: ... MacOS Catilina 10.15.16
- Contents of skaffold.yaml:
apiVersion: skaffold/v2beta8
kind: Config
metadata:
name: demoapp
build:
artifacts:
- image: gcr.io/wired-benefit-293406/demoapp
deploy:
kubectl:
manifests:
- k8*.yml
Content of K8s manifests :
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
Steps to reproduce the behavior
- a very basic starter demo app
skaffold dev
- Any change ... docker build is successful by skaffold and even pushing to registry
But, changes are not being reflected. Could be tag related problem. When I manually set the image name to latest for the deployment, then app change works.