The kubectl-cluster plugin lets you run kubectl commands across a number of specified clusters. It is possible to run any kubectl command since this plugin is basically a wrapper around kubectl.
Linux example:
git clone https://github.com/mdnix/kubectl-cluster.git
make compile
cp _out/linux/kubectl-cluster /usr/local/bin/
cat /home/marco/.clusters
clusters:
- name: minikube
config: /home/marco/.kube/config-mini
tags: test
- name: okd
config: /home/marco/.kube/config-okd
tags: prod
$ kubectl cluster list
$ kubectl cluster run get pods
NOTE: When using flags for regular kubectl commands "--" has to be added to signify the end of command options
$ kubectl cluster run -- get pods --all-namespaces
$ kubectl cluster run --targets okd,minikube get pods
$ kubectl cluster run --tags test get pods