馃憞鎵爜绔嬪埢鍏虫敞馃憞涓撴敞寮€婧愭妧鏈紝鍏卞缓楦胯挋鐢熸€?/span>鈥?杩戞棩锛孠ube"/>

K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

Posted 51CTO鎶€鏈爤

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒相关的知识,希望对你有一定的参考价值。

閫?绂?鍒?鍟?/strong>

鍏虫敞 HarmonyOS鎶€鏈ぞ鍖?/strong> 锛屽洖澶?/span> 銆愰缚钂欍€?/span> 閫?/span> 灏忕背灏忕埍闊崇mini 锛堟暟閲忎笉澶氾紝鍏堝埌鍏堝緱锛?/span> 锛岃繕鍙互 鍏嶈垂涓嬭浇 楦胯挋 鍏ラ棬璧勬枡 锛?br class="mq-40">


馃憞鎵爜绔嬪埢鍏虫敞馃憞

K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

涓撴敞寮€婧愭妧鏈紝鍏卞缓楦胯挋鐢熸€?/span>


鈥?

杩戞棩锛孠ubernetes 瀹樻柟鍙戝竷鍏憡锛屽甯冭嚜 v1.20 璧锋斁寮冨 Docker 鐨勬敮鎸侊紝灞婃椂鐢ㄦ埛灏嗘敹鍒?Docker 寮冪敤璀﹀憡锛屽苟闇€瑕佹敼鐢ㄥ叾浠栧鍣ㄨ繍琛屾椂銆?/span>


K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

鍥剧墖鏉ヨ嚜 Pexels


浣?Docker 浣滀负瀹瑰櫒闀滃儚鏋勫缓宸ュ叿鐨勪綔鐢ㄥ皢涓嶅彈褰卞搷锛岀敤鍏舵瀯寤虹殑瀹瑰櫒闀滃儚灏嗕竴濡傛棦寰€鍦板湪闆嗙兢涓笌鎵€鏈夊鍣ㄨ繍琛屾椂姝e父杩愯浆銆?br>


Kubernetes 灏嗗純鐢?Docker


娌¢敊锛岃繖鏄湡鐨勶紝Kubernetes 鐜板凡寮冪敤 Docker锛?/span>


鍙傝€冮摼鎺ワ細
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md#deprecation

鐩墠锛孠ubelet 涓殑 Docker 鏀寔鍔熻兘鐜板凡寮冪敤锛屽苟灏嗗湪涔嬪悗鐨勭増鏈腑琚垹闄ゃ€?br>


Kubelet 涔嬪墠浣跨敤鐨勬槸涓€涓悕涓?dockershim 鐨勬ā鍧楋紝鐢ㄤ互瀹炵幇瀵?Docker 鐨?CRI 鏀寔銆?br>


浣?Kubernetes 绀惧尯鍙戠幇浜嗕笌涔嬬浉鍏崇殑缁存姢闂锛屽洜姝ゅ缓璁ぇ瀹惰€冭檻浣跨敤鍖呭惈 CRI 瀹屾暣瀹炵幇锛堝吋瀹?v1alpha1 鎴?v1锛夌殑鍙敤瀹瑰櫒杩愯鏃躲€?br>
K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

绠€鑰岃█涔嬶紝Docker 骞朵笉鏀寔 CRI锛堝鍣ㄨ繍琛屾椂鎺ュ彛锛夎繖涓€ Kubernetes 杩愯鏃?API锛岃€?Kubernetes 鐢ㄦ埛涓€鐩翠互鏉ユ墍浣跨敤鐨勫叾瀹炴槸鍚嶄负鈥渄ockershim鈥濈殑妗ユ帴鏈嶅姟銆?br>


Dockershim 鑳藉杞崲 Docker API 涓?CRI锛屼絾鍦ㄥ悗缁増鏈綋涓紝Kubernetes 灏嗕笉鍐嶆彁渚涜繖椤规ˉ鎺ユ湇鍔°€?/span>


褰撶劧锛孌ocker 鏈韩涔熸槸涓€娆鹃潪甯稿己澶х殑宸ュ叿锛屽彲鐢ㄤ簬鍒涘缓寮€鍙戠幆澧冦€備絾涓轰簡浜嗚В閫犳垚褰撳墠鐘跺喌鐨勫師鍥狅紝鎴戜滑闇€瑕佸叏闈㈠垎鏋?Docker 鍦ㄧ幇鏈?Kubernetes 鏋舵瀯涓殑浣滅敤銆?/span>


