Orleans.Clustering.Kubernetes 1.1.1

Microsoft Orleans clustering provider backed by Kubernetes

Install-Package Orleans.Clustering.Kubernetes -Version 1.1.1
dotnet add package Orleans.Clustering.Kubernetes --version 1.1.1
<PackageReference Include="Orleans.Clustering.Kubernetes" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Orleans.Clustering.Kubernetes --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Configuration

A functional Kubernetes cluster is required for this provider to work. If you don't have one yet, there are multiple (and mostly complicated) ways to deploy Kubernetes for production use and it is out of scope of this provider as there are many articles around the web on how to do it. However, if you are playing with Docker and Kubernetes for the first time or you want to build a development box, Scott Hanselman has a nice article showing how to easily setup Docker for Windows with Kubernetes on your machine. Although it show Windows 10, it can be easily adopted to Mac OSX as well.

Silo

Tell Orleans runtime that we are going to use Kubernetes as our Cluster Membership Provider:

var silo = new SiloHostBuilder()
        ...
        .UseKubeMembership(opt =>
        {
            opt.CanCreateResources = true;
        })
        ...
        .Build();

The CanCreateResources will tell the provider to try create the CRDs at the startup time. In case it is set to false, you need to apply both .yaml files from the package before start the silo. It must be done once per Kubernetes cluster.

Client

Now that our silo is up and running, the Orleans client needs to connect to the Kubernetes to look for Orleans Gateways.

var client = new ClientBuilder()
        ...
        .UseKubeGatewayListProvider()
        ...
        .Build();

Both gateway list and the membership provider has other options that allow you to specify credentials and the API endpoint for your Kubernetes API server. The default will use everything discovered from the data injecte from Kubernetes runtime into the pod.

Great! Now enjoy your Orleans application running within a Kubernetes cluster without need an external membership provider!

Configuration

A functional Kubernetes cluster is required for this provider to work. If you don't have one yet, there are multiple (and mostly complicated) ways to deploy Kubernetes for production use and it is out of scope of this provider as there are many articles around the web on how to do it. However, if you are playing with Docker and Kubernetes for the first time or you want to build a development box, Scott Hanselman has a nice article showing how to easily setup Docker for Windows with Kubernetes on your machine. Although it show Windows 10, it can be easily adopted to Mac OSX as well.

Silo

Tell Orleans runtime that we are going to use Kubernetes as our Cluster Membership Provider:

var silo = new SiloHostBuilder()
        ...
        .UseKubeMembership(opt =>
        {
            opt.CanCreateResources = true;
        })
        ...
        .Build();

The CanCreateResources will tell the provider to try create the CRDs at the startup time. In case it is set to false, you need to apply both .yaml files from the package before start the silo. It must be done once per Kubernetes cluster.

Client

Now that our silo is up and running, the Orleans client needs to connect to the Kubernetes to look for Orleans Gateways.

var client = new ClientBuilder()
        ...
        .UseKubeGatewayListProvider()
        ...
        .Build();

Both gateway list and the membership provider has other options that allow you to specify credentials and the API endpoint for your Kubernetes API server. The default will use everything discovered from the data injecte from Kubernetes runtime into the pod.

Great! Now enjoy your Orleans application running within a Kubernetes cluster without need an external membership provider!

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.1 12,368 7/9/2019
1.1.0 6,689 3/21/2019
1.0.20 17,966 10/23/2018
1.0.19 10,544 7/10/2018
1.0.18 3,761 3/28/2018
1.0.0-rc2-15 358 3/13/2018
1.0.0-rc1-13 290 3/6/2018
1.0.0-rc1-11 207 2/27/2018
1.0.0-preview-7 403 2/9/2018
1.0.0-preview-5 264 2/9/2018