8000 linkerd2/bin/mkube at 2.11.0 · jojinkb/linkerd2 · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
executable file
·
21 lines (17 loc) · 685 Bytes

mkube

File metadata and controls

executable file
·
21 lines (17 loc) · 685 Bytes
#!/usr/bin/env sh
# A wrapper for interacting with minikube.
#
# Example:
# :; bin/mkube docker image ls
# If we're running under WSL then we have to use the Windows native Minikube
# as the Linux version doesn't work in WSL. Assume WSL is Microsoft's only
# Linux distro.
if ! uname -r | grep Microsoft > /dev/null; then
MINIKUBE_EXE=minikube
else
# This is where minikube-installer.exe puts it.
MINIKUBE_EXE="${MINIKUBE_EXE:-/mnt/c/Program Files (x86)/Kubernetes/Minikube/minikube.exe}"
fi
# Rewrite Windows style paths "C:\\whatever\\whatever" to "/mnt/c/whatever/whatever".
eval "$("${MINIKUBE_EXE}" docker-env --shell=bash | sed 's|C:\\|/mnt/c/|g;s|\\|/|g')"
exec "$@"
0