Kubernetes 鏄竴娆惧熀纭€璁炬柦宸ュ叿锛屽彲瀵瑰绉嶄笉鍚岃绠楄祫婧愶紙渚嬪铏氭嫙/鐗╃悊鏈猴級杩涜鍒嗙粍锛屼娇鍏跺憟鐜颁负缁熶竴鐨勫法閲忚绠楄祫婧愶紝浠庤€屼緵搴旂敤绋嬪簭浣跨敤鎴栦笌鍏朵粬浜哄叡浜€?br>


鍦ㄨ繖鏍风殑鏋舵瀯涓紝Docker锛堟垨鑰呭鍣ㄨ繍琛屾椂锛変粎鐢ㄤ簬閫氳繃 Kubernetes 鎺у埗骞抽潰杩涜璋冨害锛屼粠鑰屽湪瀹為檯涓绘満鍐呰繍琛屽簲鐢ㄧ▼搴忋€?/span>

K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

閫氳繃浠ヤ笂鏋舵瀯鍥撅紝鍙互鐪嬪埌姣忎釜 Kubernetes 鑺傜偣閮戒笌鎺у埗骞抽潰褰兼閫氫俊銆傚悇涓妭鐐逛笂鐨?kubelet 鑾峰彇鍏冩暟鎹紝骞舵墽琛?CRI 浠ュ湪璇ヨ妭鐐逛笂杩愯瀹瑰櫒鐨勫垱寤?鍒犻櫎銆?/span>


Docker 涓轰粈涔堜細琚純鐢紵


濡傚墠鎵€杩帮紝Kubernetes 鍙兘涓?CRI 閫氫俊锛屽洜姝よ涓?Docker 閫氫俊锛屽氨蹇呴』浣跨敤妗ユ帴鏈嶅姟銆傝繖灏辨槸绗竴鐐瑰師鍥犮€?/span>


瑕佽В閲婁笅涓€涓師鍥狅紝鎴戜滑蹇呴』绋嶅井瑙i噴涓€涓?Docker 鏋舵瀯銆?/span> 棣栧厛鍙傝€冧互涓嬬ず鎰忓浘锛?/span>
K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

娌¢敊锛孠ubernetes 瀹為檯涓婇渶瑕佷繚鎸佸湪绾㈡涔嬪唴銆侱ocker 缃戠粶涓庡瓨鍌ㄥ嵎閮借鎺掗櫎鍦ㄥ銆?/span>


鑰岃繖浜涚敤涓嶅埌鐨勫姛鑳芥湰韬氨鍙兘甯︽潵瀹夊叏闅愭偅銆備簨瀹炰笂锛屼綘鎷ユ湁鐨勫姛鑳借秺灏戯紝鏀诲嚮闈篃灏辫秺灏忋€傚洜姝わ紝鎴戜滑闇€瑕佽€冭檻浣跨敤鏇夸唬鏂规锛屽嵆 CRI 杩愯鏃躲€?/span>


CRI 杩愯鏃剁殑瀹炵幇鏂规涓昏鏈変袱绉嶏細


鈶燾ontainerd


濡傛灉澶у鍙槸鎯充粠 Docker 杩佺Щ鍑烘潵锛岄偅涔?containerd 灏辨槸鏈€濂界殑閫夋嫨銆傚洜涓哄畠瀹為檯涓婂氨鏄湪 Docker 涔嬪唴璧锋晥锛屽彲浠ュ畬鎴愭墍鏈夆€滆繍琛屾椂鈥濆伐浣滐紝濡備笂鍥炬墍绀恒€傛洿閲嶈鐨勬槸锛屽畠鎻愪緵鐨?CRI 鍏跺疄 100% 灏辨槸鐢?Docker 鎵€鎻愪緵銆?/span>


containerd 杩樺睘浜庡叏寮€婧愯蒋浠讹紝鍥犳浣犲彲浠ュ湪 GitHub 涓婃煡鐪嬭鏄庢枃妗g敋鑷冲弬涓庨」鐩础鐚細
https://github.com/containerd/containerd/

鈶RI-O


