Comments (8)
Fixed, try with brew update && brew upgrade
.
from kubectx.
@koenrh I just ran into this myself. The following resolved my local instance:
brew install coreutils
I then added gnubin to my path by appending
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
to $HOME/.bash_profile, and restarting my terminal.
I agree that the additional case requirement would be a helpful addition, but until that point, if others are using this fantastic tool, these three steps might help some folks.
from kubectx.
My bad. I keep forgetting gnu coreutils is installed on my Mac. I wonder if we can do without -f and without checking for greadlink.
from kubectx.
In the brew recipe you might be able to make coreutils a dependency and then use greadlink? Seems like a hard sell.
from kubectx.
Since readlink -f
fails only on BSD coreutils which is on mac, I think we can safely assume Python is installed. So I am changing the way to determine SCRIPT_DIR to this, which falls back to Python:
SCRIPT_DIR="$(dirname $( readlink -f "${0}" 2>/dev/null || \
python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "${0}" ))"
Every method I found without introducing GNU coreutils dependency is just a hack, including this one. Iโll submit a PR soon and make a release. Sorry for the disruption.
from kubectx.
@ahmetb What do think of this? https://github.com/kubernetes/kubernetes/blob/b353700bfc1ee95b8f9f827c9cc818cf2ab3f943/hack/lib/init.sh#L111-L128
from kubectx.
@koenrh it's nice but we would be copying it to 2 files, both kubens/kubectx scripts. So I prefer a one-liner more.
from kubectx.
Works for me, thanks!
from kubectx.
Related Issues (20)
- Are go versions still considered not stable? HOT 2
- kubie and kubens mixed cause kubeconfig syntax error HOT 12
- Canโt use `--height` in fzf options on Windows HOT 2
- blank issue HOT 1
- Add --selector option to kubens HOT 1
- Feature Request: Use kubectx to use right version of kubectl binary for a given K8s cluster HOT 1
- `kubens` fails with `invalid apiVersion "client.authentication.k8s.io/v1"` but `kubectl` works normally HOT 2
- Vulnerability of dependency "golang.org/x/net" HOT 1
- Add completions for Nushell
- Add kubectl plugin installation to Homebrew formula HOT 4
- [Go] kubens not working with in-cluster config HOT 1
- show all of NAME, CLUSTER and AUTHINFO in cluster selection list HOT 2
- Allow customizing path to KUBECTX and KUBENS_DIR
- Homebrew install makes kubectx slow HOT 6
- Shell completions (for zsh) fail for kubectx if its binary is renamed to kx HOT 1
- Autocomplete does not work when installed as Krew plugin HOT 2
- Autocomplete breaks when multiple longer contexts match HOT 2
- kubectl ctx outputs code lines start with plus sign + HOT 1
- error: open /home/myuser/.kube/config: permission denied HOT 1
- Consider open up internal packages HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubectx.