Skip to content

Commit 1d5dbad

Browse files
committed
use incluster config if kube config is not available
1 parent 07a62b1 commit 1d5dbad

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

dashboard/api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
from kubernetes import client, config
77

8-
config.load_kube_config()
8+
try:
9+
config.load_kube_config()
10+
except:
11+
config.load_incluster_config()
912
kube = client.CoreV1Api()
1013

1114
parent_app = None

0 commit comments

Comments
 (0)