CRI-O 鏄富瑕佺敱 Red Hat 鍛樺伐寮€鍙戠殑 CRI 杩愯鏃躲€傚畠鐨勬渶澶у尯鍒湪浜庡苟涓嶄緷璧栦簬 Docker锛岃€屼笖鐩墠宸茬粡鍦?Red Hat OpenShift 涓緱鍒颁娇鐢ㄣ€?/span>


鏈夎叮鐨勬槸锛孯HEL 7 鍚屾牱涓嶅畼鏂规敮鎸?Docker銆傜浉鍙嶏紝鍏跺彧涓哄鍣ㄧ幆澧冩彁渚?Podman銆丅uildah 浠ュ強 CRI-O锛?br>
https://github.com/cri-o/cri-o

CRI-O 鐨勪紭鍔垮湪浜庡叾閲囩敤鏋佺畝椋庢牸锛屾垨鑰呰瀹冪殑璁捐鏈韩灏辨槸浣滀负鈥淐RI鈥濊繍琛屾椂瀛樺湪銆?br>


涓嶅悓浜庝綔涓?Docker 缁勬垚閮ㄥ垎鐨?containerd锛孋RI-O 鍦ㄦ湰璐ㄤ笂灞炰簬绾?CRI 杩愯鏃躲€佸洜姝や笉鍖呭惈闄?CRI 涔嬪鐨勪换浣曞叾浠栧唴瀹广€?/span>


浠?Docker 杩佺Щ鑷?CRI-O 寰€寰€鏇翠负鍥伴毦锛屼絾鏃犺濡備綍锛孋RI-O 鑷冲皯鍙互鏀寔 Docker 瀹瑰櫒鍦?Kubernetes 涓婄殑姝e父杩愯銆?/span>


杩樻湁涓€鐐癸紝褰撴垜浠皥璁哄鍣ㄨ繍琛屾椂鏃讹紝璇锋敞鎰忔垜浠埌搴曟槸鍦ㄨ皥璁哄摢绉嶇被鍨嬬殑杩愯鏃躲€?br>


杩愯鏃跺垎涓轰袱绉嶏細

  • CRI 杩愯鏃?br>

  • OCI 杩愯鏃?/span>


CRI 杩愯鏃?/strong>


姝e涔嬪墠鎵€鎻愬埌锛孋RI 鏄?Kubernetes 鎻愪緵鐨?API锛岀敤浜庡悓瀹瑰櫒杩愯鏃惰繘琛岄€氫俊浠ュ垱寤?鍒犻櫎瀹瑰櫒鍖栧簲鐢ㄧ▼搴忋€?/span>


鍚勫鍣ㄥ寲搴旂敤绋嬪簭浣滀负 kubelet 閫氳繃 IPC 鍦?gRPC 鍐呴€氫俊锛岃€屼笖杩愯鏃朵篃杩愯鍦ㄥ悓涓€涓绘満涔嬩笂锛汣RI 杩愯鏃惰礋璐d粠 kubelet 鑾峰彇璇锋眰骞舵墽琛?OCI 瀹瑰櫒杩愯鏃朵互杩愯瀹瑰櫒銆?br>


绋嶅井鏈夌偣澶嶆潅锛屾帴涓嬫潵鎴戜滑浼氱敤鍥捐〃鏉ヨВ閲婏細

K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

鍥犳锛孋RI 杩愯鏃跺皢鎵ц浠ヤ笅鎿嶄綔锛?/span>

  • 浠?kubelet 鑾峰彇 gRPC 璇锋眰銆?/span>

  • 鏍规嵁瑙勮寖鍒涘缓 OCI json 閰嶇疆銆?/span>


OCI 杩愯鏃?/strong>


OCI 杩愯鏃惰礋璐d娇鐢?Linux 鍐呮牳绯荤粺璋冪敤锛堜緥濡?cgroups 涓庡懡鍚嶇┖闂达級鐢熸垚瀹瑰櫒銆備綘鍙兘鍚杩?runC 鎴栬€?gVisor锛岃繖灏辨槸浜嗐€?/span>

K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

CRI 浼氶€氳繃 Linux 绯荤粺璋冪敤浠ユ墽琛屼簩杩涘埗鏂囦欢锛岃€屽悗 runC 鐢熸垚瀹瑰櫒銆傝繖琛ㄦ槑 runC 渚濊禆浜?Linux 璁$畻鏈轰笂杩愯鐨勫唴鏍搞€?/span>

杩欎篃鎰忓懗鐫€锛屽鏋滀綘鍙戠幇 runC 涓殑婕忔礊浼氫娇浣犺幏寰椾富鏈?root 鏉冮檺锛岄偅涔堝鍣ㄥ寲搴旂敤绋嬪簭鍚屾牱浼氶€犳垚 root 鏉冮檺澶栨硠銆?/span>


寰堟槑鏄撅紝鎭舵剰榛戝浼氭姄浣忔満浼氬叆渚典富鏈猴紝寮曞彂鐏鹃毦鎬х殑鍚庢灉銆傛鍥犱负濡傛锛屽ぇ瀹舵墠闇€瑕佷笉鏂洿鏂?Docker锛堟垨鑰呭叾浠栧鍣ㄨ繍琛屾椂锛夛紝鑰屼笉浠呬粎鏄洿鏂板鍣ㄥ寲搴旂敤绋嬪簭鏈韩銆?/span>

K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒

gVisor 鏄渶鍒濈敱璋锋瓕鍛樺伐鍒涘缓鐨?OCI 杩愯鏃躲€傚畠瀹為檯涓婅繍琛屽湪鎵胯浇鍚勭被璋锋瓕浜戞湇鍔★紙鍖呮嫭 Google Cloud Run銆丟oogle App Engine 浠ュ強 Google Cloud Functions锛夌殑鍚屼竴濂楀熀纭€璁炬柦涔嬩笂銆?/span>

鏈夎叮鐨勬槸锛実Visor 涓寘鍚竴涓€滆瀹㈠唴鏍糕€濆眰锛屾剰鍛崇潃瀹瑰櫒鍖栧簲鐢ㄧ▼搴忔棤娉曠洿鎺ユ帴瑙﹀埌涓绘満鍐呮牳灞傘€?br>


鍗充娇鏄簲鐢ㄧ▼搴忊€滆涓衡€濊嚜宸辨帴瑙﹀埌浜嗭紝瀹為檯鎺ヨЕ鍒扮殑涔熷彧鏄?gVisor 鐨勮瀹㈠唴鏍搞€?br>


gVisor鐨勫畨鍏ㄦā寮忛潪甯告湁瓒o紝杩欓噷寤鸿澶у鍙傞槄瀹樻柟璇存槑鏂囨。锛?/span>
https://gvisor.dev/docs/

gVisor 涓?runC 鐨勬樉钁楀樊鍒涓嬶細
  • 鎬ц兘鏇村樊

  • Linux鍐呮牳灞傚苟闈?100% 鍏煎锛屽弬瑙佸畼鏂规枃妗d腑鐨勫吋瀹规€ч儴鍒嗭細
https://gvisor.dev/docs/user_guide/compatibility/
  • 涓嶅彈榛樿鏀寔


鎬荤粨锛?/span>
  • Docker 纭寮冪敤锛屽ぇ瀹跺簲璇ュ紑濮嬭€冭檻浣跨敤 CRI 杩愯鏃讹紝渚嬪 containerd 涓?CRI-O銆俢ontainerd 涓?Docker 鐩稿吋瀹癸紝浜岃€呭叡浜浉鍚岀殑鏍稿績缁勪欢銆傚鏋滀綘涓昏浣跨敤 Kubernetes 鐨勬渶浣庡姛鑳介€夐」锛孋RI-O 鍙兘鏇翠负閫傚悎銆?/span>

  • 鏄庣‘鐞嗚В CRI 杩愯鏃朵笌 OCI 杩愯鏃朵箣闂寸殑鍔熻兘涓庝綔鐢ㄨ寖鍥村樊寮傘€?/span>


鏍规嵁浣犵殑瀹為檯宸ヤ綔璐熻浇涓庝笟鍔¢渶姹傦紝runC鍙兘骞朵笉鎬绘槸鏈€濂界殑閫夋嫨锛岃閰屾儏鍋氬嚭鑰冮噺锛?br>


搴熷純 Docker锛屼絾鍒厡锛?/p>


鍦?1.20 鐗堟湰涔嬪悗锛孠ubernetes 灏嗕笉鍐嶆敮鎸佹妸 Docker 浣滀负瀹瑰櫒杩愯鏃朵娇鐢ㄣ€?/span>


涓嶅繀鎯婃厡锛屽疄闄呬笂娌″澶у奖鍝嶃€?/span>


