<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Douglops - notes and banters</title>
    <subtitle>Tales from the neverending sea of diffs</subtitle>
    <link rel="self" type="application/atom+xml" href="/atom.xml"/>
    <link rel="alternate" type="text/html" href="/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-07-21T00:00:00+00:00</updated>
    <id>/atom.xml</id>
    <entry xml:lang="en">
        <title>amateur radio textbook for hackers</title>
        <published>2026-07-21T00:00:00+00:00</published>
        <updated>2026-07-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            Douglas
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/amateur-radio/"/>
        <id>/amateur-radio/</id>
        
        <content type="html" xml:base="/amateur-radio/">&lt;p&gt;&lt;strong&gt;A Free, Country-Agnostic Textbook for Every Radio Amateur&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Ham radio has a strange problem: the physics is universal, but almost every study guide isn&#x27;t. Ohm&#x27;s law doesn&#x27;t care which country issued your callsign, yet most textbooks are written around one nation&#x27;s exam syllabus, band plan, and licensing bureaucracy — which means the moment you cross a border (or just want to actually &lt;em&gt;understand&lt;&#x2F;em&gt; the material instead of memorizing a question pool), you&#x27;re stuck.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;The Complete Amateur Radio Operator&lt;&#x2F;em&gt; is our attempt to fix that. It grew out of the study materials built for &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;radioescola.pt&quot;&gt;radioescola.pt&lt;&#x2F;a&gt;, a resource originally created to help Portuguese candidates prepare for their national amateur radio exam — the diagrams, worked examples, and topic coverage built up there over time turned out to be too good a foundation to keep locked to one country&#x27;s syllabus. So I rebuilt it: stripped out everything specific to Portugal&#x27;s regulator, rewrote and substantially expanded the technical content in English, and turned it into a free, 175-page textbook covering everything underneath every national amateur radio exam in the world.&lt;&#x2F;p&gt;
&lt;p&gt;It runs from electricity and circuit theory through AC and reactance, semiconductors and op-amps, receiver architectures, modulation, antennas, transmission lines, and ionospheric propagation — built up from first principles, with worked examples, exam tips, and end-of-chapter problems throughout. It&#x27;s organized in five tiers that roughly track the entry-level → intermediate → full-privilege progression used almost everywhere, so you can stop wherever your target license requires, or keep going all the way to advanced RF engineering.&lt;&#x2F;p&gt;
&lt;p&gt;What it deliberately &lt;em&gt;doesn&#x27;t&lt;&#x2F;em&gt; do is teach any single country&#x27;s regulations. Instead, it covers the genuinely international layer — the ITU, IARU, CEPT, the Q-code, the NATO phonetic alphabet, standardized emission designators — the stuff that&#x27;s the same whether you&#x27;re studying in Lisbon or Lagos or Los Angeles. National band plans and paperwork change; a half-wave dipole doesn&#x27;t.&lt;&#x2F;p&gt;
&lt;p&gt;A few things we&#x27;re especially glad made it in: a full appendix of every formula in the book, organized by chapter, for last-minute review, alongside SI prefixes, physical constants, and a resistor color code quick-reference. And a closing bonus chapter, outside the exam material entirely, on aviation, maritime, and military radio monitoring with SDR — ACARS, ADS-B, AIS, NAVTEX, and the rest of the signals now trivially receivable with a $20 USB dongle, framed with a clear-eyed note that monitoring legality varies by country and is worth checking before you start.&lt;&#x2F;p&gt;
&lt;p&gt;It&#x27;s built in LaTeX, with hand-drawn circuit diagrams and plots rather than screenshots, so it reads like an actual textbook rather than a printed webpage.&lt;&#x2F;p&gt;
&lt;p&gt;Whether you&#x27;re chasing your first license or just want to finally understand &lt;em&gt;why&lt;&#x2F;em&gt; your antenna tuner does what it does, I hope this is useful to you. 73.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;The finished PDF file (check repo for the last updated files) and the tex files can be found below:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;&#x2F;amateur-radio&#x2F;radio_textbook&#x2F;main.pdf&quot;&gt;Read the PDF&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;douglops&#x2F;blog&#x2F;tree&#x2F;main&#x2F;content&#x2F;amateur-radio&#x2F;radio_textbook&quot;&gt;Browse the LaTeX source&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>spot nearby planes with acars when you&#x27;re bored</title>
        <published>2026-05-03T00:00:00+00:00</published>
        <updated>2026-05-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            Douglas
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/founding-planes-acars/"/>
        <id>/founding-planes-acars/</id>
        
        <content type="html" xml:base="/founding-planes-acars/">&lt;p&gt;There was a time when I liked aircraft a lot. Like a really lot. But you know what is even more cool than flying a plane?
