Authenticating to the Kubernetes API with client-go
You would learn how to authenticate to the Kubernetes API from an Golang application running inside or outside the Kubernetes cluster

Client-go, go library for talking to a kubernetes cluster, provides few ways for authenticating to the Kubernetes API. Possible steps are quite different for apps which are running inside and outside the cluster.