PS锛氳繖閲屽彧鏄笉寤鸿灏?Docker 浣滀负搴曞眰杩愯鏃讹紝浣犱粛鐒跺彲浠ヤ娇鐢ㄤ笓涓篕ubernetes鍒涘缓鐨勫鍣ㄨ繍琛屾椂鎺ュ彛锛圕RI锛変竴濡傛棦寰€鍦板湪闆嗙兢涓繍琛?Docker 闀滃儚銆?/span>

瀵逛簬 Kubernetes 鏈€缁堢敤鎴凤紝姝ゆ璋冩暣鍚屾牱涓嶄細鏈夊お澶у奖鍝嶃€侱ocker 涓嶄細灏辨娑堜骸锛屼綘涔熶粛鐒跺彲浠ョ户缁皢 Docker 浣滀负寮€鍙戝伐鍏蜂娇鐢ㄣ€?br>


Docker 浼氱户缁瀯寤鸿捣涓嶈鍏舵暟鐨勫鍣紝鑰岃繍琛?docker build 鍛戒护鎵€鐢熸垚鐨勯暅鍍忎粛鍙湪 Kubernetes 闆嗙兢鍐呮甯歌繍琛屻€?br>


濡傛灉浣犱娇鐢ㄧ殑鏄?GKE 鎴栬€?EKS 绛夋墭绠?Kubernetes 鏈嶅姟锛屽垯闇€瑕佺‘淇濆湪鏈潵鐨?Kubernetes 鐗堟湰褰诲簳鍘婚櫎 Docker 鏀寔涔嬪墠锛屼负浣犵殑宸ヤ綔鑺傜偣寮曞叆鍙楁敮鎸佺殑瀹瑰櫒杩愯鏃躲€?br>


濡傛灉鑺傜偣涓寘鍚嚜瀹氫箟椤癸紝浣犲彲鑳介渶瑕佹牴鎹綋鍓嶇幆澧冨強杩愯鏃惰姹傚仛鍑烘洿鏂般€傝涓庢湇鍔′緵搴斿晢鍚堜綔锛岀‘淇濇纭畬鎴愬崌绾ф祴璇曞強瑙勫垝銆?br>


濡傛灉浣犵殑闆嗙兢涓€鐩村湪婊氬姩鎵╁睍锛屽垯闇€瑕侀厤鍚堝彉閲忎互閬垮厤鏈嶅姟涓柇銆傚湪 1.20 鐗堟湰涓紝浣犲皢鏀跺埌 Docker 寮冪敤璀﹀憡銆?br>


鑰屽湪鏈潵鐨?Kubernets 鐗堟湰锛堣鍒掑湪 2021 骞翠笅鍗婂勾鍙戝竷鐨?1.23 鐗堟湰锛変腑锛孌ocker 杩愯鏃跺皢琚交搴曠Щ闄ゃ€佷笉鍐嶅彈鍒版敮鎸侊紝灞婃椂鎮ㄥ繀椤诲垏鎹㈣嚦鍏朵粬鍏煎鐨勫鍣ㄨ繍琛屾椂锛屼緥濡?containerd 鎴栬€?CRI-O銆?br>


鍙渶瑕佷繚璇佷綘鎵€閫夊畾鐨勮繍琛屾椂锛岃兘澶熸敮鎸佸綋鍓嶄娇鐢ㄧ殑 Docker 瀹堟姢绋嬪簭閰嶇疆鍗冲彲锛堜緥濡傛棩蹇楄褰曪級銆?br>


鏃㈢劧闂涓嶅ぇ锛屽ぇ瀹跺湪鎱屼粈涔堬紵鍦ㄦ€曚粈涔堬紵


杩欓噷鎴戜滑闇€瑕佹帰璁ㄤ袱绉嶄笉鍚岀殑鐜锛岃€岃繖涔熸槸鎭愭厡鎯呯华鐨勬牴婧愩€傞鍏堬紝鍦?Kubernetes 闆嗙兢鍐呴儴瀛樺湪涓€绉嶅彨浣滃鍣ㄨ繍琛屾椂鐨勪笢瑗匡紝璐熻矗鎻愬彇骞惰繍琛屽鍣ㄩ暅鍍忋€?br>


