<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Github - 東東 GCP 教學 - GCP 實戰講師</title>
	<atom:link href="https://dongdonggcp.com/tag/github/feed/" rel="self" type="application/rss+xml" />
	<link>https://dongdonggcp.com</link>
	<description>助你考取證照，轉職成功</description>
	<lastBuildDate>Mon, 02 Dec 2024 13:27:49 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://dongdonggcp.com/wp-content/uploads/2025/04/cropped-340838097_121391010914395_5443948698124160121_n-32x32.jpg</url>
	<title>Github - 東東 GCP 教學 - GCP 實戰講師</title>
	<link>https://dongdonggcp.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[GKE 教學] GitOps 方法論是什麼東東？GitOps的工作流程是什麼？</title>
		<link>https://dongdonggcp.com/2024/12/02/what-is-gitops-methodolity-what-is-gitops-process/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-is-gitops-methodolity-what-is-gitops-process</link>
					<comments>https://dongdonggcp.com/2024/12/02/what-is-gitops-methodolity-what-is-gitops-process/#respond</comments>
		
		<dc:creator><![CDATA[東東]]></dc:creator>
		<pubDate>Mon, 02 Dec 2024 13:27:49 +0000</pubDate>
				<category><![CDATA[Google Cloud Platform]]></category>
		<category><![CDATA[ArgoCD]]></category>
		<category><![CDATA[CICD]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Flux]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[GitOps]]></category>
		<category><![CDATA[GKE]]></category>
		<category><![CDATA[Google Kubernetes Engine]]></category>
		<category><![CDATA[Jenkins X]]></category>
		<guid isPermaLink="false">https://dongdonggcp.com/?p=8235</guid>

					<description><![CDATA[<p>GitOps方法論是什麼？ GitOps [&#8230;]</p>
<p>The post <a href="https://dongdonggcp.com/2024/12/02/what-is-gitops-methodolity-what-is-gitops-process/">[GKE 教學] GitOps 方法論是什麼東東？GitOps的工作流程是什麼？</a> first appeared on <a href="https://dongdonggcp.com">東東 GCP 教學 - GCP 實戰講師</a>.</p>]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading">GitOps方法論是什麼？</h2>



<p class="wp-block-paragraph">GitOps是一種現代的軟體部署和運維方法論，核心理念是使用Git作為單一事實來源(Single Source of Truth)，所有系統設定和基礎設施都以程式碼形式存儲在Git倉庫中，以宣告式語法來描述整個系統狀態。</p>



<p class="wp-block-paragraph">主要特點</p>



<ol class="wp-block-list">
<li>自動化同步：系統會自動將Git倉庫中的期望狀態與實際運行環境同步</li>



<li>版本控制：所有更改都有完整的版本歷史記錄</li>



<li>可稽核性：每個變更都可以追踪誰在什麼時候做了什麼修改</li>



<li>回滾能力：可以輕鬆回退到任何之前的版本</li>
</ol>



<p class="wp-block-paragraph">優點如下：</p>



<ol class="wp-block-list">
<li>提高部署一致性和可靠性</li>



<li>減少人為錯誤</li>



<li>更容易進行協作和審查</li>



<li>簡化復原流程</li>
</ol>



<p class="wp-block-paragraph">常用工具包含：Flux、ArgoCD、Jenkins X、Config Connector (Google Cloud 專屬)。</p>



<p class="wp-block-paragraph">GitOps特別適合管理Kubernetes環境，因為Kubernetes本身就是基於聲明式配置的系統。這也是為什麼在GKE環境中，Config Connector配合GitOps方法論會是一個理想的選擇。</p>



<p class="wp-block-paragraph">撇開 GKE，Flux 和 ArgoCD 就是兩個業界常用的 GitOps 工具</p>



<p class="wp-block-paragraph">Flux:</p>



<ul class="wp-block-list">
<li>像是一個勤奮的管家,會定期檢查 Git 程式碼庫有沒有更新</li>



<li>如果發現更新了,就會自動把新的設定套用到系統</li>



<li>特別適合單一團隊使用,設定相對簡單</li>
</ul>



<p class="wp-block-paragraph">ArgoCD:</p>



<ul class="wp-block-list">
<li>功能比較豐富,有圖形化介面可以看系統狀態</li>



<li>可以管理多個專案和團隊</li>



<li>提供更多進階功能,例如可以設定部署的順序和條件</li>
</ul>



<p class="wp-block-paragraph">這兩個工具的主要差別在於:</p>



<ul class="wp-block-list">
<li>Flux 比較輕量化,適合小型專案</li>



<li>ArgoCD 功能比較完整,適合大型組織使用</li>



<li>Flux 通常整合在系統內,ArgoCD 則是獨立運作的服務</li>
</ul>



<p class="wp-block-paragraph">你要選擇哪一個,主要看:</p>



<ol class="wp-block-list">
<li>團隊規模大小</li>



<li>是否需要圖形化介面</li>



<li>需要的進階功能有哪些</li>



<li>維護的難易程度</li>
</ol>



<h2 class="wp-block-heading">GitOps的工作流程是什麼？</h2>



<figure class="wp-block-image aligncenter size-large"><img decoding="async" src="https://dongdonggcp.com/wp-content/uploads/2024/12/e688aae59c96-2024-12-10-e4b88be58d884.26.39.png?w=1024" alt="" class="wp-image-8354" /><figcaption class="wp-element-caption">資料來源：<a href="https://pradeepl.com/blog/gitops/">pradeepl.com</a></figcaption></figure>



<ol class="wp-block-list">
<li>開發階段</li>
</ol>



<ul class="wp-block-list">
<li>開發人員在本地開發功能或修改</li>



<li>將所有設定檔（包括應用代碼、基礎設施配置）存儲在 Git 倉庫 (Repository)，例如 Github。</li>



<li>創建 Pull Request（PR）提交更改</li>
</ul>



<ol start="2" class="wp-block-list">
<li>審核階段</li>
</ol>



<ul class="wp-block-list">
<li>其他團隊成員審查代碼變更</li>



<li>自動化測試運行檢查</li>



<li>CI（持續整合）流程驗證更改</li>



<li>審核通過後合併到主分支 (Main Branch)</li>
</ul>



<ol start="3" class="wp-block-list">
<li>同步階段</li>
</ol>



<ul class="wp-block-list">
<li>GitOps 操作器（如 ArgoCD 或 Flux）持續監控 Git 倉庫</li>



<li>自動檢測到主分支的新變更</li>



<li>比較目標環境與 Git 中定義的期望狀態</li>
</ul>



<ol start="4" class="wp-block-list">
<li>部署階段</li>
</ol>



<ul class="wp-block-list">
<li>操作器自動將變更同步到目標環境</li>



<li>執行必要的部署和配置更新</li>



<li>確保實際狀態與 Git 中定義的狀態一致</li>
</ul>



<ol start="5" class="wp-block-list">
<li>監控與修正</li>
</ol>



<ul class="wp-block-list">
<li>持續監控部署狀態</li>



<li>如果檢測到偏差，自動進行修正</li>



<li>將實際狀態調整回 Git 中定義的期望狀態</li>
</ul>



<ol start="6" class="wp-block-list">
<li>回滾機制</li>
</ol>



<ul class="wp-block-list">
<li>如果發現問題，可以快速回滾</li>



<li>只需將 Git 倉庫回退到之前的穩定版本</li>



<li>操作器會自動將環境同步到回滾後的狀態</li>
</ul>



<p class="wp-block-paragraph">整個流程的核心是：</p>



<ul class="wp-block-list">
<li>所有更改都通過 Git 進行</li>



<li>自動化工具負責同步和部署</li>



<li>持續確保系統狀態與 Git 定義保持一致</li>
</ul>



<p class="wp-block-paragraph">這種工作流程特別適合：</p>



<ul class="wp-block-list">
<li>Kubernetes 環境管理</li>



<li>微服務架構</li>



<li>大規模分布式系統</li>



<li>需要嚴格變更控制的環境</li>
</ul>



<p class="wp-block-paragraph"></p><p>The post <a href="https://dongdonggcp.com/2024/12/02/what-is-gitops-methodolity-what-is-gitops-process/">[GKE 教學] GitOps 方法論是什麼東東？GitOps的工作流程是什麼？</a> first appeared on <a href="https://dongdonggcp.com">東東 GCP 教學 - GCP 實戰講師</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://dongdonggcp.com/2024/12/02/what-is-gitops-methodolity-what-is-gitops-process/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
