Skip to content

Commit 029193c

Browse files
committed
Fix exec example to use new configuration model
1 parent 4e25ad8 commit 029193c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/exec.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import time
22

33
from kubernetes import config
4-
from kubernetes.client import configuration
4+
from kubernetes.client import Configuration
55
from kubernetes.client.apis import core_v1_api
66
from kubernetes.client.rest import ApiException
77
from kubernetes.stream import stream
88

99
config.load_kube_config()
10-
configuration.assert_hostname = False
10+
c = Configuration()
11+
c.assert_hostname = False
12+
Configuration.set_default(c)
1113
api = core_v1_api.CoreV1Api()
1214
name = 'busybox-test'
1315

0 commit comments

Comments
 (0)