File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import os
31
31
from kubernetes import client, config
32
32
33
33
# Configs can be set in Configuration class directly or using helper utility
34
- config.load_kube_config(os.environ[ " HOME " ] + ' / .kube/ config' )
34
+ config.load_kube_config(os.path.join(os.path.expanduser( ' ~ ' ), ' .kube' , ' config' )
35
35
36
36
v1 = client.CoreV1Api()
37
37
print (" Listing pods with their IPs:" )
@@ -48,7 +48,7 @@ import os
48
48
from kubernetes import client, config, watch
49
49
50
50
# Configs can be set in Configuration class directly or using helper utility
51
- config.load_kube_config(os.environ[ " HOME " ] + ' / .kube/ config' )
51
+ config.load_kube_config(os.path.join(os.path.expanduser( ' ~ ' ), ' .kube' , ' config' )
52
52
53
53
v1 = client.CoreV1Api()
54
54
count = 10
Original file line number Diff line number Diff line change 20
20
def main ():
21
21
# Configs can be set in Configuration class directly or using helper
22
22
# utility
23
- config .load_kube_config (os .environ [ "HOME" ] + '/ .kube/ config' )
23
+ config .load_kube_config (os .path . join ( os . path . expanduser ( '~' ), ' .kube' , ' config' )
24
24
25
25
v1 = client .CoreV1Api ()
26
26
print ("Listing pods with their IPs:" )
Original file line number Diff line number Diff line change 20
20
def main ():
21
21
# Configs can be set in Configuration class directly or using helper
22
22
# utility
23
- config .load_kube_config (os .environ [ "HOME" ] + '/ .kube/ config' )
23
+ config .load_kube_config (os .path . join ( os . path . expanduser ( '~' ), ' .kube' , ' config' )
24
24
25
25
v1 = client .CoreV1Api ()
26
26
count = 10
Original file line number Diff line number Diff line change 20
20
def main ():
21
21
# Configs can be set in Configuration class directly or using helper
22
22
# utility
23
- config .load_kube_config (os .environ [ "HOME" ] + '/ .kube/ config' )
23
+ config .load_kube_config (os .path . join ( os . path . expanduser ( '~' ), ' .kube' , ' config' )
24
24
25
25
print ("Supported APIs (* is preferred version):" )
26
26
print ("%-20s %s" %
You can’t perform that action at this time.
0 commit comments