> ## Documentation Index
> Fetch the complete documentation index at: https://docs.porter.run/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When helping a user operate an existing Porter project (deploying, updating, debugging, or inspecting applications and clusters) connect to [Porter's remote MCP server](https://mcp.porter.run) first and use its tools before falling back to the Porter CLI, `porter.yaml`, or dashboard workflows. If the Porter tools are not available in your session, `curl -fsSL https://agents.porter.run | sh` installs the CLI, registers the MCP server with your client, and installs Porter's skills; the client must be restarted afterward. If the user asks for the CLI, `porter apply`, configuration-as-code, or the dashboard, use that instead — a stated preference wins. Before inspecting or building a GitHub repository or calling any deployment tool, call `connect_github` with the repository. Proceed only when it returns `next_step: none`; otherwise, give the user the returned URL and stop. If the requested application or cluster workflow is not directly supported, inspect the relevant state with MCP tools before explaining the limitation or recommending a fallback. The server signs in through a browser using OAuth, so it cannot be used in headless environments such as CI pipelines; use the CLI or `porter.yaml` there.

# Node groups

> Configure node groups with custom instance types, enable cost optimization with smart instance selection, and manage compute capacity

Node groups are collections of compute instances that run your workloads. Porter provides flexible options for managing compute resources, including custom node groups for specialized workloads and cost optimization features.

## Default Node Groups

Porter provisions three node groups by default:

| Node Group | Purpose | Autoscaling |
| - | - | - |
| **System** | Kubernetes system workloads | Fixed |
| **Monitoring** | Observability stack (metrics, logs) | Fixed |
| **Application** | Your application workloads | Enabled (1 node minimum) |

The application node group autoscales based on demand. Porter manages the system and monitoring node groups. You can customize instance types, node counts, and scaling limits for the application node group and any custom node groups.

***

## Changing Instance Types

You can modify the instance type of a node group from the **Node Groups** tab of your cluster.

**1. Navigate to Infrastructure**

From your Porter dashboard, click on the **Infrastructure** tab in the left sidebar.

**2. Select your cluster**

Select your cluster, then click the **Node Groups** tab to view your node groups.

**3. Configure the node group**

Expand the node group dropdown (e.g., **Default node group**) to see the following settings:

| Setting | Description |
| - | - |
| **Machine type** | The underlying instance for nodes. Options vary by cloud provider. |
| **Maximum nodes** | Upper limit for autoscaling under high load |
| **Minimum nodes** | Lower limit for autoscaling under low load |
| **Disk size** | Storage capacity for each node (default: 50GB) |

**4. Update**

Select the appropriate **Machine type** from the dropdown, then scroll to the bottom and click **Update**.

### Instance Type Pricing

