dubbo-kubernetes

module
v0.0.0-...-754863c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: Apache-2.0

README

The Dubbo Kubernetes Integration

⚠️ This is still an experimental version. ⚠️

Build codecov license

The universal Control Plane and Console for managing microservices on any environment - VM and Kubernetes.

architecture

Quick Start (under development)

NOTICE: As the project has not been officially released yet, the following commands may not run properly. The best way for now is to refer to the Developer's Guide to learn how to download the source code and build it locally!

  1. Download dubbo-control-plane binary package.

    curl -L https://raw.githubusercontent.com/apache/dubbo-kubernetes/master/release/downloadDubbo.sh | sh -
    
    cd dubbo-$version
    export PATH=$PWD/bin:$PATH
    
  2. Install control-plane on Kubernetes

    dubboctl install --profile=demo
    
  3. Check installation

    kubectl get services -n dubbo-system
    
  4. Next, deploy Dubbo applications to Kubernetes as shown below:

    apiVersion: v1
    kind: Service
    metadata:
      name: demo-service
      namespace: dubbo-demo
    spec:
      selector:
        app: dubbo-demo
      type: ClusterIP
      ports:
        - name: port1
          protocol: http
          port: 80
          targetPort: 8080
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: example-app
      namespace: dubbo-demo
    spec:
      ...
      template:
        metadata:
          ...
          labels:
            app: dubbo-demo
            dubbo.apache.org/service: dubbo-demo
        spec:
          containers:
            ...
    

    If you want to create your own Dubbo application from scratch and deploy it, please use dubboctl we provided below.

  5. Open the following page to check deployment status on control plane UI:

    kubectl port-forward svc/dubbo-control-plane \
      -n dubbo-system 5681:5681
    

    visit, 127.0.0.1:5681/admin

    ui-demo

Architecture

architecture

The microservcice architecture built with Dubbo Control Plane consists of two main components:

  • The Dubbo Control Plane configures the data plane - applications developed with Dubbo SDK, for handling service traffic. Users create policies that the dubbo control plane processes to generate configurations for the data plane.
  • The data plane - the Dubbo SDK, connets directly to control plane and receives configurations that can work as the sources for service discovery, traffic routing, load balancing, etc.

Dubbo Control Plane supports two deployment modes: kubernetes and universal.

  • kubernetes mode is like the classic Service Mesh architecture, with all microservices concepts bonded to kubernetes resources. Unlike classic service mesh solutions like istio, Dubbo favors a proxyless data plane deployment - with no envoy sidecar.
  • universal is the traditional microservice architecture that all Dubbo users are already familiar with. Unlike the kubernetes mode, it usually needs a dedicated registry like Nacos or Zookeeper for service discovery, etc.

Kubernetes

In kubernetes mode, the control plane will interact directly with the Kubernetes API-SERVER, watching the kubernetes resources and transform them as xDS resources for service discovery and traffic management configurations.

kubernetes-mode

We all know the service definitions of Kubernetes and Dubo are different, Kubernetes Service is more like an application concept run on a selected group of pods while Dubbo Service can mean a specific RPC service inside the application process. So how does dubbo control plane manages to bridge the interface-application gap, check here for more details.

Universal

In Universal mode, Dubbo still uses Nacos or Zookeeper as registries for service discovery, control plane then interact with registry directly to work as the console UI, as the entry point for viewing and managing the cluster.

universal-mode

Multiple clusters

Dubbo Control Plane supports running your services in multiple zones. It is even possible to run with a mix of Kubernetes and Universal zones. Your microservice environment can include multiple isolated services, and workloads running in different regions, on different clouds, or in different datacenters. A zone can be a Kubernetes cluster, a VPC, or any other deployment you need to include in the same distributed microservice environment. The only condition is that all the data planes running within the zone must be able to connect to the other data planes in this same zone.

Dubbo Control Plane supports a global deployment mode that can connect different zone region clusters. The picture below shows how it works.

multiple-cluster

Roadmap

  • Security
  • Metrics
  • Cross-cluster communication
  • Console

