addK3sCluster
Method
interface IDistributedApplicationBuilder { // ... omitted for brevity addK3sCluster( name: string, apiServerPort?: number, agentCount?: number): K3sClusterResource;}Signature
method
addK3sCluster builderAdds a k3s Kubernetes cluster to the distributed application.
addK3sCluster( name: string, apiServerPort?: number, agentCount?: number): K3sClusterResourceParameters
namestringThe resource name. Also used as the DNS hostname by which containers in the DCP network reach the cluster's API server (e.g. `https://{name}:6443`).apiServerPort numberoptionalHost port to bind the Kubernetes API server (port 6443) to. When `null` (the default) a random available port is assigned.agentCount numberoptionalNumber of k3s agent (worker) nodes to add. When `null` (the default) a single-node cluster is created — the server node acts as both control-plane and worker. Equivalent to calling `WithAgentCount` on the returned builder.Returns
K3sClusterResource Applies to
This method applies to the following types: