GKE中的工作负载部署失败,并出现错误:构建容器映像失败

时间:2020-04-09 13:39:06

标签: google-cloud-platform google-kubernetes-engine

我已经构建了docker镜像并将其推送到github软件包。我正在使用GCP UI在现有的gke群集中部署此映像。

所有选项均为默认选项。

存储库提供程序,我从下拉列表中选择github。

图片名称GCP在填充的图片名称下自动填充gcr.io/some-gcp-project/github.com/githubuser/cso:$SHORT_SHA

Kubernetes部署yaml文件:

---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
  name: "cso"
  namespace: "default"
  labels:
    app: "cso"
spec:
  replicas: 3
  selector:
    matchLabels:
      app: "cso"
  template:
    metadata:
      labels:
        app: "cso"
    spec:
      containers:
      - name: "cso-1"
        image: "gcr.io/some-gcp-project/github.com/githubuser/cso:$SHORT_SHA"
---
apiVersion: "autoscaling/v2beta1"
kind: "HorizontalPodAutoscaler"
metadata:
  name: "cso-hpa-o9ol"
  namespace: "default"
  labels:
    app: "cso"
spec:
  scaleTargetRef:
    kind: "Deployment"
    name: "cso"
    apiVersion: "apps/v1"
  minReplicas: 1
  maxReplicas: 5
  metrics:
  - type: "Resource"
    resource:
      name: "cpu"
      targetAverageUtilization: 80

有关如何进行调试的任何指南?

0 个答案:

没有答案