diff --git a/README.md b/README.md index 855b24f25..e477d73da 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ import os from kubernetes import client, config # Configs can be set in Configuration class directly or using helper utility -config.load_kube_config(os.environ["HOME"] + '/.kube/config') +config.load_kube_config(os.path.join(os.path.expanduser('~'), '.kube', 'config') v1=client.CoreV1Api() print("Listing pods with their IPs:") @@ -48,7 +48,7 @@ import os from kubernetes import client, config, watch # Configs can be set in Configuration class directly or using helper utility -config.load_kube_config(os.environ["HOME"] + '/.kube/config') +config.load_kube_config(os.path.join(os.path.expanduser('~'), '.kube', 'config') v1 = client.CoreV1Api() count = 10