rke2-operations

Operate self-hosted RKE2 clusters covering access, debugging, metrics, add-ons, and GPU setup.

2|Updated Jul 22, 2026
One-click install
npx skills add https://github.com/dydx/rke2-skills --skill rke2-operations-dydx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rke2-operations
Source: https://github.com/dydx/rke2-skills/tree/main/skills/rke2-operations
Command: npx skills add https://github.com/dydx/rke2-skills --skill rke2-operations-dydx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running day-2 operations on self-hosted RKE2 clusters requires knowing RKE2-specific paths, socket locations, and controller behaviors that differ from stock Kubernetes, and getting them wrong causes TLS failures, empty container listings, or broken GPU workloads. ## Core Features & Use Cases - Cluster Access and Tooling: Locate the admin kubeconfig at /etc/rancher/rke2/rke2.yaml, configure tls-san entries for external access, and use bundled kubectl, crictl, and ctr against the k3s-style containerd socket. - Debugging and Metrics: Find logs for rke2-server, rke2-agent, containerd, kubelet, and static control-plane pods, and enable supervisor metrics on port 9345 including certificate expiration and loadbalancer health gauges. - Add-on and GPU Management: Deploy applications via the manifests directory, HelmChart and HelmChartConfig CRDs, and run the NVIDIA GPU operator with the correct containerd socket configuration across operator versions. - Use Case: A platform engineer joins a new agent node, notices pods stuck pending, uses crictl with the correct socket to inspect containers, checks kubelet logs, and resolves a Canal IP exhaustion issue by clearing stale lock files. ## Quick Start Ask the assistant to show how to access an RKE2 cluster with kubectl and inspect running containers using the bundled crictl binary.

Frequently Asked Questions about rke2-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access an RKE2 cluster with kubectl?▼

RKE2 writes an admin kubeconfig to /etc/rancher/rke2/rke2.yaml on server nodes. Set KUBECONFIG to that path or pass it with --kubeconfig, and for external access copy the file to your workstation and replace 127.0.0.1 in the server field with a reachable IP or hostname listed in tls-san.

Why does crictl show no containers on RKE2?▼

RKE2's embedded containerd listens on /run/k3s/containerd/containerd.sock, not the default socket. Set CONTAINER_RUNTIME_ENDPOINT to that path or use CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml, and for ctr also pass --namespace k8s.io.

How do I deploy Helm charts on RKE2 without helm CLI?▼

Create a HelmChart custom resource (helm.cattle.io/v1) in /var/lib/rancher/rke2/server/manifests and the embedded helm-controller installs it via a job pod. Use HelmChartConfig with the same name and namespace to override values of packaged charts like rke2-coredns.

Does the NVIDIA GPU operator work on RKE2?▼

Yes, but the toolkit must point at RKE2's containerd socket /run/k3s/containerd/containerd.sock for operator v25.x. With v26.3.x and NRI-enabled containerd 2.1 in recent RKE2 releases, no containerd configuration change is needed, though the operator restarts containerd and RKE2.

Why does Canal run out of IP addresses on RKE2?▼

Two common causes are a missing iptables binary on the host causing hostPort pod creation retries that leak one IP per attempt, and stale IP lock files in /var/lib/cni/networks/k8s-pod-network after containerd loses track of pods. Install iptables or remove stale lock files and restart the node.

Where are RKE2 logs located for troubleshooting?▼

Use journalctl -u rke2-server or rke2-agent for the main services, /var/lib/rancher/rke2/agent/logs/kubelet.log for kubelet, and /var/log/pods for pod logs. Control-plane components run as static pods in kube-system, so kubectl logs works for them too.