{
 "Pod:Kubernetes 最小的部署單位#1": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   3
  ],
  "cards": [
   {
    "title": "共用網路",
    "points": [
     "同一個 IP",
     "用 localhost 互連",
     "不能監聽同一個埠"
    ]
   },
   {
    "title": "共用儲存卷",
    "points": [
     "可共用 volume",
     "例如 emptyDir"
    ]
   },
   {
    "title": "一起排程",
    "points": [
     "同一台節點",
     "一起啟動、一起終止"
    ]
   }
  ]
 },
 "Pod:Kubernetes 最小的部署單位#2": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "Pod 消失",
    "sub": "刪除或節點故障"
   },
   {
    "label": "控制器",
    "sub": "例如 Deployment"
   },
   {
    "label": "全新 Pod",
    "sub": "新名稱、新 IP",
    "kind": "end"
   }
  ]
 },
 "Pod:Kubernetes 最小的部署單位#5": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "欄位",
   "內容"
  ],
  "rows": [
   [
    "apiVersion",
    "v1"
   ],
   [
    "kind",
    "Pod"
   ],
   [
    "metadata",
    "name: web,標籤 app: web"
   ],
   [
    "spec",
    "容器 nginx、映像、埠 8080"
   ]
  ],
  "widths": [
   1,
   3
  ]
 },
 "Pod:Kubernetes 最小的部署單位#6": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5,
   5
  ],
  "head": [
   "phase",
   "意思"
  ],
  "rows": [
   [
    "Pending",
    "已接受,容器尚未全部啟動"
   ],
   [
    "Running",
    "至少一個容器在執行"
   ],
   [
    "Succeeded",
    "全部成功結束(結束碼 0)"
   ],
   [
    "Failed",
    "全部結束且至少一個失敗"
   ],
   [
    "Unknown",
    "與節點失聯,拿不到狀態"
   ]
  ],
  "widths": [
   1,
   3
  ]
 },
 "Pod:Kubernetes 最小的部署單位#7": {
  "type": "cards",
  "reveal": [
   0,
   3,
   3
  ],
  "cards": [
   {
    "title": "Always",
    "points": [
     "預設值",
     "容器結束就重啟"
    ]
   },
   {
    "title": "OnFailure",
    "points": [
     "常用於一次性任務"
    ]
   },
   {
    "title": "Never",
    "points": [
     "常用於一次性任務"
    ]
   }
  ]
 },
 "YAML 宣告式管理:apply、diff 與 dry-run#1": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   2,
   2,
   2
  ],
  "cards": [
   {
    "title": "命令式",
    "points": [
     "run、create、delete、scale",
     "一個指令做一件事",
     "適合快速實驗"
    ]
   },
   {
    "title": "宣告式",
    "points": [
     "YAML + apply -f",
     "可放進 Git 版本控制",
     "重複 apply 是安全的"
    ]
   }
  ]
 },
 "YAML 宣告式管理:apply、diff 與 dry-run#2": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   4
  ],
  "nodes": [
   {
    "label": "apply -f",
    "sub": "web-pod.yaml"
   },
   {
    "label": "created",
    "sub": "pod/web created"
   },
   {
    "label": "再 apply",
    "sub": "同一個檔案"
   },
   {
    "label": "unchanged",
    "sub": "內容沒變",
    "kind": "end"
   }
  ]
 },
 "YAML 宣告式管理:apply、diff 與 dry-run#4": {
  "type": "table",
  "reveal": [
   0,
   1,
   3
  ],
  "head": [
   "工具",
   "作用"
  ],
  "rows": [
   [
    "diff",
    "顯示與叢集現況的差異;有差異結束碼為 1"
   ],
   [
    "dry-run=server",
    "apiserver 實際驗證但不儲存"
   ],
   [
    "dry-run=client",
    "只在本機檢查"
   ]
  ],
  "widths": [
   2,
   5
  ]
 },
 "YAML 宣告式管理:apply、diff 與 dry-run#6": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   0,
   0,
   4,
   4
  ],
  "nodes": [
   {
    "label": "kubectl run",
    "sub": "映像與埠號"
   },
   {
    "label": "dry-run=client"
   },
   {
    "label": "-o yaml"
   },
   {
    "label": "> web-pod.yaml",
    "sub": "存成範本檔",
    "kind": "end"
   }
  ]
 },
 "YAML 宣告式管理:apply、diff 與 dry-run#7": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   3,
   3
  ],
  "nodes": [
   {
    "label": "改別的欄位",
    "sub": "再 apply"
   },
   {
    "label": "invalid",
    "sub": "spec: Forbidden"
   },
   {
    "label": "刪除再重建",
    "sub": "或改用 Deployment",
    "kind": "end"
   }
  ]
 },
 "標籤、選擇器與註解#2": {
  "type": "table",
  "reveal": [
   0,
   0,
   3,
   3,
   3
  ],
  "head": [
   "鍵",
   "值",
   "意義"
  ],
  "rows": [
   [
    "app",
    "shop",
    "商店應用"
   ],
   [
    "tier",
    "frontend",
    "前端"
   ],
   [
    "env",
    "dev",
    "開發環境"
   ]
  ]
 },
 "標籤、選擇器與註解#3": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "等值式",
    "points": [
     "等於、不等於",
     "=、==、!="
    ]
   },
   {
    "title": "集合式",
    "points": [
     "值是否在集合內",
     "in、notin、exists"
    ]
   }
  ]
 },
 "標籤、選擇器與註解#5": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "指令",
   "篩選結果"
  ],
  "rows": [
   [
    "-l app=web",
    "app 等於 web"
   ],
   [
    "-l app=web,env=dev",
    "逗號是「且」"
   ],
   [
    "-l 'env in (dev,test)'",
    "env 是 dev 或 test"
   ],
   [
    "-l 'tier!=frontend'",
    "tier 不是 frontend"
   ]
  ],
  "widths": [
   3,
   2
  ]
 },
 "標籤、選擇器與註解#7": {
  "type": "table",
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ],
  "head": [
   "指令",
   "作用"
  ],
  "rows": [
   [
    "kubectl label pod web version=v1",
    "加上標籤"
   ],
   [
    "label ... version=v2 --overwrite",
    "修改已存在的標籤"
   ],
   [
    "label pod web version-",
    "鍵名後加減號:刪除"
   ]
  ],
  "widths": [
   3,
   2
  ]
 }
}