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

kubectl plugin does not have arm64 macos variant #10738

Open
ShadowJonathan opened this issue Dec 8, 2023 · 7 comments
Open

kubectl plugin does not have arm64 macos variant #10738

ShadowJonathan opened this issue Dec 8, 2023 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@ShadowJonathan
Copy link

What happened:

➜  ~ kubectl krew install ingress-nginx

Adding "default" plugin index from https://github.com/kubernetes-sigs/krew-index.git.
Updated the local copy of plugin index.
Installing plugin: ingress-nginx
W1208 14:11:58.733846   25803 install.go:164] failed to install plugin "ingress-nginx": plugin "ingress-nginx" does not offer installation for this platform
failed to install some plugins: [ingress-nginx]: plugin "ingress-nginx" does not offer installation for this platform

What you expected to happen:

The plugin to be installed

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):

N/A

Kubernetes version (use kubectl version):

Client Version: v1.28.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.2

Environment:

  • OS (e.g. from /etc/os-release): MacOS 14.1.1 (On M1 Mac)
  • Kernel (e.g. uname -a): Darwin

How to reproduce this issue:

  • Buy or install an Apple Silicon mac
  • Install kubectl
  • Install krew
  • Try to install this plugin

The last time this plugin has been updated was 3 years ago: https://github.com/kubernetes-sigs/krew-index/blob/master/plugins/ingress-nginx.yaml

@ShadowJonathan ShadowJonathan added the kind/bug Categorizes issue or PR as related to a bug. label Dec 8, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Dec 8, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@WladyX
Copy link

WladyX commented Dec 27, 2023

Have you found any workaround in the meantime?

@ShadowJonathan
Copy link
Author

No.

@fjanicki
Copy link

fjanicki commented Jan 7, 2024

There seems to be one here:

#8483

@WladyX
Copy link

WladyX commented Jan 8, 2024

There seems to be one here:

#8483

working , thank you @fjanicki !

@vironeen
Copy link

vironeen commented Feb 2, 2024

This worked for me, basically using the same tool that appears to be used by the repo to build the binaries.

  1. Install golang https://go.dev/doc/install
  2. Install goreleaser brew install goreleaser, close/reopen terminal to refresh env vars to reflect these installs
  3. Git clone the repo locally and run git tag 4.9.1 (or whatever the latest version is), the git tag is needed because otherwise goreleaser complains about the tags used in repo not matching semver
  4. in project root goreleaser build --single-target, this will create kubectl plugin binary in /dist/ingress-nginx_darwin_arm64/
  5. In project root, run ln -s $PWD/dist/ingress-nginx_darwin_arm64/kubectl-ingress-nginx /usr/local/bin/kubectl-ingress-nginx so that kubectl can find the plugin binary (assuming that /usr/local/bin is in your $PATH)

That being said, given the goreleaser config includes darwin/arm64, the binary might already be getting built automatically, I just don't know where to find it. I looked in the release archive files and found only the source code or chart files, no plugin binary.

@baurmatt
Copy link

baurmatt commented Mar 7, 2024

git clone https://github.com/kubernetes/ingress-nginx
cd cmd/plugin
go build
# Better move it to ~/.krew/bin/kubectl-ingress_nginx if you have krew installed.
# ATTENTION: The plugin name requires `-` to be replace with `_`!
sudo mv plugin /usr/local/bin/kubectl-ingress_nginx

Can we please get an official release? And also get it updated in krew? The krew version is 4 years old!

https://kubernetes.github.io/ingress-nginx/kubectl-plugin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Development

No branches or pull requests

6 participants