Delete using CLI
Deleting Kubeflow from GCP using the command line interface (CLI)
This page shows you how to use the CLI to delete a Kubeflow deployment onGoogle Cloud Platform (GCP).
Before you start
This guide assumes the following settings:
- The
${KF_DIR}
environment variable contains the path toyour Kubeflow application directory, which holds your Kubeflow configurationfiles. For example,/opt/my-kubeflow/
.
export KF_DIR=<path to your Kubeflow application directory>
- The
${CONFIG_FILE}
environment variable contains the path to yourKubeflow configuration file.
export CONFIG_FILE=${KF_DIR}/kfctl_gcp_iap.0.7.1.yaml
Or:
export CONFIG_FILE=${KF_DIR}/kfctl_gcp_basic_auth.0.7.1.yaml
For further background about the above settings, see the guide todeploying Kubeflow with the CLI.
Deleting your deployment
Run the following commands to delete your deployment and reclaim all GCPresources:
# If you want to delete all the resources, including storage:
kfctl delete -f ${CONFIG_FILE} --delete_storage
# If you want to preserve storage, which contains metadata and information
# from Kubeflow Pipelines:
kfctl delete -f ${CONFIG_FILE}
You should consider preserving storage if you may want to relaunchKubeflow in the future and restore the data from yourpipelines.