Report on Lightweight Kubernetes Cluster Tests - K3s on Ecloud
These notes describe feedback and observations from deploying a K3s cluster with different minimal configurations.
K3s – Minimal Configuration and Observations on a Single VM
1- (2 vCPU / 2 GB RAM)
Test Scenarios
-
Simple Deployment (Nginx)
- A web server Nginx deployed through K3s runs correctly.
- Exposed using NodePort: accessible and stable, even under continuous load testing on the index page.
-
Connection to Rancher
- The K3s cluster was added to Rancher without any issues.
- Initial monitoring and management were operational.
Problems Encountered
When deploying the Boutique (microservices-demo) application:
-
Degraded Performance
- Very slow deployment (≈20 min instead of <1 min on a 3-node K3s cluster).
- Low responsiveness:
kubectlconsole and Rancher interface are sluggish.
-
Unstable Services
- Some pods remain in the
NotReadystate for a long time. - Random and automatic restarts of services (
CrashLoopBackOffobserved).
- Some pods remain in the
-
Critical Memory Usage
free -m total used free shared buff/cache available Mem: 1966 1659 85 18 424 307 Swap: 0 0 0
2- VM 3 vCPU / 2.5 GB RAM
Test Scenarios
-
Deployment of an Nginx Server
- One Nginx pod deployed via K3s works properly.
- Exposed using NodePort → accessible and stable under repeated requests.
-
Rancher Integration
- The cluster was added to Rancher without any problems.
- Viewing statistics works (some latency, but functional).
-
Deployment of the Boutique (microservices-demo)
- The application starts and runs.
- Some slowness observed, but overall usable.
- The MetalLB LoadBalancer worked well to expose the Boutique application.
Load Test (LoadGenerator)
Initial Configuration
kubectl -n default get deploy loadgenerator -o yaml | yq '.spec.template.spec.containers[0].env'
FRONTEND_ADDR: frontend:80
USERS: "10"
RATE: "1"
I increase the load:
# 1: 50 users, 5/s --> OK
kubectl set env deploy/loadgenerator USERS=50 RATE=5
# 2: 200 users, 20/s --> Slower and less responsive
kubectl set env deploy/loadgenerator USERS=200 RATE=20
# 3: 500 users, 50/s --> Much slower, services stop responding, console becomes slow
kubectl set env deploy/loadgenerator USERS=500 RATE=50
3- VM 3 vCPU / 3 GB RAM
- Deployment of the Boutique (microservices-demo)
- The application starts and runs.
- Some slowness observed, but overall usable.
K3s – Minimal Configuration and Observations on 3 VMs
1- 3 VMs with 2+0.5x2 = 3 vCPU / 2 + 2*512 = 3 GB RAM
Test Scenarios
-
Deployment of the Boutique (microservices-demo)
- The application starts and runs.
- Some slowness observed, but overall usable.
- The MetalLB LoadBalancer worked well to expose the Boutique application.
-
Rancher
- The cluster was added to Rancher, and latency increased.
- Increasing load:
# 1: 50 users, 5/s kubectl set env deploy/loadgenerator USERS=50 RATE=5 - Rancher occasionally reports broken nodes!
2- 3 VMs with 2+1x2 = 4 vCPU / 2 + 2x1 = 4 GB RAM
Test Scenarios
-
Deployment of the Boutique (microservices-demo)
- The application starts and runs.
- The MetalLB LoadBalancer worked well to expose the Boutique application.
-
Rancher
- The cluster was added to Rancher
- Increasing load:
# 1: 50 users, 5/s --> OK kubectl set env deploy/loadgenerator USERS=50 RATE=5 # 2: 200 users, 20/s --> OK with some latency kubectl set env deploy/loadgenerator USERS=200 RATE=20 # 3: 500 users, 50/s --> OK but noticeably slower kubectl set env deploy/loadgenerator USERS=500 RATE=50