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 构建。