New to Claude Skills? Learn how to install them →

aaronontheweb on GitHub

Akka.NET Management

Free

Dynamic service discovery for Akka.NET clusters.

Get this skill

Free · Opens the source repo

What Akka.NET Management does

Akka.NET Management is a skill designed for developers deploying Akka.NET clusters in dynamic environments such as Kubernetes or cloud platforms. This skill facilitates the configuration and management of clusters by enabling service discovery, which eliminates the need for static seed nodes. Instead of relying on hard-coded IP addresses, Akka.Management allows nodes to discover each other dynamically, enhancing scalability and flexibility in production settings.

The skill integrates seamlessly with Akka.Cluster.Bootstrap, providing HTTP endpoints for managing cluster health and status. It supports various discovery providers, including Kubernetes API, Azure Table Storage, and config-based discovery, making it adaptable to different infrastructure setups. The bundled reference files, such as discovery-providers.md and configuration-reference.md, offer detailed guidance on setting up these integrations, ensuring that users can configure their clusters effectively.

For developers looking to implement auto-scaling and dynamic cluster formations, Akka.Management is particularly beneficial. It allows for the automatic adjustment of cluster nodes based on workload, which is essential for modern applications that require high availability and performance. Additionally, the skill provides health check endpoints that can be utilized by load balancers to ensure that traffic is directed only to healthy nodes, further improving the reliability of deployed services.

This skill is ideal for teams working in environments where application demands fluctuate and where maintaining a static infrastructure is impractical. By leveraging Akka.Management, developers can focus on building resilient applications without the overhead of managing static configurations.

When to use it

Use this skill when deploying Akka.NET clusters in environments like Kubernetes or Azure, where dynamic node discovery is essential.

When not to use it

This skill is not suitable for development environments or single-node deployments where static seed nodes suffice.

What you can build with it

Deploying in Kubernetes

Use Akka.Management to dynamically manage Akka.NET clusters in a Kubernetes environment, eliminating the need for static IPs.

Integrating with Azure

Leverage Akka.Management for seamless integration with Azure services, enabling efficient service discovery and health checks.

Setting Up Health Checks

Implement health endpoints for load balancers to ensure traffic is routed only to healthy Akka.NET nodes, enhancing application reliability.

How to install Akka.NET Management

View source

1. Install with the skills CLI

npx skills add aaronontheweb/dotnet-skills/akka-management --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by aaronontheweb

Akka.NET Management and Service Discovery

When to Use This Skill

Use this skill when:

  • Deploying Akka.NET clusters to Kubernetes or cloud environments
  • Replacing static seed nodes with dynamic service discovery
  • Configuring cluster bootstrap for auto-formation
  • Setting up health endpoints for load balancers
  • Integrating with Azure Table Storage, Kubernetes API, or config-based discovery

Reference Files

Overview

Akka.Management provides HTTP endpoints for cluster management and integrates with Akka.Cluster.Bootstrap to enable dynamic cluster formation using service discovery instead of static seed nodes.

Why Use Akka.Management?

ApproachProsCons
Static Seed NodesSimple, no dependenciesDoesn't scale, requires known IPs
Akka.ManagementDynamic discovery, scales to N nodesMore configuration, external dependencies

Use static seed nodes for: Development, single-node deployments, fixed infrastructure.

Use Akka.Management for: Kubernetes, auto-scaling groups, dynamic environments, production clusters.


Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Cluster Bootstrap                         │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐     │
│  │  Node 1     │    │  Node 2     │    │  Node 3     │     │
│  │             │    │             │    │             │     │
│  │ Management  │◄──►│ Management  │◄──►│ Management  │     │
│  │ HTTP :8558  │    │ HTTP :8558  │    │ HTTP :8558  │     │
│  └──────┬──────┘    └──────┬──────┘    └──────┬──────┘     │
│         │                  │                  │             │
│         └──────────────────┼──────────────────┘             │
│                            │                                │
│                    ┌───────▼───────┐                        │
│                    │   Discovery   │                        │
│                    │   Provider    │                        │
│                    └───────────────┘                        │
│                            │                                │
└────────────────────────────┼────────────────────────────────┘
                             │
              ┌──────────────┼──────────────┐
              │              │              │
        ┌─────▼─────┐ ┌──────▼─────┐ ┌─────▼──────┐
        │ Kubernetes│ │   Azure    │ │   Config   │
        │    API    │ │   Tables   │ │   (HOCON)  │
        └───────────┘ └────────────┘ └────────────┘

Required NuGet Packages

<ItemGroup>
  <!-- Core management -->
  <PackageReference Include="Akka.Management" />
  <PackageReference Include="Akka.Management.Cluster.Bootstrap" />

  <!-- Choose ONE discovery provider -->
  <PackageReference Include="Akka.Discovery.KubernetesApi" />    <!-- For Kubernetes -->
  <PackageReference Include="Akka.Discovery.Azure" />            <!-- For Azure -->
  <PackageReference Include="Akka.Discovery.Config.Hosting" />   <!-- For static config -->
</ItemGroup>

Akka.Hosting Configuration

Basic Setup with Mode Selection

public static class AkkaConfiguration
{
    public static IServiceCollection ConfigureAkka(
        this IServiceCollection services,
        Action<AkkaConfigurationBuilder, IServiceProvider>? additionalConfig = null)
    {
        services.AddOptions<AkkaSettings>()
            .BindConfiguration("AkkaSettings")
            .ValidateDataAnnotations()
            .ValidateOnStart();

        return services.AddAkka("MySystem", (builder, sp) =>
        {
            var settings = sp.GetRequiredService<IOptions<AkkaSettings>>().Value;
            var configuration = sp.GetRequiredService<IConfiguration>();

            ConfigureNetwork(builder, settings, configuration);
            ConfigureHealthChecks(builder);

            additionalConfig?.Invoke(builder, sp);
        });
    }

