Store your kubeconfig files within 1password and pull them down on demand
onekube
uses the 1password CLI to download kubeconfig files tagged in your 1password vaults to be used locally.
Clone the repostory and run:
go install .
Ensure your $PATH includes your go binaries
Auto completions are available for several shells, run the below to list them
onekube completion -h
More instructions to add completions can be found for a specific shell like so
onekube completion zsh -h
All kubeconfigs should be stored in 1password with the contents of the kubeconfig in a field called config
and a tag kubeconfig
.
The name/selector used by onekube will be the name of the item.
To start with a clean slate, run
onekube init
View available configs with
onekube list
Select a config with
onekube set <my-config>
Your existing config will be backed up, restore it with either
onekube init
or
onekube clean
Warning
Any kubeconfig files set will be stored on your local machine until replaced with another, or onekube clean
is run
- The 1password CLI must be installed and logged in
- If you have multiple 1password accounts you must change between these with the 1password CLI for onekube to use them
- If you are not logged into 1password, the experience is poor