modified: README.md
new file: manifests/alpine-deployment.yaml new file: manifests/debian-deployment.yaml
This commit is contained in:
33
README.md
33
README.md
@@ -57,6 +57,7 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
||||
- [Failed unmounting var-lib-rancher.mount on reboot](#failed-unmounting-var-lib-ranchermount-on-reboot)
|
||||
- [klipper-lb](#klipper-lb)
|
||||
- [troubleshooting](#troubleshooting)
|
||||
- [Containerd state](#containerd-state)
|
||||
- [host cli](#host-cli)
|
||||
- [host cli - check port usage](#host-cli---check-port-usage)
|
||||
- [kill all connections](#kill-all-connections)
|
||||
@@ -786,6 +787,38 @@ rm -rf /var/lib/rancher/k3s/agent/etc/klipper-lb
|
||||
systemctl restart k3s-agent
|
||||
```
|
||||
|
||||
### Containerd state
|
||||
|
||||
This procedure simulates a fresh node joining the cluster.
|
||||
It deletes all containerd runtime state but does not remove the node from the cluster.
|
||||
|
||||
1. Stop k3s (server or agent)
|
||||
1. Delete containerd state
|
||||
|
||||
```bash
|
||||
sudo rm -rf /var/lib/rancher/k3s/agent/containerd
|
||||
sudo rm -rf /var/lib/containerd
|
||||
```
|
||||
|
||||
1. Start k3s
|
||||
|
||||
**What this does:**
|
||||
|
||||
- Removes all images, snapshots, and container metadata
|
||||
- Forces k3s to repull every image through CRI → mirrors → Harbor
|
||||
- Simulates a fresh node rebuild
|
||||
- Node identity, certificates, and cluster membership remain intact
|
||||
- Workloads are rescheduled normally
|
||||
- This is the correct method to validate offline rebuild capability and ensure Harbor mirrors are complete.
|
||||
|
||||
If all container images are provided locally (Example: through Harbor proxy caches), then the entire containerd image store becomes fully ephemeral.
|
||||
This means:
|
||||
|
||||
- /var/lib/rancher/k3s/agent/containerd
|
||||
- /var/lib/containerd
|
||||
|
||||
contain no unique or irreplaceable data. so it can be ignored on backups.
|
||||
|
||||
## host cli
|
||||
|
||||
### host cli - check port usage
|
||||
|
||||
10
manifests/alpine-deployment.yaml
Normal file
10
manifests/alpine-deployment.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: alpine
|
||||
spec:
|
||||
containers:
|
||||
- name: alpine
|
||||
image: docker.io/library/alpine:latest
|
||||
command: ["sh", "-c", "echo OK && sleep 3600"]
|
||||
restartPolicy: Never
|
||||
20
manifests/debian-deployment.yaml
Normal file
20
manifests/debian-deployment.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: debian
|
||||
labels:
|
||||
app: debian
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: debian
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: debian
|
||||
spec:
|
||||
containers:
|
||||
- name: debian
|
||||
image: debian:latest
|
||||
command: ["sleep", "infinity"]
|
||||
Reference in New Issue
Block a user