Uninstalling Kubeflow

  1. Rollback the Kubeflow addon:
    # get numeric ID of the k8s cluter
    kubectl get cm -n hpecp-bootstrap hpecp-bootstrap-bdconfig -o jsonpath={.data.bds_k8s_clusterid} |  cut -d '/' -f5
    K8S_CLUSTERID=1;  #<numeric ID of the k8s cluter>
    KF_ADDON_NAME="kubeflow";
    echo "{ok, Kfaddon} = bd_mgmt_k8s_manifest:get_addon(\"${KF_ADDON_NAME}\")." >> /opt/bluedata/common-install/bd_mgmt/tmp.w;
    echo "bd_mgmt_k8s_bootstrap:cluster_bootstrap_rollback_addons(\"${K8S_CLUSTERID}\", [Kfaddon])." >>/opt/bluedata/common-install/bd_mgmt/tmp.w;
    Wait about 10 to 20 minutes for the Kubeflow addon to uninstall.
  2. To verify successful uninstallation, check that the kubeflow namespace is deleted and that there are no running pods in the hpecp-bootstrap namespace.
  3. Teardown the Kubeflow addon:
    K8S_CLUSTERID=1;  #<numeric ID of the k8s cluter>
    KF_BOOTSTRAP_DEPLOYMENT="hpecp-bootstrap-kubeflow";
    echo "bd_mgmt_k8s_bootstrap:addon_teardown(\"${K8S_CLUSTERID}\", \"${KF_BOOTSTRAP_DEPLOYMENT}\")." >> /opt/bluedata/common-install/bd_mgmt/tmp.w;
  4. To verify successful teardown, check that none of the following exists:
    • deployment hpecp-bootstrap-kubeflow in namespace hpecp-bootstrap
    • configmap hpecp-bootstrap-kubeflow in namespace hpecp-bootstrap
    • persistentvolumeclaim hpecp-bootstrap-kubeflow in namespace hpecp-bootstrap
  5. Update the database to refelct the removal of the Kubeflow add-on:
    K8S CLUSTERID=1; #<numeric ID of the k8s cluter>
    KF_ADDON_NAME="kubeflow";
    echo "{ok, C} = bd_util_db_generic:get_obj(bdm_k8s_cluster, \"${K8S_CLUSTERID}\")." >> /opt/bluedata/common-install/bd_mgmt/tmp.w; 
    echo "Alist = erlang:element(11, C)." >> /opt/bluedata/common-install/bd_mgmt/tmp.w;
    echo "Nlist = erlang:subtract(Alist, [\"${KF_ADDON_NAME}\"])." >> /opt/bluedata/common-install/bd_mgmt/tmp.w;
    echo "D = erlang:setelement(11, C, Nlist)." >> /opt/bluedata/common-install/bd_mgmt/tmp.w;
    echo "bd_util_db_generic:update_obj(D)." >> /opt/bluedata/common-install/bd_mgmt/tmp.w