title: How to access the Kubernetes API in Go and run kubectl commands
body: <p>I want to access my Kubernetes cluster API in Go to run <code>kubectl</code> command to get available namespaces in my k8s cluster which is running on google cloud.</p>
  
  <p>My sole purpose is to get namespaces available in my cluster by running <code>kubectl</code> command: kindly let me know if there is any alternative.</p>