kubetail
kubetail copied to clipboard
Not able to switch between kubeconfigs
Seems like there is no option to choose different kubeconfig, which can be useful when working with multiple clusters in different kubeconfigs
Maybe you could help out and add support for it?
Not sure if my knowledge is wide enough to create support for this...
There is a -t, --context
option for this.
Gather all your different Kube-conf files in a folder. And export these files separated by a colon. Also, you can add to your ~/.bash_profile file.
export KUBECONFIG=/home/user/.kube/config1:/home/user/.kube/config2:/home/user/.kube/config3
To get context names: kubectl config get-contexts
Then just use kubetail with -t
option:
kubetail some-pod-name -t cluster1 -n prod -s 10m
For more instruction on using several context: https://myopswork.com/how-to-switch-b-w-multiple-kubernetes-clusters-1feaf80e0cbe