Skip to content

Instantly share code, notes, and snippets.

@weltonrodrigo
Created March 10, 2022 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weltonrodrigo/ad17620e678c7231330aa73043cee8a2 to your computer and use it in GitHub Desktop.
Save weltonrodrigo/ad17620e678c7231330aa73043cee8a2 to your computer and use it in GitHub Desktop.
`kubectl completion zsh` too slow

Believe it or not, when you do a kubectl completion zsh on your ~/.zshrc, kubectl actually tries to contact the cluster of the current-context.

This is nuts and I don't understand why it would make sense.

As this can easly take seconds to complete, you can force it to quickly give up by pointing it to a impossible HTTPS_PROXY like this:

On your ~/.zshrc…

source <(eval HTTPS_PROXY=1:1 kubectl completion zsh)

Thank me later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment