Heman Jone
hemanjone162@gmail.com
Complete Longhorn Setup for Kubernetes – A Practical Guide with Vultr Docs (111 อ่าน)
8 ส.ค. 2568 01:47
If you're running a Kubernetes cluster and looking for a reliable way to manage persistent storage, then a Longhorn setup might be exactly what you need. Longhorn is a lightweight, cloud-native distributed block storage system designed specifically for Kubernetes. It offers high availability, simple UI management, data snapshots, backups, and easy volume recovery.
Recently, I followed the guide provided by Vultr at docs.vultr.com to deploy Longhorn on my Vultr Kubernetes Engine (VKE) cluster, and I wanted to share the experience and provide some helpful tips for others attempting the same setup.
Prerequisites for Longhorn Setup
Before you begin, ensure you have the following:
A Kubernetes cluster (ideally with at least 3 nodes)
Each node should have at least 4 vCPUs and sufficient storage
kubectl properly configured and access to the cluster
(Optional) Vultr Object Storage if you plan to enable volume backup features
If you're using Vultr's managed Kubernetes service, most of the infrastructure is already streamlined and ready for Longhorn installation.
Installing Longhorn on Kubernetes
Vultr’s documentation simplifies the longhorn setup process using the official Longhorn manifest. You can download and apply the manifest in just a few commands:
wget kubectl apply -f longhorn.yaml
Within a few minutes, you can check that all pods in the longhorn-system namespace are running. Once deployed, you’ll gain access to the Longhorn dashboard, where you can visually manage volumes, create snapshots, and monitor system health.
Enabling Shared Access with RWX Volumes
If your applications require ReadWriteMany (RWX) access, the Vultr Docs also walk you through deploying Longhorn’s NFS provisioner:
kubectl apply -f
This adds support for shared storage volumes that can be accessed by multiple Pods simultaneously—perfect for web apps, CMSs, or collaborative platforms.
Managing Storage with the Longhorn UI
Accessing the Longhorn dashboard is straightforward. You can expose it using a NodePort, LoadBalancer, or Ingress. From there, you can:
Attach/detach volumes from workloads
Create and restore volume snapshots
Configure scheduled backups to Vultr Object Storage
Monitor storage node status and resource usage
Final Tips
Stick to the official guide from Vultr: Don’t forget to label your storage nodes correctly, especially in mixed-role clusters.
Always verify that your cluster meets the resource requirements before installing.
Longhorn works best with block storage (e.g., NVMe or SSDs), so avoid slow HDDs for performance-critical apps.
Conclusion
The Longhorn setup process using Vultr's guide is quick, efficient, and well-documented. Whether you're running databases, stateful applications, or simply want reliable storage, Longhorn on Kubernetes is a solid, production-ready solution.
Feel free to share your experience or ask questions if you run into any issues during setup!
157.49.35.212
Heman Jone
ผู้เยี่ยมชม
hemanjone162@gmail.com