code: func NewClientInCluster() Kubernetes {
  	host := "https://" + os.Getenv("KUBERNETES_SERVICE_HOST") + ":" + os.Getenv("KUBERNETES_SERVICE_PORT")
  
  	s, err := os.Stat(serviceAccountPath)
  	if err != nil {
  		log.Fatal(err)
  	}
  	if s == nil || !s.IsDir() {
  		log.Fatal(errors.New("no k8s service account found"))
  	}
  
  	token, err := ioutil.ReadFile(path.Join(serviceAccountPath, "token"))
  	if err != nil {
  		log.Fatal(err)
  	}
  	t := string(token)
  
  	ns, err := detectNamespace()
  	if err != nil {
  		log.Fatal(err)
  	}
  
  	crt, err := CertPoolFromFile(path.Join(serviceAccountPath, "ca.crt"))
  	if err != nil {
  		log.Fatal(err)
  	}
  
  	c := &http.Client{
  		Transport: &http.Transport{
  			TLSClientConfig: &tls.Config{
  				RootCAs: crt,
  			},
  			DisableCompression: true,
  		},
  	}
  
  	return &client{
  		opts: &api.Options{
  			Client:      c,
  			Host:        host,
  			Namespace:   ns,
  			BearerToken: &t,
  		},
  	}
  }
docs: // NewClientInCluster should work similarily to the official api
  // NewInClient by setting up a client configuration for use within
  // a k8s pod.