{
 "ReplicaSet 與 Deployment#1": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   0,
   0,
   0,
   1,
   2,
   3
  ],
  "nodes": [
   {
    "label": "Deployment",
    "sub": "每個版本一個 ReplicaSet"
   },
   {
    "label": "ReplicaSet",
    "sub": "維持 Pod 副本數"
   },
   {
    "label": "Pod",
    "sub": "真正執行容器",
    "kind": "end"
   }
  ]
 },
 "ReplicaSet 與 Deployment#2": {
  "type": "table",
  "reveal": [
   0,
   0,
   0,
   1,
   2,
   3
  ],
  "head": [
   "欄位",
   "重點"
  ],
  "rows": [
   [
    "apiVersion",
    "apps/v1,不是 v1"
   ],
   [
    "replicas",
    "想要的副本數,這裡是 3;不寫預設 1"
   ],
   [
    "selector.matchLabels",
    "Deployment 認領 Pod 的條件"
   ]
  ],
  "widths": [
   2,
   4
  ]
 },
 "ReplicaSet 與 Deployment#3": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   3
  ],
  "nodes": [
   {
    "label": "template",
    "sub": "Pod 範本,含標籤 app: web"
   },
   {
    "label": "selector",
    "sub": "matchLabels app: web"
   },
   {
    "label": "兩邊必須相符",
    "sub": "否則報錯,且 selector 不可改",
    "kind": "end"
   }
  ]
 },
 "ReplicaSet 與 Deployment#6": {
  "type": "table",
  "reveal": [
   0,
   0,
   0,
   0,
   3,
   3,
   3
  ],
  "head": [
   "欄位",
   "意義",
   "範例"
  ],
  "rows": [
   [
    "READY",
    "就緒數 / 期望數",
    "3/3"
   ],
   [
    "UP-TO-DATE",
    "已更新到最新範本的副本數",
    "3"
   ],
   [
    "AVAILABLE",
    "可對外服務的副本數",
    "3"
   ]
  ],
  "widths": [
   2,
   4,
   1
  ]
 },
 "ReplicaSet 與 Deployment#7": {
  "type": "bar",
  "reveal": [
   0,
   1,
   3,
   3
  ],
  "labels": [
   "期望",
   "目前",
   "就緒"
  ],
  "values": [
   3,
   3,
   3
  ],
  "unit": "個"
 },
 "擴縮、滾動更新與回滾#2": {
  "type": "bar",
  "reveal": [
   0,
   1,
   2,
   2,
   2,
   2
  ],
  "labels": [
   "原本",
   "scale 之後"
  ],
  "values": [
   3,
   5
  ],
  "unit": "個"
 },
 "擴縮、滾動更新與回滾#3": {
  "type": "cards",
  "reveal": [
   0,
   3
  ],
  "cards": [
   {
    "title": "最少副本",
    "points": [
     "autoscale --min=2"
    ],
    "value": "2"
   },
   {
    "title": "最多副本",
    "points": [
     "autoscale --max=6"
    ],
    "value": "6"
   },
   {
    "title": "CPU 目標",
    "points": [
     "--cpu-percent=70"
    ],
    "value": "70%"
   }
  ]
 },
 "擴縮、滾動更新與回滾#4": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   3,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "改 template",
    "sub": "最常見是改 image"
   },
   {
    "label": "新 ReplicaSet",
    "sub": "逐步增加新 Pod"
   },
   {
    "label": "舊 ReplicaSet",
    "sub": "逐步減少舊 Pod",
    "kind": "end"
   }
  ]
 },
 "擴縮、滾動更新與回滾#7": {
  "type": "table",
  "reveal": [
   0,
   3,
   4,
   5
  ],
  "head": [
   "指令 / 設定",
   "作用"
  ],
  "rows": [
   [
    "rollout history",
    "列出每一個版本"
   ],
   [
    "rollout undo",
    "退回上一版"
   ],
   [
    "--to-revision",
    "指定退回哪一版"
   ],
   [
    "annotate",
    "補上 CHANGE-CAUSE 說明"
   ],
   [
    "revisionHistoryLimit",
    "預設保留 10 個舊版本"
   ]
  ],
  "widths": [
   2,
   3
  ]
 },
 "更新策略參數與其他工作負載#1": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3,
   3,
   4
  ],
  "cards": [
   {
    "title": "maxSurge",
    "points": [
     "最多可超出期望副本數幾個",
     "預設 25%"
    ]
   },
   {
    "title": "maxUnavailable",
    "points": [
     "最多允許幾個副本不可用",
     "預設 25%"
    ]
   },
   {
    "title": "範例設定",
    "points": [
     "replicas 4",
     "maxSurge 1",
     "maxUnavailable 0"
    ],
    "value": "先開新的,再刪舊的"
   },
   {
    "title": "minReadySeconds",
    "points": [
     "就緒後再穩定幾秒才算可用"
    ]
   }
  ]
 },
 "更新策略參數與其他工作負載#2": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   3,
   3
  ],
  "nodes": [
   {
    "label": "終止舊 Pod",
    "sub": "全部終止"
   },
   {
    "label": "停機一段時間"
   },
   {
    "label": "建立新 Pod",
    "sub": "strategy: Recreate",
    "kind": "end"
   }
  ]
 },
 "更新策略參數與其他工作負載#4": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   4
  ],
  "head": [
   "控制器",
   "用途"
  ],
  "rows": [
   [
    "DaemonSet",
    "每個節點各跑一個 Pod"
   ],
   [
    "Job",
    "一次性任務,直到成功完成"
   ],
   [
    "CronJob",
    "依排程建立 Job"
   ],
   [
    "StatefulSet",
    "有狀態的應用(第 6 章)"
   ]
  ],
  "widths": [
   2,
   4
  ]
 },
 "更新策略參數與其他工作負載#6": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   6
  ],
  "head": [
   "欄位",
   "值"
  ],
  "rows": [
   [
    "apiVersion",
    "batch/v1"
   ],
   [
    "kind",
    "Job"
   ],
   [
    "name",
    "say-hello"
   ],
   [
    "restartPolicy",
    "只能 Never 或 OnFailure"
   ],
   [
    "backoffLimit",
    "3"
   ],
   [
    "ttlSecondsAfterFinished",
    "300"
   ]
  ],
  "widths": [
   3,
   3
  ]
 }
}