aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/kubernetes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sos/plugins/kubernetes.py b/sos/plugins/kubernetes.py
index 4c291f75..0e9a82af 100644
--- a/sos/plugins/kubernetes.py
+++ b/sos/plugins/kubernetes.py
@@ -176,7 +176,9 @@ class RedHatKubernetes(Kubernetes, RedHatPlugin):
'/etc/origin/node/pods/master-config.yaml',
)
- kube_cmd = "kubectl --kubeconfig=/etc/origin/master/admin.kubeconfig"
+ kube_cmd = "kubectl"
+ if path.exists('/etc/origin/master/admin.kubeconfig'):
+ kube_cmd += ' --kubeconfig=/etc/origin/master/admin.kubeconfig'
class UbuntuKubernetes(Kubernetes, UbuntuPlugin):