±qDocker¨ìKubernetes¤Jªù»P¹ê¾Ô ( ²Åé ¦r) |
§@ªÌ¡Gù§Q¥Á | Ãþ§O¡G1. -> §@·~¨t²Î -> Docker |
ĶªÌ¡G |
¥Xª©ªÀ¡G²MµØ¤j¾Ç¥Xª©ªÀ | 3dWoo®Ñ¸¹¡G 51770 ¸ß°Ý®ÑÄy½Ð»¡¥X¦¹®Ñ¸¹¡I¡i¯Ê®Ñ¡j NT°â»ù¡G 345 ¤¸ |
¥Xª©¤é¡G9/1/2019 |
¶¼Æ¡G225 |
¥úºÐ¼Æ¡G0 |
|
¯¸ªø±ÀÂË¡G |
¦L¨ê¡G¶Â¥Õ¦L¨ê | »y¨t¡G ( ²Åé ª© ) |
|
¥[¤JÁʪ«¨® ¢x¥[¨ì§Úªº³Ì·R (½Ð¥ýµn¤J·|û) |
ISBN¡G9787302534815 |
§@ªÌ§Ç¡@|¡@ĶªÌ§Ç¡@|¡@«e¨¥¡@|¡@¤º®e²¤¶¡@|¡@¥Ø¿ý¡@|¡@§Ç |
(²Åé®Ñ¤W©Òz¤§¤U¸ü³sµ²¯Ó®É¶O¥\, ®¤¤£¾A¥Î¦b¥xÆW, YŪªÌ»Ýn½Ð¦Û¦æ¹Á¸Õ, ®¤¤£«OÃÒ) |
§@ªÌ§Ç¡G |
ĶªÌ§Ç¡G |
«e¨¥¡GŪÀ´¥»®Ñ ÁÙ¦b¥ÎµêÀÀ¾÷¡H¬O®ÉÔ¶}©l¥ÎDocker¤F ¥¼¨Ó¤¦~¤Þ»â¤ªpºâµo®iªº®Ö¤ß§Þ³N¥²µM¬O®e¾¹§Þ³N¡C²{¦b¶V¨Ó¶V¦hªºIT¤½¥q³vº¥©ß±ó¶Ç²ÎªºµêÀÀ¤Æ§Þ³N¡A¦ÓÂà¦V»´¶q¤Æªº®e¾¹§Þ³N¡C ¥D¬y¤ªªA°È°Ó¤w¸g¶}©l¤ä«ùDocker ¤ªªA°È´£¨Ñ°Ó¡A¥]¬A·L³n¡BIBM¡BRackspace¡BGoogle¥H¤Î¨ä¥L¥DnªºLinux´£¨Ñ°Ó¦pCanonical©MRed Hat¡A³£¶}©l¤ä«ù Docker¡C Docker©MKubernetes¦p¦ó§ïÅܶDzΪºµêÀÀ¤Æ§Þ³N¡H Docker©MKubernetesµ¹µêÀÀ¤Æ§Þ³N±a¨Ó¤F²©R©Êªº§ïÅÜ¡Aµ¹¶}µo¤Hû¥H¤Î¨t²ÎºÞ²zû´£¨Ñ¤F¤@Ó¥»O¡A¨Ï°t¸m©M³¡¸p¤À¥¬¦¡À³¥ÎÅܱo§ó¥[®e©ö¡AÅýÀ³¥Î¯u¥¿¹ê²{¹sÌX¾÷¡C ¥»®Ñ¯uªº¾A¦X§A¶Ü¡H ¥»®ÑÀ°§A±q¶Ç²ÎªºµêÀÀ¤Æ§Þ³N¹L´ç¨ìDocker¡A¦A¹L´ç¨ìKubernetes®É¥N¡F¥»®Ñ¥þ±¦Ó¤S²¼ä¦a¤¶²Ð¤FDocker¡A»´ªQ±½°£ªì¾ÇªÌ¾Ç²ß¥»®Ñªº»Ùê¡F¥»®Ñ±q³Ì²³æªº¨Ò¤l¥Xµo¡A³v¨B²`¤J¡A¨Ï±oŪªÌ¯à°÷¦b»´ªQ´r§Öªº¹Lµ{¤¤¡A¾Ç²ß¨ì·sªº§Þ³N¡F¥»®Ñ´¬±ó¤F¹L¦hªº²z½×¤¶²Ð¡A¬ð¥X¤F¤é±`¶}µo©M¹Bºû¥²»Ýªºª¾ÃÑÂI¡A¥i¿×¥h¿¾¦sµ×¡A¨úºë¥Î§»¡C
¥»®Ñ¯A¤Îªº§Þ³N©Î®Ø¬[ µêÀÀ¤Æ ®e¾¹ Docker Linux Linux Container Git ª©¥»±±¨î Nginx ¤Ï¦V¥N²z ¨¾¤õùÙ ¸ô¥Ñ OSI¤C¼hºôµ¸¼Ò«¬ ¤lºô ºô¾ô ¶°¸s NFS iSCSI SAN Hyper-V VMware Workstation Pro °ì¦W¸ÑªR
¥»®Ñ¯A¤Îªº¥Ü¨Ò©M®×¨Ò ²Ä¤@ÓDockerÀ³¥Î¡GHello world ³q¹L¤G¶i¨î¤å¥ó¦w¸ËKubernetes ¦bUbuntu¤¤ÅéÅçDocker kubectlºÞ²z¸ê·½¹ï¶H ®e¾¹ªº³Ð«Ø¡B¬d¬Ý¡B±Ò°Ê¡B°±¤î¥H¤Î§R°£ ºÞ²zDeployment Dockerªººôµ¸¼Ò¦¡ ³q¹LJob¹ê²{Ëp®É ³q¹L³n¥ó¥]ºÞ²z¤u¨ã¦w¸ËKubernetes ºÞ²zªA°È ³q¹L·½¥N½X¦w¸ËKubernetes ³q¹LNodePort¹ê²{¥~³¡³X°Ý kubeadm³¡¸pKubernetes ¦sÀx¨÷ºÞ²z ºÞ²zDaemonSet ³q¹LHelmºÞ²zÀ³¥Î ¦bWindows¤¤ÅéÅçDocker kube-proxy©MClusterIP¹ê²{¥~³¡³X°Ý DockerÃè¹³ªº¬d§ä¡B¤U¸ü¡B¦CÁ|¡B§R°£¡B ³q¹Lt¸ü§¡¿Å¹ê²{¥~³¡³X°Ý ¬d¬Ý¡Bºc«Ø¥H¤Î¼ÐñºÞ²z «ù¤[¤Æ¦sÀx¨÷ºÞ²z ®e¾¹ªº¤¬Áp ¦bKubernetes¶°¸s¤¤³¡¸pTomcat
¥»®Ñ¯SÂI ¡]1¡^¥»®Ñ¤£½×¬O²z½×ª¾ÃѪº¤¶²Ð¡AÁÙ¬O¹ê¨Òªº¿ï¾Ü¡A³£¬O±q¹ê»ÚÀ³¥Îªº¨¤«×¥Xµo¡Aºë¤ß¿ï¾Ü¹Bºû©M¶}µo¹Lµ{¤¤¨å«¬¨Ò¤l¡AÁ¿¸Ñ²ÓP¡A¤ÀªR³z¹ý¡C ¡]2¡^²`¤J²L¥X¡B»´ªQ©ö¾Ç¡A¥HDocker©MKubernetes«nª¾ÃÑÂI¬°¥D½u¡A¿EµoŪªÌªº¾\Ū¿³½ì¡AÅýŪªÌ¯à°÷¯u¥¿¾Ç²ß¨ìDocker©MKubernetes¹ê¥Î¡B«eªuªº§Þ³N¡C ¡]3¡^§Þ³N·s¿o¡B»P®ÉѶi¡Aµ²¦X®É¤U³Ì¼öªùªº§Þ³N¡A¦p·LªA°È¡B¶°¸s¥H¤Î¦Û°Ê¤Æ¹Bºûµ¥¡AÅýŪªÌ¦b¾Ç²ßDocker©MKubernetesªº¦P®É¡AÂX¤jª¾Ãѱ¡A¤F¸Ñ©M´x´¤§ó¦hªº¡B§ó¥ý¶iªº¹Bºû§Þ³N¡C ¡]4¡^¶KªñŪªÌ¡B¶Kªñ¹ê»Ú¡A¤j¶q¦¨¼ô§Þ¥©©M¸gÅ窺¤¶²Ð¡AÀ°§UŪªÌ§Ö³t§ä¨ì°ÝÃDªº³Ì¨Îµª®×¡A¤Î®É¸Ñ¨M¹Bºû©M¶}µo¹Lµ{¤¤¹J¨ìªº°ÝÃD¡C ¡]5¡^¶K¤ß´£¿ô¡A¥»®Ñ®Ú¾Ú»Ýn¦b¦U³¹¨Ï¥Î¤F«Ü¦h¡§ª`·N¡¨¡§´£¥Ü¡¨µ¥¤p´£¥Ü¡AÅýŪªÌ¥i¥H¦b¾Ç²ß¹Lµ{¤¤§ó»´ªQ¦a²z¸Ñ¬ÛÃö·§©À¤Îª¾ÃÑÂI¡C ¡]6¡^¥»®Ñ¶×¶°¤F§@ªÌ¤j¶qªº¹ê¾Ô¸gÅç¡A¤£¶È¥i¥H§@¬°¤Jªù±Ðµ{¡AÁÙ¥i¥H§@¬°¹Bºû©M¶}µoªº°Ñ¦Ò®Ñ¡C
¥»®ÑŪªÌ ? IT¹ê¬I©M¹Bºû¤uµ{®v ? ³n¥ó¶}µo¤uµ{®v ? ¹ï¤ªªA°È§Þ³N·P¿³½ì¡A¦}§Æ±æ¶i¤@¨B¾Ç²ßªº¤¤°ª¯Å§Þ³N¤Hû ? ¨t²ÎºÞ²zû ? ¤ªºÝì¥Í¶}µo¤Hû ? ·Q¤F¸Ñ®e¾¹©MKubernetes§Þ³Nªºªì¾ÇªÌ ? ·Q±qDockerÂಾ¨ìKubernetesªº§Þ³N¤Hû
¥»®Ñ²Ä1~10³¹¥Ñ¥³»¤s¾Ç°|ªºÃ¹§Q¥Á³Ð§@¡A²Ä11~12³¹¥Ñ±i¬K¾å³Ð§@¡C
§@ ªÌ 2019¦~5¤ë |
¤º®e²¤¶¡GDocker¤w¸g¦¨¬°¦æ·~¤¤³Ì¤õÃzªº¶}·½§Þ³N¡A¨S¦³¤§¤@¡C¦ÓKubernetesªº½Ï¥Í¡A§ó¬O¨Ï±oDocker¦pªê²KÁl¡C¶V¨Ó¶V¦hªº¤H¶}©l§ë¤J¨ìDocker©MKubernetesªº¶}µo©M¹Bºû¤¤¥h¡C¥»®Ñ¬O¤@¥»¬°ªì¾ÇªÌ¶q¨©w°µªº¤Jªù±Ð§÷¡A¾A¦X¹ï®e¾¹§Þ³N¤F¸Ñ¤£¦h¡A¨S¦³¤Ó¦hªº¬ÛÃö¶}µo©M¹Bºû¸gÅç¡A¦ý¬O¤S·Q´x´¤Kubernetes§Þ³NªºÅªªÌ¨Ï¥Î¡AÀ°§U¥Ļֳt¦a¶i¤J³oÓ»â°ì¡C ¥»®Ñ¤À¬°¨â½g¦@12³¹¡A²Ä¤@½g¥þ±¤¶²ÐDocker¡A¥]¬ADockerªº°ò¦ª¾ÃÑ¡B¦b¥D¬y¾Þ§@¨t²Î¤W¦w¸ËDockerªº¤èªk¥H¤ÎDockerªº°ò¥»ºÞ²z¾Þ§@¡F²Ä¤G½g¸Ô²Ó¤¶²ÐKubernetes¡A¥Dn¥]¬AKubernetes°ò¦ª¾ÃÑ¡BKubernetesªº¦w¸Ë¤èªk¡BKubernetes©R¥O¦æºÞ²z¤u¨ã¡B¹B¦æÀ³¥Î¡B³X°ÝÀ³¥Î¡B¦sÀxºÞ²z¡B³n¥ó¥]ºÞ²z¡Bºôµ¸ºÞ²z¥H¤ÎKubernetesªº¹Ï§ÎºÞ²z¤u¨ã¡C ¥»®Ñ¤º®e¸ÔºÉ¡B¥Ü¨ÒÂ×´I¡A¬O¼s¤jDocker©MKubernetesªì¾ÇªÌ¥²³Æªº°Ñ¦Ò®Ñ¡A¦P®É¤]¾A¦X°ªµ¥°|®Õ©M°ö°V¾Ç®Õpºâ¾÷¬ÛÃö±M·~§@¬°±Ð§÷¨Ï¥Î¡C |
¥Ø¿ý¡G²Ä1³¹¥þ±»{ÃÑDOCKER 1 1.1®e¾¹§Þ³N 1 1.1.1¤°¤\¬O®e¾¹ 1 1.1.2®e¾¹»PµêÀÀ¾÷¤§¶¡ªº°Ï§O 3 1.1.3®e¾¹¨s³º¸Ñ¨M¤F¤°¤\°ÝÃD 4 1.1.4®e¾¹ªºÀuÂI 5 1.1.5®e¾¹ªº¯ÊÂI 6 1.1.6®e¾¹ªº¤ÀÃþ 7 1.2DOCKER§Þ³N 8 1.2.1¤°¤\¬ODocker 8 1.2.2Dockerªº¥Ñ¨Ó 9 1.2.3Docker¨s³º¬O¤°¤\ 9 1.3DOCKERªº¬[ºc»P²Õ¦¨ 10 1.3.1Dockerªº¬[ºc 10 1.3.2Docker¤¤À³¥Î¨t²Îªº¦s¦b§Î¦¡ 12 1.4¬°¤°¤\¨Ï¥ÎDOCKER 12 1.4.1DockerªºÀ³¥Î³õ´º 12 1.4.2Docker¥i¥H¸Ñ¨Mþ¨Ç°ÝÃD 13 1.4.3DockerªºÀ³¥Î¦¨¥» 13 ²Ä2³¹ªì¨BÅéÅçDOCKER 15 2.1¦bWINDOWS¤¤¦w¸ËDOCKER 15 2.1.1³q¹LBoot2DockerÅéÅçDocker 15 2.1.2³q¹LDockerDesktopÅéÅçDocker 22 2.1.3·f«Ø²Ä¤@ÓDockerÀ³¥Î¡GHelloworld 25 2.2¦bUBUNTU¤¤¦w¸ËDOCKER 27 2.2.1³q¹L»·µ{Ü®w¦w¸ËDocker 27 2.2.2³q¹L³n¥ó¥]¦w¸ËDocker 28 2.2.3´ú¸Õ¦w¸Ëªºµ²ªG 29 ²Ä3³¹DOCKER°ò¥»ºÞ²z 30 3.1Ãè¹³ºÞ²z 30 3.1.1¬d§äÃè¹³ 30 3.1.2¤U¸üÃè¹³ 31 3.1.3¦C¥X¥»¦aÃè¹³ 32 3.1.4§R°£Ãè¹³ 32 3.1.5¬d¬ÝÃè¹³ 32 3.1.6ºc«ØÃè¹³ 35 3.1.7Ãè¹³¼ÐñºÞ²z 37 3.2®e¾¹ºÞ²z 38 3.2.1³Ð«Ø®e¾¹ 38 3.2.2¬d¬Ý®e¾¹ 40 3.2.3±Ò°Ê®e¾¹ 41 3.2.4°±¤î®e¾¹ 41 3.2.5§R°£®e¾¹ 42 3.3ºôµ¸ºÞ²z 42 3.3.1Dockerºôµ¸ì²z 42 3.3.2ºôµ¸¼Ò¦¡ 44 3.3.3Docker®e¾¹ªº¤¬³s 46 3.3.4®e¾¹»P¥~³¡ºôµ¸ªº¤¬³s 47 ²Ä4³¹KUBERNETESªì¨B¤Jªù 49 4.1KUBERNETES§Þ³N 49 4.1.1¤°¤\¬OKubernetes 49 4.1.2Kubernetesªºµo®i¾ú¥v 49 4.1.3¬°¤°¤\¨Ï¥ÎKubernetes 50 4.2KUBERNETES«n·§©À 51 4.2.1Cluster¡]¶°¸s¡^ 51 4.2.2Master¡]¥D±±¡^ 51 4.2.3Node¡]¸`ÂI¡^ 52 4.2.4Pod 53 4.2.5ªA°È 53 4.2.6¨÷ 54 4.2.7©R¦WªÅ¶¡ 54 ²Ä5³¹¦w¸ËKUBERNETES 55 5.1³q¹L³n¥ó¥]ºÞ²z¤u¨ã¦w¸ËKUBERNETES 55 5.1.1³n¥ó¥]ºÞ²z¤u¨ã 55 5.1.2¸`ÂI³W¹º 56 5.1.3¦w¸Ë«e·Ç³Æ 57 5.1.4etcd¶°¸s°t¸m 57 5.1.5Master¸`ÂIªº°t¸m 63 5.1.6Node¸`ÂIªº°t¸m 65 5.1.7°t¸mºôµ¸ 68 5.2³q¹L¤G¶i¨î¤å¥ó¦w¸ËKUBERNETES 69 5.2.1¦w¸Ë«e·Ç³Æ 69 5.2.2³¡¸petcd 73 5.2.3³¡¸pflannelºôµ¸ 76 5.2.4³¡¸pMaster¸`ÂI 77 5.2.5³¡¸pNode¸`ÂI 80 5.3³q¹L·½¥N½X¦w¸ËKUBERNETES 83 5.3.1¥»¦a¤G¶i¨î¤å¥ó½sĶ 83 5.3.2DockerÃè¹³½sĶ 84 ²Ä6³¹KUBERNETES©R¥O¦æ¤u¨ã 85 6.1KUBECTLªº¨Ï¥Î¤èªk 85 6.1.1kubectl¥Îªk·§z 85 6.1.2kubectl¤l©R¥O 87 6.1.3Kubernetes¸ê·½¹ï¶HÃþ«¬ 89 6.1.4kubectl¿é¥X®æ¦¡ 90 6.1.5kubectl©R¥OÁ|¨Ò 90 6.2KUBEADMªº¨Ï¥Î¤èªk 93 6.2.1kubeadm¦w¸Ë¤èªk 94 6.2.2kubeadm°ò¥»»yªk 95 6.2.3³¡¸pMaster¸`ÂI 95 6.2.4³¡¸pNode¸`ÂI 97 6.2.5«¸m¸`ÂI 97 ²Ä7³¹¹B¦æÀ³¥Î 99 7.1DEPLOYMENT 99 7.1.1¤°¤\¬ODeployment 99 7.1.2Deployment»PReplicaSet 100 7.1.3¹B¦æDeployment 100 7.1.4¨Ï¥Î°t¸m¤å¥ó 107 7.1.5ÂX®e©MÁY®e 112 7.1.6¬G»ÙÂಾ 114 7.1.7³q¹L¼Ðñ±±¨îPodªº¦ì¸m 116 7.1.8§R°£Deployment 118 7.1.9DaemonSet 118 7.2JOB 121 7.2.1¤°¤\¬OJob 121 7.2.2Job¥¢±Ñ³B²z 123 7.2.3Jobªº¦}¦æ°õ¦æ 124 7.2.4Jobªº©w®É°õ¦æ 125 ²Ä8³¹³q¹LªA°È³X°ÝÀ³¥Î 127 8.1ªA°È¤Î¨ä¥\¯à 127 8.1.1ªA°È°ò¥»·§©À 127 8.1.2ªA°Èªº¥\¯àì²z 128 8.2ºÞ²zªA°È 129 8.2.1³Ð«ØªA°È 129 8.2.2¬d¬ÝªA°È 132 8.2.3§R°£ªA°È 133 8.3¥~³¡ºôµ¸³X°ÝªA°È 133 8.3.1kube-proxyµ²¦XClusterIP 134 8.3.2³q¹LNodePort³X°ÝªA°È 135 8.3.3³q¹Lt¸ü§¡¿Å³X°ÝªA°È 137 8.4³q¹LCOREDNS³X°ÝÀ³¥Î 138 8.4.1CoreDNS²¤¶ 138 8.4.2¦w¸ËCoreDNS 138 ²Ä9³¹¦sÀxºÞ²z 147 9.1¦sÀx¨÷ 147 9.1.1¤°¤\¬O¦sÀx¨÷ 147 9.1.2emptyDir¨÷ 148 9.1.3hostPath¨÷ 151 9.1.4NFS¨÷ 152 9.1.5Secret¨÷ 153 9.1.6iSCSI¨÷ 156 9.2«ù¤[¤Æ¦sÀx¨÷ 157 9.2.1¤°¤\¬O«ù¤[¤Æ¦sÀx¨÷ 157 9.2.2«ù¤[¤Æ¦sÀx¨÷½Ð¨D 157 9.2.3«ù¤[¤Æ¦sÀx¨÷ªº¥Í©R©P´Á 158 9.2.4«ù¤[¤Æ¦sÀx¨÷ÀRºA¸j©w 159 9.2.5«ù¤[¤Æ¦sÀx¨÷°ÊºA¸j©w 162 9.2.6¦^¦¬ 167 ²Ä10³¹KUBERNETES³n¥ó¥]ºÞ²z 170 10.1HELM 170 10.1.1Helm¬ÛÃö·§©À 170 10.1.2Tiller 171 10.1.3Chart 171 10.1.4Repository 171 10.1.5Release 171 10.2¦w¸ËHELM 172 10.2.1¦w¸Ë«È¤áºÝ 172 10.2.2¦w¸ËªA°È¾¹ºÝTiller 174 10.3CHART¤å¥óµ²ºc 176 10.4¨Ï¥ÎHELM 177 10.4.1³n¥óÜ®wªººÞ²z 177 10.4.2¬d§äChart 178 10.4.3¦w¸ËChart 180 10.4.4¬d¬Ý¤w¦w¸ËChart 183 10.4.5§R°£Release 183 ²Ä11³¹KUBERNETESºôµ¸ºÞ²z 185 11.1KUBERNETESºôµ¸°ò¦ 185 11.1.1Kubernetesºôµ¸¼Ò«¬ 185 11.1.2©R¦WªÅ¶¡ 186 11.1.3vethºôµ¸±µ¤f 186 11.1.4netfilter/iptables 187 11.1.5ºô¾ô 187 11.1.6¸ô¥Ñ 187 11.2KUBERNETESºôµ¸¹ê²{ 188 11.2.1Docker»PKubernetesºôµ¸¤ñ¸û 188 11.2.2®e¾¹¤§¶¡ªº³q«H 192 11.2.3Pod¤§¶¡ªº³q«H 194 11.2.4Pod©MªA°È¤§¶¡ªº³q«H 197 11.3FLANNEL 206 11.3.1Flannel²¤¶ 206 11.3.2¦w¸ËFlannel 207 ²Ä12³¹KUBERNETESDASHBOARD 212 12.1KUBERNETESDASHBOARD°t¸m¤å¥ó 212 12.1.1Kubernetes¨¤¦â±±¨î 212 12.1.2kubernetes-dashboard.yaml 213 12.2¦w¸ËKUBERNETESDASHBOARD 218 12.2.1©x¤è¦w¸Ë¤èªk 219 12.2.2¦Û©w¸q¦w¸Ë¤èªk 219 12.3DASHBOARD¨Ï¥Î¤èªk 222 12.3.1Dashboard·§ªp 222 12.3.2³q¹LDashboard³Ð«Ø¸ê·½ 224 ¼g¦b³Ì¦Z 226 |
§Ç¡G |