diff --git a/src/KubernetesClient/KubernetesClientConfiguration.ConfigFile.cs b/src/KubernetesClient/KubernetesClientConfiguration.ConfigFile.cs
index 84a23a6..b7f67dc 100644
--- a/src/KubernetesClient/KubernetesClientConfiguration.ConfigFile.cs
+++ b/src/KubernetesClient/KubernetesClientConfiguration.ConfigFile.cs
@@ -48,14 +48,15 @@ namespace k8s
///
/// Initializes a new instance of the from config file
///
- /// kube api server endpoint
/// Explicit file path to kubeconfig. Set to null to use the default file path
+ /// override the context in config file, set null if do not want to override
+ /// kube api server endpoint
/// When , the paths in the kubeconfig file will be considered to be relative to the directory in which the kubeconfig
/// file is located. When , the paths will be considered to be relative to the current working directory.
public static KubernetesClientConfiguration BuildConfigFromConfigFile(string kubeconfigPath = null,
string currentContext = null, string masterUrl = null, bool useRelativePaths = true)
{
- return BuildConfigFromConfigFile(new FileInfo(kubeconfigPath ?? KubeConfigDefaultLocation), null,
+ return BuildConfigFromConfigFile(new FileInfo(kubeconfigPath ?? KubeConfigDefaultLocation), currentContext,
masterUrl, useRelativePaths);
}
@@ -363,7 +364,7 @@ namespace k8s
return LoadKubeConfigAsync(kubeconfigPath, useRelativePaths).GetAwaiter().GetResult();
}
- //
+ ///
/// Loads Kube Config
///
/// Kube config file contents
@@ -402,7 +403,7 @@ namespace k8s
return LoadKubeConfigAsync(kubeconfig, useRelativePaths).GetAwaiter().GetResult();
}
- //
+ ///
/// Loads Kube Config
///
/// Kube config file contents stream