Workload deployment in GKE failing with error: Building the container image failed

4/9/2020

I've built the docker image and pushed to github packages. I'm using GCP UI to deploy this image in an existing gke cluster.

All the options are default.

Repository provider, I'm choosing github from the drop down.

Image name GCP is autopopulating with gcr.io/some-gcp-project/github.com/githubuser/cso:$SHORT_SHA under filed image name.

Kubernetes deployment yaml file:

---
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

Any guidance on how to debug this?

-- riser101
google-cloud-platform
google-kubernetes-engine

0 Answers