/kubernetes-platform-skills:lightweight-kubernetes-k3sfrom kubernetes-platform-skills
Guides deploying K3s for edge, on-prem, and development Kubernetes — single-binary install, datastore selection (SQLite vs etcd vs external DB), and sizing tradeoffs for resource-constrained nodes.
Ships in kubernetes-platform-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
K3s packages a CNCF-conformant Kubernetes distribution into a single binary under 100MB, with sane defaults (embedded containerd, an embedded CNI, an embedded Ingress controller, and a lightweight datastore option) that make it practical to run on resource-constrained edge devices, small on-prem VMs, CI ephemeral clusters, and local development — contexts where a full kubeadm/managed-cluster install is either infeasible or excessive. The most consequential decision is the datastore: the default embedded SQLite is fine for single-server clusters but has no HA story, while embedded etcd (or an external SQL database) is required for multi-server HA — picking the wrong one for the deployment's actual availability requirement is the most common K3s planning mistake. This skill covers installation, datastore choice, and sizing.
v1.30.4+k3s1 — track upstream Kubernetes support windows the same
way as any other distribution).curl access to
get.k3s.io (or a pre-downloaded binary/air-gapped bundle for edge
sites with no internet access — K3s explicitly supports air-gapped
installs via a bundled image tarball).k3s/k3s-agent systemd
service.Decide the datastore/HA model before installing anything:
k3s server --cluster-init on
the first node and join additional server nodes to it; gives
control-plane HA with no external database to operate, at the cost
of etcd's own quorum requirements (need an odd number ≥ 3 server
nodes to tolerate a single node loss).Install a single-server cluster (dev/edge/CI):
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
sudo cat /etc/rancher/k3s/k3s.yaml # kubeconfig for this node
Install an HA cluster with embedded etcd (3 server nodes):
# first server node
curl -sfL https://get.k3s.io | sh -s - server --cluster-init \
--tls-san k3s-lb.internal.example.com
# subsequent server nodes join via a shared token
curl -sfL https://get.k3s.io | sh -s - server \
--server https://k3s-lb.internal.example.com:6443 \
--token <TOKEN_FROM_FIRST_SERVER>
--tls-san must include the load-balanced registration address so
the server's TLS certificate validates for whatever hostname/IP
agents and kubectl actually connect through — a missing SAN entry
here is the most common HA setup failure.
Join agent (worker) nodes:
curl -sfL https://get.k3s.io | K3S_URL=https://k3s-lb.internal.example.com:6443 \
K3S_TOKEN=<TOKEN_FROM_FIRST_SERVER> sh -
Disable bundled components you don't want, since K3s ships opinionated defaults (Traefik as Ingress controller, a local-path storage provisioner, ServiceLB) that may conflict with a deliberately chosen alternative:
curl -sfL https://get.k3s.io | sh -s - server \
--disable traefik --disable servicelb
Disable traefik if standardizing on
ingress-nginx-configuration
instead, and disable the bundled local-path provisioner if a
different CSI/storage backend is required for the workload.
Air-gapped/edge install where the site has no direct internet access:
# on a connected machine: download the binary + air-gap image tarball
# for the target k3s version, then transfer both to the edge device
sudo cp k3s /usr/local/bin/k3s
sudo mkdir -p /var/lib/rancher/k3s/agent/images/
sudo cp k3s-airgap-images-amd64.tar.gz /var/lib/rancher/k3s/agent/images/
INSTALL_K3S_SKIP_DOWNLOAD=true sh install.sh
Back up the datastore regardless of which model is chosen — K3s has a built-in snapshot mechanism for the embedded etcd/SQLite datastore:
k3s etcd-snapshot save --name pre-upgrade-snapshot
k3s etcd-snapshot ls
For an external SQL datastore, back it up through the database's own backup tooling instead — K3s's snapshot command only covers the embedded datastore path.
Size nodes deliberately for the actual workload, not just the K3s floor: start from expected pod count × typical request/limit, add the K3s/OS baseline (roughly 200–500MB RAM, well under 0.5 vCPU idle on a modest edge device, varying by enabled add-ons), and validate under real load rather than assuming the documented minimums include headroom for your workloads.
--tls-san for every registration hostname/IP the cluster will
ever be reached through (including a future load balancer address)
at initial server creation — regenerating server certificates to add
a SAN later is more disruptive than including it up front.etcd-snapshot (or external-datastore backup) before every
K3s version upgrade, not just on a periodic schedule — upgrades are
the highest-risk moment for datastore-level issues./etc/rancher/k3s/config.yaml rather than long CLI
flag strings) so provisioning is reproducible across many
similar-but-not-identical devices.Symptom: A single-server K3s cluster's node goes offline and
every kubectl command starts failing, even though the workload pods
were still technically running fine right before the outage.
Fix: This is expected for a single-server (single control-plane)
topology — there is no HA without multiple server nodes. If the
workload has an actual availability requirement beyond "already-
scheduled pods survive a control-plane blip," move to a 3-node
embedded-etcd or external-datastore HA topology; a single-server
cluster should be treated as dev/edge/non-critical by design, not
patched around after the fact.
Symptom: Joining a second/third server node for HA fails with a
certificate validation or connection error against the registration
address.
Fix: The first server's --tls-san didn't include the
load-balanced/DNS registration address used by the joining nodes.
Regenerate the server's certificates with the correct --tls-san
values (this does require a controlled restart) rather than pointing
joining nodes at a raw IP that happens to work around the mismatch.
Symptom: A workload's Ingress or LoadBalancer Service behaves
unexpectedly differently than an equivalent setup on a full
Kubernetes cluster.
Fix: K3s ships Traefik and ServiceLB by default, which most teams
don't run on their primary clusters — confirm whether the observed
behavior comes from K3s's bundled defaults rather than a general
Kubernetes behavior difference, and disable the bundled component
(--disable traefik/--disable servicelb) if standardizing on a
different Ingress/LB stack.
Symptom: Upgrading K3s corrupts or loses cluster state on an
embedded-datastore node.
Fix: No pre-upgrade etcd-snapshot/datastore backup was taken.
Always snapshot before an upgrade (k3s etcd-snapshot save) and
confirm the snapshot's restorability in a non-production environment
periodically — a snapshot mechanism that's never been test-restored
is not a verified backup.
Symptom: An edge device with severely constrained RAM starts
evicting pods or the K3s agent itself becomes unstable under normal
load.
Fix: The device's total capacity was sized against K3s's
documented minimums without headroom for the actual scheduled
workload's requests/limits plus OS/K3s baseline overhead. Re-size
using real observed usage (kubectl top nodes, k3s check-config)
rather than the bare minimum figures quoted for K3s alone.
Scenario: Stand up a 3-node HA K3s cluster (embedded etcd) for a regional edge site running a handful of lightweight services, with Traefik disabled in favor of ingress-nginx, and a pre-upgrade backup step included in the runbook.
# server-1
curl -sfL https://get.k3s.io | sh -s - server --cluster-init \
--tls-san k3s-edge-lb.internal.example.com \
--disable traefik --disable servicelb
sudo cat /var/lib/rancher/k3s/server/node-token # shared join token
# server-2 and server-3
curl -sfL https://get.k3s.io | sh -s - server \
--server https://k3s-edge-lb.internal.example.com:6443 \
--token <TOKEN_FROM_SERVER_1> \
--disable traefik --disable servicelb
# agent nodes
curl -sfL https://get.k3s.io | \
K3S_URL=https://k3s-edge-lb.internal.example.com:6443 \
K3S_TOKEN=<TOKEN_FROM_SERVER_1> sh -
kubectl get nodes -o wide # 3 control-plane + N agent nodes, all Ready
k3s etcd-snapshot save --name baseline-$(date +%F)
Before the next K3s upgrade:
k3s etcd-snapshot save --name pre-upgrade-$(date +%F)
k3s etcd-snapshot ls
kubectl get nodes confirms all three server nodes report Ready and
are separate failure domains (verify they run on distinct underlying
hosts/hypervisors — etcd quorum tolerance is meaningless if all three
"nodes" share one physical failure point), giving the edge site a
control plane that survives the loss of any single server node.
HelmChart/HelmChartConfig CRDs) for declaratively installing charts at cluster bootstrap time.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin kubernetes-platform-skills35 skills in this plugin
/cert-manager-tls-automationGuides installing and configuring cert-manager for automated TLS certificate issuance and renewal — Issuers vs. ClusterIssuers, ACME/ Let's Encrypt HTTP-01 and DNS-01 challenges, private-CA issuance, and integration with Ingress-nginx and Istio gateways. Use when a user asks to "automate TLS certificates on Kubernetes," "set up cert-manager with Let's Encrypt," "fix a stuck Certificate that won't become Ready," "use DNS-01 for a wildcard cert," "rotate mTLS certs automatically," or "issue certs from an internal CA."
/cni-networking-calico-flannelGuides choosing and installing a Kubernetes CNI plugin — Calico vs. Flannel — including NetworkPolicy enforcement capability differences, BGP vs. VXLAN/overlay data paths, and IP address management (IPAM) tradeoffs. Use when a user asks to "choose a CNI plugin for Kubernetes," "enable NetworkPolicy enforcement," "set up Calico with BGP peering," "install Flannel," "debug pod-to-pod connectivity across nodes," or "migrate from Flannel to Calico."
/complete-kubernetes-deployment-on-aks-from-scratchSequences a complete, end-to-end AKS deployment from a bare Azure subscription to a production-ready cluster serving a first workload — Azure landing zone prerequisites, AKS cluster and node pool provisioning, Azure CNI (with the Calico/Cilium alternative noted), ingress (Application Gateway Ingress Controller vs. ingress-nginx), cert-manager with Azure DNS, conformance validation, a Helm-deployed workload, and a node/cluster health baseline. This is an integration/orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "deploy a Kubernetes cluster on AKS from scratch," "set up a new AKS environment end to end," "build a production AKS cluster from a fresh Azure subscription," or "give me the full sequence to go from nothing to a working AKS cluster."
Other plugins' skills for the same job