Back to articles
DevOps & Systems

Kubernetes on VPS: Professional K8s Cluster Setup Under $50/Month

Build a professional Kubernetes cluster on VPS for under $50/month by optimizing resources, using NVMe Cloud VPS, and leveraging automation tools like kubeadm, Helm, and KEDA. This...

DPTCloud Engineering4 min read
Kubernetes on VPS: Professional K8s Cluster Setup Under $50/Month

For under $50 per month, you can build a professional Kubernetes (K8s) cluster on VPS by optimizing resources, leveraging high-performance NVMe Cloud VPS, and using automation tools such as kubeadm, Helm, and KEDA. This guide provides detailed steps for deploying, configuring, and operating an efficient K8s cluster, ideal for small businesses and DevOps teams.

Introduction to Kubernetes on VPS

Kubernetes (K8s) is an open-source platform for automating deployment, scaling, and management of containerized applications. In an era of rising operational costs, deploying K8s on VPS offers a cost-effective alternative for small businesses and development teams that want full control over infrastructure without investing in physical servers or large cloud clusters. With high-performance NVMe Cloud VPS, you can build a professional K8s cluster for under $50/month, making it ideal for limited budgets.

Using VPS for K8s deployment not only reduces costs but also enables full infrastructure control, easy scalability, and automation. Platforms like NVMe Cloud VPS for Docker, Nginx & Databases provide powerful, stable, and flexible resources suitable for running containerized applications at high performance.

Requirements and Environment Setup

To build a professional K8s cluster on VPS, ensure the following prerequisites:

  • At least 3 VPS instances with minimum specifications: 2GB RAM, 2 CPU cores, 40GB SSD NVMe storage.
  • Public IP addresses and root access on each VPS.
  • Stable network connectivity between all servers.
  • Linux operating system (Ubuntu 20.04 or 22.04 is recommended).

Before starting, update your system and install essential tools:

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget vim git

Ensure IPv4 forwarding is enabled and swap is disabled to prevent deployment issues.

Deploying a Kubernetes Cluster with kubeadm

To build a professional K8s cluster, use kubeadm—the official tool for deploying and managing K8s clusters. Begin by installing required components:

sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/kubernetes-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt update
sudo apt install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl

Initialize the cluster on the master node:

kubeadm init --pod-network-cidr=10.244.0.0/16

After successful initialization, configure kubeconfig to access the cluster from your local machine:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Deploy a network plugin such as Calico or Flannel:

kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml

Optimizing and Operating the Cluster

Once the cluster is deployed, configure tools like Helm for application management and KEDA for autoscaling based on load. For example, use the Green DevOps Strategy: Configuring Keda to Automatically Shut Down Node.js Bots on VPS During Low Load to save costs during low traffic periods.

To monitor performance and logs, deploy Prometheus and Grafana. With NVMe VPS, these services can run without impacting the main cluster performance.

Verification and Troubleshooting

Verify the cluster is functioning correctly with the following commands:

kubectl get nodes
kubectl get pods --all-namespaces

If nodes are not in Ready status, check kubelet logs:

sudo journalctl -u kubelet -n 100 --no-pager

If networking fails, verify pod network configuration and ensure network packages are correctly installed.

References

DPTCloud Tier III Infrastructure

Recommended NVMe Cloud VPS Plans to Deploy This Setup

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02

VPS-2E

94.600 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 2 GB
  • SSD: 30 GB NVMe
ECO · vn-02Recommended

VPS-3E

170.500 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 4 GB
  • SSD: 50 GB NVMe
BASIC · vn-01Recommended

VPS-05

457.600 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478