Blog

Cara Setup Kubernetes Cluster dengan k3s untuk Pemula

05 Oct 2025

Apa itu k3s?

k3s adalah Kubernetes distribution ringan dari Rancher Labs. Hanya ~50MB binary, cocok untuk VPS, Raspberry Pi, dan edge computing.

Langkah 1: Install Master Node

curl -sfL https://get.k3s.io | sh -\nkubectl get nodes

Langkah 2: Join Worker Node

# Di master, dapatkan token\ncat /var/lib/rancher/k3s/server/node-token\n\n# Di worker\ncurl -sfL https://get.k3s.io | K3S_URL=https://MASTER_IP:6443 K3S_TOKEN=TOKEN sh -

Langkah 3: Install Ingress Controller

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/baremetal/deploy.yaml

Langkah 4: Deploy Aplikasi

kubectl create deployment nginx --image=nginx\nkubectl expose deployment nginx --port=80 --type=NodePort

Langkah 5: Persistent Storage

Setup Longhorn atau local-path-provisioner untuk persistent volumes.

Kesimpulan

Kubernetes tidak harus rumit. k3s membuatnya accessible untuk pemula sekalipun.

Semua Artikel