Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithAgentCount

Method
📦 CommunityToolkit.Aspire.Hosting.K3s v13.6.1
func (K3sClusterResource) WithAgentCount(count float64) K3sClusterResource

Signature

methodWithAgentCountbuilder
Sets the number of k3s agent (worker) nodes to add to the cluster.
WithAgentCount(count float64) K3sClusterResource
countfloat64The number of agent nodes. Zero or greater. Defaults to 0 (single-node cluster — the server node acts as both control-plane and worker).
K3sClusterResource

The same builder, for chaining.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: