From c2520e06df911b15c62a3c9c668820bac8d02ce0 Mon Sep 17 00:00:00 2001 From: jwierzbo Date: Sat, 22 Feb 2020 14:47:19 +0100 Subject: [PATCH] Fix 401 error for in-cluster auth case --- kubernetes/config/incluster_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/config/incluster_config.go b/kubernetes/config/incluster_config.go index dc92df6..ad6158c 100644 --- a/kubernetes/config/incluster_config.go +++ b/kubernetes/config/incluster_config.go @@ -67,7 +67,7 @@ func InClusterConfig() (*client.Configuration, error) { BasePath: "https://" + net.JoinHostPort(host, port), Host: net.JoinHostPort(host, port), Scheme: "https", - DefaultHeader: map[string]string{"Authentication": "Bearer " + string(token)}, + DefaultHeader: map[string]string{"Authorization": "Bearer " + string(token)}, UserAgent: defaultUserAgent, HTTPClient: c, }, nil