Skip to main content

Setup Kubernetes (k3s)

Verify k3s is running correctly and prepare Kubernetes namespace for ORISO Platform.
1

Verify k3s is Running

Check that k3s service is active and Kubernetes cluster is operational.
# Check k3s status
sudo systemctl status k3s

# Check nodes
kubectl get nodes

# Check all pods
kubectl get pods --all-namespaces

# Check storage class
kubectl get storageclass
Expected output should show:
  • k3s service: active (running)
  • Node status: Ready
  • Storage class: local-path (default) with provisioner rancher.io/local-path
2

Create Namespace

Create the caritas namespace for ORISO Platform resources.
# Create caritas namespace
kubectl create namespace caritas

# Verify
kubectl get namespaces

# Set default namespace (optional)
kubectl config set-context --current --namespace=caritas
The caritas namespace should appear in the namespaces list.
Setting the default namespace is optional but convenient, as it allows you to omit -n caritas from subsequent kubectl commands.
3

Configure k3s for Production

Configure k3s for production use with custom settings.
This step is optional but recommended for production deployments.
# Edit k3s service
sudo systemctl edit k3s
Add resource limits and configuration:
[Service]
Environment="K3S_KUBECONFIG_MODE=644"
Environment="K3S_NODE_NAME=oriso-platform"
Apply changes:
# Restart k3s
sudo systemctl daemon-reload
sudo systemctl restart k3s

# Verify
sudo systemctl status k3s
k3s should restart successfully and show active (running) status.

Verification

After completing all steps, verify Kubernetes is ready:
# Check node is ready
kubectl get nodes

# Check namespace exists
kubectl get namespaces | grep caritas

# Check storage class
kubectl get storageclass

Troubleshooting

k3s Not Running

Check k3s logs:
sudo journalctl -u k3s -f
Verify swap is disabled (required for k3s):
free -h

Cannot Access Cluster

Check kubeconfig:
cat ~/.kube/config
Verify file permissions:
ls -la ~/.kube/config
# Should be readable by your user

Storage Class Missing

If local-path storage class is missing:
# Check if local-path-provisioner is running
kubectl get pods -n local-path-storage

Next Steps