<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by KouWei.Lee on Medium]]></title>
        <description><![CDATA[Stories by KouWei.Lee on Medium]]></description>
        <link>https://medium.com/@b0444135?source=rss-20a2f036cfec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*h7wNqQJjsbwoyuZsxGWVZA@2x.jpeg</url>
            <title>Stories by KouWei.Lee on Medium</title>
            <link>https://medium.com/@b0444135?source=rss-20a2f036cfec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 21:55:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@b0444135/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI 程式碼輔助工具研究 GitHub Copilot && Amazon Q Developer 為例]]></title>
            <link>https://b0444135.medium.com/ai-%E7%A8%8B%E5%BC%8F%E7%A2%BC%E8%BC%94%E5%8A%A9%E5%B7%A5%E5%85%B7%E7%A0%94%E7%A9%B6-github-copilot-amazon-q-developer-%E7%82%BA%E4%BE%8B-361cd9109d9f?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/361cd9109d9f</guid>
            <category><![CDATA[amazon-q]]></category>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[github-copilot]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Sat, 08 Feb 2025 09:25:23 GMT</pubDate>
            <atom:updated>2025-02-08T09:25:23.440Z</atom:updated>
            <content:encoded><![CDATA[<p>GitHub Copilot &amp;&amp; Amazon Q Developer實測目前使用上能做到的有限．<br>以下四項特點優勢與其他評估弱點</p><blockquote>1.簡化從構想到coding出來的過程</blockquote><ul><li>自然語言陳述轉換為code</li></ul><p>評估：複雜的業務邏輯效果可能有限</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mxhGvaTb8iB6f6nX-McaRg.png" /><figcaption><a href="https://learn.microsoft.com/zh-tw/visualstudio/ide/visual-studio-github-copilot-extension?view=vs-2022#using-github-copilot-for-code-completions-and-suggestions">使用指令：Q: /q dev｜Copilot : TAB 接受建議</a></figcaption></figure><blockquote>2.程式碼升級(Amazon Q獨有)</blockquote><ul><li>專案Java 8升級到Java11或17</li></ul><p>評估：目前先決條件是要是Maven專案</p><p>評估：自動升級的速度不快官方展示大約花40mins</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Hc8q39nhODgRCCZFiyJaQ.png" /><figcaption><a href="https://aws.amazon.com/tw/awstv/watch/5ac6ef9c31d/#chapter8">使用指令：/q transform 進行JAVA 8 自動升級JAVA 17</a></figcaption></figure><blockquote>3.加速code review速度</blockquote><ul><li>能做到的review: code 可讀性建議、減少重複性、建議抽取共用、安全性</li></ul><p>評估：基本程式碼寫法通則可以做到審查，但做到使用部門內部的開發守則去review沒辦法</p><p>評估：Amazon Q 可做到基礎原始碼檢測(白箱)弱點漏洞修補建議，<br>如在Fortify SCA有企業安全合規則還是需手動調整</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SG3zibNLiZh8pxa_y40IYg.png" /><figcaption><a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-reviews.html">使用指令：/q review 此案例為SQL injection漏洞指出</a></figcaption></figure><blockquote>4. 撰寫單元測試</blockquote><ul><li>可針對特定行數產生單元測試</li></ul><p>評估：基本單元測試可生成如業務情境較複雜測試覆蓋率不足需手動添加</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*We-4kUocdLj5x6w3EvoCpA.png" /><figcaption><a href="https://www.youtube.com/watch?v=smdBqEu7fx4">使用指令：Copilot : /tests 可選取特定行數自動生成測試案例</a></figcaption></figure><p>AI 程式碼輔助工具差異</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MV2wPYjcEo4WnEsgsKYBEQ.png" /></figure><p>參考資料</p><p><a href="https://learn.microsoft.com/zh-tw/visualstudio/ide/visual-studio-github-copilot-extension?view=vs-2022#using-github-copilot-for-code-completions-and-suggestions">什麼是適用於 Visual Studio 的 GitHub Copilot 完成？</a></p><p><a href="https://aws.amazon.com/tw/awstv/watch/5ac6ef9c31d/#chapter8">Mastering Amazon Q Developer in JetBrains IDEs: Installation, Configuration, and Practical Usage for Enhanced Productivity</a></p><p><a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html">Upgrading Java versions with Amazon Q Developer</a></p><p><a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-reviews.html">Reviewing code with Amazon Q Developer</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=361cd9109d9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Neighbors’ Window | 鄰居的窗戶]]></title>
            <link>https://b0444135.medium.com/the-neighbors-window-%E9%84%B0%E5%B1%85%E7%9A%84%E7%AA%97%E6%88%B6-e5e49bc9c303?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5e49bc9c303</guid>
            <category><![CDATA[academy-award-winner]]></category>
            <category><![CDATA[short-film-review]]></category>
            <category><![CDATA[short-film]]></category>
            <category><![CDATA[oscars]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Tue, 13 Aug 2024 14:26:24 GMT</pubDate>
            <atom:updated>2024-08-13T14:26:24.585Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>92 Academy Award for Best Live Action Short Film</strong></p><blockquote><strong>you are comparing your insides to someone else’s outside</strong></blockquote><p><strong>“The Neighbor’s Window”</strong> is a short film directed by Marshall Curry, which tells the story of a middle-aged couple living in New York City who inadvertently spy on the lives of a young couple living in the apartment across from theirs through their window.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fk1vCrsZ80M4&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dk1vCrsZ80M4&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2Fk1vCrsZ80M4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d0d313e521ab1457b1437e83e4d8c0f8/href">https://medium.com/media/d0d313e521ab1457b1437e83e4d8c0f8/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hvgv-ZXgWiX9u7-XeO2V8w.png" /><figcaption>we always tend to wish for the things we don’t have</figcaption></figure><blockquote>A model of economical storytelling.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iU_s7rbgI96xTc5OcNL1sg.png" /><figcaption>You can see the dividing line between the protagonists on the screen, which hints at their psychological states</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7-R_KHMnjutmIfEaJ-ZAg.png" /><figcaption>When you put on binoculars, you no longer see what you already have</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nLly6nX6EfiYTEzUHhrqNQ.png" /><figcaption>The dividing line on the screen hints at their psychological states, but this time it’s about the neighbors.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4O8Nv1XhgQP3YXknflQejg.png" /><figcaption>The skull hints at the ending</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r-oeTL8pY0b-a3ak30ydJA.png" /><figcaption>Classic linear composition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*po6tlgsnQNE0zlQVnWLDqA.png" /><figcaption>As usual, only the inner feelings have changed.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AyLYxWLHVzFrYnjWAUXdw.png" /><figcaption>Marshall Curry</figcaption></figure><blockquote>music</blockquote><p>Nobody Else Will Be There by The National</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FjUFhgORw4T4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjUFhgORw4T4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjUFhgORw4T4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5826f4f7b26923b55e34e77f9c72e36/href">https://medium.com/media/a5826f4f7b26923b55e34e77f9c72e36/href</a></iframe><blockquote>Official website</blockquote><p><a href="https://www.theneighborswindow.com/">The Neighbors&#39; Window</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5e49bc9c303" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two Distant Strangers 遙遠陌生人]]></title>
            <link>https://b0444135.medium.com/two-distant-strangers-%E9%81%99%E9%81%A0%E9%99%8C%E7%94%9F%E4%BA%BA-90caef39bb6c?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/90caef39bb6c</guid>
            <category><![CDATA[academy-award-winner]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[two-distant-strangers]]></category>
            <category><![CDATA[movıe]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Mon, 12 Aug 2024 15:10:06 GMT</pubDate>
            <atom:updated>2024-08-13T14:26:56.177Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Two Distant Strangers |</em>遙遠陌生人</h3><p><strong>93 Academy Award for Best Live Action Short Film</strong></p><h3>History Doesn’t Repeat Itself, but It Often Rhymes</h3><h3>— Mark Twain</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xSdFebWmnSHtcnA65LNXKQ.png" /><figcaption>Two Distant Strangers is a 2020 American short film written by Travon Free and directed by Free and Martin Desmond Roe.</figcaption></figure><p>The film examines the deaths of Black Americans during encounters with police through the eyes of a character trapped in a time loop that keeps ending in his death.</p><blockquote>We gotta start makin’ changes.</blockquote><blockquote>Learn to see me as a brother instead of two distant strangers</blockquote><p>1986–1998–2020-???</p><blockquote>Music Sample</blockquote><p>“The Way It Is” by Bruce Hornsby and the Range (1986)</p><p>“Changes” by 2Pac ft. Talent (1998) &lt; The Pope’s Playlist 2009</p><p>“Wishing for a Hero” by Polo G (2020)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FGlRQjzltaMQ%3Fstart%3D73%26feature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DGlRQjzltaMQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FGlRQjzltaMQ%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad294a53285480d166c01b8ad99f6a4d/href">https://medium.com/media/ad294a53285480d166c01b8ad99f6a4d/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FeXvBjCO19QY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeXvBjCO19QY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FeXvBjCO19QY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/be912a006fbba4e1323082852c215658/href">https://medium.com/media/be912a006fbba4e1323082852c215658/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F14AYq_rBJUg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D14AYq_rBJUg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F14AYq_rBJUg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5d56acf5928a5a6328c2622ec9e06ca/href">https://medium.com/media/b5d56acf5928a5a6328c2622ec9e06ca/href</a></iframe><ul><li><a href="https://www.owu.edu/alumni-family-friends/owu-magazine/fall-2018/history-doesnt-repeat-itself-but-it-often-rhymes/">History Doesn&#39;t Repeat Itself, but It Often Rhymes</a></li><li><a href="https://www.flavorwire.com/54249/the-popes-playlist-beyonce-mozart-fleet-foxes-and-tupac">The Pope&#39;s Playlist: Muse, Mozart, Fleet Foxes, and Tupac</a></li><li><a href="https://en.wikipedia.org/wiki/Two_Distant_Strangers">Two Distant Strangers - Wikipedia</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90caef39bb6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[環沖繩自行車賽2023 35th Tour de Okinawa 攻略]]></title>
            <link>https://b0444135.medium.com/%E7%92%B0%E6%B2%96%E7%B9%A9%E8%87%AA%E8%A1%8C%E8%BB%8A%E8%B3%BD2023-35th-tour-de-okinawa-%E6%94%BB%E7%95%A5-9a5842affbf1?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a5842affbf1</guid>
            <category><![CDATA[cycling]]></category>
            <category><![CDATA[bikes]]></category>
            <category><![CDATA[japan]]></category>
            <category><![CDATA[bicycles]]></category>
            <category><![CDATA[okinawa]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Thu, 16 Nov 2023 16:12:09 GMT</pubDate>
            <atom:updated>2023-11-16T16:12:09.433Z</atom:updated>
            <content:encoded><![CDATA[<p>環沖繩如何報名？比賽流程？沒公路車怎麼參賽？</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6CkNwNTZ3hHoa882klvUkg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFTyZtqxnv-g6OGvAziu8g.jpeg" /><figcaption>2023環沖繩挑戰組完賽證 &amp; 環沖繩會場</figcaption></figure><h4><strong>環沖繩單車大賽 Tour de Okinawa 介紹</strong></h4><p>官方網站</p><p><a href="http://www.tour-de-okinawa.jp/en/OUTLINE/entry.html">Entry : Tour de Okinawa 2023</a></p><p>每年11月環<strong>沖繩自行車賽</strong>（ツール・<a href="https://en.wikipedia.org/wiki/Japan">ド</a>・おきなわ，<em>Tsūru do Okinawa</em>）是在日本沖繩縣舉辦的一年一度<a href="https://en.wikipedia.org/wiki/Okinawa_Prefecture">的職業</a><a href="https://en.wikipedia.org/wiki/Road_bicycle_racing">公路自行車賽車</a> <a href="https://en.wikipedia.org/wiki/Classic_cycle_races">經典一日賽</a>。它於 1989 年首次作為業餘賽事開始，但在 1999 年成為職業賽事。它於 2005 年成為UCI<a href="https://en.wikipedia.org/wiki/UCI_Asia_Tour">亞洲巡迴賽</a>的一部分。</p><p>主要可以分為以下三組</p><p>【International road race國際賽組】 (無法參加）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TuT6L_ibRHs0NXZsRFisA.png" /></figure><p>UCI認證的國際賽事組別神仙打架組別，基本上與我們凡人無關．我們無法參加．</p><p>【<strong>Citizen road race section 市民組</strong>】(可參加但強度高）</p><p>主要可以分為<strong>200 K、140K、100K、50K</strong></p><p>雖然說是市民組但其實強度非常高巡航的均速都落在35左右</p><p>官方也是建議至少要有一定體能水準在進行報名．等之後實力再更強點會想報名看看，跟外國人廝殺一下．</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fU6Uq8e8H5Oz1rXpVO47GQ.png" /></figure><p>【Cycling / 騎遊組】（遊玩性質也是我這次參加的）</p><p>有三條路線可以選擇</p><p>【173KM】將會以豐富的自然景觀的北部地區山路為主，路線非常具有排戰性 173 km 爬升約2500m繞到沖繩最北端．希望下次有機會可以參加這個路線．聽騎過同事說非常美</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4mm1AgAC6AT7oyS1sLKWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9kJQ940is2-ozLBCuerACQ.png" /></figure><p>【90KM】這也是我這次參加的路線，從名護出發，沿著東海岸線往南行駛。騎過宜野座村市棒球場，是阪神虎隊春訓的場地。騎過恩納村，一邊欣賞清澈的大海，一邊欣賞風景。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3OaQVoJkJIoUBCOWNkgEZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B-JKJa5on4MG0CT5jorkaw.png" /></figure><p>【60KM】伊是名島繞島一圈</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y5nISbX0SXvyap3mmsjPpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hePOhXlfWXQWuGMoJYezhg.png" /></figure><h4>如何報名環沖繩單車大賽 Tour de Okinawa</h4><p>Step1</p><p>前往網站選擇組別</p><p><a href="http://www.tour-de-okinawa.jp/en/OUTLINE/entry.html">Entry : Tour de Okinawa 2023</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJiICphTqmbH8n6RRPMLAg.png" /></figure><p>選擇騎遊組接著會導到sportsentry 的網站</p><p>因為環沖繩報名是委託sportsentry 進行報名跟註冊的</p><p>所以要先進行sportsentry的會員註冊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*263_bIoCP8xOgwp3SXQMsA.png" /></figure><p>註冊完成sportsentry 的會員會收到一封郵件</p><p>他也會提醒你只是會員註冊完成而已還沒選擇要申請參加的必賽</p><p>註冊後還要選擇要參加的比賽．</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yKL6hHtyPOLlbudxwibnw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w94fOg2YTTbsmigJxUeNPA.png" /></figure><p>接著選擇要報名的組別，填寫資料後會收到報名成功郵件</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-DNamY7kCa_iXrosP2kfHA.png" /></figure><p><strong>請將此封郵件收好因為到沖繩選手報到時，需要出示此郵件兌換引換證</strong></p><p>報名階段結束</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abA2FEqOPxH2dV3iAeP7bA.png" /></figure><p>在比賽前一週會收到官方寄給海外選手的信，提醒海外選手要在11/10號 13:00–17:00 在 21世紀之森室內體育場兌換物資．</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.google.com%2Fmaps%2Fembed%2Fv1%2Fplace%3Fcenter%3D25.728212%252C119.5236004%26key%3DAIzaSyD9HrlRuI1Ani0-MTZ7pvzxwxi4pgW0BCY%26zoom%3D6%26q%3DNagoshi%2B21%2BSeikinomori%2BGymnastics&amp;display_name=Google+Maps&amp;url=https%3A%2F%2Fwww.google.com%2Fmaps%2Fplace%2FNagoshi%2B21%2BSeikinomori%2BGymnastics%2F%4025.728212%2C119.5236004%2C6z%2Fdata%3D%214m7%213m6%211s0x34e4ff63d23d2a29%3A0x43aee2bf07f010ba%218m2%213d26.592473%214d127.9752856%2115sCh0yMeS4lue0gOS5i-ajruWupOWFp-mrlOiCsuWgtJIBEWd5bW5hc3RpY3NfY2VudGVy4AEA%2116s%252Fg%252F1tg5rtj7%3Fentry%3Dtts&amp;image=http%3A%2F%2Fmaps-api-ssl.google.com%2Fmaps%2Fapi%2Fstaticmap%3Fcenter%3D25.728212%2C119.5236004%26zoom%3D15%26size%3D250x250%26sensor%3Dfalse&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="600" height="450" frameborder="0" scrolling="no"><a href="https://medium.com/media/a71bd07cf0a6755846dcf40fb119560c/href">https://medium.com/media/a71bd07cf0a6755846dcf40fb119560c/href</a></iframe><p>該場地也是比賽的起終點</p><p>賽前兩週也會在官網可以下載當天比賽的流程以及關門時間點資訊</p><p>比賽大約7:00開始</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0PLDGQx5a6DKeAnyWrTQRQ.png" /></figure><h4>沒公路車怎麼參賽</h4><p>大推沖繩名護租車 <a href="https://www.hubcycleokinawa.com/"><strong>BICYCLE SHOP HUBCYCLE OKINAWA</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gcOQ5335MnXU1cxe6R7qvw.jpeg" /><figcaption>這次租到的Scott 車況蠻好的</figcaption></figure><p>價格也很透明</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-KQe3l13NVPQxcgaF9lMg.png" /></figure><p>8速的公路車 2天1夜 大約1100元台幣</p><p>11速的公路車 2天1夜 大約1800元台幣</p><p>也有其他車款，填寫網站上的google表單就可以進行預約，店家收到預約單後會主動與你聯絡．收到確認信就預約好了．</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8u2iVU1zjt6nvlrUQseHjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*FJ3AczW64XmQ38JGWlN79g.png" /><figcaption>我這次原本要租11速的但因為11速都被借走了，店家通知只剩8速的車，但還好8速的車況也不錯</figcaption></figure><p>租車google表單</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLScZkvrtpoQ9beAInPw0yUkI0GoHFucw_mupIXYNIK4yaJa8eg%2Fviewform%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLScZkvrtpoQ9beAInPw0yUkI0GoHFucw_mupIXYNIK4yaJa8eg%2Fviewform%3Fusp%3Dsf_link&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2FywunsQdnfzRa3PMOOaV7Qj33JkHHF6vBIpRabW8p-C1t0cnbmmvuTE8m7KORZuwZjmbjz8TDOGs%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="760" height="675" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c4c2b70c088e2ecf020fbcd7ea719a7/href">https://medium.com/media/5c4c2b70c088e2ecf020fbcd7ea719a7/href</a></iframe><p><a href="https://www.hubcycleokinawa.com/">沖縄名護の自転車専門店「HUBCYCLE OKINAWA」レンタサイクル、修理、名護市、ハブサイクル沖縄</a></p><h4>比賽流程</h4><h4>11/10 比賽前一天拿取比賽物資</h4><p>於11/10 13:00–17:00選手報到時段前往 21世紀之森室內體育場 兌換物資</p><p>出示Email後會拿到 引換證</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QJlPpXmcjZbLUyWSIeOZ5A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rts65Zmsa7HBcmejom0buw.jpeg" /></figure><p>接著帶著引換證交給工作人員就會獲號碼布跟物資囉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBhRY6aZFKMYbjUfJ82vXQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OB8AAVf8oZhjOIJ-lw22gA.jpeg" /><figcaption>與Scott合影</figcaption></figure><h4>11/11 比賽當天</h4><p>集合地點：21世紀之森室內體育場外公園</p><p>約7:00 173km，約7:20 左右90KM組才開始比賽</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFTyZtqxnv-g6OGvAziu8g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biyvTPBtBxUGK5G35XCtKg.jpeg" /><figcaption>天氣有點陰陰的</figcaption></figure><p>中間還有安排在 沖繩TAPIC Thalasso Center宜野 度假村內規劃午餐時間</p><p>吃著鮭魚便當看海景超讚</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgCUymExXRCLHEqrhtfQ5g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JwwK_ZRohSorRvgDgl3xLQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*en76xUfby3xPR8SbYJ6YZg.jpeg" /><figcaption>腳踏車架跟鮭魚便當讚</figcaption></figure><p>最後就是順順騎完回到會場要記得再去會場</p><p>拿完走證！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8-DZ6iaB0eYZzJfP9Qm8DA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u3bCCLPrKDTkaD7fM5k71A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8DFE3ivXnCRNq0T4Ar-ayA.jpeg" /></figure><p>後記</p><p>第一次出國騎單車也是第一次出國比賽，感覺真得蠻新奇的．</p><p>再離台灣700公里外的小島上，用自己的雙腳去感受這片土地</p><p>用雙眼記住眼前的景色，用著最剛好的速度，體驗沖繩風光．</p><p>這可能是單車的魅力吧！</p><p>題外話</p><p>日本的交通交管很特殊，居然交通管到分鐘級別真的是一絲不苟．</p><p>（其他關於用路人都會禮讓自行車的部分就不再贅述了，只能說台灣加油）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iY9DUAjc_GODWKEtn7GoFg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a5842affbf1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CKAD_Creating a Pod and Inspecting it]]></title>
            <link>https://b0444135.medium.com/ckad-creating-a-pod-and-inspecting-it-ed1d0e19e1b2?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed1d0e19e1b2</guid>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 06:33:44 GMT</pubDate>
            <atom:updated>2023-06-27T06:33:44.149Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating a Pod and Inspecting it</h3><ol><li>Create the namespace ckad-prep.</li><li>In the namespace ckad-prep create a new Pod named mypod with the image nginx:2.3.5. Expose the port 80.</li><li>Identify the issue with creating the container. Write down the root cause of issue in a file named pod-error.txt.</li><li>Change the image of the Pod to nginx:1.15.12.</li><li>List the Pod and ensure that the container is running.</li><li>Log into the container and run the ls command. Write down the output. Log out of the container.</li><li>Retrieve the IP address of the Pod mypod.</li><li>Run a temporary Pod using the image busybox, shell into it and run a wget command against the nginx Pod using port 80.</li><li>Render the logs of Pod mypod.</li><li>Delete the Pod and the namespace.</li></ol><blockquote>1.Create the namespace ckad-prep</blockquote><pre>kubectl create namespace ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v7pvGFW2ztPAi1uDGBlt3A.png" /></figure><p>創建成功</p><pre>kubectl get namespace</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZRH4QY-DPiBy4P2H8IgPg.png" /></figure><blockquote>2.In the namespace ckad-prep create a new Pod named mypod with the image nginx:2.3.5. Expose the port 80</blockquote><pre>kubectl run mypod --image=nginx:2.3.5 --restart=Never --port=80 ==namespace=ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhevzxUSo5626gv0I9Q5EA.png" /></figure><pre>kubectl get pod</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aWjhSZje8ggWk4A0k0Xj8w.png" /></figure><blockquote>3.Identify the issue with creating the container. Write down the root cause of issue in a file named pod-error.txt.</blockquote><pre>kubectl describe pod mypod</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ugiN1hSpjzeywHG613jLiA.png" /></figure><blockquote>4. Change the image of the Pod to nginx:1.15.12.</blockquote><pre>kubectl set image pod/mypod -n ckad-prep mypod=nginx:1.15.12</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LzO_bo5lLHTDHmLRI5v2YQ.png" /></figure><p>檢查是否跑起來了</p><blockquote>5.List the Pod and ensure that the container is running.</blockquote><pre>kubectl get po -n ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qF5Yz7m8cZCj9MJVmom61A.png" /></figure><blockquote>6.Log into the container and run the ls command. Write down the output. Log out of the container.</blockquote><pre>kubectl exec mypod -it --namespace=ckad-prep  -- /bin/sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SlgeAlw28ZX0f73zX7CY7Q.png" /></figure><p>執行 kubectl exec 時需要指定至少一個容器中的命令</p><blockquote>7.Retrieve the IP address of the Pod mypod</blockquote><p>解法1.describe pod</p><pre>kubectl describe pod mypod -n ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKgSSfwCQXYC2zzvLpdvoA.png" /></figure><p><strong>ip為10.1.0.36</strong></p><p>解法2.使用 -o wide</p><pre>kubectl get pods -o wide -n ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hr_5mIe34Uit_O0201G9sw.png" /></figure><p>ip為10.1.0.36</p><blockquote>8.Run a temporary Pod using the image busybox, shell into it and run a wget command against the nginx Pod using port 80.</blockquote><p>要使用 — rm 來創建 temporary Pod</p><p>--rm: 在終止Pod後自動刪除Pod</p><ul><li>kubectl run: 創建一個新的Pod或部署（Deployment）。</li><li>busybox: Pod或部署的名稱為&quot;busybox&quot;。</li><li>--image=busybox: 使用&quot;busybox&quot;映像來運行Pod。</li><li>--rm: 在終止Pod後自動刪除Pod。</li><li>-it: 創建一個交互式的TTY終端。</li><li>--restart=Never: 設置Pod的重啟策略為&quot;Never&quot;，表示Pod在終止後不會重新啟動。</li><li>-n ckad-prep: 指定命名空間為&quot;ckad-prep&quot;。</li><li>-- /bin/sh: 在Pod中運行/bin/sh shell。</li></ul><pre>kubectl run busybox --image=busybox --rm -it --restart=Never -n ckad-prep -- /bin/sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_qpYod-ZHDWrLgNbWQ8ubQ.png" /></figure><blockquote>shell into it and run a <em>wget</em> command against the <em>nginx</em></blockquote><pre>wget -O- 10.1.0.36:80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTJSYlYJGkL12NOyUfXE8Q.png" /></figure><blockquote>9.Render the logs of Pod mypod</blockquote><p>使用log 指令</p><pre>kubectl logs mypod -n ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iy4j_yJX47UgwA9X5FTN1A.png" /></figure><blockquote>10.Delete the Pod and the namespace.</blockquote><p>刪除pod</p><pre>kubectl delete pod mypod -n ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9MIJ2BYeKA9fGYXEY3DhDQ.png" /></figure><p>刪除namespace</p><pre>kubectl delete namespace ckad-prep</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0NDuRWbEFXddqichevzAtg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed1d0e19e1b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CKAD_Configuring a Pod to Use a ConfigMap]]></title>
            <link>https://b0444135.medium.com/ckad-configuring-a-pod-to-use-a-configmap-e6f163179db2?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6f163179db2</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[configmap]]></category>
            <category><![CDATA[ckad]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 06:32:54 GMT</pubDate>
            <atom:updated>2023-06-27T06:32:54.323Z</atom:updated>
            <content:encoded><![CDATA[<h4>Configuring a Pod to Use a ConfigMap</h4><ol><li>Create a new file named config.txt with the following environment variables as key/value pairs on each line.</li></ol><ul><li>DB_URL equates to localhost:3306</li><li>DB_USERNAME equates to postgres</li></ul><ol><li>Create a new ConfigMap named db-config from that file.</li><li>Create a Pod named backend that uses the environment variables from the ConfigMap and runs the container with the image nginx.</li><li>Shell into the Pod and print out the created environment variables. You should find DB_URL and DB_USERNAME with their appropriate values.</li></ol><blockquote>1.Create a new file named config.txt with the following environment variables as key/value pairs on each line.</blockquote><p>可使用echo</p><pre> echo -e &quot;DB_URL=localhost:3306\nDB_USERNAME=postgres&quot; &gt; config.txt</pre><p>-e為 使得 echo 命令將 \n 解釋為換行符</p><p>或是 printf</p><pre>printf &quot;DB_URL=localhost:3306\nDB_USERNAME=postgres\n&quot; &gt; config.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*x3_eIFl5IBeP10KkKQL6xg.png" /></figure><blockquote>2.Create a new ConfigMap named db-config from that file.</blockquote><p>使用 create configmap</p><pre>kubectl create configmap db-config --from-file=config.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*op4YNeXBkwbmrp78V4Jmww.png" /></figure><blockquote>3.Create a Pod named backend that uses the environment variables from the ConfigMap and runs the container with the image nginx.</blockquote><pre>kubectl run backend --image=nginx --restart=Never -o yaml --dry-run=client &gt; pod.yaml</pre><ul><li>kubectl run backend: 使用 kubectl run 命令創建一個名為 &quot;backend&quot; 的新 Pod。</li><li>--image=nginx: 指定 Pod 使用 &quot;nginx&quot; 鏡像。</li><li>--restart=Never: 設置 Pod 的重啟策略為 &quot;Never&quot;，即當 Pod 終止後不會自動重新啟動。</li><li>-o yaml: 指定將生成的 Pod 配置以 YAML 格式輸出。</li><li>--dry-run=client: 使用 --dry-run=client 選項進行模擬操作，不會對實際的集群進行任何更改。</li><li>&gt; pod.yaml: 將輸出的 YAML 配置重定向到名為 &quot;pod.yaml&quot; 的文件中，而不是輸出到終端。</li></ul><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  creationTimestamp: null<br>  labels:<br>    run: backend<br>  name: backend<br>spec:<br>  containers:<br>  - image: nginx<br>    name: backend<br>    resources: {}<br>  dnsPolicy: ClusterFirst<br>  restartPolicy: Never<br>status: {}</pre><p>產生的yaml</p><p><strong>增加<br> envFrom:<br> — configMapRef:<br> name: db-config</strong></p><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  creationTimestamp: null<br>  labels:<br>    run: backend<br>  name: backend<br>spec:<br>  containers:<br>  - image: nginx<br>    name: backend<br>    envFrom:<br>      - configMapRef:<br>          name: db-config<br>    resources: {}<br>  dnsPolicy: ClusterFirst<br>  restartPolicy: Never<br>status: {}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*UihkH6VkTpI3161Dtkr6nQ.png" /><figcaption>產生出的configMap</figcaption></figure><blockquote>Create the Pod by pointing the create command to the YAML file.</blockquote><pre>$ kubectl create -f pod.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*3dmVzfDwjKJJwFD0C23N7A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*oG535aZcW6gQ3LLqmTVxHA.png" /></figure><p>Log into the Pod and run the env command.</p><pre>kubectl exec backend -it -- /bin/sh</pre><p>進入pod內輸入env 查詢環境變數</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*6mbKP1X2Nfni4p8t52cNlA.png" /></figure><p>可以找到DB_URL 跟 DB_USERNAME</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6f163179db2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Azure] Azure VPN gateway 使用情境]]></title>
            <link>https://b0444135.medium.com/azure-azure-vpn-gateway-%E4%BD%BF%E7%94%A8%E6%83%85%E5%A2%83-82af2d02442b?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/82af2d02442b</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-services]]></category>
            <category><![CDATA[gateway]]></category>
            <category><![CDATA[vpn]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 15:39:01 GMT</pubDate>
            <atom:updated>2023-06-14T15:39:01.542Z</atom:updated>
            <content:encoded><![CDATA[<h4>Azure VPN Gateway 是 Azure 提供的虛擬私人網路 (VPN) 解決方案，用於建立安全的網路連接。</h4><blockquote>Azure VPN Gateway 是 Azure 提供的虛擬私人網路 (VPN) 解決方案，用於建立安全的網路連接。</blockquote><p><strong>Azure VPN Gateway 的支援以下情境</strong></p><blockquote><strong><em>1.Site-to-Site Connection：將本地網路連線至Azure virtual networks</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekg_GPpQERjtVYtW8xnIMg.png" /></figure><p>使用情境：</p><ol><li>混合雲環境：當組織希望將其本地網路擴展到 Azure 的環境中時，可以使用 Site-to-Site Connection。這種情境下，組織可以通過 VPN 連接將 Azure 虛擬網路和本地網路連接起來，實現資源的互通和共享。</li><li>資料中心擴展：將現有的本地資料中心並將一部分工作負載遷移到 Azure 上時，Site-to-Site Connection 可以讓您建立安全且可靠的連接，將本地網路和 Azure 虛擬網路無縫集成，實現混合部署和數據中心擴展。</li></ol><blockquote><strong><em>2.Point-to-Site Connection : 將個別裝置連線至 Azure virtual networks</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZneCfoMACugd5GCCgkbV0A.png" /></figure><p>使用情境：</p><ol><li>遠程用戶訪問：當您需要遠程用戶（例如遠端工作）安全地連接到 Azure 虛擬網路，以訪問資源、應用程式或數據時，可以使用 Point-to-Site Connection。</li></ol><p>使用條件：用戶需要在其設備上安裝 VPN 客戶端軟體，並使用由 Azure 提供的憑證進行身份驗證。點對站連接提供了加密和驗證機制<strong>。</strong></p><blockquote><strong><em>3. VNet to VNet (Network-to-Network ):將Azure virtual networks連線至其他Azure virtual networks</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_DIRx2_qCG1uwKDwnWL82w.png" /></figure><p>使用情境：</p><ol><li>跨區域連接：當您在 Azure 中建立多個虛擬網路並希望這些網路之間實現通信時，可以使用 Network-to-Network 連接。這種情境下，您可以通過建立虛擬網路閘道並配置 N2N 連接，讓不同區域的虛擬網路之間可以安全地進行數據交換。</li></ol><h3>如何創建高可用</h3><p><em>1.使用 Azure 虛擬網路閘道：使用 Azure 的虛擬網路閘道來建立 VPN 連接。虛擬網路閘道提供了高可用性功能，包括主動-主動（Active-Active）或主動-備援（Active-Passive）模式，以確保連接的持續可用性。</em></p><p><em>2.多個連接端點：在 Site-to-Site VPN 或 VNet-to-VNet VPN 中，可以設定多個連接端點。這樣可以在不同的位置設置多個 VPN 連接，以實現冗餘性和故障轉移。如果其中一個連接失效，流量可以自動轉移到其他可用的連接。</em></p><p><em>3.啟用閘道集：在 Azure 中，可以啟用閘道集（Gateway SKU），它提供了更高的可用性和容錯能力。閘道集包括多個閘道實例，這些實例位於不同的區域，以確保連接的可靠性和冗餘性。</em></p><p><em>4.網路連接監控：定期監控和測試你的 VPN 連接，以確保其正常運作。使用 Azure Monitor 或其他監控工具來監測連接的狀態和性能，並設定警報以在連接中出現問題時及時通知。</em></p><p><em>5.故障轉移和自動重新連接：配置適當的故障轉移策略，例如在一個連接失效時自動切換到備援連接，或設定自動重新連接機制以保持連接的連續性。</em></p><p><em>6.跨區域和跨地理位置配置：如果需要高可用的連接，可以將連接端點部署在不同的區域或地理位置。這樣即使某個區域或地點發生故障，連接仍然可用。</em></p><p><em>7.自動化和基礎設施即代碼：使用自動化工具和基礎設施即代碼的概念，例如 Azure Resource Manager 模板、Azure PowerShell 或 Azure CLI，來快速配置和部署高可用的連接。</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*xArRsCu_yGNwzYI6d5QmcA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82af2d02442b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Azure]Azure Service Health 跟Azure Monitor差異？|| the difference between Azure Monitor and Azure…]]></title>
            <link>https://b0444135.medium.com/azure-service-health-%E8%B7%9Fazure-monitor%E4%B8%8D%E5%90%8C%E5%9C%B0%E6%96%B9-the-difference-between-azure-monitor-and-azure-service-32da61fb9ffc?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/32da61fb9ffc</guid>
            <category><![CDATA[azure-service-health]]></category>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[monitor]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 15:08:43 GMT</pubDate>
            <atom:updated>2023-06-14T15:10:04.803Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Azure]Azure Service Health 跟Azure Monitor差異？|| the difference between Azure Monitor and Azure Service Health?</h3><h4>Azure Service Health 用於判斷是Azure平台出現問題，而Azure Monitor則判斷應用服務出現問題．</h4><p>整理時發現兩個有服務概念有點類似但有點容易混淆</p><p>相似之處是它們的都可以作為警報平台</p><p>但主要差異一句話概括為</p><blockquote>Azure Service Health 可判斷是否為Azure平台問題，</blockquote><blockquote>Azure Monitor可判斷是否應用服務出現問題．</blockquote><p>以下為針對兩個服務的說明</p><h3>Azure Service Health:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AoTgrBy6X09vr97sdz4pYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTL-fH-GJlNfdSrVAhoZuw.png" /></figure><ol><li>Azure Service Health 的目標是識別並通報根本原因，以便用戶能夠了解問題的來源。</li><li>提供了一個整體的服務狀態概覽和<strong>地區性問題的報告。</strong></li><li>最佳實踐：<strong>設置 Service Health 警報</strong>，以便在發生服務問題時及時收到通知。<strong>訂閱適用於您的服務和地區的通知。</strong></li><li>提供 RCA (Root Cause Analysis)</li><li>通知渠道：電子郵件、短信、推送通知、Webhook 等</li></ol><h3><strong>Azure Monitor:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7QE6HMe_T6WEF5s_hZRJwQ.png" /></figure><ol><li>用於監控和收集多種數據源，包括應用程序日誌、基礎結構指標、性能計數器等。</li><li>提供更全面的監控覆蓋範圍，可以監控 Azure 資源和本地資源。</li><li>最佳實踐：</li></ol><ul><li>使用 Application Insights 監控和診斷應用程式問題。</li><li>使用 VM Insights 監控虛擬機器和 VM scale sets 的性能和健康狀態。</li><li>使用 Container Insights 監控容器工作負載的性能。</li><li>使用 Log Analytics 進行故障排除和問題診斷。</li><li>如果 <strong>Azure 虛擬機器停止運行，自動發送警報．</strong></li><li>使用 Azure Monitor Metrics 監控 Azure Active Directory 日誌中的資料</li><li><strong>可設置規則進行自動調整規模(Auto scale based on thresholds)</strong></li></ul><p>監測範圍</p><blockquote>Recap: 是Azure平台掛還是我的服務掛</blockquote><p>透過Azure Service Health(Azure平台) 幫助你判斷Azure平台的健康度而</p><p>Azure Monitor(我的服務)可以用來判斷出現服務是否存在任何問題．</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*xArRsCu_yGNwzYI6d5QmcA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32da61fb9ffc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Kubernetes / K8s]Ingress 和 Ingress Controller 差別]]></title>
            <link>https://b0444135.medium.com/kubernetes-k8s-ingress-%E5%92%8C-ingress-controller-%E5%B7%AE%E5%88%A5-215bef018369?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/215bef018369</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ingresscontroller]]></category>
            <category><![CDATA[ingress]]></category>
            <category><![CDATA[k8s]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Mon, 01 May 2023 16:27:19 GMT</pubDate>
            <atom:updated>2023-05-01T16:27:19.768Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Ingress是什麼？</blockquote><p><em>Ingress是一個Kubernetes平台上的API，它用於定義應用程序如何公開服務</em></p><p><strong>通過Ingress，Kubernetes使用不同的標準HTTP和HTTPS規則來將流量路由到不同的服務。</strong></p><blockquote>Ingress Controller是什麼？</blockquote><p><em>Ingress Controller是一個Kubernetes應用程序，負責監聽Kubernetes集群中的Ingress API對象，並管理相關的網絡路由器（例如Nginx，Traefik等）。</em><strong><em>Ingress Controller根據Ingress規則將流量路由到不同的應用程序服務。</em></strong></p><h4>Ingress 定義了應用程式的路由規則</h4><h4>而Ingress Controller是實現Ingress規則並將流量路由到不同應用程序的應用程序。</h4><h4>Ingress實例示範</h4><blockquote>1.建立多個服務</blockquote><p>首先我們先創建多個 Kubernetes 服務，每個服務用於運行一個微服務。例如，以下是兩個服務 YAML 文件的示例：</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: service-a<br>spec:<br>  selector:<br>    app: service-a<br>  ports:<br>  - name: http<br>    port: 80<br>    targetPort: http<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: service-b<br>spec:<br>  selector:<br>    app: service-b<br>  ports:<br>  - name: http<br>    port: 80<br>    targetPort: http</pre><p>上面描述的 YAML 文件分別定義了名為 service-a 和 service-b 的 Kubernetes 服務，每個服務都運行一個微服務。</p><blockquote>2.創建第一個Ingress 資源</blockquote><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: microservices-ingress<br>spec:<br>  rules:<br>  - host: example.com<br>    http:<br>      paths:<br>      - path: /service-a<br>        pathType: Prefix<br>        backend:<br>          service:<br>            name: service-a<br>            port:<br>              name: http<br>      - path: /service-b<br>        pathType: Prefix   //#path 前綴是/service-b時就會進入規則內<br>        backend:<br>          service:<br>            name: service-b. #對應k8s內部服務名稱 service叫service-b,使用80 PORT<br>            port:<br>              name: http</pre><p>上面描述的 YAML 文件定義了一個名為 microservices-ingress 的 Ingress 資源，將 example.com/service-a 的請求路徑命名為 service-a 的 Kubernetes Service，將 example.com/service-b 的請求路徑命名為service-b 的 Kubernetes 服務。</p><p>這個Ingress規則使用了多個路徑條目，用於確定義不同的URL路徑。pathType設置為Prefix，表示將請求路徑由到以/service-a或/service-b打頭的所有路徑方向。</p><p>如果pathType設置為Exact，需要完全一致才行，包含大小寫也要一致，只可以請求請求路徑由到 /service-a 或 /service-b 路徑</p><blockquote>3.安裝一個Ingress Controller 實現</blockquote><p>最後需要安裝一個Ingress Controller 實際，用於實際上面描述 Ingress 規則。例如，下面是使用 Nginx Ingress Controller 的 YAML 文件</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx-ingress-controller<br>spec:<br>  selector:<br>    app: nginx-ingress-controller<br>  type: LoadBalancer<br>  ports:<br>    - name: http<br>      port: 80<br>      targetPort: http<br>    - name: https<br>      port: 443<br>      targetPort: https<br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-ingress-controller<br>spec:<br>  selector:<br>    matchLabels:<br>      app: nginx-ingress-controller<br>  replicas: 1<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx-ingress-controller<br>    spec:<br>      containers:<br>        - name: nginx-ingress-controller<br>          image: nginx/nginx-ingress:latest<br>          ports:<br>            - name: http</pre><p><strong>Nginx Ingress Controller 會自動監聽 Kubernetes 集合中的 Ingress 資源，並根據其中規定的規則來由請求</strong>。它會檢測和自動更新 Ingress 資源的變化，並根據規則將流量轉發到後端服務。</p><p>一旦更新或刪除 Ingress 資源，Nginx Ingress Controller 會自動響應並相應地更新或刪除相關的路由規則。</p><p>提問</p><blockquote>為什麼Nginx Ingress Controller service type 是LoadBalancer</blockquote><p>Nginx Ingress Controller Service 的類型為 LoadBalancer 是因為它需要公開一個外部 IP 地址或 DNS 名稱，以方便外部流量可以到達 Ingress Controller從而通過 Ingress 規則將請求請求路由到後端服務．</p><p>recall service #當在 Kubernetes 群中創建一個 Service 資源時，選擇是 LoadBalancer 類型，<strong>它會為服務創建一個外部負載均衡器，並分配一個公共IP地址或者 DNS 名稱。</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4g8tZ-NxjSKHr2TndTQHQg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=215bef018369" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Kubernetes / K8s]API gateway Vs Kubernetes Ingress]]></title>
            <link>https://medium.com/k8s%E7%AD%86%E8%A8%98/kubernetes-k8s-api-gateway-vs-kubernetes-ingress-3bf9b54e5976?source=rss-20a2f036cfec------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bf9b54e5976</guid>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ingress]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[KouWei.Lee]]></dc:creator>
            <pubDate>Mon, 01 May 2023 07:44:12 GMT</pubDate>
            <atom:updated>2023-05-01T16:49:26.804Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>API Gateway誕生史</blockquote><h4>I 單體式應用時代</h4><p>早期應用為單體式應用程式(monolithic application)</p><p>介面的呈現以Web瀏覽器為主</p><p>瀏覽器跟單體應用以HTML over HTTP方式進行交互溝通</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zCIql9cvdFl2o-d1UijUEw.png" /><figcaption>單體式應用時代</figcaption></figure><h4>II 單體式應用時代 + API時代</h4><p>無線應用出現(手機)為了要讓單體式應用程式能支持無線應用，一般做法是在單體式應用上添加RESTFUL API 這樣無限應用就可以以XML/JSON over HTTP方式進行交互溝通．</p><p>同時WEB瀏覽器也開始支援單頁式應用程式(SPA)透過JS ,Ajax 等技術跟後端應用交互</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5iurq-TDA7VtbYeJtm3DDw.png" /><figcaption>單體式應用時代 + API時代</figcaption></figure><h4>III 微服務時代</h4><p>為了支持業務跟團隊規模擴大，應用後端會經過解耦拆分為微服務的型態</p><p>會出現問題前端後端耦合的問題也就是前端直接依賴於後端的微服務關係</p><p>任何一端的變化會影響另外一端，例如：後端內部微服務很多的話就要申請很多域名來暴露這些後端微服務，前端也會耦合這些域名．</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8GPKgnpKlzdvOxao-gz3Jg.png" /><figcaption>微服務時代</figcaption></figure><p><strong>因此API GateWay的誕生就是解決這個問題．</strong></p><h4>IV 微服務時代＋API GateWay</h4><p>透過API GateWay將前端與後端之間進行解耦</p><p>主要作用為反向Routing 當前端像某個微服務發起請求</p><p><strong>由API GateWay 根據配置的路由表進行Routing轉發到對應微服務</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GCbpoJmYplHMiDbOG1FUsw.png" /><figcaption>微服務時代＋API GateWay</figcaption></figure><p>因為API GateWay是微服務的集中路口</p><p>所以他可以實現其他功能</p><p>例如：安全認證、限流熔斷、日誌監控、解耦遷移、金絲雀測試……等等</p><p>回頭說K8s問題</p><h3>Kubernetes暴露服務問題</h3><p>Service 中有Load Balancer type讓我們可以暴露我們的服務給外部</p><p>透過公有雲(AWS、GCP、Azure等等)公有雲服務提供的Load Balancer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DF71R4Wv-bDDym34zq8akg.png" /><figcaption>公有雲K8s透過LB暴露服務</figcaption></figure><p>因此在公有雲上要暴露一個服務就要申請一個LB(Load Balancer)</p><p>如果要暴露三個就要三個LB如下圖</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SSTEvZQWElVsnIynBV8Mww.png" /></figure><p>成本考量不可擴展</p><p>為了要解決所以K8s引入Ingress這個概念和API Gateway類似</p><h4>K8s Ingress</h4><p>K8s Ingress和API gateway類似本質上也是7層反向代理，引入Ingress以後我們只需要申請一個LB或是少量的LB，但是可以把多個服務暴露出去．</p><p>由Ingress實現背後的Routing 進行服務轉發，因此有新增服務只要在Ingress上添加相應的Routing規則就好．</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_OnBF-qjZxnKR1FETRvfA.png" /></figure><p><strong>Ingress的核心功能為反向路由(路由轉發）</strong></p><p>而<strong>Ingress也是流量進入K8s集群的集中入口因此</strong></p><p><strong>他也可以實現集中的</strong>反向路由、安全認證、限流熔斷、日誌監控……等等</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0CkkFyb6xBZlJGeeF254cQ.png" /></figure><h4>兩者的差別？</h4><h4><strong>API Gateway(</strong>API管理)</h4><p>解決怎麼公開現有的API，供他人使用考慮的是API（如上定義）是</p><p><strong>”如何最好地管理API和允許對其進行訪問</strong>。“</p><p>我們不是在考慮服務器，主機、端口、容器甚至服務．</p><h4>Ingress(集群入口)</h4><p>通過定義明確的入口點（例如域/虛擬主機、端口、協議等），嚴格控制哪些流量可以進入（甚至離開）我們的集群。<strong>思考更多是</strong></p><p><strong>“我的集群中有此服務，我需要集群外的人能夠調用它”。</strong></p><h3>Sum Up</h3><p><strong>什麼是API Gateway?</strong></p><blockquote>用來解耦前後端為服務的接口，本質為7層反向代理，將請求轉發到後端伺服器．</blockquote><p><strong>什麼是Ingress?</strong></p><blockquote>Ingress是一個Kubernetes平台上的API，用來管理集群中公開服務</blockquote><blockquote>實現則是透過Ingress控制器(Ingress controller)</blockquote><p><strong>Ingress和API Gateway兩者差別</strong></p><p><strong>API Gateway 與 k8s Ingress 本質上是在做七層反向代理微服務集中的出入口</strong></p><p><strong>但Ingress考量的是集群入口進入K8s cluster的入口</strong></p><p>而<strong>API Gateway</strong>是如何最好地管理和允許對其進行訪問</p><blockquote>核心功能為: 反向路由</blockquote><blockquote>高級功能為: 反向路由、安全認證、日誌監控等</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bf9b54e5976" width="1" height="1" alt=""><hr><p><a href="https://medium.com/k8s%E7%AD%86%E8%A8%98/kubernetes-k8s-api-gateway-vs-kubernetes-ingress-3bf9b54e5976">[Kubernetes / K8s]API gateway Vs Kubernetes Ingress</a> was originally published in <a href="https://medium.com/k8s%E7%AD%86%E8%A8%98">k8s筆記</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>