2

So I have a deployment like this:

apiVersion: v1
kind: Pod
metadata:
  name: yy
spec:
  containers:
    - name: yy
      image: gcr.io/xx/yy
  imagePullSecrets:
    - name: gcr-json-key

That CrashLoopBackOff on Minikube, I know the issue, that the ENTRYPOINT need to be overriden before use, how can I know what's the original CMD/ENTRYPOINT of that image?

2 Answers 2

1

If you're running docker, pull the image and inspect it with:

docker pull gcr.io/xx/yy
docker image inspect gcr.io/xx/yy

Without docker, some registries allow you to explore the images. And there are online tools like https://explore.ggcr.dev (drill down into the config digest).

There are also commands to interact with registries, including crane (from Google), skopeo (from Redhat), and regclient/regctl (from me). Here's the regctl example:

$ regctl image inspect ghcr.io/regclient/regsync:latest
{
  "created": "2023-02-26T02:37:17Z",
  "architecture": "amd64",
  "os": "linux",
  "config": {
    "User": "appuser",
    "Env": [
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ],
    "Entrypoint": [
      "/regsync"
    ],
    "WorkingDir": "/",
...
0

I found out how:

minikube image save gcr.io/xx/yy /tmp/a.tar

then open that /tmp/a.tar using any decompressor and look for the .json file to know the entrypoint or cmd.

Not sure how to do this with real remote kubernetes though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.