{
 "Namespace 與資源配額#1": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "同名可共存",
    "points": [
     "各自有一個 web"
    ]
   },
   {
    "title": "配額與權限",
    "points": [
     "每個 Namespace 可設資源配額",
     "也可設定權限"
    ]
   },
   {
    "title": "連帶刪除",
    "points": [
     "刪除時所有物件一起刪",
     "清理方便,但很危險"
    ]
   }
  ]
 },
 "Namespace 與資源配額#2": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   4
  ],
  "head": [
   "Namespace",
   "用途"
  ],
  "rows": [
   [
    "default",
    "沒指定時物件放的地方"
   ],
   [
    "kube-system",
    "系統元件,如 CoreDNS、kube-proxy"
   ],
   [
    "kube-public",
    "所有人可讀,很少用到"
   ],
   [
    "kube-node-lease",
    "節點回報心跳用"
   ]
  ],
  "widths": [
   3,
   7
  ]
 },
 "Namespace 與資源配額#5": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "指令",
   "用途"
  ],
  "rows": [
   [
    "kubectl create namespace shop-dev",
    "建立 shop-dev"
   ],
   [
    "kubectl get pods -n shop-dev",
    "只看 shop-dev 的 Pod"
   ],
   [
    "kubectl get pods -A",
    "看所有 Namespace"
   ],
   [
    "kubectl config set-context --current --namespace=shop-dev",
    "改目前 context 的預設 Namespace"
   ]
  ],
  "widths": [
   7,
   3
  ]
 },
 "Namespace 與資源配額#7": {
  "type": "cards",
  "reveal": [
   0,
   1,
   1,
   2
  ],
  "cards": [
   {
    "title": "屬於 Namespace",
    "points": [
     "Pod、Deployment",
     "Service、ConfigMap",
     "Secret、PVC、Role"
    ]
   },
   {
    "title": "叢集層級",
    "points": [
     "Node、PersistentVolume",
     "StorageClass",
     "Namespace、ClusterRole"
    ]
   }
  ]
 },
 "RBAC:最小權限存取控制#1": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "Role",
    "points": [
     "限定在某個 Namespace",
     "可對哪些資源做哪些動作"
    ]
   },
   {
    "title": "ClusterRole",
    "points": [
     "叢集層級",
     "可涵蓋 nodes 等叢集資源"
    ]
   },
   {
    "title": "RoleBinding",
    "points": [
     "把 Role 或 ClusterRole 授予主體",
     "效力限於該 Namespace"
    ]
   },
   {
    "title": "ClusterRoleBinding",
    "points": [
     "把 ClusterRole 授予主體",
     "效力是整個叢集"
    ]
   }
  ]
 },
 "RBAC:最小權限存取控制#2": {
  "type": "table",
  "reveal": [
   0,
   1,
   1,
   2,
   3,
   4
  ],
  "head": [
   "欄位",
   "說明"
  ],
  "rows": [
   [
    "apiGroups [\"\"]",
    "核心群組:Pod、Service、ConfigMap、Secret"
   ],
   [
    "apiGroups [\"apps\"]",
    "Deployment"
   ],
   [
    "verbs",
    "get、list、watch、create、update、patch、delete"
   ],
   [
    "roleRef",
    "建立後不可修改,要換只能刪除重建"
   ]
  ],
  "widths": [
   3,
   7
  ]
 },
 "RBAC:最小權限存取控制#6": {
  "type": "flow",
  "reveal": [
   0,
   2,
   3
  ],
  "nodes": [
   {
    "label": "ServiceAccount",
    "sub": "viewer"
   },
   {
    "label": "RoleBinding",
    "sub": "viewer-pod-reader"
   },
   {
    "label": "Role",
    "sub": "pod-reader"
   }
  ],
  "layout": "row"
 },
 "RBAC:最小權限存取控制#7": {
  "type": "table",
  "reveal": [
   0,
   3,
   3
  ],
  "head": [
   "viewer 的操作",
   "can-i 結果"
  ],
  "rows": [
   [
    "list pods",
    "yes"
   ],
   [
    "delete pods",
    "no"
   ],
   [
    "get secrets",
    "no"
   ]
  ],
  "widths": [
   6,
   4
  ]
 },
 "Helm 入門:套件管理與模板#1": {
  "type": "flow",
  "reveal": [
   0,
   0,
   0,
   1,
   2,
   3,
   3
  ],
  "nodes": [
   {
    "label": "Chart",
    "sub": "打包成可重複使用的套件"
   },
   {
    "label": "模板化",
    "sub": "變數由 values 填入"
   },
   {
    "label": "Release",
    "sub": "安裝後的實例",
    "kind": "end"
   }
  ],
  "layout": "row"
 },
 "Helm 入門:套件管理與模板#5": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "--set / -f",
    "points": [
     "--set 臨時覆蓋某個值",
     "-f 指定值檔案"
    ]
   },
   {
    "title": "--dry-run / template",
    "points": [
     "不安裝就預覽結果",
     "先 template 再 install"
    ]
   },
   {
    "title": "--atomic / --wait",
    "points": [
     "--atomic 失敗的升級自動回滾",
     "--wait 等資源就緒才算成功"
    ]
   }
  ]
 },
 "Helm 入門:套件管理與模板#6": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "指令",
   "用途"
  ],
  "rows": [
   [
    "helm create mychart",
    "產生範本 Chart"
   ],
   [
    "helm lint mychart",
    "檢查 Chart 格式"
   ],
   [
    "helm template demo ./mychart",
    "只渲染 YAML,不安裝"
   ],
   [
    "helm install demo ./mychart -n demo --create-namespace",
    "安裝成 Release「demo」"
   ]
  ],
  "widths": [
   6,
   4
  ]
 },
 "Helm 入門:套件管理與模板#7": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "nodes": [
   {
    "label": "helm list",
    "sub": "列出 Release"
   },
   {
    "label": "helm upgrade",
    "sub": "--set replicaCount=3"
   },
   {
    "label": "helm history",
    "sub": "版本歷史"
   },
   {
    "label": "helm rollback",
    "sub": "退回第 1 版"
   },
   {
    "label": "helm uninstall",
    "sub": "移除 Release",
    "kind": "end"
   }
  ],
  "layout": "snake"
 }
}