MCPcopy Index your code
hub / github.com/clusternet/clusternet

github.com/clusternet/clusternet @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
2,922 symbols 8,579 edges 364 files 1,821 documented · 62%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GoPkg Widget License GoVersion OpenSSF Best Practices Go Report Card build Version codecov FOSSA Status


Managing Your Clusters (including public, private, hybrid, edge, etc.) as easily as Visiting the Internet.

Out of the Box.

A CNCF(Cloud Native Computing Foundation) Sandbox Project.


Clusternet (Cluster Internet) is an open source add-on that helps you manage thousands of millions of Kubernetes clusters as easily as visiting the Internet. No matter the clusters are running on public cloud, private cloud, hybrid cloud, or at the edge, Clusternet helps setup network tunnels in a configurable way and lets you manage/visit them all as if they were running locally. This also helps eliminate the need to juggle different management tools for each cluster.

Clusternet can also help deploy and coordinate applications to multiple clusters from a single set of APIs in a hosting cluster.

Clusternet also provides a Kubernetes-styled API, where you can continue using the Kubernetes way, such as KubeConfig, to visit a certain managed Kubernetes cluster, or a Kubernetes service.

Clusternet is multiple platforms supported now, including linux/amd64, linux/arm64, linux/ppc64le, linux/s390x , linux/386 , and linux/arm;


Core Features

  • Kubernetes Multi-Cluster Management and Governance
    • managing Kubernetes clusters running in cloud providers, such as AWS, Google Cloud, Tencent Cloud, Alibaba Cloud, etc.
    • managing on-premise Kubernetes clusters
    • managing any Certified Kubernetes Distributions, such as k3s
    • managing Kubernetes clusters running at the edge
    • automatically discovering and registering clusters created by cluster-api
    • parent cluster can also register itself as a child cluster to run workloads
    • managing Kubernetes above v1.17.x (Learn more about Kubernetes Version Skew)
    • visiting any managed clusters with dynamic RBAC rules (Learn more from this tutorial)
    • cluster auto-labelling based on Node Feature Discovery
  • Application Coordinations
    • Scheduling Framework (in-tree plugins, out-of-tree plugins)
    • Cross-Cluster Scheduling
      • replication scheduling
      • static dividing scheduling by weight
      • dynamic dividing scheduling by capacity
      • cluster resource predictor framework for in-tree and out-of-tree implementations
      • various deployment topologies for cluster resource predictors
      • subgroup cluster scheduling
    • Various Resource Types
      • Kubernetes native objects, such as Deployment, StatefulSet, etc.
      • CRDs
      • helm charts, including OCI-based Helm charts
    • Resource interpretations with in-tree or out-of-tree controllers
    • Setting Overrides
      • two-stage priority based override strategies
      • enables easy rollback of overrides
      • cross-cluster canary rollout
    • Multi-Cluster Services
      • multi-cluster services discovery with mcs-api
  • CLI
    • providing a kubectl plugin, which can be installed with kubectl krew install clusternet
    • consistent user experience with kubectl
    • create/update/watch/delete multi-cluster resources
    • interacting with any child clusters the same as local cluster
  • Client-go

Architecture

Clusternet is a lightweight addon that consists of four components, clusternet-agent, clusternet-scheduler, clusternet-controller-manager and clusternet-hub.

Explore the architecture of Clusternet on clusternet.io.

To start using Clusternet

Kubernetes >=v1.30 >=v1.28,<v1.30 <v1.28
Clusternet v0.18.x
v0.17.x
v0.16.x

See our documentation on clusternet.io.

The quick start tutorial will walk you through setting up Clusternet locally with kind and deploying applications to multiple clusters.

Try our interactive tutorials that help you understand Clusternet and learn some basic Clusternet features.

If you want to use client-go to interact with Clusternet, we provide a wrapper for easy integration. You can follow demo.go for a quick start.

To use Clusternet APIs and CRDs as a module, please add github.com/clusternet/apis to your go.mod.

Contributors

Contact

If you've got any questions, please feel free to contact us with following ways:

Contributing & Developing

If you want to get participated and become a contributor to Clusternet, please don't hesitate to refer to our CONTRIBUTING document for details.

A developer guide is ready to help you

  • build binaries for all platforms, such as darwin/amd64, linux/amd64, linux/arm64, etc.;
  • build docker images for multiple platforms, such as linux/amd64, linux/arm64, etc.;

License

FOSSA Status

Extension points exported contracts — how you extend this code

Plugin (Interface)
Plugin is the parent type for all the scheduling framework plugins. [11 implementers]
pkg/scheduler/framework/interfaces/interface.go
Plugin (Interface)
Plugin is the parent type for all the predictor framework plugins. [11 implementers]
pkg/predictor/framework/interfaces/interface.go
PluginFactory (Interface)
PluginFactory is an interface that must be implemented for each plugin. [3 implementers]
pkg/controllers/apps/feedinventory/registry.go
TableGenerator (Interface)
TableGenerator - an interface for generating metav1.Table provided a runtime.Object [1 implementers]
pkg/hub/registry/shadow/printers/tablegenerator.go
PredictorProvider (Interface)
PredictorProvider is an interface that provides replicas predictions. [1 implementers]
pkg/apis/scheduler/interface.go
InitFunc (FuncType)
InitFunc is used to launch a particular controller. Any error returned will cause the controller process to `Fatal` The
pkg/controllermanager/context/context.go
Option (FuncType)
Option configures a framework.Registry.
cmd/clusternet-scheduler/app/app.go
ResourceClient (Interface)
(no doc) [1 implementers]
pkg/utils/resourceclient.go

Core symbols most depended-on inside this repo

Run
called by 115
pkg/scheduler/internal/queue/queue.go
String
called by 111
pkg/utils/resource.go
Name
called by 105
pkg/predictor/framework/interfaces/interface.go
Get
called by 97
pkg/scheduler/cache/cache.go
TableHandler
called by 90
pkg/hub/registry/shadow/printers/tablegenerator.go
GetFeedKey
called by 77
pkg/utils/feed.go
Error
called by 71
pkg/scheduler/framework/interfaces/types.go
Add
called by 66
pkg/scheduler/internal/queue/queue.go

Shape

Method 1,555
Function 845
Struct 320
Interface 140
TypeAlias 34
FuncType 28

Languages

Go100%

Modules by API surface

pkg/hub/registry/shadow/printers/internalversion/printers.go123 symbols
pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go110 symbols
pkg/scheduler/framework/interfaces/interface.go89 symbols
pkg/scheduler/framework/runtime/framework.go67 symbols
pkg/predictor/framework/interfaces/interface.go55 symbols
pkg/generated/openapi/zz_generated.openapi.go55 symbols
pkg/predictor/framework/runtime/framework.go45 symbols
pkg/hub/registry/shadow/template/rest.go36 symbols
pkg/scheduler/internal/queue/queue.go31 symbols
pkg/utils/deployer.go29 symbols
pkg/generated/applyconfiguration/clusters/v1beta1/managedclusterstatus.go26 symbols
pkg/apis/clusters/v1beta1/zz_generated.deepcopy.go26 symbols

For agents

$ claude mcp add clusternet \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page