fix: import backend image into k3s containerd before rollout
docker build only populates the Docker daemon's store; k3s runs its own embedded containerd and never sees it, so imagePullPolicy: Never kept redeploying whatever was last imported instead of new builds. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
5def3c14e8
commit
8b1d2f14f1
@@ -15,6 +15,13 @@ jobs:
|
||||
- name: Build backend image
|
||||
run: docker build -t realtime-collab-backend:latest ./backend
|
||||
|
||||
- name: Import image into k3s containerd
|
||||
# docker build only populates the Docker daemon's store; k3s runs its
|
||||
# own containerd (imagePullPolicy: Never, never pulls a registry), so
|
||||
# the image must be explicitly imported or the pod keeps running
|
||||
# whatever was last imported.
|
||||
run: docker save realtime-collab-backend:latest | k3s ctr -n k8s.io images import -
|
||||
|
||||
- name: Roll out backend
|
||||
run: |
|
||||
kubectl rollout restart deployment/realtime-collab-backend
|
||||
|
||||
Reference in New Issue
Block a user