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

Linux arm64 build #183

Open
andyli opened this issue May 17, 2024 · 1 comment
Open

Linux arm64 build #183

andyli opened this issue May 17, 2024 · 1 comment

Comments

@andyli
Copy link

andyli commented May 17, 2024

Would be great if Linux arm64 builds are provided.

Currently, kubectl krew install get-all fails:

Installing plugin: get-all
W0517 03:29:17.788413      16 install.go:164] failed to install plugin "get-all": plugin "get-all" does not offer installation for this platform
failed to install some plugins: [get-all]: plugin "get-all" does not offer installation for this platform
@mrballcb
Copy link

mrballcb commented Aug 6, 2024

If you happen to have a docker container with your infrastructure tools, the best workaround I can come up with is to override the OS and ARCH. In the Dockerfile for our infrastructure toolbox container, I force the OS and ARCH to versions that my MacbookPro can emulate. Not pretty, but it works.

    Add krew "get-all" plugin, override arch/os

diff --git a/Dockerfile b/Dockerfile
index 962326310..dbfb33b9d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -295,6 +295,12 @@ RUN ( set -x; cd "$(mktemp -d)" && \
     ./"${KREW}" install krew )
 RUN export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" && kubectl krew install ${KREW_PLUGINS}

+# Install Krew plugin, overriding ARCH and OS (Emulated on a Mac)
+ARG KREW_PLUGINS_OSARCH="get-all" # list of plugin: "plugin1 plugin2"
+RUN ( set -x;  \
+    export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" && \
+    KREW_OS="linux" KREW_ARCH="amd64" kubectl krew install ${KREW_PLUGINS_OSARCH} )
+
 COPY rootfs/ /
 COPY stacks/ /stacks/
 COPY components/ /components/

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

2 participants