{
  "manifest_version": "1",
  "slug": "k3s",
  "title": "k3s",
  "headline": "Run Kubernetes with k3s",
  "description": "Run single-node Kubernetes (k3s) on an exe.dev VM: kubectl over SSH, Traefik behind exe.dev login, persistent volumes, Helm, and a cluster per PR.",
  "category": "dev-tools",
  "tags": [
    "kubernetes",
    "k3s",
    "k8s",
    "kubectl",
    "helm",
    "traefik",
    "ingress",
    "single node kubernetes",
    "minikube alternative"
  ],
  "url": "https://exe.dev/deploy/k3s",
  "markdown_url": "https://exe-staging.dev/deploy/k3s.md",
  "upstream": {
    "website": "https://k3s.io",
    "source": "https://github.com/k3s-io/k3s",
    "docs": "https://docs.k3s.io",
    "license": "Apache-2.0"
  },
  "example_vm_name": "my-k3s",
  "time": "10 minutes",
  "stack": [
    {
      "name": "k3s v1.37.2+k3s1",
      "detail": "Kubernetes 1.37 with containerd, flannel, CoreDNS and a SQLite datastore, under systemd",
      "data": "/var/lib/rancher/k3s"
    },
    {
      "name": "Traefik 3",
      "detail": "k3s's bundled ingress controller, moved to port 8000 for exe.dev's HTTPS proxy",
      "port": 8000
    },
    {
      "name": "local-path provisioner",
      "detail": "PersistentVolumes as directories on the VM's disk",
      "data": "/var/lib/rancher/k3s/storage"
    },
    {
      "name": "Helm 4.3",
      "detail": "The Kubernetes package manager"
    },
    {
      "name": "Nightly backup",
      "detail": "Cluster state, token and volumes; 14 nights kept",
      "data": "~/k3s/backups"
    }
  ],
  "access": [
    {
      "url": "https://my-k3s.exe.xyz/",
      "who": "private",
      "what": "Traefik, serving your Ingress routes (a sample app to start)"
    },
    {
      "url": "https://my-k3s.exe.xyz:9898/",
      "who": "private",
      "what": "Any LoadBalancer Service on a port from 3000 to 9999"
    },
    {
      "url": "ssh -L 16443:localhost:6443 my-k3s.exe.xyz",
      "who": "private",
      "what": "The Kubernetes API, for kubectl on your computer, over SSH only"
    }
  ],
  "delivers": [
    "k3s v1.37.2+k3s1 running as a systemd service, with pod and service networks that don't clash with the VM's own.",
    "kubectl and Helm working for `exedev` without sudo.",
    "Traefik answering on port 8000, with a sample app at the VM's private URL that shows your exe.dev email.",
    "PersistentVolumeClaims backed by the VM's disk through the local-path provisioner.",
    "Nightly backups of the cluster state, server token and volumes, with the first one checked."
  ],
  "owner_runs_after": [
    "ssh my-k3s.exe.xyz cat /etc/rancher/k3s/k3s.yaml | sed 's/:6443/:16443/' \u003e my-k3s.kubeconfig   # then KUBECONFIG=my-k3s.kubeconfig",
    "ssh -N -L 16443:localhost:6443 my-k3s.exe.xyz"
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe-staging.dev/new?prompt=Set%20up%20k3s%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe-staging.dev%2Fdeploy%2Fk3s.md%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-k3s.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-k3s.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20k3s%20v1.37.2%2Bk3s1%20running%20as%20a%20systemd%20service%2C%20with%20pod%20and%20service%20networks%20that%20don%27t%20clash%20with%20the%20VM%27s%20own.%0A-%20kubectl%20and%20Helm%20working%20for%20%60exedev%60%20without%20sudo.%0A-%20Traefik%20answering%20on%20port%208000%2C%20with%20a%20sample%20app%20at%20the%20VM%27s%20private%20URL%20that%20shows%20your%20exe.dev%20email.%0A-%20PersistentVolumeClaims%20backed%20by%20the%20VM%27s%20disk%20through%20the%20local-path%20provisioner.%0A-%20Nightly%20backups%20of%20the%20cluster%20state%2C%20server%20token%20and%20volumes%2C%20with%20the%20first%20one%20checked.%0A%0ARead%20the%20whole%20recipe%2C%20including%20the%20closed%20details%2C%20and%20follow%0A%22Install%20by%20hand%22%20from%20top%20to%20bottom%3A%20the%20k3s%20config%2C%20the%20Traefik%0Aconfig%2C%20k3s%20itself%2C%20Helm%2C%20the%20sample%20app%2C%20and%20the%20backup%20timer.%20Use%20the%0Apinned%20versions%20as%20written.%20The%20walkthrough%20sections%20are%20for%20the%20owner%0Aafterwards%3A%20don%27t%20install%20podinfo%20or%20other%20charts%2C%20add%20nodes%2C%20set%20up%0ATailscale%2C%20copy%20the%20VM%2C%20or%20run%20the%20Restore%2C%20Update%20or%20Uninstall%0Ainstructions%20during%20setup.%20Leave%20the%20VM%20private%20and%20do%20not%20reboot.%0ACheck%20%60kubectl%20get%20nodes%60%20shows%20one%20Ready%20node%20named%20k3s%2C%20every%20pod%20in%0Akube-system%20is%20Running%20or%20Completed%2C%20and%20%60curl%20localhost%3A8000%60%20returns%0Athe%20whoami%20output.%20Finish%20with%20the%20VM%27s%20private%20URL%20and%20the%20two%0Acommands%20that%20give%20the%20owner%20kubectl%20on%20their%20own%20computer.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open%20and%20these%20commands%2C%20which%20only%20I%20can%20run%2C%20from%20my%20own%20computer%20%28with%20this%20VM%27s%20name%20in%20them%29%3A%0A%20%20ssh%20my-k3s.exe.xyz%20cat%20%2Fetc%2Francher%2Fk3s%2Fk3s.yaml%20%7C%20sed%20%27s%2F%3A6443%2F%3A16443%2F%27%20%3E%20my-k3s.kubeconfig%20%20%20%23%20then%20KUBECONFIG%3Dmy-k3s.kubeconfig%0A%20%20ssh%20-N%20-L%2016443%3Alocalhost%3A6443%20my-k3s.exe.xyz%0A",
    "terminal": "curl -fsSL https://exe-staging.dev/deploy/k3s/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "Set up k3s on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/k3s.md from top to bottom.\n\nThe recipe's example VM name is my-k3s. This VM's name is the output of `hostname`: use it wherever the recipe writes my-k3s. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- k3s v1.37.2+k3s1 running as a systemd service, with pod and service networks that don't clash with the VM's own.\n- kubectl and Helm working for `exedev` without sudo.\n- Traefik answering on port 8000, with a sample app at the VM's private URL that shows your exe.dev email.\n- PersistentVolumeClaims backed by the VM's disk through the local-path provisioner.\n- Nightly backups of the cluster state, server token and volumes, with the first one checked.\n\nRead the whole recipe, including the closed details, and follow\n\"Install by hand\" from top to bottom: the k3s config, the Traefik\nconfig, k3s itself, Helm, the sample app, and the backup timer. Use the\npinned versions as written. The walkthrough sections are for the owner\nafterwards: don't install podinfo or other charts, add nodes, set up\nTailscale, copy the VM, or run the Restore, Update or Uninstall\ninstructions during setup. Leave the VM private and do not reboot.\nCheck `kubectl get nodes` shows one Ready node named k3s, every pod in\nkube-system is Running or Completed, and `curl localhost:8000` returns\nthe whoami output. Finish with the VM's private URL and the two\ncommands that give the owner kubectl on their own computer.\n\nFinish with the URLs I should open and these commands, which only I can run, from my own computer (with this VM's name in them):\n  ssh my-k3s.exe.xyz cat /etc/rancher/k3s/k3s.yaml | sed 's/:6443/:16443/' \u003e my-k3s.kubeconfig   # then KUBECONFIG=my-k3s.kubeconfig\n  ssh -N -L 16443:localhost:6443 my-k3s.exe.xyz\n",
    "prompt_url": "https://exe-staging.dev/deploy/k3s/prompt.txt"
  },
  "updated": "2026-11-16",
  "verified": "2026-11-16",
  "related": [
    "docker-compose",
    "docker-host",
    "github-actions",
    "ci",
    "postgres",
    "dev-test-prod"
  ],
  "alternatives": [
    "minikube",
    "kind",
    "Docker Desktop Kubernetes",
    "GKE",
    "EKS"
  ]
}