To me, it is the understanding of aircraft communication systems, avionics and embedded systems and the overall engineering
efforts applied to these amazing flying beasts!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-ads-b-detour&quot;&gt;The ADS-B detour&lt;&#x2F;h2&gt;
&lt;p&gt;My RTL-SDR is an old v2 dongle, and it just doesn&#x27;t do a good job at 1090 MHz, which is what you need for ADS-B. I didn&#x27;t
feel like buying a v3&#x2F;v4 just to get that one band, so instead I went down a small rabbit hole with
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rsadsb&#x2F;adsb_deku&quot;&gt;adsb_deku&lt;&#x2F;a&gt;, a Rust ADS-B decoder. The plan was to feed it from &lt;code&gt;dump1090_rs&lt;&#x2F;code&gt;
pointed at a SoapySDR remote endpoint instead of the dongle directly:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dump1090_rs --driver &amp;quot;remote, remote=tcp:&#x2F;&#x2F;127.0.0.1:55132, remote:driver=rtlsdr&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Honestly, I never confirmed whether the remote&#x2F;SoapySDR hop was actually necessary for what I was doing, or just a
leftover from an earlier experiment — but I kept the command around, along with the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;osmocom.org&#x2F;projects&#x2F;rtl-sdr&#x2F;wiki&quot;&gt;RTL-SDR wiki&lt;&#x2F;a&gt;, in case I revisit it with better hardware.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;acars-works-with-basically-anything&quot;&gt;ACARS: works with (basically) anything&lt;&#x2F;h2&gt;
&lt;p&gt;Where the dongle has no trouble at all is VHF, and that&#x27;s exactly where ACARS lives (airlines still send a lot of
short operational messages — gate info, weather, position reports — over VHF datalinks in the 130-137 MHz range).
On my MacBook Air, I fed &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;TLeconte&#x2F;acarsdec&quot;&gt;acarsdec&lt;&#x2F;a&gt; live from SoapySDR across the usual set of
international ACARS channels, and it picked up traffic right away:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;acarsdec --output full:file --soapysdr driver=rtlsdr 131.450 131.525 131.550 131.725 131.825&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;No fiddling required — it just worked, which was a nice change of pace after the ADS-B detour above.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;acars-deku-someday&quot;&gt;acars_deku, someday&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;adsb_deku&lt;&#x2F;code&gt; decodes and renders ADS-B frames so nicely that it left me wanting the same thing for ACARS — something
like &lt;code&gt;acars_deku&lt;&#x2F;code&gt;, parsing and rendering the messages &lt;code&gt;acarsdec&lt;&#x2F;code&gt; spits out instead of just logging them to a file.
Nothing built yet, just an idea sitting in my someday-maybe pile.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;further-reading&quot;&gt;Further reading&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;osmocom.org&#x2F;projects&#x2F;rtl-sdr&#x2F;wiki&quot;&gt;RTL-SDR project wiki&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rsadsb&#x2F;adsb_deku&quot;&gt;adsb_deku&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wiedehopf&#x2F;tar1090&quot;&gt;tar1090&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;mode-s.org&#x2F;1090mhz&#x2F;&quot;&gt;mode-s.org: 1090 MHz&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.rtl-sdr.com&#x2F;rtl-sdr-radio-scanner-tutorial-receiving-airplane-data-with-acars&#x2F;&quot;&gt;RTL-SDR.com: receiving ACARS airplane data&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.gta.ufrj.br&#x2F;ensino&#x2F;eel878&#x2F;redes1-2023-1&#x2F;trabalhos&#x2F;Grupo03&#x2F;acars.html&quot;&gt;UFRJ GTA: ACARS overview&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>the practice of chinese learning dump</title>
        <published>2024-08-01T00:00:00+00:00</published>
        <updated>2024-08-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            Douglas
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/learning-mandarim/"/>
        <id>/learning-mandarim/</id>
        
        <content type="html" xml:base="/learning-mandarim/">&lt;p&gt;My interest in Chinese culture goes way back to my childhood. The symbols (ideograms), martial arts and overall cultural aspects instilled in me a fascination of it&#x27;s own kind. Now, heading into this journey.&lt;&#x2F;p&gt;
