code: func (r *RemoteRuntimeService) ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err error) {
  	// Do not set timeout when timeout is 0.
  	var ctx context.Context
  	var cancel context.CancelFunc
  	if timeout != 0 {
  		// Use timeout + default timeout (2 minutes) as timeout to leave some time for
  		// the runtime to do cleanup.
  		ctx, cancel = getContextWithTimeout(r.timeout + timeout)
  	} else {
  		ctx, cancel = getContextWithCancel()
  	}
  	defer cancel()
  
  	timeoutSeconds := int64(timeout.Seconds())
  	req := &runtimeapi.ExecSyncRequest{
  		ContainerId: containerID,
  		Cmd:         cmd,
  		Timeout:     timeoutSeconds,
  	}
  	resp, err := r.runtimeClient.ExecSync(ctx, req)
  	if err != nil {
  		klog.Errorf("ExecSync %s '%s' from runtime service failed: %v", containerID, strings.Join(cmd, " "), err)
  		return nil, nil, err
  	}
  
  	err = nil
  	if resp.ExitCode != 0 {
  		err = utilexec.CodeExitError{
  			Err:  fmt.Errorf("command '%s' exited with %d: %s", strings.Join(cmd, " "), resp.ExitCode, resp.Stderr),
  			Code: int(resp.ExitCode),
  		}
  	}
  
  	return resp.Stdout, resp.Stderr, err
  }
docs: // ExecSync executes a command in the container, and returns the stdout output.
  // If command exits with a non-zero exit code, an error is returned.