ערוך

שתף באמצעות


Remove an application from a Service Fabric cluster using the Service Fabric CLI

This sample script deletes a running Service Fabric application instance, then unregisters an application type and version from the cluster. Deleting the application instance also deletes all the running service instances associated with that application. Next, the application files are deleted from the image store.

If needed, install the Service Fabric CLI.

Sample script

#!/bin/bash

# Select cluster
sfctl cluster select \
    --endpoint http://svcfab1.westus2.cloudapp.azure.com:19080

# Delete the application
sfctl application delete \
    --application-id svcfab_app \
    --timeout 500

# Unprovision the application type
sfctl application unprovision \
    --application-type-name svcfab_appType \
    --application-type-version 1.0.0 \
    --timeout 500

# Delete the application files from the image store
sfctl store delete \
    --content-path myappfolder

Next steps

For more information, see the Service Fabric CLI documentation.

Additional Service Fabric CLI samples for Azure Service Fabric can be found in the Service Fabric CLI samples.