    private static void ConfigureNetwork(
        AkkaConfigurationBuilder builder,
        AkkaSettings settings,
        IConfiguration configuration)
    {
        if (settings.ExecutionMode == AkkaExecutionMode.LocalTest)
            return;

        builder.WithRemoting(settings.RemoteOptions);

        if (settings.ClusterBootstrapOptions.Enabled)
            ConfigureAkkaManagement(builder, settings, configuration);
        else
            builder.WithClustering(settings.ClusterOptions);
    }
}

Akka.Management Configuration

private static void ConfigureAkkaManagement(
    AkkaConfigurationBuilder builder,
    AkkaSettings settings,
    IConfiguration configuration)
{
    var mgmtOptions = settings.AkkaManagementOptions;
    var bootstrapOptions = settings.ClusterBootstrapOptions;

    // IMPORTANT: Clear seed nodes when using Akka.Management
    settings.ClusterOptions.SeedNodes = [];

    builder
        .WithClustering(settings.ClusterOptions)
        .WithAkkaManagement(setup =>
        {
            setup.Http.HostName = mgmtOptions.HostName;
            setup.Http.Port = mgmtOptions.Port;
            setup.Http.BindHostName = "0.0.0.0";
            setup.Http.BindPort = mgmtOptions.Port;
        })
        .WithClusterBootstrap(options =>
        {
            options.ContactPointDiscovery.ServiceName = bootstrapOptions.ServiceName;
            options.ContactPointDiscovery.PortName = bootstrapOptions.PortName;
            options.ContactPointDiscovery.RequiredContactPointsNr = bootstrapOptions.RequiredContactPointsNr;
            options.ContactPointDiscovery.Interval = bootstrapOptions.ContactPointProbingInterval;
            options.ContactPointDiscovery.StableMargin = bootstrapOptions.StableMargin;
            options.ContactPointDiscovery.ContactWithAllContactPoints = bootstrapOptions.ContactWithAllContactPoints;
            options.ContactPoint.FilterOnFallbackPort = bootstrapOptions.FilterOnFallbackPort;
            options.ContactPoint.ProbeInterval = bootstrapOptions.BootstrapperDiscoveryPingInterval;
        });

    // Configure the discovery provider
    ConfigureDiscovery(builder, settings, configuration);
}

See discovery-providers.md for complete Config, Kubernetes, and Azure discovery setup code.

See configuration-reference.md for the full strongly-typed configuration model classes.


Health Endpoints

Akka.Management exposes health endpoints for load balancers and orchestrators:

EndpointPurposeReturns 200 When
/aliveLivenessActorSystem is running
/readyReadinessCluster member is Up
/cluster/membersDebugReturns cluster membership

ASP.NET Core Health Check Integration

// Register Akka health checks
builder.Services.AddHealthChecks();

// In Akka configuration
builder
    .WithActorSystemLivenessCheck()     // Adds "akka-liveness" health check
    .WithAkkaClusterReadinessCheck();   // Adds "akka-cluster-readiness" health check

// Map endpoints
app.MapHealthChecks("/health/live", new HealthCheckOptions
{
    Predicate = check => check.Tags.Contains("liveness")
});

app.MapHealthChecks("/health/ready", new HealthCheckOptions
{
    Predicate = check => check.Tags.Contains("readiness")
});

Troubleshooting

Cluster Won't Form

Symptoms: Nodes stay as separate single-node clusters.

Checklist:

  1. All nodes use same ServiceName
  2. RequiredContactPointsNr matches actual replica count
  3. Discovery provider is configured correctly
  4. Network allows traffic on management port (8558)
  5. For Kubernetes: RBAC permissions are set

Split Brain

Symptoms: Multiple clusters form instead of one.

Solutions:

  1. Set ContactWithAllContactPoints = true
  2. Increase StableMargin for slower environments
  3. For Aspire: Set FilterOnFallbackPort = false (dynamic ports)
  4. For Kubernetes: Set FilterOnFallbackPort = true (fixed ports)

Azure Discovery Issues

Symptoms: Nodes can't find each other via Azure Tables.

Checklist:

  1. Connection string is valid
  2. Storage account allows table operations
  3. All nodes use same ServiceName
  4. Firewall allows access to Azure Storage

Aspire Integration

For detailed Aspire-specific patterns, see the akka-net-aspire-configuration skill.

Quick reference for Aspire:

// In AppHost
appBuilder
    .WithEndpoint(name: "remote", protocol: ProtocolType.Tcp,
        env: "AkkaSettings__RemoteOptions__Port")
    .WithEndpoint(name: "management", protocol: ProtocolType.Tcp,
        env: "AkkaSettings__AkkaManagementOptions__Port")
    .WithEnvironment("AkkaSettings__ClusterBootstrapOptions__Enabled", "true")
    .WithEnvironment("AkkaSettings__ClusterBootstrapOptions__DiscoveryMethod", "AzureTableStorage")
    .WithEnvironment("AkkaSettings__ClusterBootstrapOptions__FilterOnFallbackPort", "false");

Summary: When to Use What

ScenarioDiscovery MethodFilterOnFallbackPort
Local development (single node)None (use seed nodes)N/A
Aspire multi-nodeAzureTableStoragefalse
KubernetesKubernetestrue
Azure VMs/VMSSAzureTableStoragetrue
Fixed infrastructureConfigtrue
AWS ECS/EC2AWS discovery pluginstrue

Frequently asked questions about Akka.NET Management

Similar skills