&lt;p&gt;Below some online resources to aid you, if you are interested in getting used to this language:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dictionaries&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;zhongwen-chinese-english&#x2F;kkmlkkjojmombglmlpbpapmhcaljjkde&quot;&gt;Zhongwen (Google Chrome)&lt;&#x2F;a&gt;
One of my most used dictionaries. Definitely give it a try. Check the How-to&#x27;s &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zhongwen-chrome.blogspot.com&#x2F;&quot;&gt;here&lt;&#x2F;a&gt; and start leveraging its power today!&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;dict.cn&#x2F;&quot;&gt;Dict.cn&lt;&#x2F;a&gt;
A very handy online dictionary to translate chinese words. I made a common use this way, for example: &lt;code&gt;http:&#x2F;&#x2F;dict.cn&#x2F;老师&lt;&#x2F;code&gt;
Cool if you are using a sheet for &quot;flashcarding&quot; new learning words. It gets easier to automate a link for lookups doing this.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;fanyi.baidu.com&#x2F;&quot;&gt;Baidu Fanyi (翻译)&lt;&#x2F;a&gt;
Complete translation tool from many dialects of mandarin into other languages. More trustworthy than Google Translation in this regard, made for natives of asian speaking languages. Also has a very useful mobile app, check it out!&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.pleco.com&#x2F;&quot;&gt;Pleco&lt;&#x2F;a&gt;
One of the most famous world dictionaries for mobile devices. If you are investing into learning mandarin and don&#x27;t know where to start, give Pleco a try. With its paid features on, makes it a one-stop-shop for mandarin students.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grammar&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;resources.allsetlearning.com&#x2F;chinese&#x2F;grammar&#x2F;&quot;&gt;Chinese Grammar Wiki&lt;&#x2F;a&gt;
Tired of being stuck when facing an uncommon phrase variation or symbol used in an unsettling way? Check this complete online grammar that ranges from HSK-1 to HSK-3. Complete references and a very thorough list of sentence patterns.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vocabulary&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;skritter.com&#x2F;demo&quot;&gt;Skritter&lt;&#x2F;a&gt;
Skritter is a powerful aid for learning character writing both for Chinese mandarin or Japanese kanji.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;mandarinbean.com&#x2F;new-hsk-vocabulary&#x2F;&quot;&gt;Mandarin Bean&lt;&#x2F;a&gt;
Despite all the other resources who will aid you in gaining vocabulary, sometimes you need a compreehensible list. It&#x27;s made for you! Very handy to print and put at your desk for offline reference. There&#x27;s also a whole lot of resources like tests etc. Enjoy!&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.google.com&#x2F;spreadsheets&#x2F;d&#x2F;1-BppwKJzK1swKgGw94jTB0GGB2vfr8tPdh0sTW7wi9Y&#x2F;edit?usp=sharing&quot;&gt;Chinese HSK Consolidated&lt;&#x2F;a&gt;
I&#x27;ve found this in 2021 without even grasping how mandarin worked out or how to tackle its study. Turns out it&#x27;s very handy for checking words and frequency order for all HSKs levels!&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;General resources&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;refold.link&#x2F;mandarinNotion&quot;&gt;Refold Mandarin&lt;&#x2F;a&gt; (also this &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;zenith-raincoat-5cf.notion.site&#x2F;Refold-Mandarin-Resources-d54bfade358b4d0a88b5600acb99582b&quot;&gt;link&lt;&#x2F;a&gt;)
This was a very famous online sheet for hosting cultural resources in chinese mandarin, now turned into a Notion database. Check &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;refold.la&#x2F;&quot;&gt;Refold&lt;&#x2F;a&gt;. You can also check the above mentioned old sheet &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.google.com&#x2F;spreadsheets&#x2F;d&#x2F;1mq3sfslUsC9WlPM7pJN5A7hOFdVqpEFBbiU8-fgmRUw&#x2F;edit?usp=sharing&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;disk.yandex.com&#x2F;d&#x2F;YEg7gd2TcBOHbQ&quot;&gt;Chinese Cinema&lt;&#x2F;a&gt; A fried of mine is addicted to Cinema and made this list of classical Chinese movies, from famous directors! Even if you&#x27;re not that much in Chinese learning, check it out! Password is: &lt;code&gt;Ch3nKaiRulz&lt;&#x2F;code&gt;. If you want to download it all, get &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;1hfnpu2mGB5lgZFL30JJqwJSV063CE64y&#x2F;view?usp=share_link&quot;&gt;this torrent&lt;&#x2F;a&gt;. Movies included:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Movies:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;Yonggang Wu - 1934 - 神女 (Goddess) | The Goddess&lt;&#x2F;li&gt;
&lt;li&gt;Weibang Ma-Xu - 1937 - 夜半歌声 (Song at Midnight)&lt;&#x2F;li&gt;
&lt;li&gt;Fei Mu - 1948 - 小城之春 (Spring in a small town)&lt;&#x2F;li&gt;
&lt;li&gt;Xie Jin - 1961 - 红色娘子军 (The Red Detachment of Women) -&amp;gt; also on &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=EenkAGNXBBQ&amp;amp;ab_channel=F%C3%A1bioCardoso&quot;&gt;Youtube&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Chen Kaige - 1984 - 黄土地 (Yellow earth), 1993 - 霸王别姬 (Farewell My Concubine), 2021 - 长津湖 (The Battle at Lake Changjin)&lt;&#x2F;li&gt;
&lt;li&gt;Tian Zhuangzhuang - 1986 - 盗马贼 (Horse thief), 1993 - 蓝风筝 (Blue kite)&lt;&#x2F;li&gt;
&lt;li&gt;Zhang Yimou - 1988 - 红高粱 (Red Sorghum), 1991 - 大红灯笼高高挂 (Red lanterns hang high), 1994 - 活着 (Tempo de Viver), 1999 - 一个都不能少 (Not one less), 2002 - 英雄 (Hero)&lt;&#x2F;li&gt;
&lt;li&gt;Jiang Wen - 1994 - 阳光灿烂的日子 (In the Heat of the Sun), 2000 - 鬼子来了 (Devils are coming)&lt;&#x2F;li&gt;
&lt;li&gt;Jia Zhangke - 2000 - 站台 (Platform), 2006 - 三峡好人 (Em Busca da Vida), 2013 - 天注定 (Destiny), 2015 - 山河故人 (Old friend), 2018 - 江湖儿女 (Rivers and lakes)&lt;&#x2F;li&gt;
&lt;li&gt;Bi Gan - 2018 - 地球最后的夜晚 (Last night on earth)&lt;&#x2F;li&gt;
&lt;li&gt;Guan Hu - 2020 - 八佰 (The Eight Hundred)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Animations:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;Wan Laiming - 1941 - 铁扇公主 (Iron Fan Princess), 1961 - 大闹天宫 (The Monkey King: Havoc in Heaven), 1979 - 哪吒闹海 (Nezha Naohai) | Nezha Conquers the Dragon King, 2016 - 大鱼海棠 (Big fish &amp;amp; Begônia) -&amp;gt; (Netflix Only), 2018 - 肆式青春 (Unrestrained youth) -&amp;gt; (Netflix only), 2019 - 罗小黑战记 (Heifei Legend) -&amp;gt; (HBO Max only)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Animated Series:&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;2019 - 领风者 (O Líder) -&amp;gt; &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PLvL3Puo5nv9smd8eeyOQaHBPCkTEYMJIr&quot;&gt;YouTube&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Series &amp;amp; Novels:&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;2021 - 觉醒年代 (Age of Awakening) -&amp;gt; &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cI8mKJmDUYs&amp;amp;list=PLGdeVB4h7_6SwFRrSukO4OU2dmYyOa7Gk&quot;&gt;YouTube&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;2010 - 三国 (Three Kingdoms) -&amp;gt; &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PL33A390995E9A7F00&quot;&gt;Youtube&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Chinese Cinema History&lt;&#x2F;strong&gt;:
&lt;ul&gt;
&lt;li&gt;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cinema_of_China&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nullniverse&#x2F;iptv-cn&quot;&gt;Chinese Television&lt;&#x2F;a&gt; IPTV from China mainland. Lot&#x27;s of channels for your delight. But it works only by means of a VPN, and after some research, the only feasible (not yet tested or endorsed by me) is &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.earthvpn.com&quot;&gt;earthVPN&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;disk.yandex.com&#x2F;d&#x2F;p6kAhae4odR0Eg&quot;&gt;CN folder on Cloud&lt;&#x2F;a&gt;
I hosted for many years a lot of resources for language learning on my cloud disk drive and you can still access it from the link above. It&#x27;s a couple of Gigabytes in size (~20GB) for the mandarin resources (&lt;code&gt;lang&#x2F;cn&#x2F;&lt;&#x2F;code&gt;) and they came from a publicly available torrent at that time (2018) as well as many other languages in there.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Community resources&lt;&#x2F;strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.google.com&#x2F;spreadsheets&#x2F;d&#x2F;1RxdDINBg1PjCT-nC3T4OZ0am8AFxXnPgm3HnXbDOJjY&#x2F;edit?usp=sharing&quot;&gt;My Study Sheet&lt;&#x2F;a&gt;
It&#x27;s my most used resource to study nowadays and I hope it&#x27;s also beneficial for your study endeavours! There&#x27;s also a lot of learning resources to master Bopomofo (Zhuyin Fuhao &#x2F; 注音符號／ㄅㄆㄇㄈ)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;kaohongshu.blog&#x2F;2022&#x2F;01&#x2F;13&#x2F;learn-mandarin-chinese-resources-part-1&#x2F;&quot;&gt;Kaohongshu guide for learning mandarin in 2022&lt;&#x2F;a&gt;
I&#x27;m not the most experienced mandarin learner to give advice for newcomers. Check this blog for advice and resources on how to make your mandarin learning journey more effective and joyful&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;discord.gg&#x2F;chineselanguage&quot;&gt;Discord Chinese Language&lt;&#x2F;a&gt;
One of the best learning communities out there I&#x27;ve ever seen. Not because of it&#x27;s size, but because of its quality both from it&#x27;s members and guidance in general. There you&#x27;ll find broader knowledge channels and can practice and level up your mandarin skill set!&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;discord.gg&#x2F;PfzZqBUw&quot;&gt;Discord Xefjord&#x27;s Complete Language&lt;&#x2F;a&gt; (also &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;xefjord.wixsite.com&#x2F;xefscompletelangs&quot;&gt;here&lt;&#x2F;a&gt;)
Interested in other asian countries or indian native languages? Say no more! Check Xefjord&#x27;s amazing resources and join the Discord channel for lots of resources like flashcards and advice!&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;t.me&#x2F;mandarim&quot;&gt;Telegram Xiao Mandarim Channel PT-BR&lt;&#x2F;a&gt;
If you&#x27;re coming from Portuguese-speaking countries, this is one of the most effervescent communities for mandarin learning in Brazil. 小老师 also holds a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PLSA_5IcZ3282g5B1luYSP6IxPaLigxErG&quot;&gt;public playlist&lt;&#x2F;a&gt; with +250 videos from 0-to-hero for mastering the mandarin language.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>using multiple github accounts locally</title>
        <published>2022-11-10T00:00:00+00:00</published>
        <updated>2022-11-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            Douglas
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/using-multiaccount-github/"/>
        <id>/using-multiaccount-github/</id>
        
        <content type="html" xml:base="/using-multiaccount-github/">&lt;p&gt;&lt;em&gt;This guide is just a collection of steps and use case for implementing multi-account authentication on Github in your local machine.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Of course, you can use &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;account-and-profile&#x2F;how-tos&#x2F;account-management&#x2F;managing-multiple-accounts&quot;&gt;this&lt;&#x2F;a&gt;, but... why not!?&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;context&quot;&gt;Context&lt;&#x2F;h2&gt;
