Skip to content

Instantly share code, notes, and snippets.

@shvyrev
Created November 6, 2024 08:58
Show Gist options
  • Save shvyrev/f803dabe5eec7c87795f9b9d8faed920 to your computer and use it in GitHub Desktop.
Save shvyrev/f803dabe5eec7c87795f9b9d8faed920 to your computer and use it in GitHub Desktop.
➜ .kube kubectl krew uninstall oidc-login
WARNING: To be able to run kubectl plugins, you need to add
the following to your ~/.zshrc:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
and restart your shell.
Uninstalled plugin: oidc-login
➜ .kube brew remove krew
Uninstalling /usr/local/Cellar/krew/0.4.4... (6 files, 11.7MB)
➜ .kube brew install krew
Warning: You are using macOS 12.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
==> Downloading https://ghcr.io/v2/homebrew/core/krew/manifests/0.4.4
Already downloaded: /Users/sergey/Library/Caches/Homebrew/downloads/3c76b3b2704747931ce695856102c5932ef875841d24124266f893b07d776971--krew-0.4.4.bottle_manifest.json
==> Fetching krew
==> Downloading https://ghcr.io/v2/homebrew/core/krew/blobs/sha256:ec4b6962d442c61691cfa4348ddcea989e22d18af1822123b1629ea8aae17d87
Already downloaded: /Users/sergey/Library/Caches/Homebrew/downloads/7ccd1dfb71868c6f0f358f5a1485501b61d69b904b6913668345a2569012190d--krew--0.4.4.monterey.bottle.tar.gz
==> Pouring krew--0.4.4.monterey.bottle.tar.gz
🍺 /usr/local/Cellar/krew/0.4.4: 6 files, 11.7MB
==> Running `brew cleanup krew`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
➜ .kube kubectl krew
krew is the kubectl plugin manager.
You can invoke krew through kubectl: "kubectl krew [command]..."
Usage:
kubectl krew [command]
Available Commands:
help Help about any command
index Manage custom plugin indexes
info Show information about an available plugin
install Install kubectl plugins
list List installed kubectl plugins
search Discover kubectl plugins
uninstall Uninstall plugins
update Update the local copy of the plugin index
upgrade Upgrade installed plugins to newer versions
version Show krew version and diagnostics
Flags:
-h, --help help for krew
-v, --v Level number for the log level verbosity
Use "kubectl krew [command] --help" for more information about a command.
➜ .kube kubectl krew install oidc-login
WARNING: To be able to run kubectl plugins, you need to add
the following to your ~/.zshrc:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
and restart your shell.
Updated the local copy of plugin index.
Installing plugin: oidc-login
Installed plugin: oidc-login
\
| Use this plugin:
| kubectl oidc-login
| Documentation:
| https://github.com/int128/kubelogin
| Caveats:
| \
| | You need to setup the OIDC provider, Kubernetes API server, role binding and kubeconfig.
| /
/
WARNING: You installed plugin "oidc-login" from the krew-index plugin repository.
These plugins are not audited for security by the Krew maintainers.
Run them at your own risk.
➜ .kube cat ~/.kube/config
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlakNDQVIrZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWtNU0l3SUFZRFZRUUREQmx5YTJVeUxYTmwKY25abGNpMWpZVUF4TnpFMk5EVTJOVE14TUI0WERUSTBNRFV5TXpBNU1qZzFNVm9YRFRNME1EVXlNVEE1TWpnMQpNVm93SkRFaU1DQUdBMVVFQXd3WmNtdGxNaTF6WlhKMlpYSXRZMkZBTVRjeE5qUTFOalV6TVRCWk1CTUdCeXFHClNNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJJNTJVWG1UVnZVdnJYaVk3eGh4M2s3SlY4eFlpaFFIRGpMN3FUQjUKZEREZnRYMzJJcENubkJHU3R0SmhDT2R5cTlUQ2dLbEtTTm1qVytwS2dXUWhEWmFqUWpCQU1BNEdBMVVkRHdFQgovd1FFQXdJQ3BEQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCUTZBKzRDY2E1UDdjb1FmaWp4Clh2Tk5pQ1htcVRBS0JnZ3Foa2pPUFFRREFnTkpBREJHQWlFQXozRVVqWC9aeUpTZ2l0azVoRkc3RWhUYWNocEQKekZsb2czd0x2Y1VYNVdVQ0lRQ04zbk1UMGUrd0VuY3UySWFMTTVPOXBGQldGNU1HaExyaHF2cGV0b2lrM1E9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
server: https://192.168.76.254:6443
name: k8s-ostap
contexts:
- context:
cluster: k8s-ostap
user: oidc@k8s-ostap-fbcd
name: k8s-ostap
current-context: k8s-ostap
kind: Config
preferences: {}
users:
- name: oidc@k8s-ostap-fbcd
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
args:
- oidc-login
- get-token
- --oidc-issuer-url=https://idp.fbcd.ru/realms/k8s-ostap
- --oidc-client-id=k8s-ostap-fbcd
command: kubectl
env: null
interactiveMode: IfAvailable
provideClusterInfo: false
➜ .kube kubectl get pods
error: unknown command "oidc-login" for "kubectl"
E1106 11:58:08.770157 92602 memcache.go:265] couldn't get current server API group list: Get "https://192.168.76.254:6443/api?timeout=32s": getting credentials: exec: executable kubectl failed with exit code 1
error: unknown command "oidc-login" for "kubectl"
E1106 11:58:08.834892 92602 memcache.go:265] couldn't get current server API group list: Get "https://192.168.76.254:6443/api?timeout=32s": getting credentials: exec: executable kubectl failed with exit code 1
error: unknown command "oidc-login" for "kubectl"
E1106 11:58:08.899346 92602 memcache.go:265] couldn't get current server API group list: Get "https://192.168.76.254:6443/api?timeout=32s": getting credentials: exec: executable kubectl failed with exit code 1
error: unknown command "oidc-login" for "kubectl"
E1106 11:58:08.961473 92602 memcache.go:265] couldn't get current server API group list: Get "https://192.168.76.254:6443/api?timeout=32s": getting credentials: exec: executable kubectl failed with exit code 1
error: unknown command "oidc-login" for "kubectl"
E1106 11:58:09.028871 92602 memcache.go:265] couldn't get current server API group list: Get "https://192.168.76.254:6443/api?timeout=32s": getting credentials: exec: executable kubectl failed with exit code 1
Unable to connect to the server: getting credentials: exec: executable kubectl failed with exit code 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment