modified: README.md

This commit is contained in:
2025-12-13 22:42:22 +00:00
parent eb61859994
commit c78e370b6f

View File

@@ -4,8 +4,9 @@ Kubernetes is an opensource platform that automates the deployment, scaling,
- [k3s](#k3s)
- [Install / Setup](#install--setup)
- [Kubernetes DNS](#kubernetes-dns)
- [Services DNS Name](#services-dns-name)
- [misc](#misc)
- [prune old image](#prune-old-image)
- [check system logs](#check-system-logs)
- [kubectl](#kubectl)
- [Get Pod](#get-pod)
- [Pod delete](#pod-delete)
@@ -45,6 +46,38 @@ K3s is a lightweight, certified Kubernetes distribution designed to run in resou
curl -sfL https://get.k3s.io | sh -
```
Install specific version and disable:
- flannel (alternative example calico)
- servicelb (alternative example metallb)
- traefik (then install using helm chart or custom manifests for better control)
```bash
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.33.3+k3s1 INSTALL_K3S_EXEC="--flannel-backend=none \
--disable-network-policy \
--cluster-cidr=10.42.0.0/16 \
--disable=servicelb \
--disable=traefik" \
sh -
```
### misc
#### prune old image
prune old images, execute on kubernetes host node
```bash
crictl rmi --prune
```
#### check system logs
```bash
sudo journalctl -u k3s-agent --since "1h ago" --reverse --no-pager | more
sudo journalctl -u k3s-agent --since "1 hour ago" --reverse | grep -i "Starting k3s-agent.service"
sudo journalctl -u k3s --reverse | grep -i "Starting k3s.service"
## Kubernetes DNS
**Automatic DNS Records:** Kubernetes automatically creates DNS entries for Services and Pods. This allows workloads to connect using predictable names instead of IPs, which may change.