<?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>Config Connector - 東東 GCP 教學 - GCP 實戰講師</title>
	<atom:link href="https://dongdonggcp.com/tag/config-connector/feed/" rel="self" type="application/rss+xml" />
	<link>https://dongdonggcp.com</link>
	<description>助你考取證照，轉職成功</description>
	<lastBuildDate>Mon, 07 Apr 2025 06:12:32 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://dongdonggcp.com/wp-content/uploads/2025/04/cropped-340838097_121391010914395_5443948698124160121_n-32x32.jpg</url>
	<title>Config Connector - 東東 GCP 教學 - GCP 實戰講師</title>
	<link>https://dongdonggcp.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">243235092</site>	<item>
		<title>[GKE 教學] Config Connector 是什麼東東？如何使用？</title>
		<link>https://dongdonggcp.com/2024/12/02/gke-what-is-config-connector-and-how-to-use/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gke-what-is-config-connector-and-how-to-use</link>
					<comments>https://dongdonggcp.com/2024/12/02/gke-what-is-config-connector-and-how-to-use/#respond</comments>
		
		<dc:creator><![CDATA[東東]]></dc:creator>
		<pubDate>Mon, 02 Dec 2024 13:42:12 +0000</pubDate>
				<category><![CDATA[Google Kubernetes Engine]]></category>
		<category><![CDATA[Config Connector]]></category>
		<category><![CDATA[GitOps]]></category>
		<category><![CDATA[GKE]]></category>
		<category><![CDATA[K8s]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<guid isPermaLink="false">https://dongdonggcp.com/?p=8242</guid>

					<description><![CDATA[<p>Config Connector 是 G [&#8230;]</p>
<p>The post <a href="https://dongdonggcp.com/2024/12/02/gke-what-is-config-connector-and-how-to-use/">[GKE 教學] Config Connector 是什麼東東？如何使用？</a> first appeared on <a href="https://dongdonggcp.com">東東 GCP 教學 - GCP 實戰講師</a>.</p>]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">Config Connector  是 GCP 推出的一個重要工具，它可以讓我們用 Kubernetes 的方式來管理 Google Cloud 上的各種資源。</p>



<p class="wp-block-paragraph">簡單來說，它就像是一個翻譯器，把 Google Cloud 的資源轉換成 Kubernetes 可以理解的格式。</p>



<p class="wp-block-paragraph">在實際使用中，Config Connector 扮演著橋樑的角色。</p>



<p class="wp-block-paragraph">當我們想要在Google Cloud上建立新的服務，比如說建立一個 Cloud Storage Bucket 或是設定一個負載平衡器，我們不需要去 GCP 的控制台點點按按，而是可以直接用 Kubernetes 的設定檔來描述我們想要的資源。</p>



<p class="wp-block-paragraph">Config Connector會自動幫我們在Google Cloud上建立這些資源，並且持續確保它們的狀態符合我們的期望。</p>



<p class="wp-block-paragraph">這個工具的強大之處在於它的自動化能力。</p>



<p class="wp-block-paragraph">比如說，如果有人不小心在 GCP Console 上手動修改了某些設定，Config Connector 會自動發現這個變化，並把它改回到我們在設定文件中定義的狀態。這樣可以確保我們的環境始終保持一致性。</p>



<p class="wp-block-paragraph">在安全性方面，Config Connector 完全整合了 Kubernetes 的權限管理系統。代表我們可以精確控制誰能夠管理哪些 GCP 的資源，而且所有的操作都有完整的稽核記錄。</p>



<p class="wp-block-paragraph">使用 Config Connector 的時候，我們需要先在 Kubernetes Cluster 中安裝它，然後配置適當的權限。之後，我們就可以用 YAML 格式的設定檔來描述我們想要的Google Cloud資源。</p>



<p class="wp-block-paragraph">這些配置文件可以存放在Git倉庫中，配合 CI/CD 流程實現自動化部署。</p>



<p class="wp-block-paragraph">在實際工作中，Config Connector 特別適合需要經常建立和管理GCP 資源的團隊。</p>



<p class="wp-block-paragraph">比如說開發團隊需要經常建立測試環境，或者維運團隊需要統一管理多個專案的資源，使用 Config Connector 都能大大提高工作效率。</p>



<p class="wp-block-paragraph">當遇到問題時，我們可以通過查看 Config Connector 的 Log 來進行故障排除。它會清楚地告訴我們哪裡出了問題，比如權限不足或者資源設定有誤。這讓問題診斷和修復變得更加直接和簡單。</p>



<p class="wp-block-paragraph">總的來說，Config Connector 是一個非常實用的工具，它讓 GCP 資源的管理變得更加自動化和規範化，特別適合已經在使用Kubernetes的團隊。它不僅簡化了日常運維工作，還能確保環境的一致性和可靠性。</p>



<p class="wp-block-paragraph">要使用 Config Connector，先準備以下 YAML 檔案：</p>



<pre class="wp-block-code"><code>apiVersion: core.cnrm.cloud.google.com/v1beta1
kind: ConfigConnector
metadata:
  name: configconnector.core.cnrm.cloud.google.com
spec:
  mode: cluster
  googleServiceAccount: GSA_NAME@PROJECT_ID.iam.gserviceaccount.com</code></pre>



<p class="wp-block-paragraph">當這個 YAML 被應用 (Apply) 到GKE後，它會在你的 Kubernetes Cluster 中設置 Config Connector，並且設定使用指定的 Google Service Account 來操作 GCP 資源。</p>



<p class="wp-block-paragraph">例如我們想要建立一個 Bucket，可以準備以下的 YAML 檔：</p>



<pre class="wp-block-code"><code>apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
metadata:
  name: my-bucket
spec:
  location: US-CENTRAL1
  uniformBucketLevelAccess: true</code></pre>



<p class="wp-block-paragraph">當這個 YAML 被套用 Apply 到 GKE 後，流程是這樣的：</p>



<ol class="wp-block-list">
<li>GKE 中的 Config Connector 會讀取這個YAML檔</li>



<li>Config Connector 會解析這個檔案，了解到你想要創建一個Cloud Storage bucket</li>



<li>Config Connector 會使用它被配置的 Google Service Account的權限</li>



<li>通過 Google Cloud API 去創建實際的 Storage bucket</li>



<li>持續監控這個 bucket 的狀態，確保它符合 YAML 中描述的配置</li>
</ol>



<p class="wp-block-paragraph">如果之後有人直接在 GCP 控制台修改了這個 bucket 的設定，Config Connector 會自動發現並改回 YAML 檔中定義的狀態。</p>



<p class="wp-block-paragraph">這就是為什麼它特別適合用在 GitOps 的工作流程中，因為它能確保實際的 GCP 資源狀態始終與程式碼倉庫中的定義保持一致。</p>



<p class="wp-block-paragraph"></p><p>The post <a href="https://dongdonggcp.com/2024/12/02/gke-what-is-config-connector-and-how-to-use/">[GKE 教學] Config Connector 是什麼東東？如何使用？</a> first appeared on <a href="https://dongdonggcp.com">東東 GCP 教學 - GCP 實戰講師</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://dongdonggcp.com/2024/12/02/gke-what-is-config-connector-and-how-to-use/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8242</post-id>	</item>
	</channel>
</rss>