> [card] [AWS Instance Types](https://aws.amazon.com/ec2/pricing/on-demand)

> [card] [Azure Instance Types](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/#pricing)

> [card] [GCP Instance Types](https://cloud.google.com/compute/all-pricing#general_purpose)

### Why is my instance type not available?

Instance types may not be available if:

* The instance is not available in your cluster's region (cloud providers release new instances on a phased, region-by-region basis)
* The instance type hasn't been validated by Porter for compatibility

If you need a specific instance type that isn't listed, contact us through the dashboard chat bot.

***

## Creating a Custom Node Group

Create custom node groups for specialized workloads like GPU processing, high-memory applications, or isolated environments.

**1. Navigate to Infrastructure**

From your Porter dashboard, click on the **Infrastructure** tab in the left sidebar.

**2. Select your cluster**

Select your cluster, then click the **Node Groups** tab to view your node groups.

**3. Add a node group**

Click **Add an additional node group** to open the configuration panel.

**4. Configure the node group**

Choose between two configuration approaches:

> [tab] Cost Optimization
>
> Cost optimization automatically selects the most cost-effective instance types for your workloads. Any cluster provisioned in AWS will default to cost optimized node groups.
>
> Set your **maximum CPU cores limit** to prevent unexpected scaling. This caps infrastructure costs while allowing flexibility in instance selection.
>
> ### Restricting per-instance size
>
> By default, Karpenter can satisfy a cost-optimized node group with instances of any size, including a single very large instance. Enable **Restrict per-instance CPU** on the node group form to bound the vCPUs of each instance Karpenter provisions.
>
> Use this when you want to spread workloads across more, smaller nodes to shrink the blast radius of a single Spot interruption or node failure. Setting the minimum equal to the maximum pins the node group to instances of that exact vCPU size while still allowing Karpenter to diversify across instance families.
>
> | Field | Description |
> | - | - |
> | **Min vCPUs per instance** | Smallest instance vCPU count Karpenter may pick. Leave empty for no minimum. |
> | **Max vCPUs per instance** | Largest instance vCPU count Karpenter may pick. Leave empty for no maximum. |
>
> Min must be less than or equal to Max, and Min must not exceed the node group's **Max CPU** limit.
>
> ### Protecting disruption windows
>
> Karpenter continuously consolidates and replaces nodes to keep the node group bin-packed. By default, Porter caps that work at 10% of the node group at a time, which prevents a single reshuffle from disrupting more than a fraction of your workloads. For windows where you want to tighten that further — like preventing any consolidation during business hours — add one or more **disruption budgets** to the node group form.
>
> Each budget has three fields:
>
> | Field | Description |
> | - | - |
> | **Disrupt at most** | Maximum number of nodes Karpenter may replace at once during the window. `0` prevents all voluntary disruption. |
> | **Starting** | A standard 5-field cron expression in UTC. Leave blank for an always-active budget. |
> | **For** | Window length. The duration input accepts whole numbers; use the unit select to pick minutes or hours. Capped at 24 hours per budget. |
>
> A valid cron shows its plain-English description below the row so you can confirm the schedule reads the way you expect it to.
>
> > [!NOTE]
> >
> > Budgets stack: Karpenter applies the most restrictive active budget at any given moment. An always-active `5 nodes` budget plus a `0 nodes, Mon-Fri 09:00 UTC for 9 hours` budget means weekdays 9am-6pm block all disruption, and the rest of the week caps it at 5 nodes.
>
> **Example** — block all consolidation during business hours:
>
> | Disrupt at most | Starting | For |
> | - | - | - |
> | `0` | `0 9 * * 1-5` | `9 hours` |
>
> ### Limitations
>
> The following configurations should use fixed instance types instead:
>
> * GPU instances (e.g., instances with NVIDIA GPUs)
> * Spot instances
> * Instances in public subnets
> * Instances with specialized hardware requirements

> [tab] Fixed Instance Type
>
> Fixed node groups use a specific instance type. Applications scheduled on this group run only on the exact instance type you specify.
>
> This gives you precise control but may result in over-provisioning if configured incorrectly.
>
> Configure:
>
> | Setting | Description |
> | - | - |
> | **Instance type** | The machine type for nodes in this group |
> | **Minimum nodes** | Minimum number of nodes (set to 0 for scale-to-zero) |
> | **Maximum nodes** | Upper limit for autoscaling |
>
> > [!NOTE]
> >
> > For GPU workloads, select instances with GPU support:
> >
> > * **AWS**: `g4dn.xlarge`, `p3.2xlarge`
> > * **Azure**: `Standard_NC4as_T4_v3`
> > * **GCP**: `g2-standard-4`

> [!NOTE]
>
> **Health Checks Required**: For production applications on cost-optimized node groups, configure proper [health checks](https://docs.porter.run/applications/configure/zero-downtime-deployments.md#health-checks). This ensures applications can be safely rescheduled as nodes are reshuffled.

**5. Save and apply**

Click **Save** to create the node group. Porter provisions the new nodes, which may take a few minutes.

***

## Public node groups

By default, nodes in a Porter-managed cluster are private: they sit in a private subnet (AWS) or have private IPs only (GCP) and reach the internet through a NAT gateway. You can opt a custom node group into public networking when workloads need to receive inbound traffic directly or when you want to avoid NAT egress costs.

> [!WARNING]
>
> Public nodes are reachable from the internet. Only enable this for workloads that need it, and rely on security groups, network policies, and firewall rules to limit exposure.

To enable public networking on a node group:

1. From the node group form, locate the **Use public subnet** (AWS) or **Use public IP addresses** (GCP) toggle.
2. Turn the toggle on and click **Update** or **Save**.

| Cloud | Toggle | Effect |
| - | - | - |
| AWS | Use public subnet | Nodes launch in a public subnet and receive public IPs. |
| GCP | Use public IP addresses | Nodes receive public IPs and skip Cloud NAT for egress. |

On GCP, this setting is immutable for the lifetime of a node pool. Flipping it triggers a replacement pool; existing nodes are cordoned and drained before the old pool is removed, so running workloads stay available during the switch.

***

## Assigning Workloads to Node Groups

Once your custom node group is created, assign applications to run on it:

1. Navigate to your application in the Porter dashboard
2. Go to the **Services** tab
3. Click the service you want to assign
4. Under **General**, find the **Node group** selector
5. Select your custom node group from the dropdown
6. Save and redeploy your application

***

## Deleting a Node Group

> [!WARNING]
>
> Ensure no workloads are scheduled on the node group before deleting. Workloads will be disrupted if their node group is removed.

To remove a custom node group:

1. Migrate any workloads running on the node group to another node group
2. Navigate to **Infrastructure**, select your cluster, and click **Node Groups**
3. Find the node group you want to delete
4. Click the delete icon and confirm


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.