diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 1902ef72..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/README.md b/README.md index 5136434e..d0b55e85 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,14 @@ child cluster and has no limits of cluster IP CIDR or CNI types of kubernetes clusters and also provide service discovery ability. +With ``Nauti``, you don't need to impose any specific requirements on the cluster or be aware of the cluster nodes. +Additionally, there are no intrusive modifications to the cluster. All tunnels and network policies are configured +within the containers. + It consists of several parts for networking between clusters: -- nri-controller add second network interface when pod created. -- crossdns provides DNS discovery of Services across clusters. +- `cnf` adds second network interface for pods and establishes VPN tunnels across inner-cluster and inter-cluster. +- `crossdns` provides DNS discovery of Services across clusters. ## Architecture @@ -17,22 +21,19 @@ It consists of several parts for networking between clusters: We use hub cluster to exchange MCS related resources for connecting clusters, and establish secure tunnels with all other participating clusters. Hub defines a set of ServiceAccount, Secrets and RBAC to enable `Syncer` and -`octopus`to securely access the Hub cluster's API. - -For develop guide, workflow show as. - -![](doc/pic/tunnel.png) - -## Syncer、Cross DNS +`cnf`to securely access the Hub cluster's API. -We may merge the two components into one Service Discovery Component. +## Child cluster -For every service in cluster which has ServiceExport created for it. A new EndpointSlice will be generated to represent -the running pods contain references to endpoint's secondary IP. These endpointSlice resources will be exported to -`Hub Cluster` and will be copied to other clusters. +For every service in the cluster that has a `ServiceExport` created, a new `EndpointSlice` will be generated to represent +the running pods and include references to the endpoint's secondary IP. These `EndpointSlice` resources will be exported +to the `Hub Cluster` and synchronized with other clusters. -![](doc/pic/servicediscovery.png) +``Nauti`` deploys ``cnf`` as a `DaemonSet` in the child clusters. A leader pod in cnf will be elected to establish +a VPN tunnel to the `Hub Cluster` and create tunnels to other cnf replicas on different nodes within the child cluster. +Additionally, all workload pods in the clusters will have a second network interface allocated by the ``cnf`` pod on the +same node, with this second interface assigned to the ``cnf`` network namespace. ## Helm Chart Installation @@ -134,19 +135,7 @@ Test it in another cluster. ## Clear All ```shell $ helm uninstall nauti -n nauti-system - $ kubectl delete -f local-pv.yaml $ kubectl delete ns nauti-system - $ for ns in $(kubectl get ns -o name |cut -c 11-); do - echo "annotating pods in ns:$ns" - kubectl annotate pod --all nauti.io/cidr- -n "$ns" - kubectl annotate pod --all nauti.io/gateway- -n "$ns" - kubectl annotate pod --all nauti.io/ip_address- -n "$ns" - kubectl annotate pod --all nauti.io/logical_switch- -n "$ns" - kubectl annotate pod --all nauti.io/mac_address- -n "$ns" - kubectl annotate pod --all nauti.io/allocated- -n "$ns" - kubectl annotate pod --all nauti.io/pod_nic_type- -n "$ns" - kubectl annotate pod --all nauti.io/routes- -n "$ns" - done ``` diff --git a/deploy/.DS_Store b/deploy/.DS_Store deleted file mode 100644 index 1ed38468..00000000 Binary files a/deploy/.DS_Store and /dev/null differ diff --git a/doc/pic/arch.png b/doc/pic/arch.png index 1e6992cf..a512ac71 100644 Binary files a/doc/pic/arch.png and b/doc/pic/arch.png differ diff --git a/go.mod b/go.mod index a47d893d..bd46fae1 100644 --- a/go.mod +++ b/go.mod @@ -50,9 +50,6 @@ require ( golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/sync v0.7.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect -) - -require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/DataDog/appsec-internal-go v1.0.0 // indirect github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.1 // indirect @@ -184,7 +181,6 @@ replace k8s.io/endpointslice => ./staging/k8s.io/endpointslice replace ( github.com/mdlayher/socket => github.com/mdlayher/socket v0.4.0 - github.com/ovn-org/libovsdb => github.com/kubeovn/libovsdb v0.0.0-20230824051252-485a54fd6cb4 k8s.io/api => k8s.io/api v0.28.4 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.4 k8s.io/apimachinery => k8s.io/apimachinery v0.28.4 @@ -214,5 +210,7 @@ replace ( k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.28.4 k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.28.4 k8s.io/sample-controller => k8s.io/sample-controller v0.28.4 - + k8s.io/cli-runtime => k8s.io/cli-runtime v0.28.4 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.28.4 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.4 )