2018 08 11
Technology Out of the Clouds onto the Ground: How to Make Kubernetes Production Grade Anywhere
在 2016 年左右 Kubernetes 還在 1.4 的版本時,曾經自己在機房蓋過一整套的 Kubernetes,過程真的是頗痛苦,而且每次升級都一定會有東西壞掉要修,時至今日應該有改善許多了
Run a Distribution-Supplied Kernel on a KVM Linode
大部分 Linode 預設裝的 Linux kernel 是 Linode 自己客製化過給 KVM 用的版本,這個版本的 Docker 會無法執行,透過 systemctl status docker.service 指令會出現下面的錯誤訊息
``` ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: inactive (dead) (Result: exit-code) since Sat 2018-08-11 16:44:00 UTC; 7s ago Docs: https://docs.docker.com Process: 1320 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE) Main PID: 1320 (code=exited, status=1/FAILURE) Aug 11 16:44:00 localhost systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE Aug 11 16:44:00 localhost systemd[1]: Failed to start Docker Application Container Engine. Aug 11 16:44:00 localhost systemd[1]: docker.service: Unit entered failed state. Aug 11 16:44:00 localhost systemd[1]: docker.service: Failed with result 'exit-code'. Aug 11 16:44:00 localhost systemd[1]: docker.service: Service hold-off time over, scheduling restart. Aug 11 16:44:00 localhost systemd[1]: Stopped Docker Application Container Engine. Aug 11 16:44:00 localhost systemd[1]: docker.service: Start request repeated too quickly. Aug 11 16:44:00 localhost systemd[1]: Failed to start Docker Application Container Engine. ``` 解法也很簡單,把 VM 關機,從 Linode Console 把 VM 的 Boot Settings -> Kernel 選項改成 GRUB 2 然後重開機,就可以用回原生的 kernel,此時 Docker 也就可以跑得起來了