├── README.md └── big-ugly-builder.sh /README.md: -------------------------------------------------------------------------------- 1 | # Krew Plugins for M1 Macs 2 | 3 | ## What is this? 4 | 5 | This repository is used to build and publish Kubectl Krew plugins that will run on Mac M1 models. 6 | 7 | Note that not all plugins are available. This can be for one of several reasons: 8 | - A plugin is already available in the correct format in the Krew database 9 | - It is already available, albeit outside the Krew database (usually through `brew`) 10 | - It is broken, likely on all platforms 11 | - It has severe, hard to work around, incompatibilities with ARM64 12 | - It is not very popular, so I did not include it (yet) 13 | 14 | At this time, only one package needs a bit of preparation, **kubect-dfi**: 15 | 1. remove go.sum 16 | 2. remove the lintci line from go.mod 17 | 3. running `go mod tidy` 18 | 19 | Note that you do not have to build the modules yourself (this would somewhat defeat the purpose) and are encouraged to download them from the releases page instead. 20 | 21 | Of course, feel free to build them anyway if you do not trust everything that comes in binary form from random corners of the web :) 22 | 23 | ## Current Plugins list 24 | 25 | |Plugins|Description| 26 | |-|-| 27 | |[ktunnel](https://github.com/omrikiei/ktunnel)|Ktunnel is a CLI tool that establishes a reverse tunnel between a kubernetes cluster and your local machine.| 28 | |[kubectl-ciliium](https://github.com/bmcustodio/kubectl-cilium)|A kubectl plugin for interacting with Cilium.| 29 | |[kubectl-df-pv](https://github.com/yashbhutwala/kubectl-df-pv)|Show disk usage (like unix df) for persistent volumes.| 30 | |[kubectl-dfi](https://github.com/makocchi-git/kubectl-dfi)|List and show disk resources of images on Kubernetes nodes.| 31 | |[kubectl-graph](https://github.com/steveteuber/kubectl-graph)|A kubectl plugin to visualize Kubernetes resources and relationships.| 32 | |[kubectl-iexec](https://github.com/gabeduke/kubectl-iexec)|Kubectl plugin to interactively exec into a pod.| 33 | |[kubectl-ipick](https://github.com/similarweb/kubectl-ipick)|A kubectl wrapper for interactive resource selection.| 34 | |[kubectl-modify-secret](https://github.com/rajatjindal/kubectl-modify-secret)|kubectl-modify-secrets allows user to directly modify secrets.| 35 | |[kubectl-pod-dive](https://github.com/caiobegotti/Pod-Dive)|A kubectl plugin to dive into your Kubernetes nodes pods, and inspect them.| 36 | |[kubectl-resources](https://github.com/howardjohn/kubectl-resources)|Plugin to access Kubernetes resource requests, limits, and usage.| 37 | |[kubectl-kubesec](https://github.com/controlplaneio/kubectl-kubesec)|Security risk analysis for Kubernetes resources kubesec.io.| 38 | |[ksniff](https://github.com/eldadru/ksniff)|Kubectl plugin to ease sniffing on kubernetes pods using tcpdump and wireshark.| 39 | |[kubectl-terminate](https://github.com/xcoulon/kubectl-terminate)|kubectl-terminate, a kubectl plugin to remove finalizers and finally delete k8s resources.| 40 | |[kubectl-trace](https://github.com/iovisor/kubectl-trace)|Schedule bpftrace programs on your kubernetes cluster using kubectl.| 41 | |[kubectl-tree](https://github.com/ahmetb/kubectl-tree)|A kubectl plugin to browse Kubernetes object hierarchies as a tree.| 42 | |[kubctl-view-webhook](https://github.com/Trendyol/kubectl-view-webhook)|Visualize your webhook configurations.| 43 | |[kubectl-who-can](https://github.com/aquasecurity/kubectl-who-can)|Show who has RBAC permissions to perform actions on different resources in Kubernetes.| 44 | |[kubepug](https://github.com/rikatz/kubepug)|Kubernetes PreUpGrade (Checker).| 45 | |[kubectl preflight](https://github.com/replicatedhq/troubleshoot)|Preflight Checks and Support Bundles Framework for Kubernetes Applications troubleshoot.sh.| 46 | -------------------------------------------------------------------------------- /big-ugly-builder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cleanup() { 4 | mkdir -p bin \ 5 | && rm -f ./bin/* 6 | } 7 | 8 | clone_if_needed() { 9 | DIR="$1" 10 | SRC="$2" 11 | [[ -d $DIR ]] || { 12 | git clone $SRC $DIR 13 | } 14 | } 15 | 16 | store_target() { 17 | cp "$1" ../bin/ 18 | } 19 | 20 | cleanup \ 21 | && TARGET=ktunnel && clone_if_needed $TARGET https://github.com/omrikiei/ktunnel.git \ 22 | && cd $TARGET \ 23 | && CGO_ENABLED=0 go build -ldflags="-s -w" \ 24 | && store_target $TARGET \ 25 | && cd .. \ 26 | && TARGET=kubectl-terminate && clone_if_needed $TARGET https://github.com/xcoulon/kubectl-terminate.git \ 27 | && cd $TARGET \ 28 | && make build \ 29 | && store_target bin/$TARGET \ 30 | && cd .. \ 31 | && TARGET=kubectl-who-can && clone_if_needed $TARGET https://github.com/aquasecurity/kubectl-who-can.git \ 32 | && cd $TARGET \ 33 | && make build \ 34 | && store_target $TARGET \ 35 | && cd .. \ 36 | && TARGET=kubectl-sniff && clone_if_needed $TARGET https://github.com/eldadru/ksniff.git \ 37 | && cd $TARGET \ 38 | && GO111MODULE=on GOOS=darwin GOARCH=arm64 go build -o kubectl-sniff cmd/kubectl-sniff.go \ 39 | && store_target $TARGET \ 40 | && cd .. \ 41 | && TARGET=kubectl-trace && clone_if_needed $TARGET https://github.com/iovisor/kubectl-trace.git \ 42 | && cd $TARGET \ 43 | && make \ 44 | && store_target _output/bin/$TARGET \ 45 | && cd .. \ 46 | && TARGET=kubectl-dfi && clone_if_needed $TARGET https://github.com/makocchi-git/kubectl-dfi.git \ 47 | && cd $TARGET \ 48 | && make \ 49 | && store_target _output/$TARGET \ 50 | && cd .. \ 51 | && TARGET=kubectl-df-pv && clone_if_needed $TARGET https://github.com/yashbhutwala/kubectl-df-pv.git \ 52 | && cd $TARGET \ 53 | && make \ 54 | && mv bin/df-pv bin/$TARGET \ 55 | && store_target bin/$TARGET \ 56 | && cd .. \ 57 | && TARGET=kubectl-kubesec && clone_if_needed $TARGET https://github.com/controlplaneio/kubectl-kubesec.gi \ 58 | && cd $TARGET \ 59 | && go build -o kubectl-scan \ 60 | && store_target kubectl-scan \ 61 | && cd .. \ 62 | && TARGET=kubectl-iexec && clone_if_needed $TARGET https://github.com/gabeduke/kubectl-iexec.git \ 63 | && cd $TARGET \ 64 | && go build -o kubectl-iexec \ 65 | && store_target $TARGET \ 66 | && cd .. \ 67 | && TARGET=kubectl-graph && clone_if_needed $TARGET https://github.com/steveteuber/kubectl-graph.git \ 68 | && cd $TARGET \ 69 | && go build -o kubectl-graph ./cmd/kubectl-graph/main.go \ 70 | && store_target $TARGET \ 71 | && cd .. \ 72 | && TARGET=kubectl-tree && clone_if_needed $TARGET https://github.com/ahmetb/kubectl-tree.git \ 73 | && cd $TARGET \ 74 | && go build -o kubectl-tree cmd/kubectl-tree/*.go \ 75 | && store_target $TARGET \ 76 | && cd .. \ 77 | && TARGET=kubectl-pod-dive && clone_if_needed $TARGET https://github.com/caiobegotti/Pod-Dive.git \ 78 | && cd $TARGET \ 79 | && go build -o kubectl-pod-dive cmd/plugin/main.go \ 80 | && store_target $TARGET \ 81 | && cd .. \ 82 | && TARGET=kubectl-modify-secret && clone_if_needed $TARGET https://github.com/rajatjindal/kubectl-modify-secret.git \ 83 | && cd $TARGET \ 84 | && go build -o kubectl-modify-secret main.go \ 85 | && store_target $TARGET \ 86 | && cd .. \ 87 | && TARGET=kubectl-resources && clone_if_needed $TARGET https://github.com/howardjohn/kubectl-resources.git \ 88 | && cd $TARGET \ 89 | && make deps \ 90 | && go build -o kubectl-resources main.go \ 91 | && store_target $TARGET \ 92 | && cd .. \ 93 | && TARGET=kubectl-ipick && clone_if_needed $TARGET https://github.com/similarweb/kubectl-ipick.git \ 94 | && cd $TARGET \ 95 | && GOARCH=arm64 make build-osx \ 96 | && mv ${TARGET}_osx $TARGET \ 97 | && store_target $TARGET \ 98 | && cd .. \ 99 | && TARGET=kubepug && clone_if_needed $TARGET https://github.com/rikatz/kubepug.git \ 100 | && cd $TARGET \ 101 | && go build cmd/kubepug.go \ 102 | && store_target $TARGET \ 103 | && cd .. \ 104 | && TARGET=kubectl-cilium && clone_if_needed $TARGET https://github.com/bmcustodio/kubectl-cilium.git \ 105 | && cd $TARGET \ 106 | && make \ 107 | && store_target bin/$TARGET \ 108 | && cd .. \ 109 | && TARGET=kubectl-view-webhook && clone_if_needed $TARGET https://github.com/Trendyol/kubectl-view-webhook.git \ 110 | && cd $TARGET \ 111 | && go build \ 112 | && store_target $TARGET \ 113 | && cd .. \ 114 | && TARGET=move2kube && clone_if_needed $TARGET https://github.com/konveyor/move2kube.git \ 115 | && cd $TARGET \ 116 | && make build \ 117 | && store_target bin/$TARGET \ 118 | && cd .. \ 119 | && echo "All done." 120 | --------------------------------------------------------------------------------