Docker 鏄洰鍓嶆渶娴佽鐨勮繍琛屾椂閫夐」锛堝叾浠栧父瑙侀€夐」杩樺寘鎷?containerd 涓?CRI-O锛夈€?br>


浣?Docker 鍦ㄨ璁′笂骞舵湭鑰冭檻鍒拌宓屽叆 Kubernetes 杩欑鐢ㄦ硶锛屾墍浠ュ彲鑳藉紩鍙戦棶棰樸€?br>


寰堟槑鏄撅紝杩欓噷鎴戜滑鎻愬埌鐨勨€淒ocker鈥濆苟涓嶆槸鍚屼竴绉嶄笢瑗库€斺€斿畠浠h〃鐫€涓€鏁村鎶€鏈爤锛岃€?containerd 楂樼骇瀹瑰櫒杩愯鏃跺垯鏄?Docker 涓殑涓€閮ㄥ垎銆?br>


Docker 寰堥叿銆佸疄鐢ㄦ€ф瀬寮猴紝鎻愪緵澶氱鐢ㄦ埛浣撻獙澧炲己鍔熻兘锛岃鎴戜滑鑳藉鍦ㄥ紑鍙戣繃绋嬩腑杞绘澗瀹屾垚鍗忓悓浜や簰銆?br>


浣嗘槸锛岀敤鎴蜂綋楠屽寮哄姛鑳藉 Kubernetes 鏉ヨ骞堕潪蹇呴渶锛屽洜涓?Kubernetes 骞朵笉鏄粈涔堜汉绫诲崗浣滄柟銆?br>


缁撴灉灏辨槸锛岃鎯宠 containerd 杩欎釜浜虹被鍙嬪ソ鍨嬫娊璞″眰鍙戞尌浣滅敤锛孠ubernetes 闆嗙兢灏卞繀椤诲紩鍏ュ彟涓€娆惧悕涓?Dockershimi 鐨勫伐鍏枫€?br>


浣嗚繖娆惧伐鍏风殑浠嬪叆鍙堝紩鍙戜簡鏂扮殑闂锛屽洜涓烘垜浠繀椤婚澶栧姞浠ョ淮鎶わ紝鍚﹀垯灏卞彲鑳藉紩鍙戝畨鍏ㄩ棶棰樸€?br>


浜嬪疄涓婏紝Dockershim 鏃╁湪 Kubelet 1.23 鐗堟湰鏃跺氨宸茬粡琚Щ闄わ紝鎴栬€呰 Kubelet 寰堟棭灏卞彇娑堜簡灏?Docker 浣滀负瀹瑰櫒杩愯鏃剁殑鍔熻兘銆?br>


杩欐椂鍊欏緢澶氭湅鍙嬪彲鑳借闂紝鏃㈢劧 Docker 鏍堜腑宸茬粡鍖呭惈 containerd锛孠ubernetes 涓轰粈涔堣繕瑕佺敾铔囨坊瓒冲湴鎼炲嚭涓?Dockershim锛?br>


杩欐槸鍥犱负 Docker 涓?CRI锛堝嵆瀹瑰櫒杩愯鏃舵帴鍙o級骞朵笉鐩稿銆傛鏄洜涓轰笉鐩稿锛屾墍浠ユ垜浠墠闇€瑕?Dockershim 鏉ョ紦鍐蹭竴涓嬨€?br>


浣嗚繖涓嶆槸浠€涔堝ぇ闂锛屽悇浣嶆病蹇呰鎯婃厡锛佽繖浠朵簨鐨勬湰璐紝灏辨槸鎶婂鍣ㄨ繍琛屾椂浠?Docker 杞崲涓哄彟涓€绉嶅彈鏀寔鐨勯€夐」銆?br>


杩欓噷闇€瑕佹敞鎰忕殑鏄細濡傛灉澶у灏嗗簳灞?Docker 濂楁帴瀛楋紙/var/run/docker.sock锛夎瀹氫负闆嗙兢宸ヤ綔娴佷腑鐨勪竴閮ㄥ垎锛岄偅涔堣浆鎹㈣嚦鍏朵粬杩愯鏃朵細鐮村潖鎺夊綋鍓嶄笟鍔$殑姝e父杩愯銆?br>


杩欑妯″紡绉颁负 Docker in Docker锛屽ソ鍦ㄦ垜浠彲浠ヤ娇鐢ㄥ绉嶉€夐」瑙e喅杩欎釜鐗瑰畾鐢ㄤ緥锛屽寘鎷?Kaniko銆両mg 浠ュ強 Buildah 绛夌瓑銆?/span>


