diff options
-rw-r--r-- | sos/plugins/kubernetes.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/kubernetes.py b/sos/plugins/kubernetes.py index 1a97de9d..8fc0eba4 100644 --- a/sos/plugins/kubernetes.py +++ b/sos/plugins/kubernetes.py @@ -188,8 +188,11 @@ class RedHatKubernetes(Kubernetes, RedHatPlugin): ) kube_cmd = "kubectl" + # Rather than loading the config file, use the OCP command directly that + # wraps kubectl, so we don't have to manually account for any other changes + # the `oc` binary may implement if path.exists('/etc/origin/master/admin.kubeconfig'): - kube_cmd += ' --kubeconfig=/etc/origin/master/admin.kubeconfig' + kube_cmd = 'oc' class UbuntuKubernetes(Kubernetes, UbuntuPlugin): |