主机和容器都cmd /c ver
返回10.0.20348.230
,但 Kubernetes 仍然抱怨有The container operating system does not match the host operating system.
什么想法吗?
apiVersion: v1
kind: Pod
metadata:
name: aspnet-test
spec:
containers:
- image: mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2022
name: aspnet-test
ports:
- containerPort: 80
name: http
protocol: TCP
nodeSelector:
kubernetes.io/os: windows
docker run -it -p 5000:80 mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2022
作品。该图像是通过此命令下载的,因此 Kubernetes 在获取它之前就确定了错误。
使用 Microk8s 和 Kubernetes 1.22.3 重新测试。