ref: https://ably.com/blog/no-we-dont-use-kubernetes
八月第一篇,就來個有趣的文章,來看看 ably 這間 SaaS 公司為什麼沒有使用 Kubernetes,不但當前沒有使用,甚至短期未來內都不會想要使用
更是直接的說如果你有興趣來加入團隊,千萬不要把將 Kubernetes 導入到團隊中是一個可能發生的事情。
我個人覺得這篇文章滿好的,因為是認真的去比較導入 Kubernetes 帶來的改變,而這些改變對團隊來說到底是可接受還是不可接受
而不是所謂的人云亦云,人家要我也要,人家不要我也不要...
文章分成兩部分,前述介紹當前 Ably 的環境架構是什麼,而半部分則是很技術的去探討如果導入 Kubernetes 帶來的好處與壞處是什麼
最終權衡比較之下,會發現導入 Kubernetes 沒有帶來實質上的好處。
文章開頭先簡述了一下 Kubernetes 這幾年的風潮,從最初 Google Borg 的開發開始談起,作者特別提到當初 Borg 的用法可是將一堆實體機器給搭建出一個 Private Cloud 的叢集給團隊使用,
而目前 Kubernetes 更多的用法則是搭建於 Public Cloud 上面的虛擬機器中,透過將 Kubernetes 部署到這些不同的 Cloud Provider 似乎帶來了介面統一的結果,對於 DevOps 人員來說
不同 Cloud Provider 如今看起來都是 Kubernetes 的樣貌。
Ably 目前到底怎麼部署應用程式
Ably 主要使用 AWS 作為其 Cloud Provider,並且於 EC2 機器上使用 docker/container 來部署團隊中的應用程式。
作者團隊中沒有使用任何已知的 Orchestration 服務來管理多節點上的 docker/container,取而代之的則是每個 VM 開機後則會根據 autoscaling group 的機制來判斷
每個機器應該要部署哪種 container/docker。
對於 Ably 來說,團隊中沒有任何 scheduler 相關的服務來調度各種服務,這意味每個 VM 就代表一種服務,所以將 VM 上的服務從 Core 轉換成 frontend 這種行為不會發生。
今天需要針對需求轉換服務時就以 VM 為基準來整批換掉即可。
每個節點上面都會有一個輕量的監控服務,用來確保運作的 Container 如果掛掉後可以被重啟,甚至如果當前運行的版本不符合需求時也能夠將該服務給停止。
流量方面,因為每個 Autoscaling Group 就代表一個服務,所以直接使用 NLB 與 Target Group 來將流量導入該 Autoscaling Group 即可。
至於容器與容器之間的內部流量(譬如 k8s service 等)作者認為也不是太大問題,畢竟每個機器本身都會被 VPC 賦予一個 IP 地址,所以使用上沒有什麼太大的問題。
接下來作者從幾個層次去探討當前設計與使用 Kubernetes 帶來的改變,分別有 (原文很多,這邊摘要不然文章會太長)
題外話,由於 Ably 的 Infra Team 數量有限,所以要考慮 K8s 只會考慮 K8s Service,如 EKS。
1. Resource Management
Ably:
a. 根據服務的需求來決定每個服務要用到的 VM 等級
b. 不需要去煩惱如何處理將多個小服務給部署到一個適合的大 VM 中
c. 作者稱這種行為其實就是 AWS 官方強調的 Right Sizing, 譬如只能跑兩個 Thread 的服務不需要 16vCPUs, 久久寫一次硬碟的服務也不需要一個 90,000 IOPS 的 SSD
d. 選擇一個正確的元件來搭建一個符合服務的 VM 讓團隊可以控制成本同時也減少額外的管理負擔
K8s:
a. 必須要使用一個比較強大等級的 EC2 VM,畢竟上面要透過 Container 部署很多服務
b. 針對那些需要小資源的服務來說,透過這種方式能夠盡可能的榨乾機器的資源,整體效能使用率會更好
c. 但是針對資源量沒有很辦法明確定義的服務則是會盡可能地去吃掉系統上的資源,這種被稱為 nosy neighbors 的常見問題已經不是首次出現了, Cloud Provider 本身就需要針對 VM 這類型的服務去思考如何處理資源使用,而 Cloud Provider 都有十年以上的經驗再處理這一塊
而所有 Kubernetes 的使用者則必須要自己去處理這些。
d. 一個可能的作法則是一個 VM 部署一個服務,不過這個做法跟團隊目前的作法已經完全一致,所以就資源管理這一塊,團隊看不到使用 Kubernetes 的優勢。
2. Autoscaling
Ably:
a. EC2 VM 本身可以藉由 Autoscaling Group 來動態調整需求
b. 有時候也是會手動的去調整 EC2 的數量,基本上手動跟自動是互相輔佐的
c. 團隊提供的是 SaaS 服務,所以其收費是針對客戶實際上用多少服務來收,如果開了過多 EC2 VM,則很多不要的花費與開銷都是團隊要自行吸收
d. 團隊需要一個盡可能有效率的方式能夠即使遇到流量暴衝時也能夠保證良好的服務的機制
K8s:
a. 可以透過不少方式來動態調整 Container 的數量,
b. 甚至可以透過 Cluster autoscaler 來針對節點進行調整,根據需求關閉節點或是產生更多節點
c. 動態關閉節點的有個問題是關閉節點時通常會選擇盡可能閒置的節點,但是閒置並不代表沒有任何服務部署再
上面,因此該節點上的 Container 都要先被轉移到其餘節點接者該目標節點才可以被正式關閉。這部分的邏輯作者認為相對複雜
d. 整體來說,k8s 有兩個動態調整的部分,動態節點與動態服務,而現有的架構只有一個動態節點。所以使用 k8s 則會讓問題變得更多更複雜。
3. Traffic Ingress
Ably:
a. Traffic Ingress 基本上每個 cloud provider 都提供了很好的解決方案,基本上團隊只要能夠維持每個服務與背後的機器的關係圖,網路流量基本上都沒有什麼需要團隊管理的。
b. 使用者會透過直接存取 NLB 或是透過 CloudFront 的方式來存取團隊內的服務
K8s:
a. EKS 本身可以透過 AWS VPC CNI 使得每個 Container 都獲得 VPC 內的 IP,這些 IP 都可以讓 VPC 內的其他服務直接存取
b. 透過 AWS LB Controller,這些 Container 可以跟 AWS LB 直接整合,讓封包到達 LoadBalancer 後直接轉發到對應的 Container
c. 整體架構並不會比團隊目前架構複雜
d. 唯一缺點大概就是這個解決方案是完全 AWS 綁定,所以想要透過 k8s 來打造一個跨 Cloud Provider 的統一介面可能就會遇到不好轉移的問題。
4. DevOps
Ably:
a. 開發團隊可以透過簡單的設定檔案來調整部署軟體的版本,後續相關機制就會將 VM 給替換掉,然後網路流量也會自然的導向新版服務
K8s:
a. 開發團隊改使用 Kubernetes 的格式來達到一樣的效果,雖然背後運作的方式不同但是最終都可以對開發團隊帶來一樣的效果。
上次四個分析基本上就是,使用 k8s 沒有帶來任何突破性的好處,但是 k8s 本身還有其他的功能,所以接下來作者想看看 k8s 是否能夠從其他方面帶來好處
Multi-Cloud Readiness
作者引用兩篇文章的內容作為開頭,「除非經過評估,否則任何團隊都應該要有一個跨 Cloud-Provider 的策略」
作者表明自己團隊的產品就是那個經過評估後斷言不需要跨 Cloud Provider 策略的團隊,同時目前沒有往這個方向去追求的打算。
同時作者也不認為 K8s 是一個能夠有效達成這個任務的工具。舉例來說,光 Storage 每家的做法都不同,而 K8s 沒有辦法完全將這些差異性給抽象畫,這意味者開發者終究還是要針對這些細節去處理。
Hybrid Cloud Readiness
管理混合雲(Public Cloud + Private Cloud based on Bare-Metal servers)是作者認為一個很合理使用 K8s 的理由,畢竟這種用法就跟當初 Google Borg 用法一致,是經過驗證可行的。
所以 Ably 如果有計畫要維護自己的資料中心時,底層就會考慮使用 Kubernetes 來管理服務。畢竟這時候沒有任何 Cloud Provider 提供任何好像的功能。
不過 Ably 目前沒有任何計畫,所以這個優點也沒有辦法幫助到團隊
Infrastructure as Code
團隊已經大量使用 Terraform, CloudFormation 來達成 IaC,所以透過 k8s YAML 來維護各種架構不是一個必要且真的好用的方式。
Access to a large and active community
另外一個很多人鼓吹 K8S 的好處就是有龐大的使用者社群,社群內有各種問題分享與探討。
作者認為
a. AWS 的使用者社群數量是高於 Kubernetes
b. 很多情況下,一個迭代太快速的產品其實也不一定對團隊有太大的幫助。
c. 很多人都使用 k8s,但是真正理解 k8s 的人微乎其微,所以想要透過社群來幫忙解決問題其實比你想像的還要難,畢竟裡面的問題太雜,很多時候根本很難找到一個真正有效的答案。
Added Costs of Kubernetes
為了轉移到 K8s, 團隊需要一個全新的 team 來維護 k8s 叢集以及使用到的所有基本服務。舉例來說,EKS, VPN CNI, AWS LB 帶來的網路好處並不是啟動 EKS 就會有的,
還必須要安裝相關的 Controller 並且進行設定,這些都是額外的維運成本。
如果找其他的服務供應商來管理 Kubernetes,這意味公司就要花費更多的$$來處理,所以對團隊來說,金錢與工作量都會提高,不同的解決方式只是這兩個指標的比例不同而已。
結論:
1. Ably 覺得 Kubernetes 做得很好,但是團隊目前沒有任何計畫去使用它,至少目前這階段沒有看到任何實質好處
2. 仔細評估後會發現,導入 k8s 其實也會帶出不少管理上的問題,反而並沒有減輕本來的負擔
同時也有2部Youtube影片,追蹤數超過93萬的網紅Bubzvlogz,也在其Youtube影片中提到,Nelson Mandela once said that the greatest weapon to change the world is by education. Beauty is knowledge and knowledge is power, after all we cannot...
「infrastructure as a code」的推薦目錄:
- 關於infrastructure as a code 在 矽谷牛的耕田筆記 Facebook 的精選貼文
- 關於infrastructure as a code 在 拿督雷智雄博士 Dato' Tony Looi Chee Hong Facebook 的最讚貼文
- 關於infrastructure as a code 在 矽谷牛的耕田筆記 Facebook 的最佳貼文
- 關於infrastructure as a code 在 Bubzvlogz Youtube 的最佳解答
- 關於infrastructure as a code 在 M13 Youtube 的精選貼文
- 關於infrastructure as a code 在 Create and configure infrastructure elements in seconds 的評價
- 關於infrastructure as a code 在 An example Infrastructure as Code project using ... - GitHub 的評價
infrastructure as a code 在 拿督雷智雄博士 Dato' Tony Looi Chee Hong Facebook 的最讚貼文
🔥🔥 10 Points in Response to the Prime Minister's "Recovery Plan". Window Dressing Is Not Going To Cut It This Time | Industries Unite
(1) The fact that we have a one-pager after enduring the pandemic for 15months, speaks volumes of the perceived indecisiveness, inefficiency and lack of a cohesive idea on the part of the Government on how and when we are going to come out of this. Contain the pandemic and have a structured economic recovery.. There are too many if's and variables in play for the plan to actually spur the confidence of the #Rakyat.
(2) Weren't we at these levels last year? Unless we have a clear and defined path forward the idea that we will come out of this in September or October 2021, is not convincing; amongst others as the whole plan is entirely based on the accuracy of purported numbers of infected persons and the availability of vaccinations on time. Many analysts have openly stated serious doubts on this.
(3) There are serious doubts about the absolute numbers that the government is resting the substratum of the 'Recovery Plan' on. Limited and variable testing numbers and testings may mean that there are flaws in the absolute numbers being relied upon here. This appears to be supported by the Code-Blue stats.
(4) Where is the tracking data on clusters and contact tracing?
Without this, we are fighting with eyes closed. In any case, most of the cases appear to be asymptomatic, so are the numbers correct?
(5) What if this doesn't work? We simply cannot afford to get it wrong now, the fear is that the projection put forward by you, is not based on any data that has been made available to be scrutinised and verified. Just a blanket wish-list. With the current numbers of new cases and the projection of average positivity rate. With the data, We will be able to see the real numbers (projected forecast) and tabulate a much more concrete plan. However, is the government not doing this because as the numbers are bad? These are serious questions that we have.
(6) Increasing the capacity to vaccinate should be the priority moving forward. Delay and bureaucracy are issues ignored here. Private practitioners who have been inoculating children and adults for decades are not being fully mobilised , these private practitioners, who are by law allowed to vaccinate the public are frustrated by the process of having to register and by trained by a private company #ProtectHealth. The Government's refusal to fully utilise the existing infrastructure of the many #Klinik #Kesihatan and government hospital out-patient facilities, preferring them to mega #PPVs is not optimising the capacity to vaccinate. They have not taken into account that many people especially in the rural areas do not have smart phones or connectivity, yet we insist on deployment of a RM70 million application that has shown itself to crash twice! A manual system was used to great effect in the USA and UK to great effect in simplifying the process and increasing capacity.
(7) The idea of employers being allowed to pay to vaccinate raises the question of allocation of vaccines and a two class system of vaccination process.
(8 ) There is no indication of how and when the vaccination are going to be distributed to the states. Why are we not involving the individual state health apparatus. Surely, they are already set up and are better positioned to roll it out .
(9) Where are the dollars and cents in numbers, in-terms of assistance and Aid to the #public and #businesses to stabilise their economic position for the duration that there are restrictions on movement (#FMCO). Where is the Plan B, in case the targets as stated are not met? What is the plan? Can the government be sure?
(10) Surely a recovery plan should include a plan for Economic Recovery over at least 3 years. If there is One, Where is it?
(11) Do we have an adequate safety net for the public? There is no indication of when people will get back jobs and when, businesses will get back to normal. One cannot assume economically everything will be ok, once we reach October 2021.
It will take many months thereafter to get back to employability and profitability. So whats the plan for that? What are the projections? What are the solutions? What is the plan ?
WE SIMPLY CANNOT AFRORD TO GET THIS WRONG THIS TIME.
PEOPLE ARE DYING. BUSINESSES ARE FOLDING. WE NEED MORE.
Dato' David Gurupatham
Datuk Irwin SW Cheong
On-behalf of #IndustriesUnite.
#OneVoice #kitajagakita #ManaPelan #JabatanPerdanaMenteri #RecoveryPlan #MOFMalaysia #KementerianKewanganMalaysia #KKM #covid19 #PKP3 #MCO3 #RintihanRakyat
infrastructure as a code 在 矽谷牛的耕田筆記 Facebook 的最佳貼文
今天這篇文章要探討的是如何透過 helmfile 這個專案來管理你的 helm charts,你如果目前是採用 helm charts 來管理 kubernetes 內的應用程式,同時單純使用 helm charts 覺得卡卡的,想要探索更多不同的管理工具,那非常推薦來研究看看 helmfile
# 可能問題
過往使用 Helm 來管理應用程式時,你會需要使用 helm 這個指令來進行管理,不論是安裝,解除,升版,降版,甚至是傳遞不同的參數,這一系列的操作都需要透過 helm 的指令來安裝。
當今天目標叢集內有多個應用程式都需要透過 helm 來處理時,你會怎麼做?
一種可能的做法就是撰寫相關的 script,把所有會用到的 helm 指令都包進來,接下來於 CI/CD 的過程中去呼叫這個 script 來處理
那有沒有一個現成的工具,可以更優雅的幫忙處理這個問題,甚至透過這個方式讓我們也可以採用 Infrastructure as Code 的方式來部署與管理 Helm Charts.
如果你對於這個議題有興趣,可以快速的看看下列原文,原文中用一個簡單的範例去示範如何使用 helmfile 來安裝與管理多個 helm charts.
https://medium.com/swlh/how-to-declaratively-run-helm-charts-using-helmfile-ac78572e6088
infrastructure as a code 在 Bubzvlogz Youtube 的最佳解答
Nelson Mandela once said that the greatest weapon to change the world is by education. Beauty is knowledge and knowledge is power, after all we cannot grow without learning. Let’s do something incredible TOGETHER before the year ends.If you want to improve standard of life, then we must improve education. It is the foundation to improving the economy, gender equality, hygiene, infrastructure and so much more.
All profits from the Dream lippie and Big Much Tee will go straight to fund building schools for the children of Guatemala. Whether you want to spoil yourself or a loved one, know that your support would also be the ultimate feel good gift for the holidays as you would be giving the gift of quality education, a safe environment for children to learn everyday and clean water consumption. As my Pencil Of Promise family says, 'everyone has promise'.
To support the cause,
Purchase the Dream Lippie here:
http://bit.ly/DREAM5
Purchase the BIG MUCH Shirt here: http://bit.ly/BUBZSHIRT
Purchase the Bubz Bundle (Shirt and Lippie special offer) here: http://bit.ly/BUBZBUNDLE
Use promo code 'DREAM5' for $5 off!
Thank you BIG much for your support. All of this is made possible only because of you.
Ending instrumental "The Lights Ahead" by MJ Lee:
https://mjleedot.com
With love, the Bubz family xo
Hi, I'm Lindy! Welcome to the Bubz family. I am a beauty, lifestyle and mommy vlogger. We make daily vlogs we call daily doses of happiness! New Vlogs every MONDAY, WEDNESDAY and FRIDAY (test run). Join us as we navigate this journey we call life and keep up with our crazy little family adventures. Be sure to SUBSCRIBE so we can continue to put a smile on your face. Do make new friends with fellow Bubscribers. I promise you they are the sweetest bunch ever! If you enjoyed today’s vlog, don’t forget to give it a LIKE.
Subscribe to my Vlog channel for daily doses of HAPPINESS!
http://bit.ly/BubzVlogz
Subscribe to my Beauty Channel here:
http://bit.ly/BubzBeauty
Connect with me:
MY WEBSITE: http://www.bubzbeauty.com
TWITTER: http://www.twitter.com/bubzbeauty
INSTAGRAM: http://www.instagram.com/itsbubz
TIM'S INSTAGRAM: http://www.instagram.com/bubzhubz
FACEBOOK: http://www.facebook.com/itsbubz
ADD ME ON SNAPCHAT: “THEREALBUBZ”
BUY MY EYESHADOW PALETTE HERE: http://bit.ly/BUBZpalette
BUY MY BOOK: https://amzn.to/2A6Ha5D
KINDLE VERSION available on Amazon: http://bit.ly/BubzEguide
SHOP MY LIPSTICKS: http://bit.ly/bubzlippies
Purchase the Bubz Bundle (Shirt and Lippie special offer): http://bit.ly/BUBZBUNDLE
infrastructure as a code 在 M13 Youtube 的精選貼文
Tour Taiwan with me: http://taiwantoursm13.com/
Private Channel: https://www.patreon.com/M13
My Facebook: https://www.facebook.com/Mordeth13
Support M13 buy my Private Series: http://www.m13online.com/?page_id=294
World's best motorcycle pants are RHOK (search Ebay for them) My first time trying out the Multiplayer on Homefront. This is a review of sorts showing the gameplay of my first time on.
If you are gonna upgrade your computer in the future then be sure to check out: http://www.nzxt.com/new/ before you do.
HomeFront:
"We want to stress that Homefront is one of a tiny handful of titles offering dedicated server support on console, and the infrastructure and networking code required to support this is much more complex and demanding than simple peer-to-peer matchmaking you see in most other FPS games. The pay-off is larger maps, more players, and an equal playing field for all -- something we believe is critical for fair, balanced online FPS gameplay.
Every game that goes the extra mile to provide dedicated servers faces additional teething problems in the first few days as the kinks are ironed out, but please bear with us as we address these -- the result will be worth it."
infrastructure as a code 在 An example Infrastructure as Code project using ... - GitHub 的推薦與評價
Infrastructure as a code · define all infrastructure as version-controlled text files · automate deployment and provisioning ·...all other IaC benefits already ... ... <看更多>
infrastructure as a code 在 Create and configure infrastructure elements in seconds 的推薦與評價
Infrastructure as code (IaC) is the practice of configuring and managing infrastructure such as networks or machine readable files and is ... ... <看更多>