CKA Note Section 7 Security

135. Authentication


請參考 CKAD Note Section 9 Updates for Sep 2021 Changes - 121. Authentication, Authorization and Admission Control


139. TLS in Kubernetes


tls_communication_diagram

▲ 各個 K8s component 的 TLS community diagram。

因為現在大部分 kube-proxy 都不是單獨安裝,已經變成 daemondset,所以官方 docs 才沒有找到關於它的 certificate。在這個情況下可以用 serviceaccountsecret 傳入 daemondset 來達成需求。(謝謝 hwchiu)

Linux 限制網路速度,使用 Wondershaper

pexels-kehn-hermano-3849167

Wonder Shaper 是一支底層使用 Linux 自帶的流量控制命令 tc 的 shell script,能夠簡單、方便、快速 達成限流的目的
在 Wonder Shaper v1.3 以上版本等待列隊方式從本來的 CBQ 變更成 HTB,針對 10Mb (tenmegabits) 以上的速率提供更好的流量控制方式。

CKA Note Section 6 Cluster Maintence

117. OS Upgrades


如果我們要將某個 worder node 下線,做一些例行維護 (例如: OS Upgrade) 可以使用

1
kubectl drain <node_name>

來達成,原本在目標 worker node 的 pod 會被 re-schedule 到其它 worker node 上面。當維護完成再使用

1
kubectl uncorden <node_name>

來告訴 master node 我好了,可以把 pod 繼續 schedule 到我身上囉! 被調度出去的 pod 不會恢復回來。
如果單純要讓 master node 不要把 pod 調度過來 (mark as unschedulable) 的話則可以使用。

CKA Note Section 5 App Lifecycle Management

89. Rolling Updates and Rollbacks


請參考 CKAD Note Section 6 Pod Design 82. Rolling Updates & Rollbacks in Deployments


93. Commands


請參考 CKAD Note Section 3 Configuration 37. [Pre-Request] Commands and Arguments in Docker


97. Configure Environment Variables in Applications


請參考 CKAD Note Section 3 Configuration 42. Enviroment Variables


98. Configuring ConfigMaps in Applications


請參考 CKAD Note Section 3 Configuration 42. Enviroment Variables