• Stars
    star
    5,762
  • Rank 6,763 (Top 0.2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 3 years ago
  • Updated 13 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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.

WebsiteQuickstartDocumentationBlogTwitterSlack

Latest Release License: Apache-2.0

Join us on Slack!

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.

Why Virtual Kubernetes Clusters?

  • Cluster Scoped Resources: much more powerful than simple namespaces (virtual clusters allow users to use CRDs, namespaces, cluster roles etc.)
  • Ease of Use: usable in any Kubernetes cluster and created in seconds either via a single command or cluster-api
  • Cost Efficient: much cheaper and efficient than "real" clusters (single pod and shared resources just like for namespaces)
  • Lightweight: built upon the ultra-fast k3s distribution with minimal overhead per virtual cluster (other distributions work as well)
  • Strict isolation: complete separate Kubernetes control plane and access point for each vcluster while still being able to share certain services of the underlying host cluster
  • Cluster Wide Permissions: allow users to install apps which require cluster-wide permissions while being limited to actually just one namespace within the host cluster
  • Great for Testing: allow you to test different Kubernetes versions inside a single host cluster which may have a different version than the virtual clusters

Learn more on www.vcluster.com.


vcluster Intro

vcluster Compatibility

Learn more in the documentation.


⭐️ Do you like vcluster? Support the project with a star ⭐️


Features

  • Certified Kubernetes Distribution - vcluster itself is a certified Kubernetes distribution and is 100% Kubernetes API conform. Everything that works in a regular Kubernetes cluster works in vcluster
  • Lightweight & Low-Overhead - Based on k3s, bundled in a single pod and with super-low resource consumption. Other distributions such as k0s or vanilla k8s are also supported
  • No Performance Degradation - Pods are scheduled in the underlying host cluster, so they get no performance hit at all while running
  • Reduced Overhead On Host Cluster - Split up large multi-tenant clusters into smaller vclusters to reduce complexity and increase scalability. Since most vcluster api requests and objects will not reach the host cluster at all, vcluster can greatly decrease pressure on the underlying Kubernetes cluster
  • Easy Provisioning - Create via vcluster CLI, helm, kubectl, cluster api, Argo CD or any of your favorite tools (it is basically just a StatefulSet)
  • No Admin Privileges Required - If you can deploy a web app to a Kubernetes namespace, you will be able to deploy a vcluster as well
  • Single Namespace Encapsulation - Every vcluster and all of its workloads are inside a single namespace of the underlying host cluster
  • Easy Cleanup - Delete the host namespace and the vcluster plus all of its workloads will be gone immediately
  • Flexible & Versatile - vcluster supports different storage backends (such as sqlite, mysql, postgresql & etcd), plugins, customizable sync behaviour, vcluster within vcluster setups and has many more additional configuration options to fit a multitude of different use cases

Quick Start (~ 1 minute)

To learn more about vcluster, open the full getting started guide.

1. Download vcluster CLI

Use one of the following commands to download the vcluster CLI binary from GitHub:

Mac (Intel/AMD)
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-darwin-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin
Mac (Silicon/ARM)
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-darwin-arm64" && sudo install -c -m 0755 vcluster /usr/local/bin
Linux (AMD)
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin
Linux (ARM)
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-arm64" && sudo install -c -m 0755 vcluster /usr/local/bin
Windows (Powershell)
md -Force "$Env:APPDATA\vcluster"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-windows-amd64.exe" -o $Env:APPDATA\vcluster\vcluster.exe;
$env:Path += ";" + $Env:APPDATA + "\vcluster";
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);

If you get the error that Windows cannot find vcluster after installing it, you will need to restart your computer, so that the changes to the PATH variable will be applied.


Alternatively, you can download the binary for your platform from the GitHub Releases page and add this binary to your PATH.


2. Create a vcluster

vcluster create my-vcluster

# OR: Use --expose to create a vcluster with an externally accessible LoadBalancer
vcluster create my-vcluster --expose

# OR: Use --isolate to create an isolated environment for the vcluster workloads
vcluster create my-vcluster --isolate

Take a look at the vcluster docs to see how to deploy a vcluster using Helm or Kubectl instead.

3. Use the vcluster

Run in a terminal:

# Run any kubectl, helm, etc. command in your vcluster
kubectl get namespace
kubectl get pods -n kube-system
kubectl create namespace demo-nginx
kubectl create deployment nginx-deployment -n demo-nginx --image=nginx
kubectl get pods -n demo-nginx

4. Cleanup

vcluster delete my-vcluster

Alternatively, you could also delete the host-namespace using kubectl.

Architecture

vcluster Intro

Contributing

Thank you for your interest in contributing! Please refer to CONTRIBUTING.md for guidance.



This project is open-source and licensed under Apache 2.0, so you can use it in any private or commercial projects.

More Repositories

1

devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
Go
7,897
star
2

kiosk

kiosk 🏢 Multi-Tenancy Extension For Kubernetes - Secure Cluster Sharing & Self-Service Namespace Provisioning
Go
1,067
star
3

loft

