<?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>GMT Archives -</title>
	<atom:link href="https://blog.kwt.co.kr/tag/gmt/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.kwt.co.kr/tag/gmt/</link>
	<description>여러분의 돈과 시간을 낭비하지마세요.</description>
	<lastBuildDate>Fri, 06 Dec 2024 02:51:20 +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>GMT Archives -</title>
	<link>https://blog.kwt.co.kr/tag/gmt/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>쿠버네티스 클러스터 GMT+09:00 적용</title>
		<link>https://blog.kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ed%81%b4%eb%9f%ac%ec%8a%a4%ed%84%b0-gmt9-%ec%a0%81%ec%9a%a9/</link>
					<comments>https://blog.kwt.co.kr/%ec%bf%a0%eb%b2%84%eb%84%a4%ed%8b%b0%ec%8a%a4-%ed%81%b4%eb%9f%ac%ec%8a%a4%ed%84%b0-gmt9-%ec%a0%81%ec%9a%a9/#respond</comments>
		
		<dc:creator><![CDATA[시간 조절자]]></dc:creator>
		<pubDate>Fri, 06 Dec 2024 02:51:19 +0000</pubDate>
				<category><![CDATA[기술]]></category>
		<category><![CDATA[쿠버네티스]]></category>
		<category><![CDATA[GMT]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[표준시]]></category>
		<guid isPermaLink="false">https://kwt.co.kr/?p=855</guid>

					<description><![CDATA[<p>Ubuntu 설치 후 별도의 시간 설정이 있지 않다면 GMT(Greenwich Mean Time, 그리니치 평균시)+00:00 로 적용된다. 대한민국 서울의 표준시는 GMT+09:00 로 변경이 필요하다. 시간 설정 확인 Asia/Seoul 시간대로 변경 쉽게 변환이 가능하다. 이미 쿠버네티스 클러스터 내에서 동작 중인 파드의 시간대가 변경됐는지 확인해야한다. 역시 파드에는 바로 적용되지 않는다. 파드를 삭제해서 다시 실행되도록 하거나, Deployment 에 환경 변수를 [&#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-%ed%81%b4%eb%9f%ac%ec%8a%a4%ed%84%b0-gmt9-%ec%a0%81%ec%9a%a9/">쿠버네티스 클러스터 GMT+09:00 적용</a> appeared first on <a href="https://blog.kwt.co.kr"></a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Ubuntu 설치 후 별도의 시간 설정이 있지 않다면 GMT(Greenwich Mean Time, 그리니치 평균시)+00:00 로 적용된다. 대한민국 서울의 표준시는 GMT+09:00 로 변경이 필요하다.</p>



<p>시간 설정 확인</p>



<pre class="wp-block-code"><code>$ timedatectl
</code></pre>



<p>Asia/Seoul 시간대로 변경</p>



<pre class="wp-block-code"><code>$ sudo timedatectl set-timezone Asia/Seoul
</code></pre>



<p>쉽게 변환이 가능하다.</p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" width="696" height="478" src="https://blog.kwt.co.kr/wp-content/uploads/2024/12/image.png" alt="" class="wp-image-856" style="width:661px;height:auto"/></figure>



<p>이미 쿠버네티스 클러스터 내에서 동작 중인 파드의 시간대가 변경됐는지 확인해야한다.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="706" height="88" src="https://blog.kwt.co.kr/wp-content/uploads/2024/12/image-1.png" alt="" class="wp-image-857"/></figure>



<p>역시 파드에는 바로 적용되지 않는다.</p>



<p>파드를 삭제해서 다시 실행되도록 하거나, Deployment 에 환경 변수를 입력해서 변경 하는 방법을 추천 받았다. (클로드 형님)</p>



<p>우선 파드를 삭제하고 다시 확인해봤으나 파드 삭제 후 다시 생성돼도 적용되지 않는 것을 확인했다.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="699" height="89" src="https://blog.kwt.co.kr/wp-content/uploads/2024/12/image-2.png" alt="" class="wp-image-858"/></figure>



<p>Deployment나 Pod의 YAML에서 환경변수로 설정:</p>



<pre class="wp-block-code"><code>env:
- name: TZ
  value: Asia/Seoul
</code></pre>



<p>이걸 모든 Deployment 에 다 해줘야한다고 하는데.. 이건 좀..</p>



<p>추천 받은 방법으로는</p>



<p>ConfigMap 생성</p>



<pre class="wp-block-code"><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: tz-config
  namespace: default
data:
  TZ: "Asia/Seoul"
</code></pre>



<p>각 Deployment에서 참조</p>



<pre class="wp-block-code"><code>env:
  - name: TZ
    valueFrom:
      configMapKeyRef:
        name: tz-config
        key: TZ
</code></pre>



<p>라고 하는데..</p>



<p>결국 마찬가지 아닌가?</p>



<p>생각해보니 Jenkins 배포는 모두 deployment-template.yaml 을 공유하고 있기 때문에 이곳에 timezone 설정을 추가하고 재배포 하면 적용이 될 것으로 추정된다.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="341" height="198" src="https://blog.kwt.co.kr/wp-content/uploads/2024/12/image-3.png" alt="" class="wp-image-859"/></figure>



<p>해당 부분을 추가하고 재배포를 진행</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="428" height="302" src="https://blog.kwt.co.kr/wp-content/uploads/2024/12/image-4.png" alt="" class="wp-image-860"/></figure>



<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="855"
					data-ulike-nonce="0d4e3846b2"
					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_855"></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-%ed%81%b4%eb%9f%ac%ec%8a%a4%ed%84%b0-gmt9-%ec%a0%81%ec%9a%a9/">쿠버네티스 클러스터 GMT+09:00 적용</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-%ed%81%b4%eb%9f%ac%ec%8a%a4%ed%84%b0-gmt9-%ec%a0%81%ec%9a%a9/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
