Alan Zhan 部落格

Live for nothing, or die for something

透過 Terraform 建立私有 GKE Cluster

讓我們一起來花個十分鐘,我會手把手地教你使用 Terraform ,建立私有的 GKE Cluster ! 設定 GCP 建立 Service Account 首先我們會需要先到 Google Cloud 的頁面上,建立一個 Service Account 給 Terraform 使用,位置可以參考上圖的第 1 2 3 步驟,如果你已經有 Service Account 的話,你可以跳過這個步驟。 …

終身成長

思維模式 你今天去上了一門對你來說是很重要的課程,而且你非常喜歡這門課。你的教授公佈了期中考的考試成績,然而你考試的成績只獲得了 60 分。你非常的失望,等到晚上準備要回家的時候,你發現你錯過了最後一班捷運,導致你必須走回家。當你感到非常生氣的時候,打電話給你最好的朋友想要傾訴,然而卻沒有打通。

Kubernetes 核心介紹 Kubelet

Kubelet 架構 如下 kubelet 內部組件結構圖所示,Kubelet 由許多內部組件構成: Kubelet API,包括 10250 port 的認證 API、4194 port 的 cAdvisor API、10255 port 的只讀 API 以及 10248 port 的健康檢查 API 。 syncLoop:從 API 或者 manifest 目錄接收 Pod 更新,發送到 …

白話解 Leetcode - 25 Reverse Nodes in k-Group

25. Reverse Nodes in k-Group https://leetcode.com/problems/reverse-nodes-in-k-group/ HardGiven the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. k is …

阿甘投資法

還記得我大概在三年前,當時的我是一位股市小白,我剛才了解完畢台灣股市之後,就隨即投入股市交易,當時買的第一張股票是 中信金 2891 ,這個代碼還記得清清楚楚,但是每天上上下下波動,每天都心驚膽跳,最後按耐不住性子就出場了,幸好最後出場有賺到一點點便當錢,不是賠錢,真的是不幸中的大幸,最後在因緣際會下,接觸到阿甘投資法這本書,就此展開了我的指數投資人生,今天就來跟大家好好介紹這本書。

Kubernetes 核心介紹 Controller Manager

Controller Manager 是 Kubernetes 集群的自動化控制中心,裡面包含了 3X 多個 Controller ,有管理 Pod 相關的、網路相關的、儲存相關的等等。大多數的 Controller 工作模式都差不多,每個 Controller 都是一個 control loop ,負責通過 api-server 監聽其相對應的資源,根據對象狀態來決定接下來的動作,使其達到預期的 …

白話解 Leetcode - 70 Climbing Stairs

70. Climbing Stairs https://leetcode.com/problems/climbing-stairs/ EasyYou are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many …

Kubernetes - Node 維護 Pod 遷移

敝公司前陣子有發現有機器的資源使用率特別的低在 GKE 上,再怎麼說這些用不到的資源也是白花花的銀子啊,所以我們就新增資源更低更便宜的 Node Pool ,再搭配使用 Cordon + Drain 或者手動刪除 Pod ,讓 Pod 重新長在新的 Node Pool 上,當然在 GKE 上直接刪除舊的 Node Pool 也可以達到一樣的效果,只是我們選用了更安全的做法。

白話解 Leetcode - 69 Sqrt(x)

69. Sqrt(x) https://leetcode.com/problems/sqrtx/ EasyGiven a non-negative integer x, compute and return the square root of x. Since the return type is an integer, the decimal digits are …

白話解 Leetcode - 433 Minimum Genetic Mutation

433. Minimum Genetic Mutation https://leetcode.com/problems/minimum-genetic-mutation/ MediumA gene string can be represented by an 8-character long string, with choices from 'A', 'C', 'G', and 'T'. …