use-k3s

use-k3s is a skill for Claude Code from slicervm/agent-skills. It costs 82 tokens per session (1,663 once invoked), scanned C, original, MIT.

A guide for installing and checking K3s, a lightweight Kubernetes distribution, as a single-node cluster inside a local Slicer virtual machine. It configures `kubectl` and verifies that a basic Nginx service can receive local traffic.

In plain words
What is it for?
Creating a local K3s cluster, installing `k3sup` and `kubectl`, merging the Kubernetes configuration, and testing a service through `127.0.0.1`.
Why use it?
It documents the setup details needed to get a working local Kubernetes environment without manually piecing together the cluster, configuration, and smoke test.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Creating a local K3s cluster, installing k3sup and kubectl, merging the Kubernetes configuration, and testing a service through 127.0.0.1.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/slicervm/agent-skills/use-k3s
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add slicervm/agent-skills --skill use-k3s
Clone the repo
git clone --depth 1 https://github.com/slicervm/agent-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for use-k3s

README.md
[![agentmods](https://agentmods.dev/badge/skills/slicervm/agent-skills/use-k3s/github.svg)](https://agentmods.dev/skills/slicervm/agent-skills/use-k3s)
Your own site
<a href="https://agentmods.dev/skills/slicervm/agent-skills/use-k3s"><img src="https://agentmods.dev/badge/skills/slicervm/agent-skills/use-k3s/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for use-k3s

Your own site · 80×15
<a href="https://agentmods.dev/skills/slicervm/agent-skills/use-k3s"><img src="https://agentmods.dev/badge/skills/slicervm/agent-skills/use-k3s.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,663 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.01663
Opus 5 $0.00041 $0.00831
Sonnet 5 $0.00016 $0.00333
Haiku 4.5 $0.00008 $0.00166

Measured 9d ago against content hash dcf893897d11, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

use-k3s scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

description: Install and verify a single-node K3s cluster on a local/Slicer VM with k3sup — no traefik, svclb LoadBalancer, kubeconfig merged into ~/.kube/config, nginx smoke test via 127.0.0.1. Use when asked to install

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

nginx LoadBalancer curl at the end.
skills/use-k3s/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use K3s — single-node local cluster with a working LoadBalancer

Verified end-to-end on a Slicer VM (Ubuntu 22.04, k3s v1.36.3+k3s1, k3sup 0.13.12, 2026-08-15). This is the in-VM, single-node, no-ingress flow: kubectl works out of the box, no traefik, and a bare nginx pod is exposed as a LoadBalancer reachable at 127.0.0.1. For remote/HA flows (k3sup over SSH, k3sup-pro), see the use-k3sup skill instead.

Golden rules

  • Install tools with arkade in one callarkade get k3sup kubectl (multiple tools download in parallel). Do NOT chain arkade get k3sup && arkade get kubectl; that serialises the downloads. On Slicer VMs arkade is preinstalled; binaries land in ~/.arkade/bin (ensure it is on PATH). See the use-slicer skill's arkade.md reference for the full pattern.
  • Disable only traefik: --k3s-extra-args '--disable traefik'. Do NOT use --no-extras — it disables both traefik and servicelb (svclb), and svclb is what makes --type=LoadBalancer work.
  • Merge the kubeconfig into ~/.kube/config with k3sup get-config --local --merge so kubectl works with no KUBECONFIG export.
  • Verify with k3sup ready (it exists for a reason — it polls until the control plane and default service account are actually usable), then kubectl get nodes.
  • Trust nothing self-reported: prove the cluster serves traffic with the nginx LoadBalancer curl at the end.
  • Wait by polling readiness, not by blind sleep. A fixed sleep 8 (or a long inline sleep) is dead time — and in a recording it reads as the agent "stuck". Poll at 1s and break the instant the pod/svc is ready (see the smoke test below). Same idea as k3sup ready: check, don't guess.

The verified sequence

# 1. Tools (arkade is preinstalled on Slicer VMs) — one call, parallel
export PATH=$PATH:~/.arkade/bin
arkade get k3sup kubectl

# 2. Install single-node K3s, no traefik, svclb kept
k3sup install --local --k3s-extra-args '--disable traefik'

# 3. Kubeconfig: merge into ~/.kube/config (kubectl works out of the box)
mkdir -p ~/.kube
k3sup get-config --local --merge --local-path ~/.kube/config

# 4. Wait for the cluster to be actually ready
k3sup ready

# 5. Verify
kubectl get nodes -o wide        # e2e-N  Ready  control-plane
kubectl get pods -A              # coredns, local-path-provisioner, metrics-server
                                 # (no traefik pods; svclb pod appears on first LB svc)

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 115 lines · 82 tokens per session scan C dcf893897d11

Subscribe to this mod's changes

use-k3s is a skill published in the GitHub repository slicervm/agent-skills (5 stars, last pushed 4d ago), licensed MIT. It adds 82 tokens to every session and 1,663 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 2 findings (reaches for credential files, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

compute-env-setup

Set up a reproducible Feynman compute environment for research jobs. Use when a task needs Python/R packages, GPU libraries, containers, Modal, SSH, caches, or managed model runtime setup.

companion-inc/feynman · 45 tokens

securing-kubernetes-on-cloud

This skill covers hardening managed Kubernetes clusters on EKS, AKS, and GKE by implementing Pod Security Standards, network policies, workload identity, RBAC scoping, image admission controls, and runtime security monitoring. It addresses cloud-specific security features including IRSA for EKS, Workload Identity for…

xalgorix/xalgorix · 80 tokens

detecting-privilege-escalation-in-kubernetes-pods

Detect and prevent privilege escalation in Kubernetes pods by monitoring security contexts, capabilities, and syscall patterns with Falco and OPA policies.

xalgorix/xalgorix · 40 tokens

implementing-rbac-hardening-for-kubernetes

Harden Kubernetes Role-Based Access Control by implementing least-privilege policies, auditing role bindings, eliminating cluster-admin sprawl, and integrating external identity providers.

xalgorix/xalgorix · 41 tokens

docker-socket-mount

Docker / containerd socket mounted into a container → host RCE. Common in CI runners, GitOps controllers (ArgoCD, Flux), and 'Docker-in-Docker' setups. Single-command escape via docker run --rm --privileged -v /:/host alpine chroot /host.

PurpleAILAB/Decepticon · 67 tokens