kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.58k stars 8.27k forks source link

kubectl plugin does not have arm64 macos variant #10738

Open ShadowJonathan opened 11 months ago

ShadowJonathan commented 11 months ago

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:

How to reproduce this issue:


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

k8s-ci-robot commented 11 months ago

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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
WladyX commented 11 months ago

Have you found any workaround in the meantime?

ShadowJonathan commented 11 months ago

No.

fjanicki commented 10 months ago

There seems to be one here:

https://github.com/kubernetes/ingress-nginx/issues/8483

WladyX commented 10 months ago

There seems to be one here:

8483

working , thank you @fjanicki !

vironeen commented 10 months ago

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 commented 8 months ago
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/