kubeConfig.setCurrentContext(context); Context currentContext = KubeConfigUtils.getCurrentContext(kubeConfig); Cluster currentCluster = KubeConfigUtils.getCluster(kubeConfig, currentContext); if (currentCluster != null) {
try { io.fabric8.kubernetes.api.model.Config kubeConfig = KubeConfigUtils.parseConfig(kubeConfigFile); Context currentContext = KubeConfigUtils.getCurrentContext(kubeConfig); Cluster currentCluster = KubeConfigUtils.getCluster(kubeConfig, currentContext); if (currentCluster != null) {