Skip to content

Commit f6c783d

Browse files
authored
Merge pull request #1343 from yue9944882/fix/kubeconfig-file-example
Kubeconfig Example: Replaces shell sugar `~` with env var `$HOME`
2 parents 7314b39 + 92b6bea commit f6c783d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/src/main/java/io/kubernetes/client/examples/KubeConfigFileClientExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public class KubeConfigFileClientExample {
3535
public static void main(String[] args) throws IOException, ApiException {
3636

3737
// file path to your KubeConfig
38-
String kubeConfigPath = "~/.kube/config";
38+
39+
String kubeConfigPath = System.getenv("HOME") + "/.kube/config";
3940

4041
// loading the out-of-cluster config, a kubeconfig from file-system
4142
ApiClient client =

0 commit comments

Comments
 (0)