瀵瑰紑鍙戣€呮潵璇存剰鍛崇潃浠€涔堬紵


浣嗚繖绉嶅彉鍖栧寮€鍙戣€呮剰鍛崇潃浠€涔堬紵鎴戜滑杩橀渶瑕佺紪鍐?Dockerfiles 鍚楋紵鏈潵杩樺簲涓嶅簲璇ョ户缁娇鐢?Docker锛?br>


璇锋敞鎰忥紝鏈鍙樻洿鎵€褰卞搷鍒扮殑鐜锛屽叾瀹炶窡澶у鏁颁汉鐢ㄤ簬杩涜 Docker 浜や簰鐨勭幆澧冨苟涓嶆槸涓€鍥炰簨銆?/span>


浣犲湪寮€鍙戜腑浣跨敤鐨?Docker 瀹夎锛屼笌 Kubernetes 闆嗙兢涓殑 Docker 杩愯鏃舵鏃犲叧绯汇€傛垜鐭ラ亾锛岃繖浜嬪惉璧锋潵璁╀汉鏈夌偣鐘糠绯娿€?br>


鎬讳箣锛屽浜庡紑鍙戜汉鍛橈紝Docker 鍦ㄥ叕甯冩娆℃洿鏀逛箣鍓嶆彁渚涚殑鎵€鏈夋柟妗堥兘浠嶇劧閫傜敤銆?br>


Docker 鐢熸垚鐨勯暅鍍忓疄闄呬笂骞朵笉鐗瑰畾浜?Docker锛屾洿鍑嗙‘鍦拌瀹冨簲璇ュ睘浜?OCI锛堝紑鏀惧鍣ㄥ€¤锛夐暅鍍忋€?br>


浠讳綍涓?OCI 鐩稿吋瀹圭殑闀滃儚锛屾棤璁轰娇鐢ㄥ摢绉嶅伐鍏锋瀯寤鸿€屾垚锛屽浜?Kubernetes 鏉ヨ閮芥槸涓€鏍风殑銆?br>


Containerd 涓?CRI-O 閮借兘璇嗗埆杩欎簺闀滃儚骞舵甯歌繍琛岋紝杩欎篃鏄垜浠缓绔嬩竴濂楃粺涓€瀹瑰櫒鏍囧噯鐨勬剰涔夋墍鍦ㄣ€?/span>


鍥犳锛岃櫧鐒跺彉鍖栧嵆灏嗗埌鏉ワ紝铏界劧浼氱粰閮ㄥ垎鐢ㄦ埛甯︽潵楹荤儲锛屼絾褰卞搷骞朵笉绠楀ぇ銆傝€屼笖浠庨暱杩滆搴︾湅锛岃繖鍏跺疄鏄欢濂戒簨銆?br>


鎬昏€岃█涔嬶紝甯屾湜澶у鏀句笅鎶佃Е鍜屾亹鎱屾儏缁紝鍧︾劧鎺ュ彈杩欎釜鍙樺寲銆?/span>


鍙傝€冮摼鎺ワ細

  • https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/

  • https://dev.to/inductor/wait-docker-is-deprecated-in-kubernetes-now-what-do-i-do-e4m


绮惧僵鏂囩珷鎺ㄨ崘锛?/strong>


以上是关于K8s瀹e竷寮冪敤Docker锛屽崈涓囧埆鎱岋紒的主要内容,如果未能解决你的问题,请参考以下文章

寮冪敤 wget, 鎷ユ姳澶氱嚎绋嬩笅杞?axel

鍒嗗竷寮忓姩鎬侀厤缃悗娴帹鍓嶆氮 -- Nacos

鍒嗗竷寮忎腑鐨勪竴鑷存€х畻娉曚箣Raft绠楁硶

寰俊api璋冪敤闄愬埗锛?5009 reach max api daily quota limit 瑙e喅鏂规硶

瀹夋帓锛岃胺绮掑晢鍩巎ava鍒嗗竷寮忓紑鍙戝熀纭€绡囬珮绾х瘒涓庨珮鍙敤闆嗙兢鏋舵瀯绡?020

Ubuntu18.04锛屽畨瑁匯edis鍜岀畝鍗曚娇鐢≧edis