aylei / kubectl-debug

This repository is no longer maintained, please checkout https://github.com/JamesTGrant/kubectl-debug.
Apache License 2.0
2.31k stars 303 forks source link

Error: No such image: nicolaka/netshoot:latest #134

Closed themez closed 3 years ago

themez commented 4 years ago

Hi I run into this problem using agent-less default configuration. However, I found it works if I set verbose to 1 Looks wired.

Waiting for pod debug-agent-pod-xxx to run...
Forwarding from 127.0.0.1:10027 -> 10027
Forwarding from [::1]:10027 -> 10027
Handling connection for 10027
                             Start deleting agent pod my-pod-xxx
error execute remote, Internal error occurred: error attaching to container: Error: No such image: nicolaka/netshoot:latest
error: Internal error occurred: error attaching to container: Error: No such image: nicolaka/netshoot:latest
lx1036 commented 4 years ago

me too. how to resolve it?

wanminny commented 4 years ago

+1

ComeonBug commented 4 years ago

+1

yaoyaoio commented 4 years ago

建议先docker pull nicolaka/netshoot:latest 一下看看

hillbun commented 4 years ago

docker pull nicolaka/netshoot:latest可以

fforloff commented 3 years ago

The same error for me. While pulling the image locally works, the "kubectl debug..." does not.

lwabish commented 3 years ago

seems that we need to ensure the images exists on the cluster nodes

fforloff commented 3 years ago

seems that we need to ensure the images exists on the cluster nodes

which was not the case before

lwabish commented 3 years ago

seems that we need to ensure the images exists on the cluster nodes

which was not the case before

right, last time I didn't pre pull the netshoot image

aylei commented 3 years ago

Sorry for the late response, it is caused by an unstable debug-agent pushed to docker hub recently. It should have been fixed now, please run the command again to verify.

Since kubectl-debug plugin will still pull debug-agent:latest by default before #135 get fixed, it is recommend to configure or specify --agent-image=aylei/debug-agent:${version} if you are using a stable version of the plugin.

lwabish commented 3 years ago

Sorry for the late response, it is caused by an unstable debug-agent pushed to docker hub recently. It should have been fixed now, please run the command again to verify.

Since kubectl-debug plugin will still pull debug-agent:latest by default before #135 get fixed, it is recommend to configure or specify --agent-image=aylei/debug-agent:${version} if you are using a stable version of the plugin.

Thanks for your work. Tried again but still not fixed. I have reinstalled the debug-agent and also tried brew upgrade kubectl-debug. Is there anything else I forgot?

aylei commented 3 years ago

Thanks for your work. Tried again but still not fixed. I have reinstalled the debug-agent and also tried brew upgrade kubectl-debug. Is there anything else I forgot?

Are you encountering the same error (image not found)? And what's the image of debug agent?

lwabish commented 3 years ago

Thanks for your work. Tried again but still not fixed. I have reinstalled the debug-agent and also tried brew upgrade kubectl-debug. Is there anything else I forgot?

Are you encountering the same error (image not found)? And what's the image of debug agent?

Yes.The debug-agent daemonset is using aylei/debug-agent:latest and the imagePullPolicy has been set to always.

aylei commented 3 years ago

@lwabish could you please try aylei/debug-agent:v0.1.1?

lwabish commented 3 years ago

@lwabish could you please try aylei/debug-agent:v0.1.1?

Just tried using kubectl debug ${POD_NAME} --agent-image=aylei/debug-agent:v0.1.1,worked as expected

alexdoka commented 3 years ago

@lwabish it doesn't work for me

lwabish commented 3 years ago

@lwabish it doesn't work for me

append --agentless=true

moluzhui commented 2 years ago

Hi I run into this problem using agent-less default configuration. However, I found it works if I set verbose to 1 Looks wired.

Waiting for pod debug-agent-pod-xxx to run...
Forwarding from 127.0.0.1:10027 -> 10027
Forwarding from [::1]:10027 -> 10027
Handling connection for 10027
                             Start deleting agent pod my-pod-xxx
error execute remote, Internal error occurred: error attaching to container: Error: No such image: nicolaka/netshoot:latest
error: Internal error occurred: error attaching to container: Error: No such image: nicolaka/netshoot:latest

@aylei @themez The problem seems to be caused here, I delete the verbosity comparison in this part, and then I can download the image

// pkg/agent/runtime.go
    // delete if statement
        if cfg.verbosity > 0 {
        term.DisplayJSONMessagesStream(out, cfg.stdout, 1, true, nil)
    }

I understand that I went to the follow-up process(creat container) before the image pull was completed, so it caused an error

But the docker client uses http, which seems to return resp.body directly, there is no delay waiting problem.

    out, err := c.client.ImagePull(ctx, image, types.ImagePullOptions{RegistryAuth: authStr})

Looking forward to solving the confuse.

make build by master branch