diff --git a/pkg/cri/server/container_execsync.go b/pkg/cri/server/container_execsync.go index cd9e31fc7..eb17981a7 100644 --- a/pkg/cri/server/container_execsync.go +++ b/pkg/cri/server/container_execsync.go @@ -146,6 +146,8 @@ func (c *criService) execInternal(ctx context.Context, container containerd.Cont } pspec.Args = opts.cmd + // CommandLine may already be set on the container's spec, but we want to only use Args here. + pspec.CommandLine = "" if opts.stdout == nil { opts.stdout = cio.NewDiscardLogger()