Lima bazi templateleri veriyor. Bu templateler basit seyleri calistirmak icin cok iyi.
https://lima-vm.io/docs/templates
Ben single-node k8s calismak icin k3s kullanmaya karar verdim.
Detaylari burada :
https://github.com/lima-vm/lima/blob/master/templates/k3s.yaml
Direk su komut ile indirip baslatiyor
limactl start template://k3s
WARN[0010] local username "this.user" is not a valid Linux username (must match "^[a-z_][a-z0-9_-]$"); using "lima" instead INFO[0011] Starting the instance "k3s" with VM driver "vz" INFO[0011] Attempting to download the image arch=aarch64 digest="sha256:bbecbb88100ee65497927ed0da247ba15af576a8855004182cf3c87265e25d35" location="https://cloud-images.ubuntu.com/releases/noble/release-20250704/ubuntu-24.04-server-cloudimg-arm64.img" Downloading the image (ubuntu-24.04-server-cloudimg-arm64.img) 579.71 MiB / 579.71 MiB [----------------------------------] 100.00% 10.65 MiB/s INFO[0065] Downloaded the image from "https://cloud-images.ubuntu.com/releases/noble/release-20250704/ubuntu-24.04-server-cloudimg-arm64.img" INFO[0065] Converting "/Users/this.user/.lima/k3s/basedisk" (qcow2) to a raw disk "/Users/this.user/.lima/k3s/diffdisk" 3.50 GiB / 3.50 GiB [---------------------------------------] 100.00% 1.56 GiB/s INFO[0068] Expanding to 100GiB INFO[0068] [hostagent] hostagent socket created at /Users/this.user/.lima/k3s/ha.sock INFO[0068] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/this.user/.lima/k3s/serial.log")
INFO[0069] SSH Local Port: 58096
INFO[0068] [hostagent] Waiting for the essential requirement 1 of 2: "ssh"
INFO[0068] [hostagent] [VZ] - vm state change: running
INFO[0078] [hostagent] Waiting for the essential requirement 1 of 2: "ssh"
INFO[0079] [hostagent] The essential requirement 1 of 2 is satisfied
INFO[0079] [hostagent] Waiting for the essential requirement 2 of 2: "user session is ready for ssh"
INFO[0079] [hostagent] The essential requirement 2 of 2 is satisfied
INFO[0079] [hostagent] Waiting for the optional requirement 1 of 1: "user probe 1/1"
INFO[0079] [hostagent] Guest agent is running
INFO[0079] [hostagent] Not forwarding TCP 127.0.0.53:53
INFO[0079] [hostagent] Not forwarding TCP 127.0.0.54:53
INFO[0079] [hostagent] Not forwarding TCP [::]:22
INFO[0079] [hostagent] Not forwarding UDP 127.0.0.54:53
INFO[0079] [hostagent] Not forwarding UDP 127.0.0.53:53
INFO[0079] [hostagent] Not forwarding UDP 192.168.5.15:68
INFO[0088] [hostagent] Forwarding TCP from 127.0.0.1:10010 to 127.0.0.1:10010
INFO[0088] [hostagent] Forwarding TCP from [::]:6443 to 127.0.0.1:6443
INFO[0091] [hostagent] Forwarding TCP from 127.0.0.1:6444 to 127.0.0.1:6444
INFO[0091] [hostagent] The optional requirement 1 of 1 is satisfied
INFO[0091] [hostagent] Waiting for the guest agent to be running
INFO[0091] [hostagent] Waiting for the final requirement 1 of 1: "boot scripts must have finished"
INFO[0094] [hostagent] Forwarding TCP from 127.0.0.1:10256 to 127.0.0.1:10256
INFO[0094] [hostagent] Forwarding TCP from 127.0.0.1:10257 to 127.0.0.1:10257
INFO[0094] [hostagent] Forwarding TCP from 127.0.0.1:10248 to 127.0.0.1:10248
INFO[0094] [hostagent] Forwarding TCP from 127.0.0.1:10249 to 127.0.0.1:10249
INFO[0094] [hostagent] Forwarding TCP from [::]:10250 to 127.0.0.1:10250
INFO[0094] [hostagent] The final requirement 1 of 1 is satisfied
INFO[0094] [hostagent] Copying config from /etc/rancher/k3s/k3s.yaml to /Users/this.user/.lima/k3s/copied-from-guest/kubeconfig.yaml
INFO[0095] READY. Run limactl shell k3s to open the shell.
INFO[0095] Message from the instance "k3s":
To run kubectl on the host (assumes kubectl is installed), run the following commands:
export KUBECONFIG="/Users/this.user/.lima/k3s/copied-from-guest/kubeconfig.yaml"
Sanirim artik k3s ile diger calisacagim k8s clusterlari arasinda gecis yapabilmek icin script hazirlamam gerekecek.