title: ChildProcessError: stdout maxBuffer length exceeded
body: <p>We have the following code (don't ask me why...even as none-javascript dev it doesn't look pretty to me), which throws error after Kubernetes upgrade:</p>
  <pre><code>module.exports.getReplicationControllers = async function getReplicationControllers(namespace) {
    const kubeConfig = (await getNamespacesByCluster()).get(namespace);
    if (!kubeConfig) throw new Error(`No clusters contain the namespace ${namespace}`)
    const kubeConfigEscaped = shellEscape([kubeConfig]);
  
    const namespaceEscaped = shellEscape([namespace]);
    const result = await cpp(`kubectl --kubeconfig ${kubeConfigEscaped} get replicationcontrollers -o json -n ${namespaceEscaped}`);
    console.error(result.stderr);
    /** @type {{items: any[]}} */
    const resultParsed = JSON.parse(result.stdout);
    const serviceNames = resultParsed.items.map((item) =&gt; item.metadata.name);
    return serviceNames;
  }
  </code></pre>
  <blockquote>
  <p>ChildProcessError: stdout maxBuffer length exceeded kubectl --kubeconfig /kubeconfig-staging get replicationcontrollers -o json -n xxx (exited with error code ERR_CHILD_PROCESS_STDIO_MAXBUFFER)</p>
  </blockquote>
  <p>What I've tried so far is:</p>
  <pre><code>  const result = await cpp(`kubectl --kubeconfig ${kubeConfigEscaped} get replicationcontrollers -o=jsonpath='{.items[*].metadata.name}' -n ${namespaceEscaped}`);
    console.error(result.stderr);
    const serviceNames = result.split(' ');
    return serviceNames;
  </code></pre>
  <p>Which returns</p>
  <blockquote>
  <p>TypeError: result.split is not a function</p>
  </blockquote>
  <p>I am not super versed with JavaScript, any help appreciated.</p>