Namespace & Virtual Cluster Manager for Kubernetes - Lightweight Virtual Clusters, Self-Service Provisioning for Engineers and 70% Cost Savings with Sleep Mode
Go
693
star
4

jspolicy

jsPolicy - Easier & Faster Kubernetes Policies using JavaScript or TypeScript
Go
341
star
5

cluster-api-provider-vcluster

Go
64
star
6

virtual-cluster

Create fully functional virtual Kubernetes clusters - Each vCluster runs inside a Kubernetes namespace and can be started within seconds
Mustache
36
star
7

component-chart

Kubernetes Component Chart - Helm Chart for Application Components in Kubernetes
32
star
8

vcluster-sdk

Provides a toolset to create custom vcluster syncers
Go
24
star
9

devspace-plugin-loft

Loft Plugin for DevSpace - adds commands like `devspace create space` or `devspace create vcluster` to DevSpace
19
star
10

devpod-kubebuilder-template

DevPod KubeBuilder Template
Dockerfile
14
star
11

vcluster-generic-crd-sync-plugin

A vcluster plugin that syncs crds to the host cluster
Go
14
star
12

vcluster-plugins

The plugin repository for vcluster. Extend virtual Kubernetes clusters with plugins.
Go
11
star
13

devpod-provider-aws

DevPod on AWS
Go
11
star
14

devspace-containers

Shell
11
star
15

devpod-provider-kubernetes

DevPod on Kubernetes
Go
9
star
16

devspace-quickstart-python

A small ready to use python flask application to use with devspace
HTML
8
star
17

k8s-init-containers

Complementary repository to be used with Kubernetes Init Containers Article
Shell
8
star
18

jspolicy-sdk

TypeScript
7
star
19

devspace-php-laravel-nginx

PHP
7
star
20

dockerless

Go
6
star
21

dockerfile-templates

Dockerfile
6
star
22

devpod-provider-dockerless

Devpod without Docker/Podman
Go
6
star
23

loftctl

Go
5
star
24

devpod-provider-ssh

DevPod on SSH
Go
5
star
25

create-vcluster

GitHub Action to create a Loft VCluster
TypeScript
5
star
26

devpod-provider-azure

DevPod on Azure
Go
5
star
27

vcluster-dd-extension

This provides an extension integration with Docker Desktop to allow managing vclusters quickly and easily through the Docker Desktop interface.
TypeScript
5
star
28

devpod-kubebuilder-guestbook

KubeBuilder DevPod Example Repository
Go
5
star
29

devspace-quickstart-nodejs

JavaScript
4
star
30

terraform-provider-loft

Terraform Provider for managing Loft Spaces and VCluster
Go
4
star
31

setup-devspace

GitHub Action to Install DevSpace CLI
TypeScript
4
star
32

vcluster-hostpath-mapper

Go
3
star
33

devpod-provider-gcloud

DevPod on Google Cloud
Go
3
star
34

devpod-provider-digitalocean

DevPod on DigitalOcean
Go
3
star
35

tilt-devspace-migration

Starlark
2
star
36

delete-vcluster

TypeScript
2
star
37

cert-issuer

2
star
38

devspace-quickstart-ruby

Ruby
2
star
39

devspace-quickstart-asp-dotnet

C#
2
star
40

devspace-quickstart-golang

Go
2
star
41

devspace-example-python

Python
2
star
42

devpod-provider-ecs

DevPod on ECS
Go
2
star
43

devspace-vscode-example

An example project that shows how to develop with DevSpace and VSCode
Go
1
star
44

devspace-example-php

1
star
45

log

The common logger for Loft projects
Go
1
star
46

devspace-go

Go Development with Kubernetes & DevSpace post's example source code
Shell
1
star
47

devspace-example-javascript

Shell
1
star
48

lib

Go
1
star
49

e2e-test-dependency

This is used for DevSpace e2e tests
1
star
50

action-repo-sync

Shell
1
star
51

vue-ts-client-demo

TypeScript
1
star
52

setup-loft

GitHub Action to Install Loft CLI
TypeScript
1
star
53

isolation-templates

1
star
54

loft-javascript-client

TypeScript
1
star
55

devspace-quickstart-php

PHP
1
star
56

api

Go
1
star
57

devpod-provider-terraform

DevPod on Terraform
Go
1
star
58

vcluster-pro-azure-rbac

A little Demo that shows how to use vCluster.Pro and Azure RBAC together
1
star
59

external-types

Go
1
star
60

loft-grafana-dashboards

1
star
61

agentapi

Go
1
star
62

loft-argo-example

An example project which uses Loft and ArgoCD
1
star
63

delete-space

TypeScript
1
star
64

apiserver

Go
1
star
65

vcluster-plugin-example

Go
1
star
66

utils

Go
1
star
67

create-space

GitHub Action to create a Loft Space
TypeScript
1
star
68

programming-language-detection

Small library to guess which programming language a project is
Go
1
star
69

devpod-provider-civo

DevPod on Civo
Go
1
star
70

devpod-pro-ecs-terraform

Terraform Script to deploy DevPod Pro on ECS with Terraform
HCL
1
star