Skip to content

Commit 90fd79d

Browse files
authored
fix: ctr namespace on image import (#2897)
1 parent 481c39c commit 90fd79d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/vclusterctl/cmd/node/load-docker-image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (o *LoadImageOptions) Run(ctx context.Context, nodeName string) error {
104104

105105
// load the image in the node
106106
o.Log.Infof("Importing image in node %s...", nodeName)
107-
if err := runCommand("kubectl", "exec", loadImagePod.Name, "-n", loadImagePod.Namespace, "--", "nsenter", "-t", "1", "-m", "-u", "-i", "-n", "-S", "0", "-G", "0", "sh", "-c", "ctr images import /tmp/image.tar.gz && rm -f /tmp/image.tar.gz"); err != nil {
107+
if err := runCommand("kubectl", "exec", loadImagePod.Name, "-n", loadImagePod.Namespace, "--", "nsenter", "-t", "1", "-m", "-u", "-i", "-n", "-S", "0", "-G", "0", "sh", "-c", "ctr --namespace=k8s.io images import /tmp/image.tar.gz && rm -f /tmp/image.tar.gz"); err != nil {
108108
return fmt.Errorf("failed to load image in node: %w", err)
109109
}
110110

0 commit comments

Comments
 (0)