列出 Service Fabric 叢集中執行的應用程式

此範例指令碼會連線到 Service Fabric 叢集,並列出所有佈建的應用程式。

重要

有兩個 CLI 公用程式用來與 Service Fabric 互動。 Azure CLI 用來管理 Azure 資源,例如 Azure 託管的 Service Fabric 叢集。 Service Fabric CLI 用來直接連線到 Service Fabric 叢集 (不論裝載於何處) 及管理叢集、應用程式和服務。

範例指令碼

#!/bin/bash

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

# Retrieve all applications from the cluster
sfctl application list

下一步

如需詳細資訊,請參閱 Service Fabric CLI 文件

您可以在 Service Fabric CLI 範例中找到適用於 Azure Service Fabric 的其他 Service Fabric CLI 範例。