Kuberentes 支援的運算資源種類繁多,諸如 Pod, Job, ReplicaSet, DaemonSet, Deployment 以及 StatefulSet.
其中 StatefulSet 則是特別針對 stateful 應用程式所設計的,實際使用上會有些許小地方與 Deployment 用法不同,譬如
1. Storage 使用的是 Template 的概念,希望每個 StatefulSet Pod 可以綁定固定的 PV
2. 名稱採取流水號設計,相對於 Deployment -> ReplicaSet -> Pod 兩層亂數來說, StatefulSet 的名稱更加顯眼
3. StatefulSet 的 Pod 有網路存取唯一性,搭配 Headless Service,就可以使用固定一組的 DNS 名稱來存取固定 Pod(預設情況下,Pod 重啟 IP 就會不同,要做到固定一致需要不少修改)
今天這篇文章算是一個入門教學文,主要是跟大家探討什麼是 StatefulSet,以及於 Kubernetes 內該如何使用,使用上有什麼要注意的,以下幫大家節錄部分資訊
1. StatefulSet 的設計是安全優先,所以預設情況下刪除 StatefulSet 不會連帶刪除使用的 Volume
2. 使用 StatefulSet 的時候,要記得處理當 Pod 被停止,被刪除時,相關資料的寫入與同步
3. 預設情況下, StatefulSet 的創建與移除都是一個一個來,創建時由 0-N-1, 移除則反過來。
4. 對於多節點的 StatefulSet 來說,這些應用程式可能都會需要一些初始化的操作,甚至 leader-election 等相關算法。這意味者 Container(s) Running 不等於 Pod 以及準備好了。
5. 針對上述概念,使用者一定要仔細的去設定 liveness 以及 readiness,來確保
6. PostStart/PreStop 的用法與時機也要考慮進去,特別是 PreStop 用得好還可以減少使用端封包無故重送
7. 研究 disruption budgets 的用法,來確保你的 StatefulSet 運行得更安心
8. 針對特定的儲存空間使用權限問題,可以考慮使用 fsGroup 來修改,而不用自己寫一堆 shellScript 來做。當然要注意儲存空間檔案過多內容過大的情況,預設的 fsGroup 行為可以會導致你的 Pod 花太多時間來啟動
原文: https://itnext.io/stateful-applications-in-kubernetes-808a60bc109
想學習更多關於 Kubernetes 的實戰經驗與基礎設計,可參閱我的線上課程: https://technologynoteniu.github.io/awesome-notes/linux/network/
「well known用法」的推薦目錄:
- 關於well known用法 在 矽谷牛的耕田筆記 Facebook 的最佳貼文
- 關於well known用法 在 EZ Talk Facebook 的最佳貼文
- 關於well known用法 在 玳瑚師父 Master Dai Hu Facebook 的最佳解答
- 關於well known用法 在 well-known用法的評價和優惠,YOUTUBE和商品老實說的推薦 的評價
- 關於well known用法 在 HOPE English 希平方學英文 的評價
- 關於well known用法 在 axios/axios: Promise based HTTP client for the browser and ... 的評價
well known用法 在 EZ Talk Facebook 的最佳貼文
#EZTALK #你不知道的美國大小事 #豬年回顧 #這絕對不是豬身攻擊
🐽Food Idioms 美國生活用語:Pork 豬肉
豬年即將結束,我們就趁這個專欄,介紹一些與 pork 豬肉有關的美國生活用語吧~🐖
1⃣eat like a pig; pig out
2⃣fat as a pig
3⃣sweat like a pig
4⃣pigsty
5⃣put lipstick on a pig
--
Pigs are known for being noisy, greedy eaters, 1⃣so if someone says you “eat like a pig,” well, you know what they mean. Ex: I don’t like eating out with Sean because he eats like a pig. In fact, pigs are so famous for their eating habits that they’ve even become verbs: “pig out” means “to eat greedily or gorge.” Ex: If you pig out on junk food, you’re going to get a stomachache.
豬吃東西一向又吵又急,所以如果有人說你 eat like a pig,嗯…我想你應該知道他是什麼意思。如:I don’t like eating out with Sean because he eats like a pig.(我不愛跟尚恩吃飯,因為他吃相像頭豬。)事實上,豬也因為吃相太出名,pig 一字也變成動詞了:pig out 指「狼吞虎嚥;大吃大喝」,如:If you pig out on junk food, you’re going to get a stomachache. (如果你猛塞垃圾食物,你會肚子痛。)
What happens if you eat like a pig? You get fat! 2⃣So if you say someone is fat as a pig, the meaning is obvious. Ex: Josh used to be thin, but now he’s fat as a pig. 3⃣The fat tend to sweat a lot, and “sweat like a pig” means “to sweat profusely.” Which seems strange, because pigs don’t actually sweat. As it turns out, this expression comes from pig iron, which “sweats” as it cools. Ex: I sweat like a pig whenever it gets hot.
那如果你吃得像一頭豬,會有什麼後果?對,你會變胖!所以如果你說,某人 fat as a pig,這意思應該也很清楚。如:Josh used to be thin, but now he’s fat as a pig.(賈許過去很瘦,可是現在肥得像頭豬。)人一胖,也很容易流汗,所以 sweat like a pig 就是指「汗流浹背」。這個說法其實沒道理,因為豬事實上是不流汗的。其實這個用語是出自生鐵(pig iron),一旦生鐵冷卻下來,就會一直『出汗』。如:I sweat like a pig whenever it gets hot.(天氣熱的時候,我總是汗流浹背。)
We all know how pigs love rolling around in the mud, so a 4⃣ “pigsty” can mean a place that’s really dirty or messy. Ex: Why is your room such a pigsty? 5⃣ Pigs are so dirty that putting lipstick on them wouldn’t make them look much better, so “put lipstick on a pig” means to make superficial changes in an attempt to makes something (or someone) seem better than it really is. Ex: The government’s PR campaign is just putting lipstick on a pig.
我們都知道豬喜歡在泥巴裡滾來滾去,所以 pigsty「豬圈」可以延伸形容又髒又亂的地方,如:Why is your room such a pigsty?(你房間怎麼可以亂得像豬窩?)因為豬太髒了,即使幫牠們塗口紅也沒用,所以這個譬喻用法 put lipstick on a pig 可以指「再怎麼粉飾美化也沒用」。如:The government’s PR campaign is just putting lipstick on a pig.(政府的公關活動只是給豬上口紅。)
【✍重點單字】
1. gorge「狼吞虎嚥」:當動詞。
2. pig iron「生鐵」:未經鍛造、品質不純的生鐵。
3. profusely「充沛地、大量地」
-
🔔 按下「搶先看」,每週五【美國大小事】,由 Judd 編審分享最即時美國新鮮事!想知道更多美國文化,請看 👉 http://bit.ly/EZTalk嚴選
well known用法 在 玳瑚師父 Master Dai Hu Facebook 的最佳解答
【玳瑚師父佛學論】 《夢不到妳你》
Can't Dream of You (English version below)
人間為何是人間,因還有罣念,有罣念就始終離不開一個情字。依此因緣,就跳不出紅塵,繼續被滾滾紅塵掩埋佛性,虛度光陰,塵勞混成團,想透出頭來也是難。 如此這般狀況,「死睡」者多過於「活睡」者。就算妳你想夢見的對象想給妳你夢,試問妳你又如何夢得到她他呢?
過去早已有多人嚮吾申訴,夢不到她他們欲想夢到的親眷。大多的她他們都想知道其親眷到底在何境界,現在不知過得好不好,等等。有些問過乩童,不是每位都有所要領。有些則嚮米婆求助,同樣不是每位都有所滿意。到底是乩童不靈,米婆不靈,還是...?確實是有不靈的,但有時候問題並不出現在乩童或米婆身上,而是在問事的人身上。
若干年前,就有一位「欠狗債」的妙齡女郎來到吾跟前,嚮吾請教如何才能夢到其愛狗。其狗與吾有一面之緣,因此就教她欲夢其愛狗的方法。這方法是佛所傳授,照理是不可能不成的。吾叫她取來一條五色線,「淨化」後加持密咒,然後清楚地說明用法。可是她不只沒夢著,還做了惡夢。當吾知道此事後,立馬做了一番邏輯性的審查,此女無法圓夢的原因,可分為以下三點。
一;平日的德行不夠。此點吾早已知之甚詳,證人是其家眷。
二;信力不夠。
三;此點甚為重要。那就是不如法。
吾之所以說問題出在此女,那是因為還有一點可證明。她的父親曾向吾求取法寶保佑其弟國外軍訓吉祥平安。吾以類似方法助之。其弟回來後,親口告訴父親,軍隊中有多人出事,但他卻平安回來。其父母歡喜嚮吾答謝。這並不是巧合,當中個人的德行自然地也算在其中。這也為什麼吾一直地苦口婆心,殷勤為妳你們解說,就是希望大家都能夠吉祥如意圓滿啊!
想夢到任何人都是有辦法的。但這方法中自然也必需有前段述之的三個因緣啊!要不然就得視妳你與亡者的頻率而定了。好好努力地學習,將來就不會再哀嘆,「夢不到妳你」了。
--------------------
The human realm exists because of clinging attachments, and most of it got to do with matters of the heart. As a result of these affinities, you are trapped in this never-ending cycle of sufferings, burying your Buddha nature. Your time is wasted and it is hard to break out of the drudgery of life. Under such circumstances, many are just "sleeping dead", and very few are really "awake while sleeping". How would you then be able to dream of the person on your mind even if the other party wishes to enter your dreams?
In the past, many people had complained to me that they could not dream of their deceased relatives. They mostly wanted to know how their deceased relatives were doing, and at which realm they were, etc. Some went to the shamans but not everybody were satisfied with the answers while some consulted the "rice ladies" (mediums) and went away clueless too. Does the problem lie with the shamans, the mediums or...? There are times that such answers are inaccurate and there are times the problem is not due to the shamans or the mediums but the person asking for answers.
Many years ago, there was a young lady who came to me for help. She had a deep karmic debt owed to her deceased pet dog. She wanted to see her pet in her dream and asked me to teach her how. I had a brief affinity with the dog, thus my decision to teach her. The technique was taught by the Buddha and should have worked well. I asked her to bring me a five-coloured thread. After cleansing it, I empowered it with Tantric mantras and taught her how to use it. However, not only did she not dream of her pet, she had nightmares. When I came to know of it, I made a logical deduction. Here are 3 main reasons why the young lady did not get her wish fulfilled.
Firstly, the merits of that person are insufficient. I had known this fact beforehand and it was evident to her family members too.
Secondly, her faith is not enough.
Thirdly, and an important one, the steps in the ritual were not adhered to.
I can offer another proof when I said that the problem lies with the girl. Her father once came to me to ask for a protective charm for her brother who was going overseas for army training. I used a similar technique to assist him. When the son returned home, he told his father that many of comrades had troubles during the mission but he himself managed to return safely. His parents happily thanked me. This is no mere coincidence. The moral conduct of the answer-seeker is a major contributing factor here. That is the reason why I relentlessly and painstakingly explaining to you, hoping that everyone can be auspicious.
There are certainly ways to dream of anyone that you wishes. However you would need to fulfill the three prerequisites as stated earlier in this article. Otherwise, the energy frequencies of the deceased and yourself shall determine the chance of him or her appearing in your dream. Put in the effort to learn and you will no longer be lamenting "I can't dream of you!"
www.masterdaihu.com/cant-dream-of-you/
Photo credit: Wallcoo.com
well known用法 在 axios/axios: Promise based HTTP client for the browser and ... 的推薦與評價
... gitter chat · code helpers · Known Vulnerabilities. Promise based HTTP client for the browser and node.js. New axios docs website: click here ... ... <看更多>
well known用法 在 HOPE English 希平方學英文 的推薦與評價
known用法 #多益必看】 大家都知道known 意思是「出名的」 但是後面跟上as/for/to/in 不同的介係詞小弟意思竟然通通不一樣! ... Well Done 點進專欄,學更多喔. ... <看更多>