{
 "資源 requests、limits 與 QoS#1": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "沒有任何限制",
    "points": [
     "容器記憶體洩漏或 CPU 失控",
     "吃光整台節點資源",
     "連累同節點其他服務"
    ]
   },
   {
    "title": "沒告訴排程器",
    "points": [
     "不知道 Pod 需要多少資源",
     "無法做出合理排程",
     "節點可能被塞得太滿"
    ]
   }
  ]
 },
 "資源 requests、limits 與 QoS#2": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "head": [
   "項目",
   "說明"
  ],
  "rows": [
   [
    "requests",
    "請求量,容器需要的資源下限;排程器依此決定放哪個節點"
   ],
   [
    "limits",
    "上限,容器最多能用多少;由容器執行階段強制"
   ],
   [
    "CPU 單位",
    "1 = 1 個核心;500m = 500 毫核(0.5 核)"
   ]
  ],
  "widths": [
   2,
   8
  ]
 },
 "資源 requests、limits 與 QoS#3": {
  "type": "cards",
  "reveal": [
   0,
   2,
   3
  ],
  "cards": [
   {
    "title": "Mi、Gi",
    "points": [
     "2 的冪",
     "慣例使用 Mi、Gi"
    ]
   },
   {
    "title": "M、G",
    "points": [
     "10 的冪"
    ]
   },
   {
    "title": "寫成 128m",
    "points": [
     "小寫 m = 千分之一位元組",
     "幾乎等於沒有",
     "請勿這樣寫"
    ]
   }
  ]
 },
 "資源 requests、limits 與 QoS#5": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   2,
   2,
   2
  ],
  "head": [
   "超過 limits",
   "結果"
  ],
  "rows": [
   [
    "CPU",
    "被節流,程式變慢,但不會被殺掉"
   ],
   [
    "記憶體",
    "OOM Killer 終止,OOMKilled,結束碼 137"
   ]
  ],
  "widths": [
   3,
   7
  ]
 },
 "資源 requests、limits 與 QoS#6": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ],
  "cards": [
   {
    "title": "Guaranteed",
    "points": [
     "CPU 與記憶體都設 requests 和 limits",
     "兩者相等",
     "最後才被驅逐"
    ]
   },
   {
    "title": "Burstable",
    "points": [
     "至少設了一個 requests 或 limits",
     "不符合 Guaranteed"
    ]
   },
   {
    "title": "BestEffort",
    "points": [
     "完全沒設定",
     "壓力下最先被驅逐"
    ]
   }
  ]
 },
 "探針:liveness、readiness 與 startup#2": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "liveness",
    "points": [
     "存活探針",
     "失敗 → 重啟容器",
     "處理卡死救不回來"
    ]
   },
   {
    "title": "readiness",
    "points": [
     "就緒探針",
     "失敗 → 移出 Service",
     "不重啟,不接新流量"
    ]
   },
   {
    "title": "startup",
    "points": [
     "啟動探針",
     "保護慢啟動的應用",
     "成功前其他探針不執行"
    ]
   }
  ]
 },
 "探針:liveness、readiness 與 startup#3": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "檢查方式",
   "成功條件"
  ],
  "rows": [
   [
    "httpGet",
    "GET 回應碼 200~399"
   ],
   [
    "tcpSocket",
    "能建立 TCP 連線"
   ],
   [
    "exec",
    "容器內指令結束碼為 0"
   ],
   [
    "grpc",
    "支援 gRPC 健康檢查協定"
   ]
  ],
  "widths": [
   3,
   7
  ]
 },
 "探針:liveness、readiness 與 startup#4": {
  "type": "bar",
  "reveal": [
   0,
   0,
   0,
   1,
   2,
   3
  ],
  "labels": [
   "初始延遲",
   "探測間隔",
   "單次逾時"
  ],
  "values": [
   0,
   10,
   1
  ],
  "unit": "秒",
  "colors": [
   0,
   1,
   2
  ]
 },
 "探針:liveness、readiness 與 startup#7": {
  "type": "table",
  "reveal": [
   0,
   1,
   3
  ],
  "head": [
   "現象",
   "代表"
  ],
  "rows": [
   [
    "describe 的 Events",
    "Unhealthy 警告,Readiness probe failed"
   ],
   [
    "READY 0/1 且 Running",
    "通常是就緒探針沒過"
   ],
   [
    "RESTARTS 持續增加",
    "懷疑 liveness 失敗或應用崩潰"
   ]
  ],
  "widths": [
   4,
   6
  ]
 },
 "調度:nodeSelector、親和性與汙點#1": {
  "type": "flow",
  "reveal": [
   0,
   4,
   4,
   4
  ],
  "nodes": [
   {
    "label": "新 Pod"
   },
   {
    "label": "過濾節點",
    "sub": "資源、汙點、選擇條件"
   },
   {
    "label": "評分",
    "sub": "對剩下的節點"
   },
   {
    "label": "選最高分",
    "kind": "end"
   }
  ],
  "layout": "row"
 },
 "調度:nodeSelector、親和性與汙點#2": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "貼標籤",
    "sub": "disktype=ssd"
   },
   {
    "label": "Pod 指定",
    "sub": "nodeSelector"
   },
   {
    "label": "排到該節點",
    "sub": "沒符合就 Pending",
    "kind": "end"
   }
  ],
  "layout": "row"
 },
 "調度:nodeSelector、親和性與汙點#3": {
  "type": "table",
  "reveal": [
   0,
   0,
   1,
   2,
   2,
   2
  ],
  "head": [
   "類型",
   "條件",
   "性質"
  ],
  "rows": [
   [
    "required",
    "disktype In ssd, nvme",
    "硬性,不符不排"
   ],
   [
    "preferred(權重 50)",
    "zone In a",
    "軟性,盡量符合"
   ]
  ],
  "widths": [
   3,
   4,
   3
  ]
 },
 "調度:nodeSelector、親和性與汙點#7": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   3
  ],
  "cards": [
   {
    "title": "NoSchedule",
    "points": [
     "新 Pod 不會被排進來",
     "已在上面的不受影響"
    ]
   },
   {
    "title": "PreferNoSchedule",
    "points": [
     "盡量不排進來"
    ]
   },
   {
    "title": "NoExecute",
    "points": [
     "不排進來",
     "沒有容忍的 Pod 也會被驅逐"
    ]
   }
  ]
 }
}