Delen via


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. Als u het toepassingsexemplaar verwijdert, worden ook alle actieve service-exemplaren verwijderd die aan die toepassing zijn gekoppeld. Next, the application files are deleted from the image store.

Installeer indien nodig de Service Fabric CLI.

Voorbeeldscript

#!/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

Volgende stappen

Zie de Service Fabric CLI-documentatie voor meer informatie.

Aanvullende Service Fabric CLI-voorbeelden voor Azure Service Fabric vindt u in de Service Fabric CLI-voorbeelden.