
Vultr Kubernetes Engine (VKE) is a fully managed Kubernetes service that operates the control plane and worker nodes on your behalf. A VPC-only node pool attaches its worker nodes to a Virtual Private Cloud (VPC) with no public IP address, and routes their outbound traffic through a NAT Gateway attached to that VPC.
This guide explains how to deploy a VKE cluster with a VPC-only node pool backed by a NAT Gateway, using the Vultr Console to provision the network and the Vultr API to create the cluster.
Before you begin, ensure you:
kubectl and jq on your local workstation.Create the VPC network in the Vultr Console before deploying the cluster. The Vultr Console bundles the NAT Gateway into the VPC: selecting the VPC Network with NAT Gateway option provisions a NAT Gateway with the VPC, which provides the outbound path that the VPC-only nodes use to reach the internet.
After the VPC provisions, open it from the VPC Networks list to view its details. The detail page reports the Gateway as a NAT Gateway and lists a NAT Gateway IP Address, which is the outbound address for the VPC-only nodes. Note the VPC UUID for use as the VPC ID in the API request.
Create the VKE cluster with the Vultr API and attach it to the VPC you created.
Export your API key as an environment variable.
Replace YOUR_API_KEY with your Vultr API key.
Send a GET request to the List Regions endpoint and note the ID of the region that matches your VPC.
The output lists each region with its id and city.
Send a GET request to the List Available Plans in Region endpoint and note a plan to use for the node pool. Replace REGION-ID with your target region.
The output lists the plan IDs available in that region.
Send a GET request to the Get Kubernetes Versions endpoint and note your target version.
The output lists the supported Kubernetes versions.
Send a POST request to the Create Kubernetes Cluster endpoint with vpc_only set to true and the VPC ID that has the NAT Gateway.
Replace:
ewr.v1.36.1+1.vc2-4c-8gb.Omitting vpc_id while vpc_only is true instructs VKE to provision a new VPC and NAT Gateway automatically. Supplying an existing vpc_id requires that VPC to already have an active NAT Gateway, otherwise the request fails with a 422 error.
The response returns the new cluster, including its id. Note this value to use as the cluster ID in later steps.
Send a GET request to confirm the cluster reaches an active state.
The output displays the cluster with its node pool, and each node reports vpc_only as true.
A VPC-only node has no public IP, so every request it makes to the internet exits through the NAT Gateway and carries the NAT Gateway public IP as its source address. Run a request from inside the cluster and match the returned address to the NAT Gateway IP to confirm the routing.
Note the NAT Gateway IP address from the Vultr Console. Navigate to Network, click VPC Networks, then select the VPC you created. The NAT Gateway IP Address field shows the outbound address for the VPC-only nodes.
Download the cluster's kubeconfig from the Get Kubernetes Cluster Kubeconfig endpoint and save it to a file. Replace VKE-ID with your cluster ID.
The command saves the decoded kubeconfig to vke-config.yaml.
Point kubectl at the downloaded configuration.
List the nodes and confirm they report only private VPC addresses.
The output lists each node with a private address in the 10.x.x.x range and no public IP address.
Run a temporary pod that requests its public source address from an external service.
The pod schedules on a VPC-only node, sends the request, prints the public source address, then kubectl removes the pod when it completes.
The address it prints matches the NAT Gateway IP address noted in the first step, which confirms that the nodes have no direct public connectivity and that all outbound traffic routes through the NAT Gateway.
A VPC-only node pool removes the public IP from each worker node and routes outbound traffic through a single NAT Gateway. This network model suits workloads that need controlled connectivity rather than direct public exposure:
You have successfully deployed a VKE cluster with a VPC-only node pool backed by a NAT Gateway. The worker nodes run without public IP addresses, attach only to the VPC, and reach the internet through the NAT Gateway for outbound traffic such as image pulls. To expose workloads on these nodes to the public internet, pair the cluster with a load balancer or a NAT Gateway port forwarding rule. For more information, visit the official Vultr Kubernetes Engine documentation.
0 Comments
Be the first to comment and share your perspective with the community.