GKE not recognising jfrog docker image

4/15/2019

I am using GKE and Jfrog artifactory. I am building image with tag like

cicd-docker-local.jfrog.io/stage_proj:50d3afd0

If i see artifactory i can see the image in https://cicd.jfrog.io/cicd/webapp/ which is right. But my GKE is not able to recognise the image and it throws error like

couldn't parse image reference "'cicd-docker-local.jfrog.io/stage_proj:50d3afd0'": invalid reference format: InvalidImageName

But my image exists. Is there any problem with my image and name.

Deployment file portion:

 containers: 
    - 
      image: "<IMAGE_NAME>"

In yaml file

- sed -i "s%<IMAGE_NAME>%'${STAGE_CONTAINER_IMAGE}'%g" deployment.yaml

    STAGE_CONTAINER_IMAGE = cicd-docker-local.jfrog.io/stage_proj:50d3afd0



  --- 
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata: 
      labels: 
        app: go
      name: hello-world-go
    spec: 
      progressDeadlineSeconds: 60
      replicas: 3
      selector: 
        matchLabels: 
          app: go
      strategy: 
        rollingUpdate: 
          maxSurge: 1
          maxUnavailable: 33%
        type: RollingUpdate
      template: 
        metadata: 
          labels: 
            app: go
        spec: 
          containers: 
            - 
             image: "<IMAGE_NAME>"
             # image: cicd-docker-local.jfrog.io/stage_proj: 50d3afd0
              livenessProbe: 
                httpGet: 
                  path: /healthz
                  port: 8080
                initialDelaySeconds: 2
                periodSeconds: 2
              name: go
              ports: 
                - 
                  containerPort: 8080
              readinessProbe: 
                httpGet: 
                  path: /healthz
                  port: 8080
                initialDelaySeconds: 2
                periodSeconds: 2

If i use and sed command, i get error in kubernetes. But if i use cicd-docker-local.jfrog.io/stage_proj: 50d3afd0 directly, there is no error. Am i doing SED command wrongly?

-- Hacker
google-kubernetes-engine
jfrog-cli
kubernetes

0 Answers