遷移 Windows IIS 服務時發生的問題
本文說明遷移 Windows IIS 服務時可能遇到的問題,以及相關解決方法。
Windows IIS 部署作業標示為「未準備就緒」
由於逾時時間過短,Windows IIS 工作負載的部署作業可能會標示為未就緒。如果您使用 Skaffold 部署工作負載,部署作業可能會顯示為失敗。
如要解決這個問題,請使用 PowerShell 增加就緒探針逾時和週期:
foreach ($file in (Get-ChildItem . -Recurse -Include "deployment_spec.yaml")) { (Get-Content $file).replace("periodSeconds: 10", "periodSe
conds: 30").replace("timeoutSeconds: 1", "timeoutSeconds: 10") | Set-Content $file }
針對 Windows 映像檔建構的 Skaffold 失敗
針對 Windows 映像檔的 Skaffold 建構作業可能會在 Windows 電腦上失敗,因為 Skaffold 會嘗試為錯誤的目標提取基礎映像檔。
如果發生這個問題,您可能會看到類似以下的錯誤訊息:
Checking cache...
- migrated-image-6jc3z: Error checking cache.
getting hash for artifact "migrated-image-6jc3z": getting dependencies for "migrated-image-6jc3z": parsing ONBUILD instructions: retrieving image "mcr.microsoft.com/dotnet/framework/aspnet:4.8": no child with platform linux/amd64 in index mcr.microsoft.com/dotnet/framework/aspnet:4.8
解決這個問題的因應措施是使用 docker pull
指令手動提取映像檔,然後再次執行 Skaffold 建構作業。