kubeadm: fix crictl pull using wrong flag, use -i and -r

This commit is contained in:
Paco Xu 2023-05-06 14:50:21 +08:00
parent 8f3f997a98
commit 64f2fe2357

View File

@ -71,7 +71,7 @@ func (runtime *CRIRuntime) Socket() string {
// crictl creates a crictl command for the provided args.
func (runtime *CRIRuntime) crictl(args ...string) utilsexec.Cmd {
cmd := runtime.exec.Command(runtime.crictlPath, append([]string{"-r", runtime.Socket()}, args...)...)
cmd := runtime.exec.Command(runtime.crictlPath, append([]string{"-r", runtime.Socket(), "-i", runtime.Socket()}, args...)...)
cmd.SetEnv(os.Environ())
return cmd
}