Refereces

  • Dubboctl
  • Console UI Design
  • Dubbo java xDS implementation
  • Dubbo go xDS implementation

Directories

Path Synopsis
api
app
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
pkg
bufman/bufpkg/bufcheck
Package bufcheck contains the implementations of the lint and breaking change detection rules.
Package bufcheck contains the implementations of the lint and breaking change detection rules.
bufman/bufpkg/bufcheck/bufbreaking
Package bufbreaking contains the breaking change detection functionality.
Package bufbreaking contains the breaking change detection functionality.
bufman/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild
Package bufbreakingbuild contains the RuleBuilders used by bufbreakingv*.
Package bufbreakingbuild contains the RuleBuilders used by bufbreakingv*.
bufman/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck
Package bufbreakingcheck impelements the check functions.
Package bufbreakingcheck impelements the check functions.
bufman/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1
Package bufbreakingv1 contains the VersionSpec for v1.
Package bufbreakingv1 contains the VersionSpec for v1.
bufman/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1
Package bufbreakingv1beta1 contains the VersionSpec for v1beta1.
Package bufbreakingv1beta1 contains the VersionSpec for v1beta1.
bufman/bufpkg/bufcheck/buflint
Package buflint contains the linting functionality.
Package buflint contains the linting functionality.
bufman/bufpkg/bufcheck/buflint/internal/buflintbuild
Package buflintbuild contains the RuleBuilders used by buflintv*.
Package buflintbuild contains the RuleBuilders used by buflintv*.
bufman/bufpkg/bufcheck/buflint/internal/buflintcheck
Package buflintcheck impelements the check functions.
Package buflintcheck impelements the check functions.
bufman/bufpkg/bufcheck/buflint/internal/buflintv1
Package buflintv1 contains the VersionSpec for v1.
Package buflintv1 contains the VersionSpec for v1.
bufman/bufpkg/bufcheck/buflint/internal/buflintv1beta1
Package buflintv1beta1 contains the VersionSpec for v1beta1.
Package buflintv1beta1 contains the VersionSpec for v1beta1.
bufman/bufpkg/bufconfig
Package bufconfig contains the configuration functionality.
Package bufconfig contains the configuration functionality.
bufman/bufpkg/bufconnect
Package bufconnect provides buf-specific Connect functionality.
Package bufconnect provides buf-specific Connect functionality.
bufman/bufpkg/buflock
Package buflock manages the buf.lock lock file.
Package buflock manages the buf.lock lock file.
bufman/bufpkg/bufplugin/bufpluginconfig
Package bufpluginconfig defines the buf.plugin.yaml file.
Package bufpluginconfig defines the buf.plugin.yaml file.
bufman/bufpkg/bufplugin/bufplugindocker
Package bufplugindocker contains utilities for building Buf plugins using the Docker API.
Package bufplugindocker contains utilities for building Buf plugins using the Docker API.
bufman/bufpkg/bufpluginexec
Package bufpluginexec provides protoc plugin handling and execution.
Package bufpluginexec provides protoc plugin handling and execution.
bufman/bufpkg/bufstyle
Package bufstyle defines lint analyzers that help enforce Buf's Go code standards.
Package bufstyle defines lint analyzers that help enforce Buf's Go code standards.
bufman/pkg/app
Package app provides application primitives.
Package app provides application primitives.
bufman/pkg/app/appcmd
Package appcmd contains helper functionality for applications using commands.
Package appcmd contains helper functionality for applications using commands.
bufman/pkg/app/appflag
Package appflag contains functionality to work with flags.
Package appflag contains functionality to work with flags.
bufman/pkg/app/applog
Package applog contains utilities to work with logging.
Package applog contains utilities to work with logging.
bufman/pkg/app/appname
Package appname provides containers for named applications.
Package appname provides containers for named applications.
bufman/pkg/app/appproto
Package appproto contains helper functionality for protoc plugins.
Package appproto contains helper functionality for protoc plugins.
bufman/pkg/app/appproto/appprotoos
Package appprotoos does OS-specific generation.
Package appprotoos does OS-specific generation.
bufman/pkg/diff
Package diff implements diffing.
Package diff implements diffing.
bufman/pkg/encoding
Package encoding provides encoding utilities.
Package encoding provides encoding utilities.
bufman/pkg/filepathextended
Package filepathextended provides filepath utilities.
Package filepathextended provides filepath utilities.
bufman/pkg/git/cmd/git-ls-files-unstaged
Package main implements a file lister for git that lists unstaged files.
Package main implements a file lister for git that lists unstaged files.
bufman/pkg/github/githubtesting
Package githubtesting provides testing functionality for GitHub.
Package githubtesting provides testing functionality for GitHub.
bufman/pkg/ioextended
Package ioextended provides io utilities.
Package ioextended provides io utilities.
bufman/pkg/licenseheader
Package licenseheader handles license headers.
Package licenseheader handles license headers.
bufman/pkg/manifest
A manifest is a file containing a list of paths and their hash digests, canonically ordered by path in increasing lexicographical order.
A manifest is a file containing a list of paths and their hash digests, canonically ordered by path in increasing lexicographical order.
bufman/pkg/netrc
Package netrc contains functionality to work with netrc.
Package netrc contains functionality to work with netrc.
bufman/pkg/normalpath
Package normalpath provides functions similar to filepath.
Package normalpath provides functions similar to filepath.
bufman/pkg/osextended
Package osextended provides os utilities.
Package osextended provides os utilities.
bufman/pkg/protogenutil
Package protogenutil provides support for protoc plugin development with the appproto and protogen packages.
Package protogenutil provides support for protoc plugin development with the appproto and protogen packages.
bufman/pkg/protosource
Package protosource defines minimal interfaces for Protobuf descriptor types.
Package protosource defines minimal interfaces for Protobuf descriptor types.
bufman/pkg/storage
Package storage implements a simple storage abstraction.
Package storage implements a simple storage abstraction.
bufman/pkg/storage/cmd/ddiff
Package main implements the ddiff command that diffs two directories.
Package main implements the ddiff command that diffs two directories.
bufman/pkg/storage/storagearchive
Package storagearchive implements archive utilities.
Package storagearchive implements archive utilities.
bufman/pkg/storage/storagegit
Package storagegit implements a storage abstraction for Git repositories.
Package storagegit implements a storage abstraction for Git repositories.
bufman/pkg/storage/storagemem
Package storagemem implements an in-memory storage Bucket.
Package storagemem implements an in-memory storage Bucket.
bufman/pkg/storage/storagemem/internal
Package internal splits out ImmutableObject into a separate package from storagemem to make it impossible to modify ImmutableObject via direct field access.
Package internal splits out ImmutableObject into a separate package from storagemem to make it impossible to modify ImmutableObject via direct field access.
bufman/pkg/storage/storageos
Package storageos implements an os-backed storage Bucket.
Package storageos implements an os-backed storage Bucket.
bufman/pkg/storage/storageutil
Package storageutil provides helpers for storage implementations.
Package storageutil provides helpers for storage implementations.
bufman/pkg/stringutil
Package stringutil implements string utilities.
Package stringutil implements string utilities.
bufman/pkg/tmp
Package tmp provides temporary files and directories.
Package tmp provides temporary files and directories.
bufman/pkg/zaputil
Package zaputil implements utilities for zap.
Package zaputil implements utilities for zap.
core/governance
Package config is a generated GoMock package.
Package config is a generated GoMock package.
core/resources/apis/mesh
nolint:whitespace
nolint:whitespace
core/resources/apis/system
nolint:whitespace
nolint:whitespace
dds
hds
log
plugins/resources/k8s/native/api/v1alpha1
Package v1alpha1 contains API Schema definitions for the mesh v1alpha1 API group +groupName=dubbo.io
Package v1alpha1 contains API Schema definitions for the mesh v1alpha1 API group +groupName=dubbo.io
tls
xds
tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL