|
51 | 51 | # - Document functions using proper syntax:
|
52 | 52 | # https://technet.microsoft.com/en-us/library/hh847834(v=wps.620).aspx
|
53 | 53 |
|
54 |
| -$INFRA_CONTAINER = "e2eteam/pause:3.1" |
| 54 | +$INFRA_CONTAINER = 'mcr.microsoft.com/k8s/core/pause:1.0.0' |
55 | 55 | $GCE_METADATA_SERVER = "169.254.169.254"
|
56 | 56 | # The "management" interface is used by the kubelet and by Windows pods to talk
|
57 | 57 | # to the rest of the Kubernetes cluster *without NAT*. This interface does not
|
@@ -1038,6 +1038,23 @@ function Verify-WorkerServices {
|
1038 | 1038 | Log_Todo "run more verification commands."
|
1039 | 1039 | }
|
1040 | 1040 |
|
| 1041 | +# Pulls the infra/pause container image onto the node so that it will be |
| 1042 | +# immediately available when the kubelet tries to run pods. |
| 1043 | +# TODO(pjh): downloading the container container image may take a few minutes; |
| 1044 | +# figure out how to run this in the background while perform the rest of the |
| 1045 | +# node startup steps! |
| 1046 | +function Pull-InfraContainer { |
| 1047 | + $name, $label = $INFRA_CONTAINER -split ':',2 |
| 1048 | + if (-not ("$(& docker image list)" -match "$name.*$label")) { |
| 1049 | + & docker pull $INFRA_CONTAINER |
| 1050 | + if (!$?) { |
| 1051 | + throw "Error running 'docker pull $INFRA_CONTAINER'" |
| 1052 | + } |
| 1053 | + } |
| 1054 | + $inspect = "$(& docker inspect $INFRA_CONTAINER | Out-String)" |
| 1055 | + Log-Output "Infra/pause container:`n$inspect" |
| 1056 | +} |
| 1057 | + |
1041 | 1058 | # Add a registry key for docker in EventLog so that log messages are mapped
|
1042 | 1059 | # correctly. This is a workaround since the key is missing in the base image.
|
1043 | 1060 | # https://github.com/MicrosoftDocs/Virtualization-Documentation/pull/503
|
|
0 commit comments