<?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>동작구조 Archives -</title>
	<atom:link href="https://blog.kwt.co.kr/tag/%eb%8f%99%ec%9e%91%ea%b5%ac%ec%a1%b0/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.kwt.co.kr/tag/동작구조/</link>
	<description>여러분의 돈과 시간을 낭비하지마세요.</description>
	<lastBuildDate>Sat, 05 Oct 2024 14:37:14 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://blog.kwt.co.kr/wp-content/uploads/2022/07/cropped-logo_bg-32x32.jpg</url>
	<title>동작구조 Archives -</title>
	<link>https://blog.kwt.co.kr/tag/동작구조/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>쿠버네티스 시작하기 &#8211; 1 (최소한 알아야 할 것들)</title>
		<link>https://blog.kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ec%8b%9c%ec%9e%91%ed%95%98%ea%b8%b0-%ec%b5%9c%ec%86%8c%ed%95%9c-%ec%95%8c%ec%95%84%ec%95%bc-%ed%95%a0-%ea%b2%83%eb%93%a4/</link>
					<comments>https://blog.kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ec%8b%9c%ec%9e%91%ed%95%98%ea%b8%b0-%ec%b5%9c%ec%86%8c%ed%95%9c-%ec%95%8c%ec%95%84%ec%95%bc-%ed%95%a0-%ea%b2%83%eb%93%a4/#respond</comments>
		
		<dc:creator><![CDATA[시간 조절자]]></dc:creator>
		<pubDate>Mon, 02 Sep 2024 14:18:28 +0000</pubDate>
				<category><![CDATA[기술]]></category>
		<category><![CDATA[쿠버네티스]]></category>
		<category><![CDATA[나중에후회함]]></category>
		<category><![CDATA[동작구조]]></category>
		<category><![CDATA[동작원리]]></category>
		<category><![CDATA[모르면손해]]></category>
		<category><![CDATA[아키텍처]]></category>
		<guid isPermaLink="false">https://kwt.co.kr/?p=781</guid>

					<description><![CDATA[<p>쿠버네티스 시작 전 최소한 알아야 할 것들이 있다.뭔가 명령어가 나와서 따라 치긴 하는데 도무지 뭘 하는건지 알 수 없는 상황이 반복되다보면 문제가 생겼을 때 해결이 어렵고, 마지막 희망 GPT 형님마저 헛소리를 해대면 도무지 방법이 없다. 결국 빠른 문제 해결을 위해선 어디서부터 접근해야하는지 알기 위해 동작 원리를 배워야한다. 말이 빠른 해결이지 자칫 나 혼자 공부, 포트폴리오 [&#8230;]</p>
<p>The post <a href="https://blog.kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ec%8b%9c%ec%9e%91%ed%95%98%ea%b8%b0-%ec%b5%9c%ec%86%8c%ed%95%9c-%ec%95%8c%ec%95%84%ec%95%bc-%ed%95%a0-%ea%b2%83%eb%93%a4/">쿠버네티스 시작하기 &#8211; 1 (최소한 알아야 할 것들)</a> appeared first on <a href="https://blog.kwt.co.kr"></a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>쿠버네티스 시작 전 최소한 알아야 할 것들이 있다.<br>뭔가 명령어가 나와서 따라 치긴 하는데 도무지 뭘 하는건지 알 수 없는 상황이 반복되다보면 문제가 생겼을 때 해결이 어렵고, 마지막 희망 GPT 형님마저 헛소리를 해대면 도무지 방법이 없다.</p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" width="1023" height="513" src="https://blog.kwt.co.kr/wp-content/uploads/2024/09/몸이나쁘면.jpeg" alt="" class="wp-image-783" style="width:514px;height:auto"/></figure>



<p>결국 빠른 문제 해결을 위해선 어디서부터 접근해야하는지 알기 위해 동작 원리를 배워야한다. 말이 빠른 해결이지 자칫 나 혼자 공부, 포트폴리오 같은 것은 트러블 슈팅이 길어지면 포기하기 십상이다.</p>





<h2 class="wp-block-heading">쿠버네티스 아키텍처</h2>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="2076" height="1356" src="https://blog.kwt.co.kr/wp-content/uploads/2024/09/쿠버네티스-아키텍처.png" alt="" class="wp-image-782" style="width:840px;height:auto"/><figcaption class="wp-element-caption">출처 : <a href="https://awskrug.github.io/eks-workshop/introduction/architecture/architecture_control_and_data_overview/">AWS 아키텍처 개요</a></figcaption></figure>



<p>감격스럽다. 정말 간단 명료한 아키텍처 도식화라고 생각된다.<br><a href="https://kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ec%84%a4%ec%b9%98-%eb%ac%b4%ec%a7%80%ec%84%b1-%eb%b3%b5%eb%b6%99/">지난 포스팅</a>에서 <code>kubectl</code>, <code>kubeadm</code>, <code>kubelet</code> 을 설치하고 클러스터를 만들었는데 아무런 설명을 하지 않았기 때문에 우선 위 도식을 기준으로 각 구성요소를 설명하려 한다.</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">쿠버네티스 어떻게 동작하는가?</h2>



<h3 class="wp-block-heading">ControlPlane (컨트롤 플레인)</h3>



<p>쿠버네티스 클러스터를 관리하는 핵심 컴포넌트를 모아서 컨트롤 플레인이라고 부르며 Master Node(마스터 노드)에 설치된다.</p>



<ul class="wp-block-list">
<li><strong>API Server</strong>: 클러스터 내의 모든 명령을 관리한다. <code>kubectl</code>, <code>kubeadm</code> 클라이언트는 API 서버와 통신하여 클러스터를 제어한다.</li>



<li><strong>Scheduler</strong>: 새로운 Pod를 생성할 때 적절한 워커 노드를 선택하는 역할을 수행한다.</li>



<li><strong>Controller Manager</strong>: 클러스터의 상태를 지속적으로 모니터링하며 사용자가 정의한 설정을 유지하기 위한 동작을 한다.</li>



<li><strong>etcd</strong>: 클러스터의 모든 현재 상태 정보를 Key-Value 형태로 저장, 보관한다.</li>
</ul>



<h3 class="wp-block-heading">Worker (워커 노드)</h3>



<p>그림의 <code>worker1</code>은 워커 노드에 해당한다. 실제로 컨테이너가 실행되는 곳이다.</p>



<ul class="wp-block-list">
<li><strong>kubelet</strong>: 각 노드에서 실행되며, API 서버와 통신하여 지정된 Pod가 제대로 실행되고 있는지 확인한다. Pod의 상태를 주기적으로 확인하고, 필요한 작업을 수행한다.</li>



<li><strong>kube-proxy</strong>: 클러스터 내부의 네트워킹을 관리하는 네트워크 프록시. 외부에서 들어오는 트래픽을 적절한 Pod로 라우팅한다.</li>



<li><strong>Pods</strong>: 워커 노드에서 실행되는 가장 작은 단위로, 컨테이너가 이 안에서 동작한다. 각 Pod에는 하나 이상의 컨테이너가 포함될 수 있다.</li>



<li>CRI(<strong>C</strong>ontainer Runtime Interface): 그림에서 <code>docker1</code>이라고 명시된 컨테이너 런타임. 이 런타임이 실제로 컨테이너를 실행시키는 역할을 한다. 과거엔 Docker 를 컨테이너 런타임으로 사용했지만 현재는 Containerd, CRI-O 를 사용한다.</li>
</ul>



<h3 class="wp-block-heading"><strong>동작 과정</strong> 예시</h3>



<ol class="wp-block-list">
<li><code>kubectl</code>을 통해 API 서버에 명령을 내린다.<br><img decoding="async" width="576" height="36" src="https://blog.kwt.co.kr/wp-content/uploads/2024/09/kubectlgetnodes.png" alt="" class="wp-image-785" style="width:383px;height:auto"></li>



<li><code>kubectl</code>은 API 서버의 <code>/api/v1/nodes</code> 엔드포인트에 HTTP GET 요청한다.</li>



<li>API 서버는 <code>kubectl</code>로부터 받은 <code>GET /api/v1/nodes</code> 요청을 처리한다. 상태 정보를 저장한 <code>etcd</code>에서 모든 노드의 정보를 조회, 응답한다.</li>



<li>kubectl 클라이언트가 응답을 포맷팅하여 사용자에게 보여준다.<br><img loading="lazy" decoding="async" width="806" height="174" src="https://blog.kwt.co.kr/wp-content/uploads/2024/09/kubectlgetnodes_result.png" alt="" class="wp-image-786" style="width:472px;height:auto"></li>
</ol>



<p>명령에 따라 사용자 설정을 <code>etcd</code>에 저장하고, 스케줄러가 생성할 파드를 적절한 노드로 결정하며 컨트롤러 매니저가 결정된 설정에 따라 워커 노드의 <code>kubelet</code>에 파드 생성 명령을 내린다.</p>



<p><code>kubectl</code>을 통해 내린 거의 대부분 명령은 API 서버로 요청을 보낸다.</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">이외 알아두면 좋을 것들</h2>



<p>당연히 알아두면 좋을 것은 엄청나게 많다. 하지만 글이 길어지면 받아들이기 쉽지 않다는 것을 안다. 마치 이 글만 보면 될 것처럼 말했었지만 추가 포스팅을 통해 좀 더 알아야 할 내용을 적어야겠다.</p>



<p></p>
		<div class="wpulike wpulike-robeen " ><div class="wp_ulike_general_class wp_ulike_is_restricted"><button type="button"
					aria-label="Like Button"
					data-ulike-id="781"
					data-ulike-nonce="defbc0d959"
					data-ulike-type="post"
					data-ulike-template="wpulike-robeen"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_781"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p>The post <a href="https://blog.kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ec%8b%9c%ec%9e%91%ed%95%98%ea%b8%b0-%ec%b5%9c%ec%86%8c%ed%95%9c-%ec%95%8c%ec%95%84%ec%95%bc-%ed%95%a0-%ea%b2%83%eb%93%a4/">쿠버네티스 시작하기 &#8211; 1 (최소한 알아야 할 것들)</a> appeared first on <a href="https://blog.kwt.co.kr"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ec%8b%9c%ec%9e%91%ed%95%98%ea%b8%b0-%ec%b5%9c%ec%86%8c%ed%95%9c-%ec%95%8c%ec%95%84%ec%95%bc-%ed%95%a0-%ea%b2%83%eb%93%a4/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
