loft-sh / vcluster

vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
https://www.vcluster.com
Apache License 2.0
6.16k stars 372 forks source link

feat: context flag on vcluster #48

Closed matdehaast closed 3 years ago

matdehaast commented 3 years ago

It would be nice to have the ability to specify the kube-context to use when calling vcluster. Currently the default one is used so you have to ensure you are setup correctly before calling vcluster.

Example

vcluster --context my-cluster connect test --namespace test

would use the my-cluster context from kubectl config get-contexts

FabianKramm commented 3 years ago

@matdehaast thanks for creating this issue! Thats a good idea and we will add that as a global flag to the vcluster commands.

FabianKramm commented 3 years ago

@matdehaast this is working now with v0.3.0-beta.3