<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
	<channel>
		<title>큐브테크시스템</title>
		<link>https://cubetech.co.kr</link>
		<description>서버직접생산 전문기업</description>
		
				<item>
			<title><![CDATA[K8s Cluster 구축 방법 (How to Build a K8s Cluster)]]></title>
			<link><![CDATA[https://cubetech.co.kr/?kboard_content_redirect=8]]></link>
			<description><![CDATA[<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">1. </span>사전 준비 및 계획 <span style="font-family:'Liberation Serif', serif;">(Pre-requisites and Planning)</span></h3>
<span style="font-family:'맑은 고딕', serif;">Before you start, it's crucial to plan your cluster based on your needs.</span>
<ul>
 	<li><b>클러스터 크기 및 용량 </b><span style="font-family:'맑은 고딕', serif;"><b>(Cluster Size and Capacity):</b></span>
<ul>
 	<li>몇 개의 워커 노드가 필요한가<span style="font-family:'맑은 고딕', serif;">? (How many worker nodes do you need?)</span></li>
 	<li>각 노드의 <span style="font-family:'맑은 고딕', serif;">CPU, RAM, </span>스토리지 요구 사항은<span style="font-family:'맑은 고딕', serif;">? (What are the CPU, RAM, and storage requirements for each node?)</span></li>
 	<li>어떤 종류의 워크로드를 실행할 것인가<span style="font-family:'맑은 고딕', serif;">? (What kind of workloads will you be running?)</span></li>
</ul>
</li>
 	<li><b>네트워크 설정 </b><span style="font-family:'맑은 고딕', serif;"><b>(Network Configuration):</b></span>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;">Pod </span>및 <span style="font-family:'맑은 고딕', serif;">Service CIDR </span>범위는 어떻게 할 것인가<span style="font-family:'맑은 고딕', serif;">? (What will be the Pod and Service CIDR ranges?)</span></li>
 	<li>네트워크 플러그인<span style="font-family:'맑은 고딕', serif;">(CNI) </span>선택 <span style="font-family:'맑은 고딕', serif;">(Choosing a Network Plugin (CNI) - e.g., Calico, Flannel, Cilium)</span></li>
</ul>
</li>
 	<li><b>스토리지 솔루션 </b><span style="font-family:'맑은 고딕', serif;"><b>(Storage Solution):</b></span>
<ul>
 	<li>영구 볼륨<span style="font-family:'맑은 고딕', serif;">(Persistent Volumes)</span>을 위한 스토리지 클래스 <span style="font-family:'맑은 고딕', serif;">(Storage Class for Persistent Volumes - e.g., NFS, Ceph, Cloud-specific storage)</span></li>
</ul>
</li>
 	<li><b>고가용성 </b><span style="font-family:'맑은 고딕', serif;"><b>(High Availability - HA):</b></span>
<ul>
 	<li>컨트롤 플레인 노드를 <span style="font-family:'맑은 고딕', serif;">HA</span>로 구성할 것인가<span style="font-family:'맑은 고딕', serif;">? (Will you configure the control plane nodes for HA?)</span></li>
 	<li>로드 밸런서<span style="font-family:'맑은 고딕', serif;">(Load Balancer) </span>필요성 <span style="font-family:'맑은 고딕', serif;">(Need for a Load Balancer)</span></li>
</ul>
</li>
 	<li><b>운영체제 선택 </b><span style="font-family:'맑은 고딕', serif;"><b>(Operating System Choice):</b></span>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;">Ubuntu, CentOS, RHEL </span>등 <span style="font-family:'맑은 고딕', serif;">(e.g., Ubuntu, CentOS, RHEL)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;">Kubernetes</span>가 지원하는 버전 확인 <span style="font-family:'맑은 고딕', serif;">(Verify Kubernetes supported versions)</span></li>
</ul>
</li>
 	<li><b>툴 선택 </b><span style="font-family:'맑은 고딕', serif;"><b>(Tool Selection):</b></span>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>kubeadm:</b> Kubernetes </span>공식 툴로<span style="font-family:'맑은 고딕', serif;">, </span>프로덕션 환경에 적합 <span style="font-family:'맑은 고딕', serif;">(Official Kubernetes tool, suitable for production environments). </span>이 가이드에서는 <span style="font-family:'맑은 고딕', serif;">kubeadm</span>을 주로 다룰 것입니다<span style="font-family:'맑은 고딕', serif;">. (This guide will primarily focus on kubeadm.)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>kops:</b> </span>클라우드 환경<span style="font-family:'맑은 고딕', serif;">(AWS, GCP </span>등<span style="font-family:'맑은 고딕', serif;">)</span>에 특화된 툴 <span style="font-family:'맑은 고딕', serif;">(Tool specialized for cloud environments like AWS, GCP).</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>minikube:</b> </span>로컬 개발 및 테스트용 <span style="font-family:'맑은 고딕', serif;">(For local development and testing).</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>kind:</b> Docker in Docker</span>를 사용하여 로컬 <span style="font-family:'맑은 고딕', serif;">Kubernetes </span>클러스터 생성 <span style="font-family:'맑은 고딕', serif;">(Creates a local Kubernetes cluster using Docker in Docker).</span></li>
</ul>
</li>
</ul>
<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">2. </span>인프라 준비 <span style="font-family:'Liberation Serif', serif;">(Infrastructure Preparation)</span></h3>
이 가이드에서는 최소 <span style="font-family:'맑은 고딕', serif;">2</span>개의 <span style="font-family:'맑은 고딕', serif;">VM(1 Master, 1 Worker)</span>을 기준으로 설명합니다<span style="font-family:'맑은 고딕', serif;">. (This guide explains based on a minimum of 2 VMs: 1 Master, 1 Worker.)</span>

<b>모든 노드에서 공통 설정 </b><span style="font-family:'맑은 고딕', serif;"><b>(Common settings on all nodes):</b></span>
<ol>
 	<li><b>호스트네임 설정 </b><span style="font-family:'맑은 고딕', serif;"><b>(Set Hostname):</b></span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo hostnamectl set-hostname &lt;your-hostname&gt; # </code></span><code class="cjk">예</code><span style="font-family:'Liberation Mono', monospace;"><code class="western">: master01, worker01</code></span></pre>
</li>
 	<li><span style="font-family:'맑은 고딕', serif;"><code class="western"><b>/etc/hosts</b></code><b> </b></span><b>파일 수정 </b><span style="font-family:'맑은 고딕', serif;"><b>(Modify </b><code class="western"><b>/etc/hosts</b></code><b> file):</b> </span>모든 노드에서 서로의 <span style="font-family:'맑은 고딕', serif;">IP</span>와 호스트네임을 추가합니다<span style="font-family:'맑은 고딕', serif;">. (Add each other's IP and hostname on all nodes.)</span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western"># </code></span><code class="cjk">예시</code> <span style="font-family:'Liberation Mono', monospace;"><code class="western">192.168.1.10 master01</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">192.168.1.11 worker01</code></span></pre>
</li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>SELinux </b></span><b>비활성화 </b><span style="font-family:'맑은 고딕', serif;"><b>(Disable SELinux - CentOS/RHEL):</b> SELinux</span>가 <span style="font-family:'맑은 고딕', serif;">Kubernetes </span>구성 요소 간의 통신을 방해할 수 있습니다<span style="font-family:'맑은 고딕', serif;">. (SELinux can interfere with communication between Kubernetes components.)</span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo setenforce 0</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config</code></span></pre>
</li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Swap </b></span><b>비활성화 </b><span style="font-family:'맑은 고딕', serif;"><b>(Disable Swap):</b> Kubernetes</span>는 <span style="font-family:'맑은 고딕', serif;">Swap </span>메모리를 사용하지 않도록 권장합니다<span style="font-family:'맑은 고딕', serif;">. (Kubernetes recommends disabling swap memory.)</span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo swapoff -a</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab</code></span></pre>
</li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>IP </b></span><b>포워딩 활성화 및 </b><span style="font-family:'맑은 고딕', serif;"><b>bridge-nf-call-iptables </b></span><b>설정 </b><span style="font-family:'맑은 고딕', serif;"><b>(Enable IP Forwarding and bridge-nf-call-iptables):</b> </span>컨테이너 간의 네트워크 통신을 위해 필요합니다<span style="font-family:'맑은 고딕', serif;">. (Required for network communication between containers.)</span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo tee /etc/modules-load.d/k8s.conf &lt;&lt;EOF</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">overlay</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">br_netfilter</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">EOF</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo modprobe overlay</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo modprobe br_netfilter</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo tee /etc/sysctl.d/k8s.conf &lt;&lt;EOF</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">net.bridge.bridge-nf-call-iptables  = 1</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">net.bridge.bridge-nf-call-ip6tables = 1</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">net.ipv4.ip_forward                 = 1</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">EOF</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo sysctl --system</code></span></pre>
</li>
 	<li><b>방화벽 설정 </b><span style="font-family:'맑은 고딕', serif;"><b>(Firewall Configuration - Optional but Recommended):</b> </span>필요한 포트를 열어줍니다<span style="font-family:'맑은 고딕', serif;">. (Open necessary ports.)</span>
<ul>
 	<li><b>컨트롤 플레인 노드 </b><span style="font-family:'맑은 고딕', serif;"><b>(Control Plane Node):</b></span>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;">6443/tcp (Kubernetes API server)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;">2379-2380/tcp (etcd server client API)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;">10250/tcp (Kubelet API)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;">10251/tcp (kube-scheduler)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;">10252/tcp (kube-controller-manager)</span></li>
</ul>
</li>
 	<li><b>워커 노드 </b><span style="font-family:'맑은 고딕', serif;"><b>(Worker Node):</b></span>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;">10250/tcp (Kubelet API)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;">30000-32767/tcp (NodePort Services - default range)</span></li>
</ul>
</li>
</ul>
<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western"># </code></span><code class="cjk">예시</code><span style="font-family:'Liberation Mono', monospace;"><code class="western">: UFW (Ubuntu)</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo ufw allow 6443/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo ufw allow 2379:2380/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo ufw allow 10250/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo ufw allow 10251/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo ufw allow 10252/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo ufw allow 30000:32767/tcp # Worker nodes only</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo ufw enable</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># </code></span><code class="cjk">예시</code><span style="font-family:'Liberation Mono', monospace;"><code class="western">: firewalld (CentOS/RHEL)</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo firewall-cmd --permanent --add-port=6443/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo firewall-cmd --permanent --add-port=2379-2380/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo firewall-cmd --permanent --add-port=10250/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo firewall-cmd --permanent --add-port=10251/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo firewall-cmd --permanent --add-port=10252/tcp</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo firewall-cmd --permanent --add-port=30000-32767/tcp # Worker nodes only</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo firewall-cmd --reload</code></span></pre>
</li>
 	<li><b>컨테이너 런타임 설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Container Runtime):</b> Kubernetes</span>는 컨테이너 런타임<span style="font-family:'맑은 고딕', serif;">(Docker, containerd, CRI-O </span>등<span style="font-family:'맑은 고딕', serif;">)</span>이 필요합니다<span style="font-family:'맑은 고딕', serif;">. containerd</span>를 권장합니다<span style="font-family:'맑은 고딕', serif;">. (Kubernetes requires a container runtime (Docker, containerd, CRI-O, etc.). containerd is recommended.)</span><span style="font-family:'맑은 고딕', serif;"><b>Containerd </b></span><b>설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Containerd):</b></span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western"># 1. containerd.io </code></span><code class="cjk">패키지 설치를 위한 저장소 추가 </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">(Add repository for containerd.io package installation)</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># Ubuntu</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt update &amp;&amp; sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt update</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt install -y containerd.io</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># CentOS/RHEL</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo yum install -y yum-utils</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo yum install -y containerd.io</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># 2. containerd </code></span><code class="cjk">설정 파일 생성 및 재시작 </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">(Create containerd configuration file and restart)</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo mkdir -p /etc/containerd</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo containerd config default | sudo tee /etc/containerd/config.toml</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo systemctl restart containerd</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo systemctl enable containerd</code></span></pre>
</li>
</ol>
<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">3. Kubernetes </span>구성 요소 설치 <span style="font-family:'Liberation Serif', serif;">(Install Kubernetes Components)</span></h3>
모든 노드에서 <span style="font-family:'맑은 고딕', serif;"><code class="western">kubeadm</code>, <code class="western">kubelet</code>, <code class="western">kubectl</code></span>을 설치합니다<span style="font-family:'맑은 고딕', serif;">. (Install <code class="western">kubeadm</code>, <code class="western">kubelet</code>, <code class="western">kubectl</code> on all nodes.)</span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western"># 1. Google GPG </code></span><code class="cjk">키 및 </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">Kubernetes APT/YUM </code></span><code class="cjk">저장소 추가 </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">(Add Google GPG key and Kubernetes APT/YUM repository)</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># Ubuntu</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt update</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt install -y apt-transport-https ca-certificates curl</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># CentOS/RHEL</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">cat &lt;&lt;EOF | sudo tee /etc/yum.repos.d/kubernetes.repo</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">[kubernetes]</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">name=Kubernetes</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">enabled=1</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">gpgcheck=1</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">repo_gpgcheck=1</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">exclude=kubelet kubeadm kubectl</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">EOF</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># 2. kubelet, kubeadm, kubectl </code></span><code class="cjk">설치 및 버전 고정 </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">(Install kubelet, kubeadm, kubectl and pin versions)</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># Ubuntu</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt update</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt install -y kubelet kubeadm kubectl</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo apt-mark hold kubelet kubeadm kubectl</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># CentOS/RHEL</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo systemctl enable --now kubelet</code></span></pre>
<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">4. </span>컨트롤 플레인 노드 초기화 <span style="font-family:'Liberation Serif', serif;">(Initialize Control Plane Node)</span></h3>
<b>마스터 노드에서만 실행 </b><span style="font-family:'맑은 고딕', serif;"><b>(Run only on the master node):</b></span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo kubeadm init --pod-network-cidr=&lt;Your-Pod-Network-CIDR&gt; --control-plane-endpoint=&lt;Master-Node-IP&gt;</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western"># </code></span><code class="cjk">예시</code><span style="font-family:'Liberation Mono', monospace;"><code class="western">: sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --control-plane-endpoint=192.168.1.10</code></span></pre>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;"><code class="western">--pod-network-cidr</code>: </span>사용할 <span style="font-family:'맑은 고딕', serif;">Pod </span>네트워크 범위<span style="font-family:'맑은 고딕', serif;">. </span>선택할 <span style="font-family:'맑은 고딕', serif;">CNI </span>플러그인에 따라 다릅니다<span style="font-family:'맑은 고딕', serif;">. Calico</span>는 일반적으로 <span style="font-family:'맑은 고딕', serif;">192.168.0.0/16</span>을<span style="font-family:'맑은 고딕', serif;">, Flannel</span>은 <span style="font-family:'맑은 고딕', serif;">10.244.0.0/16</span>을 사용합니다<span style="font-family:'맑은 고딕', serif;">. (The Pod network range to use. This depends on the CNI plugin you choose. Calico typically uses 192.168.0.0/16, and Flannel uses 10.244.0.0/16.)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;"><code class="western">--control-plane-endpoint</code>: </span>마스터 노드의 <span style="font-family:'맑은 고딕', serif;">IP </span>주소 또는 로드 밸런서 <span style="font-family:'맑은 고딕', serif;">IP (HA </span>구성 시<span style="font-family:'맑은 고딕', serif;">). (The IP address of the master node or the load balancer IP (for HA configuration).)</span></li>
</ul>
<b>초기화 후 출력되는 지시 사항 따르기 </b><span style="font-family:'맑은 고딕', serif;"><b>(Follow the instructions output after initialization):</b></span>

초기화가 성공하면 다음과 유사한 메시지가 출력됩니다<span style="font-family:'맑은 고딕', serif;">. (If initialization is successful, a message similar to the following will be output.)</span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">Your Kubernetes control-plane has initialized successfully!</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">To start using your cluster, you need to run the following as a regular user:</code></span> <code class="cjk">  </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">mkdir -p $HOME/.kube</code></span> <code class="cjk">  </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config</code></span> <code class="cjk">  </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo chown $(id -u):$(id -g) $HOME/.kube/config</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">You should now deploy a Pod network to the cluster.</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:</code></span> <code class="cjk">  </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">https://kubernetes.io/docs/concepts/cluster-administration/addons/</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">Then you can join any number of worker nodes by running the following on each as root:</code></span> <code class="cjk">  </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">kubeadm join &lt;control-plane-endpoint&gt;:6443 --token &lt;token&gt; \</code></span> <code class="cjk">    </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">--discovery-token-ca-cert-hash sha256:&lt;hash&gt;</code></span></pre>
위 지시 사항에 따라 일반 사용자 계정에서 <span style="font-family:'맑은 고딕', serif;"><code class="western">kubectl</code></span>을 사용할 수 있도록 설정합니다<span style="font-family:'맑은 고딕', serif;">. (Follow the instructions above to configure <code class="western">kubectl</code> for use with a regular user account.)</span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">mkdir -p $HOME/.kube</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo chown $(id -u):$(id -g) $HOME/.kube/config</code></span></pre>
<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">5. CNI (Container Network Interface) </span>플러그인 설치 <span style="font-family:'Liberation Serif', serif;">(Install CNI Plugin)</span></h3>
<b>마스터 노드에서만 실행 </b><span style="font-family:'맑은 고딕', serif;"><b>(Run only on the master node):</b></span>

클러스터 내 <span style="font-family:'맑은 고딕', serif;">Pod </span>간의 네트워크 통신을 위해 <span style="font-family:'맑은 고딕', serif;">CNI </span>플러그인이 필수적입니다<span style="font-family:'맑은 고딕', serif;">. (A CNI plugin is essential for network communication between Pods within the cluster.)</span>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Calico </b></span><b>설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Calico):</b> <code class="western">--pod-network-cidr</code></span>를 <span style="font-family:'맑은 고딕', serif;">192.168.0.0/16</span>으로 설정했다면 <span style="font-family:'맑은 고딕', serif;">Calico</span>를 고려할 수 있습니다<span style="font-family:'맑은 고딕', serif;">. (If you set <code class="western">--pod-network-cidr</code> to 192.168.0.0/16, you might consider Calico.)</span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml</code></span></pre>
</li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Flannel </b></span><b>설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Flannel):</b> <code class="western">--pod-network-cidr</code></span>를 <span style="font-family:'맑은 고딕', serif;">10.244.0.0/16</span>으로 설정했다면 <span style="font-family:'맑은 고딕', serif;">Flannel</span>을 고려할 수 있습니다<span style="font-family:'맑은 고딕', serif;">. (If you set <code class="western">--pod-network-cidr</code> to 10.244.0.0/16, you might consider Flannel.)</span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml</code></span></pre>
</li>
</ul>
<span style="font-family:'맑은 고딕', serif;">CNI </span>플러그인이 배포되면 <span style="font-family:'맑은 고딕', serif;">Pod</span>들이 <span style="font-family:'맑은 고딕', serif;"><code class="western">Running</code> </span>상태로 전환되는 것을 확인할 수 있습니다<span style="font-family:'맑은 고딕', serif;">. (Once the CNI plugin is deployed, you should see Pods transition to the <code class="western">Running</code> state.)</span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">kubectl get pods --all-namespaces</code></span></pre>
<span style="font-family:'맑은 고딕', serif;"><code class="western">coredns</code> Pod</span>들이 <span style="font-family:'맑은 고딕', serif;"><code class="western">Running</code> </span>상태가 되어야 합니다<span style="font-family:'맑은 고딕', serif;">. (<code class="western">coredns</code> Pods should be in the <code class="western">Running</code> state.)</span>
<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">6. </span>워커 노드 클러스터 조인 <span style="font-family:'Liberation Serif', serif;">(Join Worker Nodes to the Cluster)</span></h3>
<b>각 워커 노드에서 실행 </b><span style="font-family:'맑은 고딕', serif;"><b>(Run on each worker node):</b></span>

마스터 노드 초기화 시 출력된 <span style="font-family:'맑은 고딕', serif;"><code class="western">kubeadm
join</code> </span>명령어를 사용합니다<span style="font-family:'맑은 고딕', serif;">. (Use the <code class="western">kubeadm join</code> command output during master node initialization.)</span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo kubeadm join &lt;control-plane-endpoint&gt;:6443 --token &lt;token&gt; \</code></span> <code class="cjk">    </code><span style="font-family:'Liberation Mono', monospace;"><code class="western">--discovery-token-ca-cert-hash sha256:&lt;hash&gt;</code></span></pre>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;"><code class="western">&lt;control-plane-endpoint&gt;</code>: </span>마스터 노드의 <span style="font-family:'맑은 고딕', serif;">IP </span>주소</li>
 	<li><span style="font-family:'맑은 고딕', serif;"><code class="western">&lt;token&gt;</code>: <code class="western">kubeadm init</code> </span>시 생성된 토큰</li>
 	<li><span style="font-family:'맑은 고딕', serif;"><code class="western">&lt;hash&gt;</code>: <code class="western">kubeadm init</code> </span>시 생성된 <span style="font-family:'맑은 고딕', serif;">CA </span>인증서 해시</li>
</ul>
<b>토큰이 만료되었거나 잊어버린 경우 </b><span style="font-family:'맑은 고딕', serif;"><b>(If the token has expired or you forgot it - on master node):</b></span>

새로운 조인 토큰을 생성할 수 있습니다<span style="font-family:'맑은 고딕', serif;">. (You can create a new join token.)</span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">sudo kubeadm token create --print-join-command</code></span></pre>
<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">7. </span>클러스터 확인 <span style="font-family:'Liberation Serif', serif;">(Verify the Cluster)</span></h3>
<b>마스터 노드에서 실행 </b><span style="font-family:'맑은 고딕', serif;"><b>(Run on the master node):</b></span>

<span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">kubectl get nodes</code></span></pre>
모든 노드가 <span style="font-family:'맑은 고딕', serif;"><code class="western">Ready</code> </span>상태여야 합니다<span style="font-family:'맑은 고딕', serif;">. (All nodes should be in the <code class="western">Ready</code> state.)</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">NAME        STATUS   ROLES           AGE   VERSION</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">master01    Ready    control-plane   5m    v1.28.x</code></span> <span style="font-family:'Liberation Mono', monospace;"><code class="western">worker01    Ready    &lt;none&gt;          2m    v1.28.x</code></span></pre>
<h3 class="cjk"><span style="font-family:'Liberation Serif', serif;">8. </span>추가 설정 및 작업 <span style="font-family:'Liberation Serif', serif;">(Additional Configurations and Tasks - Optional)</span></h3>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Kubernetes </b></span><b>대시보드 설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Kubernetes Dashboard):</b> </span>클러스터의 웹 <span style="font-family:'맑은 고딕', serif;">UI</span>를 제공합니다<span style="font-family:'맑은 고딕', serif;">. (Provides a web UI for your cluster.)</span><span style="font-family:'맑은 고딕', serif;">Bash</span>
<pre class="cjk"><span style="font-family:'Liberation Mono', monospace;"><code class="western">kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml</code></span></pre>
대시보드 접근을 위한 <span style="font-family:'맑은 고딕', serif;">ServiceAccount </span>및 <span style="font-family:'맑은 고딕', serif;">ClusterRoleBinding </span>설정이 필요합니다<span style="font-family:'맑은 고딕', serif;">. (ServiceAccount and ClusterRoleBinding setup is required for Dashboard access.)</span></li>
 	<li><b>로드 밸런서 설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Load Balancer - e.g., MetalLB for on-premise):</b> Service Type: LoadBalancer</span>를 사용하려면 온프레미스 환경에서 <span style="font-family:'맑은 고딕', serif;">MetalLB</span>와 같은 로드 밸런서가 필요합니다<span style="font-family:'맑은 고딕', serif;">. (If you want to use Service Type: LoadBalancer, you need a load balancer like MetalLB in an on-premise environment.)</span></li>
 	<li><b>스토리지 클래스 설정 </b><span style="font-family:'맑은 고딕', serif;"><b>(Configure Storage Class):</b> </span>영구 스토리지 사용을 위해 <span style="font-family:'맑은 고딕', serif;">NFS, Ceph, </span>또는 클라우드 제공업체의 <span style="font-family:'맑은 고딕', serif;">CSI </span>드라이버 등을 설정합니다<span style="font-family:'맑은 고딕', serif;">. (Configure NFS, Ceph, or a cloud provider's CSI driver for persistent storage.)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Helm </b></span><b>설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Helm):</b> Kubernetes </span>애플리케이션 관리를 위한 패키지 매니저입니다<span style="font-family:'맑은 고딕', serif;">. (Package manager for Kubernetes application management.)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Ingress Controller </b></span><b>설치 </b><span style="font-family:'맑은 고딕', serif;"><b>(Install Ingress Controller - e.g., Nginx Ingress):</b> </span>클러스터 외부에서 서비스로 트래픽을 라우팅하기 위해 필요합니다<span style="font-family:'맑은 고딕', serif;">. (Required to route traffic from outside the cluster to services.)</span></li>
 	<li><b>모니터링 및 로깅 솔루션 </b><span style="font-family:'맑은 고딕', serif;"><b>(Monitoring and Logging Solutions):</b> Prometheus, Grafana, ELK Stack </span>등을 사용하여 클러스터의 상태를 모니터링하고 로그를 수집합니다<span style="font-family:'맑은 고딕', serif;">. (Use Prometheus, Grafana, ELK Stack, etc. to monitor cluster status and collect logs.)</span></li>
</ul>
<h3 class="cjk">고려 사항 및 문제 해결 <span style="font-family:'Liberation Serif', serif;">(Considerations and Troubleshooting)</span></h3>
<ul>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Kubernetes </b></span><b>버전</b><span style="font-family:'맑은 고딕', serif;"><b>:</b> kubeadm, kubelet, kubectl</span>의 버전은 항상 일치시키는 것이 좋습니다<span style="font-family:'맑은 고딕', serif;">. (It's always recommended to match the versions of kubeadm, kubelet, and kubectl.)</span></li>
 	<li><b>네트워크 설정</b><span style="font-family:'맑은 고딕', serif;"><b>:</b> CNI </span>플러그인과 <span style="font-family:'맑은 고딕', serif;">Pod CIDR </span>범위가 올바르게 설정되었는지 확인합니다<span style="font-family:'맑은 고딕', serif;">. (Ensure CNI plugin and Pod CIDR range are correctly configured.)</span></li>
 	<li><b>방화벽</b><span style="font-family:'맑은 고딕', serif;"><b>:</b> </span>필요한 포트가 모두 열려 있는지 확인합니다<span style="font-family:'맑은 고딕', serif;">. (Ensure all necessary ports are open.)</span></li>
 	<li><span style="font-family:'맑은 고딕', serif;"><b>Swap:</b> Swap</span>이 비활성화되었는지 다시 확인합니다<span style="font-family:'맑은 고딕', serif;">. (Double-check that swap is disabled.)</span></li>
 	<li><b>로그 확인</b><span style="font-family:'맑은 고딕', serif;"><b>:</b> </span>문제가 발생하면 <span style="font-family:'맑은 고딕', serif;"><code class="western">journalctl
-u kubelet</code> </span>또는 각 <span style="font-family:'맑은 고딕', serif;">Kubernetes </span>컴포넌트의 로그를 확인합니다<span style="font-family:'맑은 고딕', serif;">. (If issues arise, check <code class="western">journalctl -u kubelet</code> or the logs of individual Kubernetes components.)</span></li>
 	<li><b>공식 문서 참조</b><span style="font-family:'맑은 고딕', serif;"><b>:</b> </span>항상 최신 버전의 <span style="font-family:'맑은 고딕', serif;">Kubernetes </span>공식 문서를 참조하는 것이 가장 정확합니다<span style="font-family:'맑은 고딕', serif;">. (Always refer to the latest official Kubernetes documentation for the most accurate information.)</span></li>
</ul>
이 가이드는 기본적인 <span style="font-family:'맑은 고딕', serif;">Kubernetes </span>클러스터 구축 방법을 다루며<span style="font-family:'맑은 고딕', serif;">, </span>프로덕션 환경에서는 더 많은 보안<span style="font-family:'맑은 고딕', serif;">, </span>고가용성<span style="font-family:'맑은 고딕', serif;">, </span>모니터링<span style="font-family:'맑은 고딕', serif;">, </span>백업 전략 등을 고려해야 합니다<span style="font-family:'맑은 고딕', serif;">. (This guide covers the basic method for building a Kubernetes cluster. For production environments, more considerations like security, high availability, monitoring, and backup strategies are needed.)</span>]]></description>
			<author><![CDATA[TECH Team]]></author>
			<pubDate>Tue, 22 Jul 2025 08:45:32 +0000</pubDate>
			<category domain="https://cubetech.co.kr/?kboard_redirect=1"><![CDATA[공지사항]]></category>
		</item>
				<item>
			<title><![CDATA[큐브테크시스템(주) 홈페이지를 리뉴얼하였습니다.]]></title>
			<link><![CDATA[https://cubetech.co.kr/?kboard_content_redirect=7]]></link>
			<description><![CDATA[2024년 홈페이지를 리뉴얼하고 더욱 좋은 상품과 서비스를 제공하도록 노력하겠습니다.]]></description>
			<author><![CDATA[큐브테크시스템]]></author>
			<pubDate>Mon, 10 Jun 2024 13:19:39 +0000</pubDate>
			<category domain="https://cubetech.co.kr/?kboard_redirect=1"><![CDATA[공지사항]]></category>
		</item>
			</channel>
</rss>