Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64 image for Krew plugin #90

Open
benkelukas opened this issue Sep 22, 2022 · 6 comments
Open

ARM64 image for Krew plugin #90

benkelukas opened this issue Sep 22, 2022 · 6 comments

Comments

@benkelukas
Copy link

Hello,

I'm trying to use the tunnel krew plugin on Mac M1 to tunnel to a local Kube cluster (Docker for Mac)

It seems that there is not a published version for arm64 on quay.io, and if I try to use the amd64 through rosetta, it segfaults and does not create the tunnel:

Output from running the docker container directly:

docker run --rm quay.io/omrikiei/ktunnel:v1.4.8
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Output from running the Krew plugin:

kubectl tunnel expose --namespace=default --tls xdebug-svc 9003
INFO[0000] Exposed service's cluster ip is: 10.99.222.125
.INFO[0000] waiting for deployment to be ready
......
INFO[0002] port forwarding to https://kubernetes.docker.internal:6443/api/v1/namespaces/default/pods/xdebug-svc-678c857f7c-77n9n/portforward
INFO[0002] Waiting for port forward to finish
INFO[0002] Forwarding from 127.0.0.1:28688 -> 28688
Forwarding from [::1]:28688 -> 28688
INFO[2022-09-22 18:03:02.586] starting tcp tunnel from source 9003 to target 9003
E0922 18:03:02.617812   79680 portforward.go:400] an error occurred forwarding 28688 -> 28688: error forwarding port 28688 to pod e187a3212e5042c7226cf8ed49fb5b2585673d4701e6847e22aa1d2ae63d6539, uid : exit status 1: 2022/09/22 16:03:02 socat[19739] E connect(16, AF=2 127.0.0.1:28688, 16): Connection refused
ERRO[2022-09-22 18:03:02.617] Error sending init tunnel request: rpc error: code = Unavailable desc = connection closed
E0922 18:03:03.630357   79680 portforward.go:400] an error occurred forwarding 28688 -> 28688: error forwarding port 28688 to pod e187a3212e5042c7226cf8ed49fb5b2585673d4701e6847e22aa1d2ae63d6539, uid : exit status 1: 2022/09/22 16:03:03 socat[19740] E connect(16, AF=2 127.0.0.1:28688, 16): Connection refused
^CINFO[0004] Got exit signal, closing client tunnels and removing k8s objects
INFO[0004] Deleting service xdebug-svc
INFO[0004] Deleting deployment xdebug-svc

Logs from the pod:

│ qemu: uncaught target signal 11 (Segmentation fault) - core dumped                                                                                                     

Would it be possible to publish the arm64 image?

Thanks for the awesome work on this tool!

@omrikiei
Copy link
Owner

omrikiei commented Oct 3, 2022

I'll try to get this fixed over the weekend, sorry for the inconvenience, in the meanwhile it's possible to build a supported image and pass the --image flag to the CLI

@benkelukas
Copy link
Author

@omrikiei no worries, thanks for looking into this! :)

@igoooor
Copy link

igoooor commented Oct 24, 2022

@benkelukas have you been able to build an image working for ARM64? For me it says upx (no such package)

@igoooor
Copy link

igoooor commented Oct 24, 2022

or maybe @omrikiei you may have had time to already look into it? Sorry for bothering you I know it's been only ~20 days since your last comment

@omrikiei
Copy link
Owner

omrikiei commented Oct 27, 2022

@igoooor not yet, what I can say is that upx is only used to compress the binary, it is not required for pure functionality - feel free to remote this line from the Dockerfile

@igoooor
Copy link

igoooor commented Oct 27, 2022

Nice it seems to work indeed, thank you very much for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants