diff --git a/middleware/kubernetes/kubernetes.go b/middleware/kubernetes/kubernetes.go
index <HASH>..<HASH> 100644
--- a/middleware/kubernetes/kubernetes.go
+++ b/middleware/kubernetes/kubernetes.go
@@ -50,6 +50,12 @@ func (k *Kubernetes) getClientConfig() (*restclient.Config, error) {
 	authinfo := clientcmdapi.AuthInfo{}
 	if len(k.APIEndpoint) > 0 {
 		clusterinfo.Server = k.APIEndpoint
+	} else {
+		cc, err := restclient.InClusterConfig()
+		if err != nil {
+			return nil, err
+		}
+		return cc, err
 	}
 	if len(k.APICertAuth) > 0 {
 		clusterinfo.CertificateAuthority = k.APICertAuth
Enable use of a service account in-cluster. (#<I>)