Kubernetes 7週年:它爲什麼如此受歡迎?

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"今年 6 月 7 日,Kubernetes 迎來 7 週年。七年前,當谷歌宣佈 Kubernetes 項目時,誰也不曾想到它會取得如此大的成功。作爲後起之秀,Kubernetes 打敗了 Docker,成爲容器編程領域的事實標準,改變了整個容器市場的格局。當今,Kubernetes 已經成爲廣受認可的基礎設施領域工業標準,變成雲計算平臺上的主角。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在 Kubernetes 七週年之際,InfoQ 採訪了項目創始人 Craig McLuckie 和 Joe Beda,與他們聊了聊 Kubernetes 的過去、現在和未來。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Kubernetes 創始人、VMware 應用現代化業務部門研發副總裁 Craig McLuckie 說:“我們看到,Kubernetes 在過去七年曆程中精彩紛呈。它從最初我們兩個人非常大膽的想法,到今天已經發展成有很多發行版的技術。這確實是一段不可思議的歷程。”"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"源於 Project 7"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對 Kubernetes 來說,七週年很獨特,Craig McLuckie 稱“特別強調一下 Kubernetes 的七歲生日是一個非常特殊的生日”,因爲 Kubernetes 最初在谷歌內部起步時,該項目名稱就叫 Project 7(七號項目)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/69\/69b911b34604261114c4d0af5a0986b0.jpeg","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"Kubernetes 創始人、VMware 首席工程師 Joe Beda"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"據 Kubernetes 創始人、VMware 首席工程師 Joe Beda 解釋,這個名字是來自於科幻電影《Star Trek》(中文“星際迷航”)提供的靈感。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是,在後來發展過程中,由於“谷歌律師提出了不同意見”,所以谷歌無法對外繼續使用 Project 7 這個名稱。因此,該項目被改名叫 Kubernetes。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"據兩位創始人介紹,Kubernetes 這個名字源於希臘語,意爲“舵手”或“飛行員”。他們表示,“說實話,我們之所以選擇這個詞,很大一部分原因是很難找到另一個可以讓谷歌法律團隊批准的名字”。同時,Kubernetes 有時縮寫爲K8s,這是因爲K和 s 之間有八個字符的關係。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"據悉,Kubernetes 建立在谷歌大規模運行生產工作負載十幾年的經驗基礎上。它源自 Borg,在谷歌用 Go 語言對它重寫後,最終取名 Kubernetes。2014 年,谷歌正式開源 Kubernetes 項目。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲什麼選擇開源 Kubernetes 項目?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他們稱,“我們希望把 Borg 的經驗分享給谷歌之外的人,因此把它變成一個開源項目是最好的選擇。我們想要的是一種共享方式,與社區分享我們在如何開發分佈式應用程序方面的專業知識。除了公司在其數據中心運行的物理機外,還可以更有效地跨雲服務運行代碼。”"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"之後,CNCF(雲原生計算基金會)成立,微軟、亞馬遜雲科技和甲骨文以及 Red Hat、英特爾、IBM 等紛紛加入,Kubernetes 走上快車道。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"企業青睞,挑戰也隨之而來"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"根據 VMware《2021 年 Kubernetes 狀態報告》顯示,持續轉向生產成爲 Kubernetes 乘風破浪的一個重要標誌,從 2020 年報告的 59%增長到今年的 65%。並且擁有超過 500 名開發人員的公司更傾向於在生產環境中運行所有或大部分容器化工作負載(78%)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在兩位創始人看來,一旦投入運營,企業組織可能會享受到諸多益處,包括提高資源利用率、簡化應用程序升級和維護等,“這兩個關鍵 KPI 對業務成果都有着重大影響”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他們說:“不僅如此,Kubernetes 確實是一個龐大生態系統的重要支柱,賦能許多公司,許多項目圍繞其成立並展開。”"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Kubernetes 的採用率持續上升,這意味着它已經穩步進入企業生產環境,並逐步成爲 IT 主流。與此同時,企業還要面對 Kubernetes 帶來的挑戰。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/16\/16e48fa20ee4d514436bd964464056cd.jpeg","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"Kubernetes 創始人、VMware 應用現代化業務部門研發副總裁 Craig McLuckie"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Craig McLuckie 指出,Kubernetes 的成功是伴隨着越來越多人的使用而不斷向前發展。它之所以成功的一個重要方面是因爲圍繞 Kubernetes 出現了大量創新,這些創新在幫助用戶解決實實在在的問題。不過,衆多的創新也爲企業帶來它們必須要梳理清楚的複雜性和挑戰。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"據他介紹,企業部署 Kubernetes 的複雜性主要體現在兩個方面:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一是如何以一種可擴展的方式迅速地運行操作 Kubernetes;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"二是如何讓廣大的開發人員能輕而易舉地用上 Kubernetes。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"挑戰中也蘊藏着機會。Craig McLuckie 和 Joe Beda 在 2016 年 11 月聯合創立 Heptio 公司,其中,Craig McLuckie 擔任 CEO,Joe Beda 擔任 CTO,公司致力於提供專業服務來幫助企業建立和維護由 Kubernetes 提供支持的大型容器環境。2 年後,VMware 收購該公司,Craig McLuckie 和 Joe Beda 也進入 VMware 工作。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Craig McLuckie 在採訪中向 InfoQ 解釋,整個 Kubernetes 的使用呈現指數級增長,“我們與之打交道的每一個企業都在以某種方式部署 Kubernetes,但很多企業的使用方式與我們最初的想象不一樣”,這些企業以一種更加精細粒度的方式部署 Kubernetes,比如構建了很多規模較小的 Kubernetes 集羣。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這樣一種部署模式帶來的最大挑戰之一是企業有了自建的 Kubernetes 集羣后,其自身內部能力卻未及時跟上,無法對這些集羣進行接近實時的升級,即它們的集羣無法最快地通過 Kubernetes 上游項目中的各種創新來進行更新和升級。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這一方面給它們帶來了安全上的隱患,另一方面,也讓它們部署的 Kubernetes 系統無法獲取整個開源社區生機勃勃的創新來源。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在 Craig McLuckie 看來,Kubernetes 和其它基礎設施技術的一個缺點是,它往往是應用程序開發的重點,而非推動者。Kubernetes 應該成爲開發人員暢遊的海洋,但實際狀況卻是它仍未達到期望中易於運行的程度。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"VMware 的《2021 年 Kubernetes 狀態報告》迴應了這一觀點,超過一半(55%)的受訪者表示,在做出選擇時,缺乏內部經驗和專業知識是最大的挑戰。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"與此同時,Kubernetes 安全性是大多數組織(實際高達 97%)面臨的一個顯著問題,並且需要採用 DevSecOps 實踐來確保在端到端容器生命週期中增強安全性。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Kubernetes 成功的核心"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"某種程度上,Kubernetes 的快速發展和壯大與背後的社區息息相關。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"據兩位創始人介紹,在 Kubernetes 項目早期,社區有很多來自不同方向的、偉大的創新想法。“我們無法將它們全部融入到項目中並持續提高可靠性,也不希望項目本身阻礙人們使用 Kubernetes”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因此,他們專注於構建可擴展性的機會,這意味着人們可以構建和擴展 Kubernetes,無需與 Kubernetes 項目本身進行協調。這在很大程度上推動了更廣泛生態系統的發展。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"實際上,他們一開始就把 Kubernetes 做成一個以社區爲中心的項目。在 Kubernetes 發展過程中,既有谷歌的項目,也有來自 VMware、IBM 和 Red Hat 等很多參與者的想法。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Craig McLuckie 和 Joe Beda 強調,“Kubernetes 今天的成功是後期由整個社區開發者攜手努力做到的。社區不僅帶來了廣泛且深刻的經驗和視角,而且幫助釋放開源社區的創新”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"“獨行快,衆行遠”,這或許纔是 Kubernetes 成功的關鍵。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"此外,良好的擴展性、Kubernetes 新版本引入的新功能讓集羣運營者在運行各種不同工作負載時有更大的靈活性:這些因素使得 Kubernetes 越來越受歡迎。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於 Kubernetes 的成功,Craig McLuckie 這樣概括:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一是因爲 Kubernetes 誕生在一個雲服務供應商的內部,所以一開始就知道它將來會有怎樣的發展潛力,應該向什麼方向發展。打個比方,就像玩拼圖的遊戲,我們不光有做這個拼圖需要的所有的塊,而且我們還有它最後的那張圖紙。二是 Kubernetes 一開始就是一個以社區爲中心的項目,除了谷歌,它還吸納了 VMware、IBM、Red Hat 等很多參與者的想法,所以 Kubernetes 在發展過程中具備非常廣泛、深刻多樣的各種經驗和視角。因此,它如今具備非常深刻且強大的力量和價值。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"針對 Kubernetes 目前的成績,兩位創始人表示,“Kubernetes 已經走過七年,但我們認爲它作爲一個社區,仍處於起步階段”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他們說:“我們還有大量且非常精彩的工作要去做。不僅僅讓 Kubernetes 從操作運維角度來說更加簡單易用,而且還要通過 Kubernetes 把基於 Kubernetes 的整個開源社區的創新充分釋放出來。”"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"談到 Kubernetes 的未來,他們“想讓 Kubernetes 變得’無聊乏味‘,讓它足夠可靠,嵌入生態系統中。這樣,它就真的像我們以抽象概念所描述的基礎設施一樣,自然地成爲工作的組成部分,如同消失一般融入在框架中,人們無需額外考慮它的存在”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其次,讓 Kubernetes 變得更具內在彈性、可擴展性和開發人員可訪問性。他們指出,Kubernetes 旅程的下一階段是爲團隊提供更豐富的自助服務體驗,即如何使 Kubernetes 成爲開始構建自助服務供應和自助服務消費體驗的容器,以補充公有云。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他們表示,“展望未來,我們還認爲更激動人心的事取決於圍繞 Kubernetes 形成的更大的生態系統。藉助 VMware Tanzu,我們幫助用戶利用 Kubernetes 更快速地取得成功,同時爲他們敞開大門,利用更廣泛的生態系統進一步賦能”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"注:VMware 在 2019 年發佈 Tanzu,它是用於實現應用程序和基礎架構現代化升級的產品和服務組合,目標是持續不斷地爲生產提供更好的軟件。它爲開發人員提供一種自由,能將應用交付至任意雲端,採用 Kubernetes 不再有障礙,並幫助 IT 管理員轉換技能,爲新一輪的現代化應用提供支持。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"開源與工作倦怠"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在 Craig McLuckie 和 Joe Beda 看來,新冠疫情推動了開發人員、企業與開源技術的互動加速。同時,開源被視爲創新和創意孵化的重要來源,並且一直是很多企業組織的主要焦點。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Joe Beda 說:“就個人而言,我最近在開源上花的時間並不多。我大部分時間在學習並瞭解 Kubernetes 生態系統中正在發生的事情(通過我的 Youtube 頻道直播——tgik.io 上的 TGIK),並支持Tanzu的其他團隊與開源社區合作,提供建議。”"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在開源行業,項目維護正變得日益艱難。在他們看來,工作倦怠(burn out)是開源世界中一個非常現實的問題,”且時刻出現在我們面前“。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他們說:“我們採取的方法是確保有明確的項目目標,並充分明晰其如何爲我們更大的業務目標發揮錦上添花的作用。這使我們能確保爲這些項目提供適當的資金,併爲該項目與社區設定正確的期望。致力於我們的參與可持續性,有望創造合適的環境來防止維護者精疲力盡。”"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後,在談到開發者平衡工作和生活上時,Joe Beda 表示,真正的 10 倍效率開發者是那些讓周圍的人變得更好的人。軟件開發(無論是否開源)從根本上說是一項團隊活動。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他說:“我認爲,在你的開發職業生涯中成長的真正途徑是找到與你的同事更巧妙合作的方法,做一些沒人能做到的驚人的事情。如果你能將境況調整至合適的狀態,它將是可持續的,並創造驚人的結果。”"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章