k3s 성숙도 점검 7.2·7.3·7.5절과 8절 결정 5(재시작은 한 번)를 넣는다. 소유자가 sudo로 한 번 돌리는 스크립트와 그 스크립트가 까는 파일이다.
kubelet drop-in: 예약(system 1 CPU·2Gi, kube 0.5 CPU·1Gi), 메모리 축출(hard 500Mi, soft 1Gi/1분), graceful node shutdown(60초, critical 20초). 지금은 메모리 축출 문턱이 없어 커널 OOM killer가 고르고, Postgres oom_score_adj가 985다.
API 서버 drop-in: 감사 로그(Metadata 수준, 30일·10개·100MB)와 PodSecurity 기본값 설정 파일(라벨 없는 namespace에 enforce baseline, warn·audit restricted, kube-system 예외).
local-path StorageClass 기본 표시 제거(k3s .skip + annotation).
W1의 시간 동기화 drop-in 둘은 파일을 고치지 않고 그 경로에서 읽어 같이 설치한다.
고른 방법과 버린 대안
kubelet 값은 CLI 인자가 아니라 kubelet drop-in 폴더로 넣는다. k3s가 kubelet에 넘기는 것은 --config-dir뿐이라(journal 확인) 기본값과 충돌하지 않는다. evictionHard는 셋을 다 적는다(맵을 정하면 나머지가 0).
API 서버 인자는 kube-apiserver-arg+로 덧붙인다(k3s 문서의 multiple config files 규칙).
protect-kernel-defaults는 뺐다(보고서 7.3에서 권했던 것). CIS가 v1.7에서 이 항목을 뺐고, 필요한 sysctl 중 kernel.panic_on_oops=1은 커널 oops 한 번에 이 이중 부팅 데스크톱을 재부팅시킨다. 11-11 시계 사고가 재부팅에서 시작했다. 이유는 infrastructure/host/k3s/README.md에 있다.
PSA 기본값을 restricted가 아니라 baseline으로 했다. 라벨 없는 namespace(default·kube-public·kube-node-lease)에는 파드가 없고, 플랫폼 namespace는 모두 자기 라벨이 있다.
logind InhibitDelayMaxSec은 직접 바꾸지 않았다. logind 재시작은 데스크톱 세션을 끊을 수 있고, kubelet이 모자라면 스스로 늘린다.
위험과 영향
이 PR은 아무것도 설치하지 않는다. --execute는 소유자 sudo 단계이고 실행하지 않았다.
재시작 중 1~2분 API가 멈춘다. k3s는 KillMode=process라 컨테이너는 계속 돈다.
스크립트는 W1의 host 파일이 main에 없으면 MISSING …(W1)로 멈춘다. W1 PR 병합 뒤에 돌린다.
실패하면 백업한 파일을 되돌리고 k3s를 다시 재시작한다. 백업에는 datastore sqlite3 .backup 사본과 token이 들어간다(root 0600, /var/backups/platform-k3s-restart-bundle/<시각>/, 같은 SSD라 재해 복구용이 아니라 이 변경의 되돌리기용).
호스트 종료가 최대 60초 늦어진다(graceful shutdown).
Allocatable이 메모리 약 3.5Gi 줄어든다. 지금 파드 requests 합은 11Gi(노드 32Gi)다.
검증
desktop, 일반 사용자.
$ bash scripts/bootstrap/apply-k3s-restart-bundle.sh --check # main + 이 브랜치(W1 파일 없음)
MISSING infrastructure/host/systemd/k3s.service.d/10-after-time-sync.conf (W1)
MISSING infrastructure/host/systemd/systemd-time-wait-sync.service.d/10-timeout.conf (W1) (exit 1)
$ bash scripts/bootstrap/apply-k3s-restart-bundle.sh --check # W1 파일을 얹은 사본
bundle files parse and keep their invariants
== plan ... (설치 6, .skip, logs 폴더, time-wait-sync enable, 재시작 1)
CHECK ONLY: nothing changed (exit 0)
$ bash scripts/bootstrap/apply-k3s-restart-bundle.sh --execute # root 아님
ERROR: --execute needs root (sudo)
--execute의 설치·재시작·되돌리기 경로는 돌리지 않았다(root·운영 재시작).
리뷰어가 볼 곳
scripts/bootstrap/apply-k3s-restart-bundle.sh: rollback과 trap ERR가 걸리는 범위, verify 단계.
docs/reviews/2026-11-11-k3s-maturity-review.md A3·A9·A10·7.2·7.3·7.5, 8절 결정 5
W1 infrastructure/host/README.md 2단계(시간 동기화)
## 무엇을, 왜
k3s 성숙도 점검 7.2·7.3·7.5절과 8절 결정 5(재시작은 한 번)를 넣는다. 소유자가 sudo로 한 번 돌리는 스크립트와 그 스크립트가 까는 파일이다.
- kubelet drop-in: 예약(system 1 CPU·2Gi, kube 0.5 CPU·1Gi), 메모리 축출(hard 500Mi, soft 1Gi/1분), graceful node shutdown(60초, critical 20초). 지금은 메모리 축출 문턱이 없어 커널 OOM killer가 고르고, Postgres `oom_score_adj`가 985다.
- API 서버 drop-in: 감사 로그(Metadata 수준, 30일·10개·100MB)와 PodSecurity 기본값 설정 파일(라벨 없는 namespace에 enforce baseline, warn·audit restricted, `kube-system` 예외).
- local-path StorageClass 기본 표시 제거(k3s `.skip` + annotation).
- W1의 시간 동기화 drop-in 둘은 파일을 고치지 않고 그 경로에서 읽어 같이 설치한다.
## 고른 방법과 버린 대안
- kubelet 값은 CLI 인자가 아니라 kubelet drop-in 폴더로 넣는다. k3s가 kubelet에 넘기는 것은 `--config-dir`뿐이라(journal 확인) 기본값과 충돌하지 않는다. `evictionHard`는 셋을 다 적는다(맵을 정하면 나머지가 0).
- API 서버 인자는 `kube-apiserver-arg+`로 덧붙인다(k3s 문서의 multiple config files 규칙).
- **`protect-kernel-defaults`는 뺐다**(보고서 7.3에서 권했던 것). CIS가 v1.7에서 이 항목을 뺐고, 필요한 sysctl 중 `kernel.panic_on_oops=1`은 커널 oops 한 번에 이 이중 부팅 데스크톱을 재부팅시킨다. 11-11 시계 사고가 재부팅에서 시작했다. 이유는 `infrastructure/host/k3s/README.md`에 있다.
- PSA 기본값을 `restricted`가 아니라 `baseline`으로 했다. 라벨 없는 namespace(`default`·`kube-public`·`kube-node-lease`)에는 파드가 없고, 플랫폼 namespace는 모두 자기 라벨이 있다.
- logind `InhibitDelayMaxSec`은 직접 바꾸지 않았다. logind 재시작은 데스크톱 세션을 끊을 수 있고, kubelet이 모자라면 스스로 늘린다.
## 위험과 영향
- 이 PR은 아무것도 설치하지 않는다. `--execute`는 소유자 sudo 단계이고 실행하지 않았다.
- 재시작 중 1~2분 API가 멈춘다. k3s는 `KillMode=process`라 컨테이너는 계속 돈다.
- 스크립트는 W1의 host 파일이 main에 없으면 `MISSING …(W1)`로 멈춘다. W1 PR 병합 뒤에 돌린다.
- 실패하면 백업한 파일을 되돌리고 k3s를 다시 재시작한다. 백업에는 datastore `sqlite3 .backup` 사본과 `token`이 들어간다(root 0600, `/var/backups/platform-k3s-restart-bundle/<시각>/`, 같은 SSD라 재해 복구용이 아니라 이 변경의 되돌리기용).
- 호스트 종료가 최대 60초 늦어진다(graceful shutdown).
- Allocatable이 메모리 약 3.5Gi 줄어든다. 지금 파드 requests 합은 11Gi(노드 32Gi)다.
## 검증
desktop, 일반 사용자.
```text
$ bash scripts/bootstrap/apply-k3s-restart-bundle.sh --check # main + 이 브랜치(W1 파일 없음)
MISSING infrastructure/host/systemd/k3s.service.d/10-after-time-sync.conf (W1)
MISSING infrastructure/host/systemd/systemd-time-wait-sync.service.d/10-timeout.conf (W1) (exit 1)
$ bash scripts/bootstrap/apply-k3s-restart-bundle.sh --check # W1 파일을 얹은 사본
bundle files parse and keep their invariants
== plan ... (설치 6, .skip, logs 폴더, time-wait-sync enable, 재시작 1)
CHECK ONLY: nothing changed (exit 0)
$ bash scripts/bootstrap/apply-k3s-restart-bundle.sh --execute # root 아님
ERROR: --execute needs root (sudo)
```
- `--execute`의 설치·재시작·되돌리기 경로는 돌리지 않았다(root·운영 재시작).
## 리뷰어가 볼 곳
- `scripts/bootstrap/apply-k3s-restart-bundle.sh`: `rollback`과 `trap ERR`가 걸리는 범위, verify 단계.
- `infrastructure/host/k3s/kubelet.conf.d/50-platform-resources.conf`: 예약 값.
- `infrastructure/host/k3s/README.md` 「넣지 않은 것」.
## 관련
- `docs/reviews/2026-11-11-k3s-maturity-review.md` A3·A9·A10·7.2·7.3·7.5, 8절 결정 5
- W1 `infrastructure/host/README.md` 2단계(시간 동기화)
The kubelet has no memory eviction threshold and no reservations, so
under memory pressure the kernel OOM killer picks a victim and
Postgres (oom_score_adj 985) is near the front. The API server writes
no audit log. Namespaces without labels have no Pod Security level, and
graceful node shutdown is off.
Add the files for one k3s restart: a kubelet drop-in (system 1 CPU/2Gi,
kube 0.5 CPU/1Gi, hard eviction memory 500Mi plus the two k3s disk
defaults, soft eviction 1Gi for 1m, shutdown 60s/20s), an API server
drop-in that appends the audit and admission-config flags, a Metadata
audit policy and a cluster Pod Security default (baseline, warn and
audit restricted, kube-system exempt).
Rejected: protect-kernel-defaults, recommended in review 7.3. CIS
dropped it in v1.7, and the sysctls it requires include
kernel.panic_on_oops=1, which reboots this dual-boot desktop on any
kernel oops; a reboot started the 2026-11-11 clock incident. The README
records the reason.
Risk: nothing is installed by this commit. The kubelet merges the
drop-in after k3s's 00-k3s-defaults.conf (k3s passes only --config-dir);
evictionHard lists all three keys because setting the map zeroes the
others.
Verification: the apply script's --check parses every file and asserts
the invariants (next commit).
The restart bundle needs root, touches k3s, kubelet and systemd files,
and must not leave the cluster half-configured. The W1 time-sync
drop-ins need a restart window too.
apply-k3s-restart-bundle.sh --check parses the files and prints the
install plan without root. --execute checks the cluster is Ready,
backs up every file it replaces plus a sqlite .backup of the datastore
and the token, installs the W6 files and W1's two time-sync drop-ins
as they are, enables systemd-time-wait-sync, restarts k3s once with
--no-block (the unit has TimeoutStartSec=0), then verifies the kubelet
configz values, the audit log, that the default namespace rejects a
privileged pod, three health URLs and the time-sync unit. Any failure
restores the backup and restarts again. Last, it creates the
local-storage .skip file and clears the local-path default annotation.
Risk: --execute was not run (owner sudo step). The API is unavailable
for one to two minutes; containers keep running (KillMode=process). The
script refuses to run until W1's host files are on main.
Verification (desktop, non-root):
- --check without the W1 files: MISSING ... (W1), exit 1.
- --check with the W1 files overlaid: parse and invariants pass, plan
printed, exit 0.
- --execute as non-root: "--execute needs root (sudo)".
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
무엇을, 왜
k3s 성숙도 점검 7.2·7.3·7.5절과 8절 결정 5(재시작은 한 번)를 넣는다. 소유자가 sudo로 한 번 돌리는 스크립트와 그 스크립트가 까는 파일이다.
oom_score_adj가 985다.kube-system예외)..skip+ annotation).고른 방법과 버린 대안
--config-dir뿐이라(journal 확인) 기본값과 충돌하지 않는다.evictionHard는 셋을 다 적는다(맵을 정하면 나머지가 0).kube-apiserver-arg+로 덧붙인다(k3s 문서의 multiple config files 규칙).protect-kernel-defaults는 뺐다(보고서 7.3에서 권했던 것). CIS가 v1.7에서 이 항목을 뺐고, 필요한 sysctl 중kernel.panic_on_oops=1은 커널 oops 한 번에 이 이중 부팅 데스크톱을 재부팅시킨다. 11-11 시계 사고가 재부팅에서 시작했다. 이유는infrastructure/host/k3s/README.md에 있다.restricted가 아니라baseline으로 했다. 라벨 없는 namespace(default·kube-public·kube-node-lease)에는 파드가 없고, 플랫폼 namespace는 모두 자기 라벨이 있다.InhibitDelayMaxSec은 직접 바꾸지 않았다. logind 재시작은 데스크톱 세션을 끊을 수 있고, kubelet이 모자라면 스스로 늘린다.위험과 영향
--execute는 소유자 sudo 단계이고 실행하지 않았다.KillMode=process라 컨테이너는 계속 돈다.MISSING …(W1)로 멈춘다. W1 PR 병합 뒤에 돌린다.sqlite3 .backup사본과token이 들어간다(root 0600,/var/backups/platform-k3s-restart-bundle/<시각>/, 같은 SSD라 재해 복구용이 아니라 이 변경의 되돌리기용).검증
desktop, 일반 사용자.
--execute의 설치·재시작·되돌리기 경로는 돌리지 않았다(root·운영 재시작).리뷰어가 볼 곳
scripts/bootstrap/apply-k3s-restart-bundle.sh:rollback과trap ERR가 걸리는 범위, verify 단계.infrastructure/host/k3s/kubelet.conf.d/50-platform-resources.conf: 예약 값.infrastructure/host/k3s/README.md「넣지 않은 것」.관련
docs/reviews/2026-11-11-k3s-maturity-review.mdA3·A9·A10·7.2·7.3·7.5, 8절 결정 5infrastructure/host/README.md2단계(시간 동기화)