0

我在 Azure 上创建了一个虚拟机,并在带有 VirtualBox 的 VM 上安装了 minikube。我已经使用以下链接中的说明创建了 kubectl 机密: https ://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-kubernetes 我能够从 ACR 发起拉取请求Azure 门户: 在此处输入图像描述

但是Container创建了很长时间: 在此处输入图像描述

以下是对使用中的 pod 的描述:

Name:           loginfunctionality-84b59c4464-rr5ss
Namespace:      default
Priority:       0
Node:           minikube/192.168.99.101
Start Time:     Mon, 29 Jun 2020 11:42:01 +0000
Labels:         io.kompose.service=loginfunctionality
                pod-template-hash=84b59c4464
Annotations:    kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert
                kompose.version: 1.21.0 (992df58d8)
Status:         Pending
IP:
IPs:            <none>
Controlled By:  ReplicaSet/loginfunctionality-84b59c4464
Containers:
  loginfunctionality:
    Container ID:
    Image:          healthcareakscicdacr.azurecr.io/loginfunctionality:latest
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:
      ASPNETCORE_ENVIRONMENT:   Development
      RedisCacheConnection:     rediscache:6379
      WebApiBaseUrl:            http://20.185.77.158:5018/api/
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-f4wfq (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-f4wfq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-f4wfq
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age    From               Message
  ----    ------     ----   ----               -------
  Normal  Scheduled  5m3s   default-scheduler  Successfully assigned default/loginfunctionality-84b59c4464-rr5ss to mini
  Normal  Pulling    4m35s  kubelet, minikube  Pulling image "healthcareakscicdacr.azurecr.io/loginfunctionality:latest"
PS C:\DeploymentFiles> kubectl describe pod loginfunctionality-84b59c4464-rr5ss
Name:           loginfunctionality-84b59c4464-rr5ss
Namespace:      default
Priority:       0
Node:           minikube/192.168.99.101
Start Time:     Mon, 29 Jun 2020 11:42:01 +0000
Labels:         io.kompose.service=loginfunctionality
                pod-template-hash=84b59c4464
Annotations:    kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert
                kompose.version: 1.21.0 (992df58d8)
Status:         Pending
IP:
IPs:            <none>
Controlled By:  ReplicaSet/loginfunctionality-84b59c4464
Containers:
  loginfunctionality:
    Container ID:
    Image:          healthcareakscicdacr.azurecr.io/loginfunctionality:latest
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:
      ASPNETCORE_ENVIRONMENT:   Development
      RedisCacheConnection:     rediscache:6379
      WebApiBaseUrl:            http://20.185.77.158:5018/api/
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-f4wfq (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-f4wfq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-f4wfq
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age    From               Message
  ----    ------     ----   ----               -------
  Normal  Scheduled  7m35s  default-scheduler  Successfully assigned default/loginfunctionality-84b59c4464-rr5ss to mini
  Normal  Pulling    7m7s   kubelet, minikube  Pulling image "healthcareakscicdacr.azurecr.io/loginfunctionality:latest"
PS C:\DeploymentFiles> kubectl describe pod loginfunctionality-84b59c4464-rr5ss
Name:           loginfunctionality-84b59c4464-rr5ss
Namespace:      default
Priority:       0
Node:           minikube/192.168.99.101
Start Time:     Mon, 29 Jun 2020 11:42:01 +0000
Labels:         io.kompose.service=loginfunctionality
                pod-template-hash=84b59c4464
Annotations:    kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert
                kompose.version: 1.21.0 (992df58d8)
Status:         Pending
IP:
IPs:            <none>
Controlled By:  ReplicaSet/loginfunctionality-84b59c4464
Containers:
  loginfunctionality:
    Container ID:
    Image:          healthcareakscicdacr.azurecr.io/loginfunctionality:latest
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:
      ASPNETCORE_ENVIRONMENT:   Development
      RedisCacheConnection:     rediscache:6379
      WebApiBaseUrl:            http://20.185.77.158:5018/api/
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-f4wfq (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-f4wfq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-f4wfq
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  11m   default-scheduler  Successfully assigned default/loginfunctionality-84b59c4464-rr5ss to minik
  Normal  Pulling    11m   kubelet, minikube  Pulling image "healthcareakscicdacr.azurecr.io/loginfunctionality:latest"
PS C:\DeploymentFiles> kubectl describe pod loginfunctionality-84b59c4464-rr5ss
Name:           loginfunctionality-84b59c4464-rr5ss
Namespace:      default
Priority:       0
Node:           minikube/192.168.99.101
Start Time:     Mon, 29 Jun 2020 11:42:01 +0000
Labels:         io.kompose.service=loginfunctionality
                pod-template-hash=84b59c4464
Annotations:    kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert
                kompose.version: 1.21.0 (992df58d8)
Status:         Pending
IP:
IPs:            <none>
Controlled By:  ReplicaSet/loginfunctionality-84b59c4464
Containers:
  loginfunctionality:
    Container ID:
    Image:          healthcareakscicdacr.azurecr.io/loginfunctionality:latest
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:
      ASPNETCORE_ENVIRONMENT:   Development
      RedisCacheConnection:     rediscache:6379
      WebApiBaseUrl:            http://20.185.77.158:5018/api/
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-f4wfq (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-f4wfq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-f4wfq
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  16m   default-scheduler  Successfully assigned default/loginfunctionality-84b59c4464-rr5ss to minik
  Normal  Pulling    16m   kubelet, minikube  Pulling image "healthcareakscicdacr.azurecr.io/loginfunctionality:latest"

请让我知道我哪里出错了。

4

1 回答 1

1

重新启动 VM 有助于解决问题。

于 2020-06-29T17:51:39.407 回答