Skip to content

Commit f0d15cb

Browse files
authored
Update exception message in KubernetesClientConfiguration.InCluster.cs (#844)
1 parent 4db390f commit f0d15cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/KubernetesClient/KubernetesClientConfiguration.InCluster.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static KubernetesClientConfiguration InClusterConfig()
4444
if (!IsInCluster())
4545
{
4646
throw new KubeConfigException(
47-
"unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined");
47+
"Unable to load in-cluster configuration. Missing environment variables KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT or service account token. Hint: consider using option \"automountServiceAccountToken: true\" in deployment declaration.");
4848
}
4949

5050
var rootCAFile = Path.Combine(ServiceAccountPath, ServiceAccountRootCAKeyFileName);

0 commit comments

Comments
 (0)