CKA Note Section 3 Scheduling

50. Manual Scheduling


kube-scheduler 的情況下,我們可以在 pod definition YAML 裡面定義 pod.spec.nodeName: <worker node name> 來把 pod 放在指定 worker node。
沒有 kube-scheduler 的情況下,必須要以 json 格式 POST 到 api-server。BTW,我找不到 docs 耶 = =

CKA Note Section 2 Core Concepts

10. Cluster Architecture


k8s_arch

▲ Kubernetes controll plane / worker node 組件


12. ETCD in Kubernetes


  • 透過 kubectl get 都是 (透過 api-server ) 向 etcd 查詢資料。
  • 講師提供的練習環境是使用 kubeadm 搭建的,課程最後的章節會教導如何從 scratch 建立 Kubernetes cluster。

etcd_manual_install_0

CKAD Note Section 9 Updates for Sep 2021 Changes


CKAD_20210928_change

▲ CKAD 新舊版差異


119. Define, build and modify container images


非常基礎的 Docker Image (container image) 介紹,我之前就打過一篇在公司 Bookstack 了~
《Docker Image 介紹》

使用 dockerpodman

大部分情況 dockerpodman syntax 很接近~

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## docker multi tags
sudo docker build -t registry.killer.sh:5000/sun-cipher:latest -t registry.killer.sh:5000/sun-cipher:v1-docker .

## pod man build image
podman build -t registry.killer.sh:5000/sun-cipher:v1-podman .

## podman run container
podman run -d --name sun-cipher registry.killer.sh:5000/sun-cipher:v1-podman

## podman show process
podman ps

## podman logs
podman logs sun-cipher


121. Authentication, Authorization and Admission Control


除了 master,worker node 本身的安全機制 (例如: SSH public key ONLY) 以外
kube-apiserver 在 K8s cluster 當中扮演非常關鍵的角色必須要被嚴格控管,接下來的章節會介紹 How to
一開始我們先來探討一下 Who can access?What can they do?

CKAD Note Section 8 State Persistence

105. Volumes


hostPath


這個範例 mount worker-node 的 /datapod 裡面,並且 mapping 到 container 裡面的 /test-pd
實際上我們並不會這樣做,因為 worker-node 之間的資料並沒辦法同步,一般來說會使用 shared storage 例如: NFS, ClusterFS, Ceph, AWS EBS, AzureDisk ….