=== a7 12 로그인하고 반대 노드에서 갱신한다 ===
200
=== a7 13 ① 토큰을 담고 access token 의 클레임을 편다 ===
{"exp":1789635852,"iat":1789635792,"jti":"onltro:81f8f0e3-06aa-890c-3b2b-bc1080d617bd","iss":"https://auth.hyeonworks.com/realms/master","typ":"Bearer","azp":"admin-cli","sid":"7HNHaJ1RxIKwxI-CUn86vUSe","scope":"profile email
=== a7 13 ② 시각을 남기고 롤링 재시작을 건다 ===
18:04:47 재시작
statefulset.apps/keycloak restarted
Waiting for partitioned roll out to finish: 0 out of 2 new pods have been updated...
Waiting for 1 pods to be ready...
Waiting for 1 pods to be ready...
Waiting for 1 pods to be ready...
Waiting for partitioned roll out to finish: 1 out of 2 new pods have been updated...
Waiting for 1 pods to be ready...
Waiting for 1 pods to be ready...
Waiting for 1 pods to be ready...
partitioned roll out complete: 2 new pods have been updated...
=== a7 13 ③ 롤아웃 뒤 IP 를 다시 잡는다 ===
10.42.1.84 10.42.0.38
=== a7 13 ④ 재시작 전 토큰으로 갱신을 시도한다 ===
{"error":"invalid_grant","error_description":"Session not active"}
400
=== (참고) 재시작 뒤 sessions 캐시 ===
"pod":"keycloak-1"}
"151"]}
"pod":"keycloak-0"}
"0"]}]}}
######## a7 14 ① 을 kc-lab-1 에서 문서 그대로 친 결과
time="2026-09-17T09:04:49Z" level=warning msg="Unable to read /etc/rancher/k3s/k3s.yaml, please start server with --write-kubeconfig-mode or --write-kubeconfig-group to modify kube config permissions"
error: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied
time="2026-09-17T09:04:49Z" level=warning msg="Unable to read /etc/rancher/k3s/k3s.yaml, please start server with --write-kubeconfig-mode or --write-kubeconfig-group to modify kube config permissions"
error: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied
Bad argument `7800'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `57800'
Try `iptables -h' or 'iptables --help' for more information.
Host key verification failed.
Host key verification failed.
09:04:49 차단
remote_exit=0
######## 그 뒤 두 노드의 raw PREROUTING — 규칙이 하나도 안 들어갔다
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
--- kc-lab-2 ---
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
K0=10.42.1.84 K1=10.42.0.38
=== a7 14 ① 양쪽 노드에 raw DROP 을 넣는다 (lab host 에서 두 노드 모두 ssh 한 줄로) ===
18:06:40 차단
=== a7 14 ② 두 노드의 규칙과 카운터를 본다 ===
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       6    --  *      *       0.0.0.0/0            10.42.0.38           tcp dpt:57800
    0     0 DROP       6    --  *      *       0.0.0.0/0            10.42.0.38           tcp dpt:7800
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       6    --  *      *       0.0.0.0/0            10.42.1.84           tcp dpt:57800
    2   116 DROP       6    --  *      *       0.0.0.0/0            10.42.1.84           tcp dpt:7800
=== a7 14 ③ 두 노드가 각각 아는 멤버 수를 본다 ===
  +25초
"pod":"keycloak-1"}
"2"]}
"pod":"keycloak-0"}
"2"]}]}}
  +50초
"pod":"keycloak-1"}
"2"]}
"pod":"keycloak-0"}
"2"]}]}}
  +75초
"pod":"keycloak-1"}
"1"]}
"pod":"keycloak-0"}
"1"]}]}}
  +100초
"pod":"keycloak-1"}
"1"]}
"pod":"keycloak-0"}
"1"]}]}}
  +125초
"pod":"keycloak-1"}
"1"]}
"pod":"keycloak-0"}
"1"]}]}}
=== a7 14 ② 다시 — 카운터가 올라갔나 ===
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   20  1184 DROP       6    --  *      *       0.0.0.0/0            10.42.0.38           tcp dpt:57800
    2   120 DROP       6    --  *      *       0.0.0.0/0            10.42.0.38           tcp dpt:7800
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       6    --  *      *       0.0.0.0/0            10.42.1.84           tcp dpt:57800
   22  4002 DROP       6    --  *      *       0.0.0.0/0            10.42.1.84           tcp dpt:7800
=== a7 14 ④ 디스커버리 테이블의 코디네이터를 센다 ===
       name       |       ip        | coord 
------------------+-----------------+-------
 keycloak-0-41852 | 10.42.1.84:7800 | t
 keycloak-1-65118 | 10.42.0.38:7800 | t
(2 rows)


[exited with code 0]
K0=10.42.1.84 K1=10.42.0.38
=== a7 14 ⑤ 대조군 — 로그인한 노드에서 갱신한다 ===
same-node 200
=== a7 14 ⑥ 시험군 — 새로 로그인해서 반대 노드에서 갱신한다 ===
{"error":"invalid_grant","error_description":"Session not active"}
cross-node 400
=== a7 14 차단을 푼다 (두 노드) ===
18:09:09 해제
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
=== 양쪽 cluster_size 가 2 로 돌아오는가 ===
  +20초
"pod":"keycloak-1"}
"1"]}
"pod":"keycloak-0"}
"1"]}]}}
  +40초
"pod":"keycloak-1"}
"1"]}
"pod":"keycloak-0"}
"1"]}]}}
  +60초
"pod":"keycloak-1"}
"2"]}
"pod":"keycloak-0"}
"2"]}]}}
  둘 다 2

[exited with code 0]
K0=10.42.1.84 K1=10.42.0.38
=== a7 15 ① 로그인만 해서 /tmp/rt 를 채운다 ===
{"exp":1789636190,"iat":1789636130,"jti":"onltro:66c69a56-72aa-998d-3a65-669945a48ac9","iss":"https://auth.hyeonworks.com/realms/master","typ":"Bearer","azp":"admin-cli","sid":"x8EWkde54QSEnlY-lDKizez3","scope":"profile email
=== a7 15 ② 시각을 남기고 DB 를 0 replica 로 내린다 ===
18:10:24 정지
deployment.apps/postgres scaled
pod/postgres-7b474b88c8-48lrr condition met
=== a7 15 ③ 캐시를 가진 노드에서 refresh ===
500
=== a7 15 ④ 새 로그인 ===
200
=== a7 15 ⑤ DB 를 다시 올린다 ===
deployment.apps/postgres scaled
Waiting for deployment "postgres" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "postgres" rollout to finish: 0 of 1 updated replicas are available...
deployment "postgres" successfully rolled out
