この記事では、Arc 対応 Kubernetes 上の Azure App Service からの移行に使用する項目と考慮事項のチェックリストを示します。
評価と計画
まず、Arc 対応 Kubernetes 上の App Service で実行されているワークロードを特定する必要があります。 次の Azure Resource Graph クエリを実行して、Application Services 拡張機能がインストールされている Web アプリケーション、App Service Kubernetes Environment、Arc 対応 Kubernetes クラスターを一覧表示します。
Arc 対応 Kubernetes 上の App Service で実行されているすべての Web アプリケーションを識別する
resources
| where type=~"microsoft.web/sites" and kind contains "app,linux,kubernetes"
az graph query -q "resources | where type =~ 'microsoft.web/sites" and kind contains 'app,linux,kubernetes'"
Arc 対応 Kubernetes 上の App Service に接続されているすべての App Service Kubernetes 環境を特定する
resources
| where type=~"microsoft.web/kubeenvironments"
az graph query -q "resources | where type=~'microsoft.web/kubeenvironments'"
Application Services 拡張機能がインストールされているすべての Azure Arc 対応 Kubernetes クラスターを特定する
KubernetesConfigurationResources
| where type =~ 'microsoft.kubernetesconfiguration/extensions'
| where properties.ExtensionType == 'microsoft.web.appservice'
| project clusterresourceid = trim_end('/providers/Microsoft.KubernetesConfiguration/Extensions/.*', ['id']), name, location
az graph query -q "KubernetesConfigurationResources | where type =~ 'microsoft.kubernetesconfiguration/extensions' | where properties.ExtensionType == 'microsoft.web.appservice' | project clusterresourceid = trim_end('/providers/Microsoft.KubernetesConfiguration/Extensions/.*', ['id']), name, location"
Arc 対応 Kubernetes クラスターから Application Services 拡張機能を削除する
Arc 対応 Kubernetes 上の Azure Container Apps 拡張機能は、Application Services 拡張機能が既にインストールされているクラスターにはインストールできません。 接続されているクラスターから Application Services 拡張機能を最初に削除するか、Arc 対応 Kubernetes 拡張機能の Azure Container Apps を新しいクラスターにインストールする必要があります。
拡張機能をアンインストールして同じクラスターを使用する
Application Services 拡張機能をアンインストールするには、次の手順を実行する必要があります。
- 接続されたクラスターから、App Service Kubernetes 環境、関連する Web アプリケーション、および App Service プランを削除します。
- 接続されているクラスターから Application Services 拡張機能をアンインストールします。
Arc 対応 Kubernetes で Azure Container Apps を設定する
Arc 対応 Kubernetes 上の Azure Container Apps は、次の要件を満たす Arc 対応 Kubernetes クラスターにインストールできます。
- クラスターは、LoadBalancer サービスの種類をサポートする必要があります。
- クラスターは、サポートされている Azure リージョンのいずれかに接続されている必要があります。
- すべてのコンテナー アプリを Linux コンテナーにデプロイする必要があります。 Windows サポートは利用できません。
クラスターがこれらの要件を満たしている場合は、ドキュメントに従って Azure Arc 対応 Kubernetes で Azure Container Apps を有効にします。
コンテナー アプリの作成
Arc 対応 Kubernetes 上の Azure App Service から Arc 対応 Kubernetes 上の Azure Container Apps に移行するアプリケーションについては、デプロイする前にコンテナー化する必要があります。
既存のコンテナー イメージからアプリケーションをデプロイしたり、コードからデプロイしたり、GitHub のコードからデプロイしたりできます