{
 "為什麼需要 Kubernetes?#1": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "機器掛了",
    "points": [
     "上面的容器全消失",
     "誰在別台重啟?"
    ]
   },
   {
    "title": "流量變大",
    "points": [
     "1 個變 10 個",
     "誰決定放哪裡?"
    ]
   },
   {
    "title": "發佈新版本",
    "points": [
     "不想讓使用者看到中斷",
     "怎麼逐台替換?"
    ]
   }
  ]
 },
 "為什麼需要 Kubernetes?#3": {
  "type": "flow",
  "layout": "cycle",
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ],
  "nodes": [
   {
    "label": "宣告期望狀態",
    "sub": "3 個副本"
   },
   {
    "label": "控制器比較",
    "sub": "期望與實際"
   },
   {
    "label": "調和修正",
    "sub": "少了就補"
   }
  ],
  "edges": [
   [
    0,
    1
   ],
   [
    1,
    2
   ],
   [
    2,
    0
   ]
  ]
 },
 "為什麼需要 Kubernetes?#4": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "自我修復",
    "points": [
     "容器當機會重啟",
     "節點故障會重新排程",
     "健康檢查沒過不接流量"
    ]
   },
   {
    "title": "水平擴縮",
    "points": [
     "改一個數字增減副本",
     "依 CPU 使用率自動擴縮"
    ]
   },
   {
    "title": "滾動更新與回滾",
    "points": [
     "逐步替換舊版本",
     "出問題一行指令退回"
    ]
   }
  ]
 },
 "為什麼需要 Kubernetes?#5": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "head": [
   "能力",
   "做什麼"
  ],
  "rows": [
   [
    "服務發現與負載平衡",
    "穩定的名稱與入口"
   ],
   [
    "設定與機密管理",
    "設定從映像中分離"
   ],
   [
    "儲存編排",
    "持久化磁碟掛給容器"
   ]
  ],
  "widths": [
   2,
   3
  ]
 },
 "為什麼需要 Kubernetes?#7": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   4,
   9
  ],
  "nodes": [
   {
    "label": "第 1 章",
    "sub": "架構與 kubectl"
   },
   {
    "label": "第 2 章",
    "sub": "Pod"
   },
   {
    "label": "第 3 章",
    "sub": "Deployment"
   },
   {
    "label": "第 4 章",
    "sub": "Service、Ingress"
   },
   {
    "label": "第 5 章",
    "sub": "設定管理"
   },
   {
    "label": "第 6 章",
    "sub": "儲存"
   },
   {
    "label": "第 7 章",
    "sub": "資源限制與探針"
   },
   {
    "label": "第 8 章",
    "sub": "Namespace、RBAC、Helm"
   },
   {
    "label": "第 9 章",
    "sub": "故障排除實戰"
   }
  ]
 },
 "叢集架構:Control Plane 與 Node#1": {
  "type": "cards",
  "reveal": [
   0,
   0,
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "控制平面 Control Plane",
    "points": [
     "叢集的大腦",
     "負責做決策",
     "記錄狀態"
    ]
   },
   {
    "title": "工作節點 Node",
    "points": [
     "真正跑容器的機器",
     "實體機或虛擬機皆可"
    ]
   }
  ]
 },
 "叢集架構:Control Plane 與 Node#2": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "kube-apiserver",
    "points": [
     "叢集唯一的入口",
     "驗證身分、檢查權限",
     "寫入 etcd"
    ]
   },
   {
    "title": "etcd",
    "points": [
     "高可用鍵值資料庫",
     "叢集的真相來源",
     "正式環境務必備份"
    ]
   },
   {
    "title": "kube-scheduler",
    "points": [
     "替新 Pod 挑選節點",
     "只負責決定,不負責啟動"
    ]
   },
   {
    "title": "controller-manager",
    "points": [
     "執行各種控制器",
     "把實際調和成期望"
    ]
   }
  ]
 },
 "叢集架構:Control Plane 與 Node#4": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   2,
   3
  ],
  "head": [
   "元件",
   "職責"
  ],
  "rows": [
   [
    "kubelet",
    "領取分配給本節點的 Pod、回報狀態"
   ],
   [
    "容器執行階段",
    "拉映像、跑容器(containerd、CRI-O)"
   ],
   [
    "kube-proxy",
    "維護網路規則,轉送 Service 到 Pod"
   ]
  ],
  "widths": [
   2,
   5
  ]
 },
 "叢集架構:Control Plane 與 Node#6": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "nodes": [
   {
    "label": "kubectl",
    "sub": "讀 kubeconfig 送出請求"
   },
   {
    "label": "kube-apiserver",
    "sub": "驗證、授權、准入 寫入 etcd"
   },
   {
    "label": "Deployment 控制器",
    "sub": "建立 ReplicaSet 與 Pod"
   }
  ]
 },
 "叢集架構:Control Plane 與 Node#7": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   3,
   4,
   5
  ],
  "nodes": [
   {
    "label": "kubectl",
    "sub": "送出請求"
   },
   {
    "label": "apiserver",
    "sub": "驗證後寫入 etcd"
   },
   {
    "label": "Deployment 控制器",
    "sub": "建立 ReplicaSet 與 Pod"
   },
   {
    "label": "scheduler",
    "sub": "挑選節點並寫回"
   },
   {
    "label": "kubelet",
    "sub": "啟動容器並回報狀態",
    "kind": "end"
   }
  ]
 },
 "kubectl 基本操作與 kubeconfig#2": {
  "type": "cards",
  "reveal": [
   0,
   0,
   3,
   3,
   3
  ],
  "cards": [
   {
    "title": "cluster",
    "points": [
     "API 伺服器位址",
     "憑證"
    ]
   },
   {
    "title": "user",
    "points": [
     "你的身分憑證"
    ]
   },
   {
    "title": "context",
    "points": [
     "組合 cluster 與 user",
     "加上預設 namespace"
    ]
   }
  ]
 },
 "kubectl 基本操作與 kubeconfig#3": {
  "type": "table",
  "reveal": [
   0,
   2,
   2,
   2,
   2
  ],
  "head": [
   "CURRENT",
   "NAME",
   "CLUSTER",
   "AUTHINFO",
   "NAMESPACE"
  ],
  "rows": [
   [
    "*",
    "kind-demo",
    "kind-demo",
    "kind-demo",
    ""
   ],
   [
    "",
    "minikube",
    "minikube",
    "minikube",
    "default"
   ]
  ]
 },
 "kubectl 基本操作與 kubeconfig#4": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ],
  "nodes": [
   {
    "label": "目前 context",
    "sub": "kind-demo"
   },
   {
    "label": "切換 context",
    "sub": "use-context minikube"
   },
   {
    "label": "切換成功",
    "sub": "Switched to context",
    "kind": "end"
   }
  ]
 },
 "kubectl 基本操作與 kubeconfig#5": {
  "type": "table",
  "reveal": [
   0,
   3,
   9,
   10
  ],
  "head": [
   "選項 / 資源",
   "意義 / 縮寫"
  ],
  "rows": [
   [
    "-A",
    "列出所有 namespace"
   ],
   [
    "-n",
    "指定 namespace"
   ],
   [
    "-o wide",
    "多顯示節點、IP"
   ],
   [
    "pods",
    "po"
   ],
   [
    "services",
    "svc"
   ],
   [
    "deployments",
    "deploy"
   ],
   [
    "namespaces",
    "ns"
   ],
   [
    "nodes",
    "no"
   ],
   [
    "configmaps",
    "cm"
   ],
   [
    "get all",
    "只列常見幾種資源"
   ]
  ]
 }
}