kubernetes 执行容器运行状况检查时发生Google Cloud Run内部错误

zaq34kh6  于 2022-11-02  发布在  Kubernetes
关注(0)|答案(1)|浏览(95)

有时(无特定关联)Cloud Run会由于执行容器运行状况检查时出现问题而无法部署新修订版本:

X Deploying... Deploying Revision. Waiting on revision <my_app>-s7px8.                                                                                                                                                             
  - Creating Revision... Internal error occurred while performing container health check.                                                                                                                                                   
  . Routing traffic...

1.我使用此命令来卷展栏:cloudrun.yml
1.我的cloudrun.yml的一些谷歌特定的细节:

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: <my_app>
spec:
  traffic:
  - percent: 100
    latestRevision: true
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/minScale: '1'
        autoscaling.knative.dev/maxScale: '40'
        run.googleapis.com/vpc-access-connector: <my_app>-vpc-16gbps
        run.googleapis.com/sandbox: gvisor
    spec:
      timeoutSeconds: 50
      serviceAccountName: ...
      containerConcurrency: 100
      containers:
      - image: ...
        ports:
        - containerPort: 8080
          name: h2c
        resources:
          limits:
            cpu: '4'
            memory: 6Gi
  1. Cloud Run中的应用程序日志看起来很好,没有什么奇怪的
  2. Cloud Run中唯一的“坏”日志是:
{
  "protoPayload": {
    "@type": "type.googleapis.com/google.cloud.audit.AuditLog",
    "status": {
      "code": 13,
      "message": "Ready condition status changed to False for Service <my_app> with message: Internal error occurred while performing container health check. Resource readiness deadline exceeded."
    },
    "serviceName": "run.googleapis.com",
    "response": {
      "apiVersion": "serving.knative.dev/v1",
      "kind": "Service",
      "status": {
        "observedGeneration": 1,
        "conditions": [
          {
            "type": "Ready",
            "status": "False",
            "message": "Internal error occurred while performing container health check. Resource readiness deadline exceeded.",
            "lastTransitionTime": "2022-10-05T14:11:19.884568Z"
          },
          {
            "type": "ConfigurationsReady",
            "status": "Unknown",
            "message": "Internal error occurred while performing container health check.",
            "lastTransitionTime": "2022-10-05T14:00:50.398740Z"
          },
          {
            "type": "RoutesReady",
            "status": "False",
            "reason": "RevisionFailed",
            "message": "Revision '<my_app>-s7px8' is not ready and cannot serve traffic. Internal error occurred while performing container health check.",
            "lastTransitionTime": "2022-10-05T14:11:19.884568Z"
          }
        ],
        "latestCreatedRevisionName": "<my_app>-s7px8",
      },
      "@type": "type.googleapis.com/google.cloud.run.v1.Service"
    }
  }
}

1.该命令在约15-20秒内失败。我不知道GCP执行了什么探测(看起来像TCP,超时时间为4分钟),但它看起来过早耗尽。
1.我没有任何自定义的启动探测器、运行状况检查、就绪/活动探测器等。
有人面临同样的问题吗?有什么想法去哪里看?

nmpmafwu

nmpmafwu1#

好吧,这就是我的工作。我删除了这一行:

autoscaling.knative.dev/minScale: '1'

根据文件,默认为0

相关问题