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 on Google Cloud Platform (GCP).

Before you start

This guide assumes the following settings:

  • The ${KF_DIR} environment variable contains the path to your Kubeflow application directory, which holds your Kubeflow configuration files. For example, /opt/my-kubeflow/.

    export KF_DIR=<path to your Kubeflow application directory>
    
  • The ${CONFIG_FILE} environment variable contains the path to your Kubeflow configuration file.

    export CONFIG_FILE=${KF_DIR}/kfctl_gcp_iap.v1.0.1.yaml
    

    Or:

    export CONFIG_FILE=${KF_DIR}/kfctl_gcp_basic_auth.v1.0.1.yaml
    

For further background about the above settings, see the guide to deploying Kubeflow with the CLI.

Deleting your deployment

Run the following commands to delete your deployment and reclaim all GCP resources:

# 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 relaunch Kubeflow in the future and restore the data from your pipelines.