11

Below is the Kubernetes deployment yaml file -container image section:

image: https://registry.ng.bluemix.net/****/test-service:test-branch-67

imagePullPolicy: Always

Below is the error message after deploying:

ubuntu@ip-xxxx:~$ kubectl logs test-deployment-69c6d8xxx -n test

Error from server (BadRequest): container "test-deployment" in pod "test-deployment-ccccxxx" is waiting to start: InvalidImageName

Another error log:

Failed to apply default image tag "https://registry.ng.bluemix.net/test/test-service:test-branch-66": couldn't parse image reference "https://registry.ng.bluemix.net/test/test-service:test-branch-66": invalid reference format

Any idea why the pod is not coming up?

double-beep
  • 5,031
  • 17
  • 33
  • 41
Raj kumar
  • 131
  • 1
  • 1
  • 10
  • Had the same issue then turned out the pipeline that was creating the image was failing. – Jalal May 02 '22 at 11:15

4 Answers4

9

Remove the https:// from the image name, and if you are using a private registry, make sure to use imagePullSecrets.

cookiedough
  • 3,552
  • 2
  • 26
  • 51
2

This could be because in your YAML file your image name would be wrong, maybe a tag missed, you can trace from there.

Kumar Pankaj Dubey
  • 1,541
  • 3
  • 17
  • 17
0

Please add your complete deployment file to know the problem in detail. But looking at the file make sure you are not missing

imagePullSecrets (Add valid credentials with access to pull the image from repository)

Also you need not provide the protocol like you added

https

Your image field in yml should look like below example:

image: repository:organization_name/image_name:image_version

Afsar
  • 15
  • 5
0

curl --insecure -sfL https://192.168.2.217/v3/import/zc2t5qstv4l9f6wv8stmfsqcks47x7z5m4xnnrbf7hn9c9vj65bwd7_c-4mdds.yaml  > tmp.yaml

# edit tmp.yaml file and delete https:/hub.docker.com/rancher/rancher-agent:v2.5.7 => rancher/rancher-agent:v2.5.7
# apply again:
kubectl apply -f tmp.yaml
nobjta_9x_tq
  • 1,205
  • 14
  • 16