&lt;p&gt;There was a time when cryptic sysadmins and developers integrated their scripts and codes underneath a pile of skull and rocks (kindly called &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Revision_Control_System&quot;&gt;&lt;em&gt;Revision Control Systems&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;Evolved offspring of this so-called jurassic figure filled the earth after this apocalyptical era, and rapidly became popular and known by their own names, like Subversion and TurtoiseSVN, the later its GUI implementation.&lt;&#x2F;p&gt;
&lt;p&gt;Things were gaining traction back then, and the fast-paced rhythm on which software was being developed, spawned a new set of demon capable of spread havoc and anxiety for generations to come. Well known as &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;tortoisesvn.net&quot;&gt;Git&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Loved and hated, different tastes contributed more or less to what is better known today as &lt;em&gt;SCM&lt;&#x2F;em&gt; - &lt;em&gt;Source Control Management&lt;&#x2F;em&gt;, creating a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Comparison_of_version-control_software&quot;&gt;rich and diverse ecosystem&lt;&#x2F;a&gt; of tools for the occultist craft of software engineering.&lt;&#x2F;p&gt;
&lt;p&gt;In my life I&#x27;ve only used two systems for SCM, SVN and Git. I also have seen people scratching their heads to be more productive on their work machines and keep up with their contributions besides job-related ones.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;tip&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you want to dig deeper into Git, there are &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;dictcp&#x2F;awesome-git&quot;&gt;many resources&lt;&#x2F;a&gt; and also an &lt;em&gt;de facto&lt;&#x2F;em&gt; &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&quot;&gt;industry standard&lt;&#x2F;a&gt; book written about what git is and how to better leverage its system&#x27;s functionality. Check it out!&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;My main drive for this post is because there&#x27;s so much information out there about vanilla git configurations, but few ones aimed to configuration and operability for productivity - aside of installing new-shiny-tools.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;signing-commits&quot;&gt;Signing Commits&lt;&#x2F;h2&gt;
&lt;p&gt;Signing posts is the most overlooked component when you are working for a closed doors org if they enforce self-domain usage for contributors in private repos, that is: only users with email &lt;em&gt;user@myorg.com&lt;&#x2F;em&gt; are able to contribute on private repositories and no outside collaborators are allowed.&lt;&#x2F;p&gt;
&lt;p&gt;That works... in parts! Let&#x27;s suppose you have started small and gaining traction month by month, not only in revenue and corporate growth, but also in collaborators among your team who constantly push changes to production.&lt;&#x2F;p&gt;
&lt;p&gt;Once you start adding complexity in your environment, and aren&#x27;t inclined to spend large bucks with security software for everyone&#x27;s laptops - a couple questions arise:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Are my devs skilled enough in security practices while using their machines for off-work related issues?&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;How can I be assured that the startling new shiny tools integrated in our pipelines, doesn&#x27;t pose a security risk for the entire supply-chain of our product?&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;What if a disgruntled employee starts to pose a security risk and plans to act on behalf of other employees to compromise our chain and our users?&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;More &lt;strong&gt;what ifs&lt;&#x2F;strong&gt;...&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;With these concerns at bay, a preliminary solution is to activate &lt;strong&gt;signed commits&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;As &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;43623702&quot;&gt;this post&lt;&#x2F;a&gt; from the old is explaining, it poses a question of authenticity and integrity, because:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;... the software [in question] is critical to some type of security, an attacker might compromise you by substituting broken software for the software you think you&#x27;re getting, e.g. something with a backdoor you couldn&#x27;t easily identify. After all, you want some code, you click &quot;download&quot;, and you trust.&lt;&#x2F;em&gt; - Cris from Stackoverflow Apr 26 2017&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Sufficiently to say, it also puts another layer of trust in commits inside your org, validating contribution&#x27;s origin for its members.&lt;&#x2F;p&gt;
&lt;p&gt;So, how do you do that?&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ll summarize the main steps below, but feel free to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;authentication&#x2F;managing-commit-signature-verification&#x2F;about-commit-signature-verification#gpg-commit-signature-verification&quot;&gt;check this&lt;&#x2F;a&gt; doc from Github and follow it at your own pace.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Install your GPG suite of tools.
_ Windows: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.gpg4win.org&#x2F;&quot;&gt;Gpg4win&lt;&#x2F;a&gt;
_ MacOS: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gpgtools.org&#x2F;&quot;&gt;GPG Suite&lt;&#x2F;a&gt; integrates automagically in the MacOs keychain. Check be above documentation for nitty-gritty details. * Unix&#x2F;Linux: Chances are you already have it, but give &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;gpg-agent&quot;&gt;gpg-agent&lt;&#x2F;a&gt; a try&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;pt&#x2F;enterprise-cloud@latest&#x2F;get-started&#x2F;signing-up-for-github&#x2F;verifying-your-email-address&quot;&gt;Verify your main address&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Activate commit auto-sign after each commit, this will save time on each commit: &lt;code&gt;git config commit.gpgsign true&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Generate your key: &lt;code&gt;gpg --full-generate-key&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;important&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;It &lt;em&gt;must&lt;&#x2F;em&gt; be at least 4096 bits (default option)
Your email must be the main email address of your Github account&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;List and export your newly created GPG key: &lt;code&gt;gpg --list-secret-keys --keyid-format=long&lt;&#x2F;code&gt;. Copy the e.g: &lt;em&gt;3AA5C34371567BD2&lt;&#x2F;em&gt; part to be used in the next command.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;List your secret key&quot;&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --list-secret-keys --keyid-format=long&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;hubot&#x2F;.gnupg&#x2F;secring.gpg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;------------------------------------&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sec   4096R&#x2F;3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;uid                          Hubot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssb   4096R&#x2F;42B317FD4BA89E7A 2016-03-10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, run the below command and copy the exhibited key in your &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;pt&#x2F;github-ae@latest&#x2F;authentication&#x2F;managing-commit-signature-verification&#x2F;adding-a-new-gpg-key-to-your-github-account&quot;&gt;GPG settings on Github&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;Copy your GPG key&quot;&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ gpg --armor --export 3AA5C34371567BD2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Prints the GPG key ID, in ASCII armor format&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Telling Github you&#x27;re a winner. Inserting your keys in the config&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;Configuring Git with your signing key&quot;&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ git config user.signingkey 3AA5C34371567BD2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The process above can be used to generate as many keys as you want. It&#x27;s useful if you plan to manage more than a single account on your machine&#x2F;session, as we&#x27;ll cover in the next part.&lt;&#x2F;p&gt;
&lt;p&gt;From now on, you&#x27;re able to effectively prove yourself and sign every commit you make. &lt;em&gt;Welcome to the age of surveillance capitalism!&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;configuring-multiple-accounts&quot;&gt;Configuring Multiple Accounts&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;using-multiaccount-github&#x2F;account-scheme.png&quot; alt=&quot;Possible interactions with git and Github in a single machine&#x2F;account&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I really appreciate your taste for the above image!&lt;&#x2F;p&gt;
&lt;p&gt;There&#x27;s a way to have a virtually unlimited number of git accounts configured if you observe some tricks, but often the most sought after feature is to maximize productivity, allowing you to commit to your professional and personal projects.&lt;&#x2F;p&gt;
&lt;p&gt;The above image says that in some cases, you want to use your personal username to work for your org, but using the &lt;em&gt;org&lt;&#x2F;em&gt; domain email, while, for your private projects, preserving the personal username + email address, also. But... is that possible? &lt;em&gt;Yes&lt;&#x2F;em&gt;, my horseshoe crab!&lt;&#x2F;p&gt;
&lt;p&gt;Let&#x27;s do that now:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Head back to your Github&#x27;s &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;settings&#x2F;emails&quot;&gt;email&lt;&#x2F;a&gt; settings. In this case, let&#x27;s create the scenario where you&#x27;re using your personal account and planning to use this account&#x27;s username to commit to your org.&lt;&#x2F;li&gt;
&lt;li&gt;Simply add your org&#x27;s email address and then make it valid.&lt;&#x2F;li&gt;
&lt;li&gt;Your primary address can be either your org or your personal one&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;After confirming your address, let&#x27;s go to your &lt;code&gt;~&#x2F;.gitconfig&lt;&#x2F;code&gt; settings in your machine.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;tip&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;In this step, you&#x27;ll not need to configure your SSH keys for each account, as the username will not change. For possible counterpositive needs, you could &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;3860112&#x2F;multiple-github-accounts-on-the-same-computer&quot;&gt;check this&lt;&#x2F;a&gt; ancient scroll.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;We are going to generate and use two additional files for this case, despite the &lt;code&gt;.gitconfig&lt;&#x2F;code&gt; file, and also will specify a static working path dir, to be used with one of the accounts.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~&#x2F;.git-personal.conf&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;~&#x2F;.git-professional.conf&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;In the &lt;code&gt;.gitconfig&lt;&#x2F;code&gt; file you&#x27;ll have your path choice set and additional commands:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.gitconfig&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;Configuring the path in .gitconfig file&quot; showLineNumbers&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;include]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        path = ~&#x2F;.git-personal.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[includeIf &amp;quot;gitdir:~&#x2F;Documents&#x2F;YourOrgFolder&#x2F;&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        path = ~&#x2F;.git-professional.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[init]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        defaultBranch = main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.git-personal&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;Configuring your personal .gitconfig file&quot; showLineNumbers&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[user]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        signingkey = 3AA5C34371567BD2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        email = your-personal@email.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        name = your-username&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        mergeTool = vimDiff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[commit]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        gpgsign = true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.git-professional&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-other z-link&quot;&gt;user&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;signingkey = FD668DAFE840A89C&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;email = your-professional-email@organization.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;name = same-username-as-your-personal-one&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mergeTool = vimDiff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-other z-link&quot;&gt;commit&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gpgsign = true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;One thing to notice in the above configuration is that you can use more than one signing key, or use the same to signed-commit in both projects - make sure your boss don&#x27;t work two part-time jobs, if you&#x27;ll just one key btw.&lt;&#x2F;p&gt;
&lt;p&gt;If you&#x27;re taking advantage of this pandemic and working more than one all-remote job, you could negotiate to use your same username and enjoy a multi-org config. Just create more .git-professional-&lt;code&gt;&amp;lt;number&amp;gt;&lt;&#x2F;code&gt; files and more &lt;code&gt;[includeIf]&lt;&#x2F;code&gt; entries in your &lt;code&gt;.gitconfig&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;p&gt;Now, for cloning accordingly (Github example), for other configured accounts &lt;em&gt;not&lt;&#x2F;em&gt; in your first &lt;code&gt;[Include]&lt;&#x2F;code&gt;- which is applicable to any folder &lt;em&gt;besides&lt;&#x2F;em&gt; the configured others - you need to run the clone command this way:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; git@github.com-&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;account_usernam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;account_usernam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;repo_nam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;.git&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;repo_nam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;_&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;account_usernam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; git@github.com-nullniverse:nullniverse&#x2F;my_repo.git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; my_repo_nullniverse&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;That&#x27;s it.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>not so useful k8s tricks - maybe</title>
        <published>2022-11-04T00:00:00+00:00</published>
        <updated>2022-11-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            Douglas
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/not-useful-k8s-tricks/"/>
        <id>/not-useful-k8s-tricks/</id>
        
        <content type="html" xml:base="/not-useful-k8s-tricks/">&lt;p&gt;Nowadays, I barely touch in helm charts in my job. In the past, I was used to writing a little bit of helm charts performing migrations of deployments that were outdated, and migrating our CI&#x2F;CD pipelines from drone.io to argo workflows.&lt;&#x2F;p&gt;
&lt;p&gt;I tried my best to prioritize maintainability and code flexibility over complexity in helm chart code deployments.&lt;&#x2F;p&gt;
&lt;p&gt;So below you&#x27;ll find some examples of useful snippets that simplified my day to day tasks, and other k8s useful stuffs - maybe.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;simplified-multi-ingress&quot;&gt;⎈ Simplified multi-Ingress&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;Multi-ingress file&quot; showLineNumbers&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- $svcPort := .Values.service.port -}}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- if .Values.ingresses.enabled -}}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- range .Values.ingresses.ingress }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;apiVersion: networking.k8s.io&#x2F;v1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;kind: Ingress&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;metadata:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  name: {{ .name }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  namespace: {{ .namespace }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  labels:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ include &amp;quot;app.labels&amp;quot; $ | indent 4 }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {{- with .annotations }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  annotations:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {{- toYaml . | nindent 4 }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;spec:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- if .tls }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  tls:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {{- range .tls }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    - hosts:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {{- range .hosts }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      - {{ . | quote }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      secretName: {{ .secretName }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  {{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  rules:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- range .rules }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    - host: {{ .hosts | quote }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      http:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {{- range .http.paths }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        paths:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          - path: {{ .path | quote }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            pathType: {{ .pathType | quote }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            backend:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              service:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                name: {{ .backend.service.name | quote }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                port:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                  number: {{ .backend.service.port.number | default $svcPort }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{- end }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It&#x27;s modular enough so you can attach and remove ingresses as needed without much hurdle.&lt;&#x2F;p&gt;
&lt;p&gt;Here follows the &lt;code&gt;value.yaml&lt;&#x2F;code&gt; example.&lt;&#x2F;p&gt;
&lt;p&gt;It can have a vast number of ingresses each one starting at &quot;name&quot;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ngresses&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;nabled&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ngress&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    -&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; n&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ame&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; i&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;ngress-1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;    n&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;amespace&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; n&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;amespace&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;    a&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;nnotations&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-constant&quot;&gt;    ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;    t&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ls&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        -&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; h&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;osts&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; m&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;y.host.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;        s&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ecretName&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; t&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;ls-my-host.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;    r&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ules&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        -&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; h&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;osts&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; m&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;y.host.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;        h&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ttp&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;            p&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;aths&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            -&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; p&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ath&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;            p&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;athType&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; P&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;refix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;            b&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ackend&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;                s&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ervice&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;                n&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ame&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;service-name&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;                p&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ort&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;                    n&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;umber&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 80&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    -&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt; n&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ame&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; i&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;ngress-2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This works for any object as well - like Services, Secrets etc; -, and could save you face when you need to plan for a modularized model to be used for multiple apps with as single config.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;pod-recurrent-restarts&quot;&gt;⎈ Pod Recurrent Restarts&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;em&gt;Ever wondered how to cycle your deployment&#x2F;pods the native way? Think no more!&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;Roles and account creation&quot; showLineNumbers&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;kubectl apply -f - &amp;lt;&amp;lt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;apiVersion: v1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;kind: ServiceAccount&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;metadata:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  name: deployment-restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  namespace: ns-name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;apiVersion: rbac.authorization.k8s.io&#x2F;v1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;kind: Role&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;metadata:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  name: deployment-restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  namespace: ns-name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rules:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  - apiGroups: [&amp;quot;apps&amp;quot;, &amp;quot;extensions&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    resources: [&amp;quot;deployments&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    resourceNames: [&amp;quot;deployment-name&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    verbs: [&amp;quot;get&amp;quot;, &amp;quot;patch&amp;quot;, &amp;quot;list&amp;quot;, &amp;quot;watch&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;apiVersion: rbac.authorization.k8s.io&#x2F;v1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;kind: RoleBinding&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;metadata:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  name: deployment-restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  namespace: ns-name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;roleRef:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  apiGroup: rbac.authorization.k8s.io&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  kind: Role&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  name: deployment-restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;subjects:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  - kind: ServiceAccount&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    name: deployment-restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    namespace: ns-name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot; data-jsx-title=&quot;&quot;Cronjob creation&quot; showLineNumbers&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;kubectl apply -f - &amp;lt;&amp;lt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;apiVersion: batch&#x2F;v1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;kind: CronJob&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;metadata:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  name: deployment-restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  namespace: ns-name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;spec:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  schedule: &amp;quot;* *&#x2F;5 * * *&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  jobTemplate:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    spec:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      backoffLimit: 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      activeDeadlineSeconds: 600&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      template:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        spec:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          serviceAccountName: deployment-restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          containers:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            - command:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                - bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                - -c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                - &amp;gt;-&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                  kubectl rollout restart deployment&#x2F;deployment-name &amp;amp;&amp;amp; kubectl rollout status deployment&#x2F;deployment-name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              image: bitnami&#x2F;kubectl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              imagePullPolicy: IfNotPresent&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              name: kubectl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          restartPolicy: Never&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Adjust the values to meet your current needs.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;using-sealed-secrets-the-easy-way&quot;&gt;⎈ Using sealed-secrets the easy way&lt;&#x2F;h2&gt;
&lt;p&gt;If your deployment implements the usage of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;bitnami-labs&#x2F;sealed-secrets&quot;&gt;sealed-secrets&lt;&#x2F;a&gt;, chances high that someday you&#x27;ll need to implement a secret by hand.It is the best way to keep your sensitive data safe in a GitOps workflow.&lt;&#x2F;p&gt;
&lt;p&gt;Here is a breakdown that simplifies this process using &lt;code&gt;kubeseal&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;First, ensure you have the following installed and configured:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;kubectl&lt;&#x2F;strong&gt;: Connected to your target cluster.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;kubeseal&lt;&#x2F;strong&gt;: The CLI tool for Sealed Secrets.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;view-secret&lt;&#x2F;strong&gt;: A kubectl kubecrew plugin (or use standard base64 decoding if you don&#x27;t have it). To install, run &lt;code&gt;kubectl krew install view-secret&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;1-fetch-the-public-certificate&quot;&gt;1. Fetch the Public Certificate&lt;&#x2F;h3&gt;
&lt;p&gt;To encrypt data without needing direct access to the Sealed Secrets controller, you first need to grab the public certificate from your cluster.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;find-the-latest-key-name&quot;&gt;Find the latest key name:&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; secret&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; kube-system&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; grep&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; sealed-secrets-key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;export-the-certificate&quot;&gt;Export the certificate:&lt;&#x2F;h4&gt;
&lt;p&gt;Replace &lt;code&gt;{{latest-key-name}}&lt;&#x2F;code&gt; with the name you found in the previous step.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; view-secret&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; {{latest-key-name}}&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; kube-system&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tls.crt&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tls.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;&#x2F;strong&gt; This &lt;code&gt;tls.crt&lt;&#x2F;code&gt; file is public. You can safely share it with your team; it can only be used to &lt;strong&gt;encrypt&lt;&#x2F;strong&gt; data, not decrypt it.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;2-encrypt-your-data&quot;&gt;2. Encrypt Your Data&lt;&#x2F;h3&gt;
&lt;p&gt;You can now generate the encrypted string (the &quot;Sealed&quot; version) to put into your &lt;code&gt;values.yaml&lt;&#x2F;code&gt; or Kubernetes manifests.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;for-simple-strings&quot;&gt;For simple strings:&lt;&#x2F;h4&gt;
&lt;p&gt;Use this for passwords, API keys, or tokens.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;your-sensitive-data&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; kubeseal&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-raw&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--scope&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cluster-wide&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--cert&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tls.crt&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--controller-name&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; {{latest-key-name}}&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--from-file=&#x2F;dev&#x2F;stdin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;for-service-account-json-files&quot;&gt;For Service Account JSON files:&lt;&#x2F;h4&gt;
&lt;p&gt;If you have a Google Cloud or Azure service account file (&lt;code&gt;SA.json&lt;&#x2F;code&gt;), use this method:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; SA.json&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; kubeseal&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-raw&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--scope&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cluster-wide&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--cert&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tls.crt&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--controller-name&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; {{latest-key-name}}&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--from-file=&#x2F;dev&#x2F;stdin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;bulb-key-parameters-explained&quot;&gt;💡 Key Parameters Explained&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Parameter&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Purpose&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;--raw&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Outputs only the encrypted string instead of a full YAML object.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;--scope cluster-wide&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Allows the secret to be unsealed in any namespace within the cluster.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;--cert tls.crt&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Uses the certificate you just downloaded to perform the encryption.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;--from-file=&#x2F;dev&#x2F;stdin&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Tells the tool to read the data you piped in via &lt;code&gt;echo&lt;&#x2F;code&gt; or &lt;code&gt;cat&lt;&#x2F;code&gt;.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;warning-a-quick-pro-tip&quot;&gt;⚠️ A Quick Pro-Tip&lt;&#x2F;h3&gt;
&lt;p&gt;Once you have generated the encrypted string and pasted it into your &lt;code&gt;values.yaml&lt;&#x2F;code&gt;, &lt;strong&gt;delete the local &lt;code&gt;tls.crt&lt;&#x2F;code&gt; and any plain-text files&lt;&#x2F;strong&gt; (like &lt;code&gt;SA.json&lt;&#x2F;code&gt;) if they are no longer needed. Never commit the plain-text versions to your repository!&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;start-a-cronjob&quot;&gt;⎈ Start a cronjob&lt;&#x2F;h2&gt;
&lt;p&gt;Learn how to start a previously deployed cronjob in your cluster:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; create&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; job&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-from=cronjob&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;cronjob-name&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;job-nam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;namespace-nam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;list-api-versions&quot;&gt;⎈ List API versions&lt;&#x2F;h2&gt;
&lt;p&gt;This is how to list all your cluster&#x27;s API versions for any object:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;anythin&lt;&#x2F;span&gt;&lt;span&gt;g&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;A&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;o=custom-columns=NAME:.metadata.name,API-Version:.apiVersion&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;multi-container-pods&quot;&gt;⎈ Multi-Container pods&lt;&#x2F;h2&gt;
&lt;p&gt;Pods can run more than one container (like a main app and a &quot;sidecar&quot;). These commands help you target the right one.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;1-list-all-containers-in-a-pod&quot;&gt;1. List all containers in a Pod&lt;&#x2F;h3&gt;
&lt;p&gt;If you aren&#x27;t sure what the containers inside a Pod are named, use this command to list them:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; pod&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;podNam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; jsonpath=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;{.spec.containers[*].name}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;2-view-logs-for-a-specific-container&quot;&gt;2. View logs for a specific container&lt;&#x2F;h3&gt;
&lt;p&gt;By default, &lt;code&gt;kubectl logs&lt;&#x2F;code&gt; might fail if there is more than one container. Use the &lt;code&gt;-c&lt;&#x2F;code&gt; flag to specify which one you want to see:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; logs&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; pod&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;podNam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;c&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;containerNam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;3-access-the-container-s-terminal-shell&quot;&gt;3. Access the container&#x27;s terminal (shell)&lt;&#x2F;h3&gt;
&lt;p&gt;If you need to jump inside the container to check file paths, environment variables, or network connectivity:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; exec&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;it&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;podNam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;c&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;containerNam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it does:&lt;&#x2F;strong&gt; * &lt;code&gt;-it&lt;&#x2F;code&gt;: Interactive and TTY (keeps the session open so you can type).
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-c &amp;lt;containerName&amp;gt;&lt;&#x2F;code&gt;: Ensures you enter the correct container.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-- &#x2F;bin&#x2F;bash&lt;&#x2F;code&gt;: Executes the bash shell (if bash isn&#x27;t available, try &lt;code&gt;&#x2F;bin&#x2F;sh&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;bulb-quick-summary-table&quot;&gt;💡 Quick Summary Table&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Goal&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Command Flag&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Why use it?&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Identify&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;-o jsonpath=&#x27;...&#x27;&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;When you don&#x27;t know the container names.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Debug&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;logs&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;To see error messages or application output.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Inspect&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;exec -it&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;To run manual commands inside the running environment.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;&#x2F;strong&gt; Be careful with &lt;code&gt;exec&lt;&#x2F;code&gt; in production environments! Changes made manually inside a container are &lt;strong&gt;temporary&lt;&#x2F;strong&gt; and will disappear if the Pod restarts. Always update your configuration or Dockerfile for permanent changes.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;identify-which-images-are-running-in-a-kubernetes-cluster&quot;&gt;⎈ Identify which images are running in a Kubernetes cluster&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; pods&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-all-namespaces&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; jsonpath=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;{..image}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;tr&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;s&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;[[:space:]]&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;sort&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;uniq&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;list-all-container-images-in-all-namespaces&quot;&gt;⎈ List all Container images in all namespaces&lt;&#x2F;h2&gt;
&lt;p&gt;Easy ti grab a full list of running container images in the cluster, without relying on any extra plugins.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; pods&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-all-namespaces&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; jsonpath=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;{.items[*].spec.containers[*].image}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;tr&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;s&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;[[:space:]]&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;sort&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;uniq&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you want to list all container images by pod, the command is:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; pods&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-all-namespaces&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; jsonpath=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;{range .items[*]}{&amp;quot;\n&amp;quot;}{.metadata.name}{&amp;quot;:\t&amp;quot;}{range .spec.containers[*]}{.image}{&amp;quot;, &amp;quot;}{end}{end}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;sort&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;list-all-pulled-images-in-worker-nodes&quot;&gt;⎈ List all pulled images in worker nodes&lt;&#x2F;h2&gt;
&lt;p&gt;List all images pulled for all nodes:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; node&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; json&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; jq&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;r&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;.items[].status.images[].names&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For a single worker node:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; node&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; worker-node&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; json&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name&quot;&gt; jq&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;r&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;.status.images[].names&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;get-and-sort-cluster-events&quot;&gt;⎈ Get and sort cluster events&lt;&#x2F;h2&gt;
&lt;p&gt;List all cluster events sorted by the newest first:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; get&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; events&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;-sort-by=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;.lastTimestamp&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;real-time-node-status-monitoring&quot;&gt;⎈ Real-time node status monitoring&lt;&#x2F;h2&gt;
&lt;p&gt;Filter and monitor nodes in real-time:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name&quot;&gt;watch&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt;n1&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;kubectl get nodes --sort-by=.metadata.creationTimestamp | grep &amp;lt;node_name_hint&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;bulb-key-parameters-explained-1&quot;&gt;💡 Key Parameters Explained&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Parameter&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Purpose&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;-n1&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Runs the following command every 1 second.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;--sort-by=.metadata.creationTimestamp&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;It sorts the nodes by their age.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;database-health-check-probes&quot;&gt;⎈ Database health-check probes&lt;&#x2F;h2&gt;
&lt;p&gt;When running databases like MySQL in Kubernetes, you want to know if the database is actually responding to queries.&lt;&#x2F;p&gt;
&lt;p&gt;These configurations use &lt;strong&gt;Probes&lt;&#x2F;strong&gt; to automate health checks.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;database-health-probes-mysql&quot;&gt;Database Health Probes (MySQL)&lt;&#x2F;h3&gt;
&lt;p&gt;Probes allow Kubernetes to automatically &quot;heal&quot; your application or stop traffic if the database becomes unresponsive.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;1-liveness-probe-is-the-process-alive&quot;&gt;1. Liveness Probe: &quot;Is the process alive?&quot;&lt;&#x2F;h4&gt;
&lt;p&gt;This probe determines if the container needs a &lt;strong&gt;restart&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;l&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ivenessProbe&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;  e&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;xec&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;    c&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ommand&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bash&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-c&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;mysqladmin --user=$MYSQL_USER --password=$MYSQL_PASSWORD ping&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;  i&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;nitialDelaySeconds&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 30&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;  t&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;imeoutSeconds&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Check:&lt;&#x2F;strong&gt; Uses &lt;code&gt;mysqladmin ping&lt;&#x2F;code&gt; to see if the MySQL server process is alive.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Wait Time:&lt;&#x2F;strong&gt; It waits &lt;strong&gt;30 seconds&lt;&#x2F;strong&gt; (&lt;code&gt;initialDelaySeconds&lt;&#x2F;code&gt;) after starting before checking. This gives the database enough time to finish its internal startup (buffer pools, log recovery, etc.).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Failure:&lt;&#x2F;strong&gt; If the command fails or takes longer than &lt;strong&gt;5 seconds&lt;&#x2F;strong&gt;, Kubernetes will kill the Pod and start a fresh one.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h4 id=&quot;2-readiness-probe-is-the-db-ready-for-traffic&quot;&gt;2. Readiness Probe: &quot;Is the DB ready for traffic?&quot;&lt;&#x2F;h4&gt;
&lt;p&gt;This probe determines if the container is ready to &lt;strong&gt;accept connections&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;r&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;eadinessProbe&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;  e&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;xec&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;    c&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;ommand&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;bash&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-c&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;mysql --host=127.0.0.1 --user=$MYSQL_USER --password=$MYSQL_PASSWORD -e &amp;#39;SELECT 1&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;  i&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;nitialDelaySeconds&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;  p&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag&quot;&gt;eriodSeconds&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant&quot;&gt; 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Check:&lt;&#x2F;strong&gt; Runs a real SQL query (&lt;code&gt;SELECT 1&lt;&#x2F;code&gt;). This is more thorough than a &quot;ping&quot; because it confirms the database can actually execute commands.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Frequency:&lt;&#x2F;strong&gt; It checks every &lt;strong&gt;2 seconds&lt;&#x2F;strong&gt; (&lt;code&gt;periodSeconds&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Traffic Control:&lt;&#x2F;strong&gt; If this fails, Kubernetes removes the Pod from the Service endpoint. Your app won&#x27;t try to send data to a database that isn&#x27;t ready.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;bulb-pro-tip&quot;&gt;💡 Pro-Tip&lt;&#x2F;h3&gt;
&lt;p&gt;Always use a &lt;strong&gt;Readiness Probe&lt;&#x2F;strong&gt; for databases. If your database is doing a heavy internal migration or recovery, you want the Pod to stay &quot;Running&quot; (so it doesn&#x27;t get killed by a Liveness probe) but you don&#x27;t want your application to try and connect to it until the migration is finished.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
