vcluster is an open source project that allows users to create and run virtual Kubernetes clusters inside of a shared cluster. A virtual cluster runs inside a namespace of the shared host cluster, but it appears to the user as a standalone, dedicated cluster. The Loft Labs team released the initial version of vcluster almost one year ago. Since then, a lot of momentum has built around the project, and we’ve received a lot of helpful feedback from users.
We believe that tools should be opinionated and easy to reason about while also providing ways for users to extend them. We’ve heard from users and contributors who want to use vcluster in all kinds of interesting scenarios, but it doesn’t make sense for us as maintainers to support every possibility by changing how vcluster works or adding features.
So in version 0.6.0 of vcluster, we’ve added the ability for users to write vcluster plugins using the new vcluster SDK. vcluster plugins are written in Go, and they can customize vcluster in many ways. There are currently three examples in the GitHub repo:
- bootstrap-with-deployment: This example shows how to have a deployment automatically applied in your vclusters when they’re provisioned. Creating resources like this is very powerful, as it means you don’t need to use other tools to create the deployment once the vcluster is provisioned.
- crd-sync: This plugin syncs a CRD from the vcluster to the host cluster in the same way that pods are synced to the host. This is another post-provisioning task that would require additional tooling to perform without vcluster plugins.
- pull-secret-sync: This example shows how to sync a pull secret from the host cluster to the vcluster. The secret is synced from the namespace on the host cluster where your vcluster is running into the default namespace of the vcluster itself.
Many other tasks could be automated with vcluster plugins, and we’re excited to see what ideas people in the community have. We’re also looking to build more examples and provide a place where users can share their plugins with the community.
Want to build your own plugin? Here’s a tutorial that will walk you through the process. If you have questions about vcluster plugins or using the SDK, you can open a GitHub issue on the GitHub repo or visit our community Slack to chat with the maintainers and other community members. We’d love to hear your feedback.