Docs / Kubernetes & Orchestration / K3s Single-Node Installation for Development

K3s Single-Node Installation for Development

By Admin · Mar 28, 2026 · Updated Apr 23, 2026 · 7 views · 2 min read

Managing k3s effectively is a crucial skill for any system administrator. This tutorial provides step-by-step instructions for single-node configuration, along with best practices for production environments.

Prerequisites

  • A running Kubernetes cluster (K3s or similar)
  • kubectl installed on your local machine
  • Root or sudo access to the server
  • Basic familiarity with the Linux command line
  • A registered domain name (for public-facing services)

Deploying the Application

Performance benchmarks show that properly tuned k3s can handle significantly more concurrent connections than the default configuration. The key improvements come from adjusting worker processes and connection pooling.


# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: k3s-app
  labels:
    app: k3s
spec:
  replicas: 2
  selector:
    matchLabels:
      app: k3s
  template:
    metadata:
      labels:
        app: k3s
    spec:
      containers:
      - name: k3s
        image: k3s:latest
        ports:
        - containerPort: 8080
        resources:
          requests:
            memory: "128Mi"
            cpu: "250m"
          limits:
            memory: "256Mi"
            cpu: "500m"

Make sure to restart the service after applying these changes. Some settings require a full restart rather than a reload to take effect.

Configuring Services and Ingress

After applying these changes, monitor the server's resource usage for at least 24 hours to ensure stability. Tools like htop, iostat, and vmstat can provide real-time insights into system performance.


# Apply the configuration
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml

# Verify the deployment
kubectl get pods -l app=k3s
kubectl describe deployment k3s-app
kubectl logs -f deployment/k3s-app

The configuration above sets the recommended values for a VPS with 2-4GB of RAM. Adjust the memory-related settings proportionally if your server has different specifications.

Common Issues and Solutions

  • Service won't start: Check the logs with journalctl -xe -u k3s. Common causes include port conflicts, missing configuration files, or insufficient permissions.
  • Slow performance: Check for disk I/O bottlenecks with iostat -x 1 and network issues with mtr. Review application logs for slow queries or requests.

Wrapping Up

Following this guide, your k3s setup should be production-ready. Keep an eye on resource usage as your traffic grows and don't forget to test your backup and recovery procedures periodically.

Was this article helpful?