Skip to main content

Compute Config

A Compute Config defines default settings for how PaletteAI deploys Kubernetes clusters. It captures infrastructure details, such as networking, SSH keys, and node configurations, so that data scientists and ML engineers can deploy workloads without specifying these settings each time.

Every Project must reference a Compute Config. When users deploy App Deployments, PaletteAI uses the Compute Config to provision clusters with consistent, pre-approved settings. These settings are defined in the spec.paletteClusterConfig.defaults section of the Compute Config resource.

tip

Compute Config replaces the manual configuration steps you would normally perform in Palette's cluster deployment workflow. For Edge clusters, it covers most settings entered on the Cluster Config and Nodes Config screens.

Example Compute Config configuration
apiVersion: spectrocloud.com/v1alpha1
kind: ComputeConfig
metadata:
name: edge-compute-config
namespace: project-a
spec:
# Minimum number of worker nodes that must be provisioned
minWorkerNodes: 2
paletteClusterConfig:
# Edge configuration for edge deployments
edge:
vip: '10.10.189.24'
ntpServers:
- 'time.google.com'
- 'time2.google.com'
networkOverlayConfig:
enabled: false
staticIp: true
cidr: '192.168.1.0/24'
overlayNetworkType: 'VXLAN'
isTwoNode: false
defaults:
# SSH keys for node access
sshKeys:
- 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7... test-user@test-machine'
- 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8... admin@admin-machine'
# Control plane defaults - required field
controlPlaneDefaults:
nodeCount: 3 # Must be 1, 3, or 5 to maintain quorum
architecture: 'AMD64'
cpu:
cpuCount: 8
memory:
memory: '16 GB'
workerNodeEligible: false
labels:
'palette.ai': 'true'
annotations:
'control-plane-annotation': 'control-plane-value'
'kubernetes.io/description': 'Control plane node'
taints:
- key: 'node-role.kubernetes.io/control-plane'
effect: 'NoSchedule'
# Worker pool defaults
workerNodePoolDefaults:
labels:
'palette.ai': 'true'
annotations:
'worker-annotation': 'worker-value'
'kubernetes.io/description': 'Worker node'
taints:
- key: 'worker-taint'
value: 'true'
effect: 'NoExecute'

Minimum Worker Nodes

The spec.minWorkerNodes setting ensures clusters have at least a specified number of worker nodes. This is useful for workloads that require a minimum level of compute resources to function properly, such as distributed training jobs or high-availability applications.

Resolution Order

PaletteAI resolves the minimum worker node count from multiple sources in the following order:

  1. Workload Profile - The palette.ai/min-nodes: N label on the Workload Profile (highest priority)

    Example WorkloadProfile label
    apiVersion: spectrocloud.com/v1beta1
    kind: WorkloadProfile
    metadata:
    name: distributed-training
    labels:
    palette.ai/min-nodes: '3' # This workload requires at least 3 nodes
    spec:
  2. Worker Pool Config - minWorkerNodes in clusterVariant.*.nodePoolRequirements.workerPools[*] (used in either the AI Workload or ComputePool spec, depending on which path you use)

    Example AIWorkload minWorkerNodes
    apiVersion: spectrocloud.com/v1alpha1
    kind: AIWorkload
    metadata:
    name: my-workload
    spec:
    clusterVariant:
    dedicated:
    paletteClusterDeploymentConfig:
    cloudType: edge-native
    nodePoolRequirements:
    controlPlanePool:
    nodeCount: 3
    workerPools:
    - gpu:
    family: 'NVIDIA A100'
    gpuCount: 8
    minWorkerNodes: 3

If none of these sources specify a minimum worker node requirement, no minimum is enforced.

Resources

Refer to the following articles to learn more about the role Compute Config plays in PaletteAI:

  • Compute - Discovers available machines for cluster deployment
  • Compute Pool - Allocates machines and provisions clusters using Compute Config settings
  • Project - References a Compute Config for all workloads in the project