“kubectl set image”因ErrImagePull而失败

时间:2017-05-10 09:14:42

标签: kubernetes google-kubernetes-engine kubectl

当我想要使用“kubectl set image”部署新图像时,经常会出现ErrImagePull状态失败,然后在一段时间后(最多几个小时)自行修复。这些是来自“kubectl describe pod”的事件:

Events:
FirstSeen     LastSeen        Count   From                                                            SubObjectPath                   Type            Reason          Message
---------     --------        -----   ----                                                            -------------                   --------        ------          -------
36m           36m             1       {default-scheduler }                                                                            Normal          Scheduled       Successfully assigned zzz-staging-2373868389-62tgk to gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5
36m           12m             6       {kubelet gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5}     spec.containers{zzz-staging}    Normal          Pulling         pulling image "us.gcr.io/yyyy-staging/zzz:latest"
31m           11m             6       {kubelet gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5}     spec.containers{zzz-staging}    Warning         Failed          Failed to pull image "us.gcr.io/yyyy-staging/zzz:latest": net/http: request canceled
31m           11m             6       {kubelet gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5}                                     Warning         FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "zzz-staging" with ErrImagePull: "net/http: request canceled"

16m           7m              3       {kubelet gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5}     spec.containers{zzz-staging}    Normal          BackOff         Back-off pulling image "us.gcr.io/yyyy-staging/zzz:latest"
16m           7m      7m      3       {kubelet gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5}                                     Warning         FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "zzz-staging" with ImagePullBackOff: "Back-off pulling image \"us.gcr.io/yyyy-staging/zzz:latest\""

24m           7m      5m      6       {kubelet gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5}     spec.containers{zzz-staging}    Warning         InspectFailed   Failed to inspect image "us.gcr.io/yyyy-staging/zzz:latest": operation timeout: context deadline exceeded
24m           7m      5m      6       {kubelet gke-xxxxxxxxxx-staging-default-pool-ac6a32f4-09h5}                                     Warning         FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "zzz-staging" with ImageInspectError: "Failed to inspect image \"us.gcr.io/yyyy-staging/zzz:latest\": operation timeout: context deadline exceeded"

有没有办法避免这种情况?

0 个答案:

没有答案