{"id":35838,"date":"2023-11-13T10:07:25","date_gmt":"2022-11-11T15:24:25","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/"},"modified":"2024-05-04T08:49:31","modified_gmt":"2024-05-04T00:49:31","slug":"%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/","title":{"rendered":"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u662f\u4e3a\u4e86\u5e2e\u52a9\u5373\u5c06\u5f00\u59cb\u5b66\u4e60Kubernetes\u7684\u4eba\u800c\u5199\u7684\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u5c3d\u5feb\u7406\u89e3\u5bb9\u5668\u5f00\u53d1\u7684\u57fa\u7840\u77e5\u8bc6\u800c\u63d0\u4f9b\u7684\u5165\u95e8\u6587\u7ae0\u3002<\/p>\n<p>\u5c3d\u7ba1\u79f0\u4e3a\u5165\u95e8\u6587\u7ae0\uff0c\u4f46\u6211\u4eec\u5047\u8bbe\u8bfb\u8005\u5df2\u7ecf\u6709\u5bf9\u4e8e\u5bb9\u5668\u865a\u62df\u5316\u6280\u672f\u7684\u62bd\u8c61\u6982\u5ff5\u7406\u89e3\u4f5c\u4e3a\u57fa\u7840\u77e5\u8bc6\uff0c\u5e76\u4e14\u5728\u7a0d\u5fae\u6df1\u5165\u63a2\u8ba8\u7684\u540c\u65f6\uff0c\u65e8\u5728\u63d0\u4f9b\u5173\u4e8eKubernetes\u7684\u5f15\u5165\u3001\u57fa\u672c\u64cd\u4f5c\u4ee5\u53ca\u76f8\u5173\u6280\u672f\u7684\u7406\u89e3\u3002<\/p>\n<h2>\u524d\u63d0\u77e5\u8b58 t\u00ed zh\u012b sh\u00ed)<\/h2>\n<p>\u5728\u5f00\u59cb\u5b66\u4e60Kubernetes\u4e4b\u524d\uff0c\u9700\u8981\u4e86\u89e3\u5bb9\u5668\u865a\u62df\u5316\u6280\u672f\u7684\u77e5\u8bc6\u3002\u672c\u6587\u5c06\u4f7f\u7528Docker\u4f5c\u4e3a\u5bb9\u5668\u865a\u62df\u5316\u6280\u672f\u7684\u4f8b\u5b50\uff0c\u4f46\u57fa\u672c\u7684Docker\u77e5\u8bc6\u5c06\u4f1a\u88ab\u7701\u7565\u3002\u4ee5\u4e0b\u662f\u9700\u8981\u638c\u63e1\u7684\u77e5\u8bc6\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b3\u30f3\u30c6\u30ca\u578b\u4eee\u60f3\u5316\u6280\u8853\uff08\u6982\u8981\u30ec\u30d9\u30eb\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\uff08Docker Engine\/Docker Compose\/Docker Swarm\/Docker Machine\/Docker Kitematic\/Docker Registry\u7b49\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Docker\u306e\u64cd\u4f5c\uff08\u30a4\u30e1\u30fc\u30b8\u30fb\u30b3\u30f3\u30c6\u30ca\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30aa\u30fc\u30b1\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u30c4\u30fc\u30eb\u306e\u77e5\u8b58<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Docker Hub<\/ul>\n<h2>\u5173\u4e8e\u5bb9\u5668\u865a\u62df\u5316\u6280\u672f\uff0c\u7a0d\u5fae\u6df1\u5165\u4e00\u70b9\u3002<\/h2>\n<p>\u4f7f\u7528\u5bb9\u5668\u5316\u6280\u672f\u53ef\u4ee5\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u7684\u529f\u80fd\u6765\u5b9e\u73b0\u3002\u5229\u7528\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u7684\u529f\u80fd\uff0c\u5c06\u4e3b\u673a\u8d44\u6e90\u9694\u79bb\u5e76\u5206\u914d\u7ed9\u6bcf\u4e2a\u5bb9\u5668\uff0c\u4ece\u800c\u521b\u5efa\u72ec\u7acb\u7684\u7a7a\u95f4\u3002\u540c\u65f6\uff0c\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u79cd\u72ec\u7acb\u7684\u7a7a\u95f4\uff0c\u63d0\u4f9b\u4e86\u4e00\u4e2a\u8f6f\u4ef6\u89e3\u51b3\u65b9\u6848\uff0c\u5373LXC\u3002<\/p>\n<p>LXC \u662f Linux \u5185\u6838\u4e3a\u5bb9\u5668\u529f\u80fd\u63d0\u4f9b\u7684\u7528\u6237\u7a7a\u95f4\u63a5\u53e3\u3002 Docker \u548c LXC \u53ef\u4ee5\u6df7\u5408\u4f7f\u7528\uff0c\u4f46\u5b83\u4eec\u5206\u522b\u5c5e\u4e8e\u4e0d\u540c\u7684\u8f6f\u4ef6\u3002 Docker \u65e8\u5728\u7528\u4e8e\u5e94\u7528\u7a0b\u5e8f\u90e8\u7f72\uff0c\u56e0\u6b64\u5b83\u63d0\u5021&#8221;\u6bcf\u4e2a\u5bb9\u5668\u4e00\u4e2a\u8fdb\u7a0b&#8221;\u7684\u7406\u5ff5\uff0c\u800c LXC \u88ab\u79f0\u4e3a&#8221;\u64cd\u4f5c\u7cfb\u7edf\u7ea7\u865a\u62df\u5316\u8f6f\u4ef6&#8221;\u3002 Docker \u5230\u7248\u672c 0.8 \u4e5f\u662f\u4f7f\u7528\u4e86 LXC\u3002<\/p>\n<p>\u76ee\u524d\uff0cDocker\u67b6\u6784\u88ab\u5206\u6210\u4e86\u56db\u4e2a\u7ec4\u4ef6\uff1aDocker\u5f15\u64ce\u3001containerd\u3001containerd-shm\u548crunC\u3002\u5b83\u4eec\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u5206\u522b\u88ab\u79f0\u4e3adocker\u3001docker-containerd\u3001docker-containerd-shim\u548cdocker-runc\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/10-0.png\" alt=\"ss_2.png\" \/><\/div>\n<p>\u4e3a\u4e86\u8fd0\u884c\u5bb9\u5668\uff0cDocker Engine\u4f1a\u521b\u5efa\u955c\u50cf\u5e76\u5c06\u5176\u4f20\u9012\u7ed9containerd\u3002containerd\u4f1a\u8c03\u7528containerd-shim\u6765\u4f7f\u7528runC\u8fd0\u884c\u5bb9\u5668\u3002\u7136\u540e\uff0ccontainerd-shim\u4f1a\u786e\u4fdd\u5728\u5bb9\u5668\u542f\u52a8\u540e\u53ef\u4ee5\u7ec8\u6b62\u8fd0\u884c\u65f6\uff08\u5728\u6b64\u793a\u4f8b\u4e2d\u4e3arunC\uff09\u3002\u8fd9\u6837\u505a\u662f\u4e3a\u4e86\u907f\u514d\u9700\u8981\u4e3a\u5bb9\u5668\u6301\u7eed\u8fd0\u884c\u7684\u957f\u65f6\u95f4\u8fd0\u884c\u65f6\u8fdb\u7a0b\uff0c\u4ece\u800c\u53ef\u4ee5\u8fd0\u884c\u65e0\u5b88\u62a4\u8fdb\u7a0b\u7684\u5bb9\u5668\u3002<\/p>\n<h3>\u8fd0\u884c\u65f6\u95f4<\/h3>\n<p>\u8fd0\u884c\u65f6\uff08runtime\uff09\u6307\u7684\u662f\u7a0b\u5e8f\u6267\u884c\u65f6\u4ee5\u53ca\u6267\u884c\u65f6\u6240\u9700\u7684\u7269\u54c1\u3002\u8ba9\u6211\u4eec\u7a0d\u5fae\u4e86\u89e3\u4e00\u4e0b\u5bb9\u5668\u8fd0\u884c\u65f6\uff08container runtime\uff09\u3002<\/p>\n<h4>\u5bb9\u5668\u7ba1\u7406\u5b88\u62a4\u8fdb\u7a0b<\/h4>\n<p>containerd\u8d1f\u8d23\u7ba1\u7406\u8fd0\u884c\u7684\u5bb9\u5668\u3002<\/p>\n<p>containerd\u306f\u3082\u3068\u3082\u3068Docker\u793e\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u6a19\u6e96\u7684\u306a\u30e9\u30f3\u30bf\u30a4\u30e0\u5b9f\u88c5\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u3001Docker\u793e\u304b\u3089\u4e2d\u7acb\u7684\u306a\u56e3\u4f53\u3067\u3042\u308bCloud Native Computing Foundation\u306b\uff08CNCF\uff09\u306b\u30012017\u5e743\u6708\u306b\u5bc4\u8d08\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<h4>\u5bb9\u5668\u76d1\u63a7\u670d\u52a1-Shim<\/h4>\n<p>containerd-shim\u306f\u3001\u30c7\u30fc\u30e2\u30f3\u30ec\u30b9\u30b3\u30f3\u30c6\u30ca\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002<br \/>\n\u8d77\u52d5\u3055\u308c\u305f\u3059\u3079\u3066\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u89aa\u30d7\u30ed\u30bb\u30b9\u3067\u3042\u308a\u3001\u30c7\u30fc\u30e2\u30f3\u306a\u3057\u306e\u30b3\u30f3\u30c6\u30ca\u3082\u8a31\u53ef\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>\u8fd0\u884c<\/h4>\n<p>runC\u662f\u4e00\u4e2a\u7528\u4e8e\u521b\u5efa\u548c\u542f\u52a8\u5bb9\u5668\u7684\u4e8c\u8fdb\u5236\u7a0b\u5e8f\u3002\u6b64\u5916\uff0crunC\u662f\u57fa\u4e8e\u4e0eDocker Engine\u76f8\u540c\u7684\u6280\u672flibcontainer\u5b9e\u73b0\u7684\u3002<\/p>\n<p>Docker\u793e\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u73fe\u5728\u306f\u30b3\u30f3\u30c6\u30ca\u578b\u4eee\u60f3\u5316\u6280\u8853\u306e\u6a19\u6e96\u5316\u306b\u53d6\u308a\u7d44\u3080Open Container Initiative\uff08OCI\uff09\uff08\u203b1\uff09\u304c\u5b9a\u7fa9\u3059\u308b\u4ed5\u69d8\u3067\u3001\u4e8b\u5b9f\u4e0a\u30b3\u30f3\u30c6\u30ca\u578b\u4eee\u60f3\u5316\u6280\u8853\u306e\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u5b9f\u88c5\u3068\u3057\u3066\u306f\u3001Namespace\u3001cgroups\u3001pivot_root\u3001AppArmor\u3001SELinux\u3001seccomp\u7b49\u306b\u3088\u308a\u3001\u30bb\u30ad\u30e5\u30a2\uff08\u203b2\uff09\u306a\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\uff08\u203b1\uff09\u5f00\u653e\u5bb9\u5668\u5021\u8bae\uff08OCI\uff09\u7684\u76ee\u6807\u662f\u5728\u5bb9\u5668\u751f\u6001\u7cfb\u7edf\u4e2d\u5efa\u7acb\u8f6f\u4ef6\u5bb9\u5668\u7684\u5171\u540c\u6807\u51c6\uff0c\u4ee5\u907f\u514d\u6f5c\u5728\u7684\u788e\u7247\u5316\u548c\u5206\u5272\uff0c\u5e76\u5305\u542b\u4e86\u4e24\u9879\u6307\u6807\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">runtime-spec\uff1a\u30e9\u30f3\u30bf\u30a4\u30e0\u4ed5\u69d8<\/ul>\n<\/li>\n<\/ul>\n<p>image-spec\uff1a\u30a4\u30e1\u30fc\u30b8\u4ed5\u69d8<\/p>\n<p>\uff08\u203b2\uff092019\u5e742\u670812\u65e5\u306b\u3001runc\u306e\u8106\u5f31\u6027\uff08CVE-2019-5736\uff09\u304c\u767a\u898b\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u8106\u5f31\u6027\u306b\u3088\u308a\u3001\u60aa\u610f\u306e\u3042\u308b\u30b3\u30f3\u30c6\u30ca\u304c\uff08\u6700\u5c0f\u9650\u306e\u30e6\u30fc\u30b6\u30fc\u3067\uff09\u8a31\u53ef\u3055\u308c\u307e\u3059\u3002\u30db\u30b9\u30c8\u306erunc\u30d0\u30a4\u30ca\u30ea\u3092\u4e0a\u66f8\u304d\u3057\u3066\u3001root\u30ec\u30d9\u30eb\u306b\u306a\u308b\u30db\u30b9\u30c8\u4e0a\u3067\u4efb\u610f\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Docker\u3067\u4f7f\u7528\u3057\u3066\u3044\u308b\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u78ba\u8a8d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">docker info | grep &#8216;Runtime&#8217;<\/ul>\n<h4>\u5bb9\u5668\u6280\u672f<\/h4>\n<p>libcontainer\u662f\u4e00\u4e2a\u7528Go\u8bed\u8a00\u5b9e\u73b0\u7684\u5e93\u3002<\/p>\n<p>Docker\u7684\u5bb9\u5668\u529f\u80fd\u57280.8\u7248\u672c\u4e4b\u524d\u4f9d\u8d56\u4e8eLXC\uff0c\u4f46\u4ece0.9\u7248\u672c\u5f00\u59cb\u6539\u4e3a\u76f4\u63a5\u8c03\u7528\u5185\u6838\u7684\u5bb9\u5668API\u7684libcontainer\u9a71\u52a8\u7a0b\u5e8f\u3002<\/p>\n<h3>\u5185\u6838 h\u00e9)<\/h3>\n<p>\u5185\u6838\u662f\u64cd\u4f5c\u7cfb\u7edf\uff08OS\uff09\u7684\u6838\u5fc3\u90e8\u5206\u3002<br \/>\n\u5b83\u5c06CPU\u3001\u5185\u5b58\u3001\u8bbe\u5907\u8f93\u5165\u8f93\u51fa\u7b49\u786c\u4ef6\u8d44\u6e90\u8fdb\u884c\u62bd\u8c61\u5316\u3002<\/p>\n<p>\u30b3\u30f3\u30c6\u30ca\u578b\u4eee\u60f3\u5316\u6280\u8853\u306f\u3001\u30db\u30b9\u30c8\u578b\u3084\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u578b\u7b49\u4ed6\u306e\u4eee\u60f3\u5316\u6280\u8853\u306b\u6bd4\u3079\u3066\u3001\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u5c11\u306a\u3044\u305f\u3081\u3001\u8efd\u91cf\u3067\u9ad8\u901f\u306b\u52d5\u4f5c\u3059\u308b\u306e\u304c\u7279\u5fb4\u3067\u3059\u3002<\/p>\n<h4>\u6587\u4ef6\u7cfb\u7edf<\/h4>\n<p>Docker\u3067\u306f\u3001\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u4e0a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3084\u30d5\u30a1\u30a4\u30eb\u3092\u30ec\u30a4\u30e4\u3068\u3057\u3066\u91cd\u306d\u5408\u308f\u305b\u3001\u305d\u308c\u3089\u3092\u4eee\u60f3\u7684\u306b\u4e00\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066\u6271\u3046\u3053\u3068\u306b\u3088\u308a\u3001\u30a4\u30e1\u30fc\u30b8\u3092\u5b9f\u73fe\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u30a4\u30e1\u30fc\u30b8\u30ec\u30a4\u30e4\u306b\u5bfe\u3059\u308b\u30b3\u30f3\u30c6\u30ca\u4e0a\u3067\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u66f4\u65b0\u306f\u3001\u30b3\u30d4\u30fc\u30aa\u30f3\u30e9\u30a4\u30c8\u306b\u3088\u3063\u3066\u5b9f\u73fe\u3057\u3066\u3044\u307e\u3059\u3002\u30b3\u30d4\u30fc\u30aa\u30f3\u30e9\u30a4\u30c8\u51e6\u7406\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u30c9\u30e9\u30a4\u30d0\u306b\u3088\u3063\u3066\u5b9f\u88c5\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3068\u3057\u3066\u3001Aufs\u306f\u3001\u8907\u6570\u306e\u7570\u306a\u308b\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0 (\u30d6\u30e9\u30f3\u30c1\u3068\u547c\u3070\u308c\u308b) \u306e\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540c\u58eb\u3092\u900f\u904e\u7684\u306b\u91cd\u306d\u308b (\u30de\u30fc\u30b8\u3059\u308b) \u3053\u3068\u304c\u3067\u304d\u308b\u6280\u8853\u3067\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Docker\u3067\u4f7f\u7528\u3057\u3066\u3044\u308b\u30c9\u30e9\u30a4\u30d0\u306e\u78ba\u8a8d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">docker info | grep &#8216;Storage Driver&#8217;<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Docker \u30a4\u30e1\u30fc\u30b8\u30ec\u30a4\u30e4\u306e\u78ba\u8a8d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">docker history \u30a4\u30e1\u30fc\u30b8<\/ul>\n<h4>\u547d\u540d\u7a7a\u95f4<\/h4>\n<p>Namespace\u306f\u3001\u30b3\u30f3\u30c6\u30ca\u6bce\u306b\u7570\u306a\u308b\u8ad6\u7406\u7684\u306a\u7a7a\u9593\u3092\u63d0\u4f9b\u3057\u3001\u9694\u96e2\u3059\u308b\u305f\u3081\u306e\u6280\u8853\u3067\u3059\u3002<\/p>\n<div>\n<div class=\"post-table\">\u540d\u524d\u7a7a\u9593\u5b9a\u6570\u6982\u8981IPCCLONE_NEWIPCSystem V \u30d7\u30ed\u30bb\u30b9\u9593\u901a\u4fe1\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u547c\u3070\u308c\u308b\u3001POSIX\u30e1\u30c3\u30bb\u30fc\u30b8\u30ad\u30e5\u30fc\u7b49\u5185\u90e8\u306e\u30d7\u30ed\u30bb\u30b9\u9593\u901a\u4fe1\u3092\u5206\u96e2\u3059\u308b\u3002MOUNTCLONE_NEWNSNamespace\u5185\u306b\u9694\u96e2\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30c4\u30ea\u30fc\u3092\u4f5c\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30c4\u30ea\u30fc\u3092\u5206\u96e2\u3059\u308b\u3002NetworkCLONE_NEWNET\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30d0\u30a4\u30b9\u3001IP\u30a2\u30c9\u30ec\u30b9\u3001\u30dd\u30fc\u30c8\u756a\u53f7\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u30c6\u30fc\u30d6\u30eb\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30c6\u30fc\u30d6\u30eb\u7b49\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30ea\u30bd\u30fc\u30b9\u3092\u5206\u96e2\u3059\u308bPID\u3000CLONE_NEWPIDPID(\u30d7\u30ed\u30bb\u30b9ID)\u3092\u5206\u96e2\u3059\u308b\u3002UIDCLONE_NEWUSERUID\u3084GID\u3092\u5206\u96e2\u3059\u308b\u3002UTSCLONE_NEWUTSuname() \u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u304b\u3089\u8fd4\u3055\u308c\u308b2\u3064\u306e\u30b7\u30b9\u30c6\u30e0\u8b58\u5225\u5b50(\u30db\u30b9\u30c8\u540d\u3084NIS\u30c9\u30e1\u30a4\u30f3\u540d)\u3092\u5206\u96e2\u3059\u308b\u3002<\/div>\n<\/div>\n<h4>\u63a7\u5236\u7ec4<\/h4>\n<p>cgroups\u306f\u3001\u30d7\u30ed\u30bb\u30b9\u30b0\u30eb\u30fc\u30d7\u306e\u30ea\u30bd\u30fc\u30b9(CPU\u3001\u30e1\u30e2\u30ea\u3001\u30c7\u30a3\u30b9\u30afI\/O\u7b49)\u306e\u5229\u7528\u3092\u5236\u9650\u30fb\u9694\u96e2\u3059\u308bLinux\u30ab\u30fc\u30cd\u30eb\u306e\u6a5f\u80fd\u3067\u3059\u3002\u30b0\u30eb\u30fc\u30d7\u5185\u306e\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u4ed6\u306e\u30b0\u30eb\u30fc\u30d7\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u898b\u3048\u306a\u3044\u3088\u3046\u306b\u3067\u304d\u3066\u3044\u308b\u306e\u306f\u3001\u540d\u524d\u7a7a\u9593\u306b\u3088\u308b\u9694\u96e2\u6a5f\u80fd\u304c\u50cd\u3044\u3066\u3044\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u8208\u5473\u304c\u3042\u308c\u3070\u3001\u30ab\u30fc\u30cd\u30eb\u30bd\u30fc\u30b9\u306etask_struct()\u3092\u898b\u3066\u307f\u308b\u3068\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>Linux\u5185\u6838\u4e2d\uff0c\u8fdb\u7a0b\u4ee5\u540d\u4e3atask_struct\u7684\u76f8\u5f53\u5e9e\u5927\u7684\u6570\u636e\u7ed3\u6784\u8868\u793a\u3002task_struct\u53ef\u4ee5\u5728.\/linux\/include\/linux\/sched.h\u4e2d\u627e\u5230\u3002<\/p>\n<h4>chroot &#8211; \u66f4\u6539\u6839\u76ee\u5f55<\/h4>\n<p>Chroot\u662f\u4e00\u9879\u53e4\u8001\u7684\u6280\u672f\uff0c\u4f46\u4e3a\u4e86\u66f4\u597d\u5730\u7406\u89e3\u865a\u62df\u5316\u6280\u672f\uff0c\u77e5\u9053\u5b83\u662f\u5f88\u597d\u7684\u9009\u62e9\u3002<\/p>\n<p>chroot\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u540d\u524d\u7a7a\u9593\u3092\u9694\u96e2\u3057\u307e\u3059\u3002\u3082\u3046\u5c11\u3057\u5206\u304b\u308a\u3084\u3059\u304f\u8a00\u3046\u3068\u3001\u3053\u308c\u4ee5\u4e0a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u884c\u304b\u305b\u306a\u3044\u3088\u3046\u306b\u3001\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\u4f46\u3057\u3001\u9694\u96e2\u3059\u308b\u306e\u306f\u3001\u3042\u304f\u307e\u3067\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u307f\u3067\u3059\u3002\u4ed6\u306e\u30ea\u30bd\u30fc\u30b9\u306f\u9694\u96e2\u3057\u306a\u3044\u305f\u3081\u3001\u30e6\u30fc\u30b6\u30fcID\u3084\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306f\u5171\u901a\u306e\u3082\u306e\u304c\u898b\u3048\u307e\u3059\u3002<\/p>\n<p>\u8eab\u8fd1\u306a\u4f8b\u3068\u3057\u3066\u306f\u3001bind\u306e\u69cb\u7bc9\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002chroot\u3059\u308b\u3053\u3068\u3067\u3001\/var\/named\/chroot\u304c\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u306a\u308a\u3001bind\u30d7\u30ed\u30bb\u30b9\u304c\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u7bc4\u56f2\u3092\u5236\u9650\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4e07\u304c\u4e00\u653b\u6483\u3092\u53d7\u3051\u3066\u4fb5\u5165\u3055\u308c\u3066\u3082\u3001\/var\/named\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3060\u3051\u304c\u5f71\u97ff\u3092\u53d7\u3051\u307e\u3059\u3002<\/p>\n<p>chroot\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u3069\u3053\u3092\u8d77\u70b9\u306b\u3057\u3066\u3044\u308b\u304b\u3067\u76f8\u5bfe\u7684\u4f4d\u7f6e\u3092\u7406\u89e3\u3057\u3066\u304a\u304f\u3068\u3001\u30c8\u30e9\u30d6\u30eb\u306e\u9632\u6b62\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>Kubernetes\u7b80\u4ecb<\/h2>\n<p>Kubernetes\u662f\u4e00\u79cd\u5bb9\u5668\u7f16\u6392\u5de5\u5177\uff0c\u5b83\u5141\u8bb8\u58f0\u660e\u5f0f\u914d\u7f6e\u548c\u5bb9\u5668\u81ea\u52a8\u64cd\u4f5c\u3002\u4f5c\u4e3a\u4e00\u4e2a\u5206\u5e03\u5f0f\u7cfb\u7edf\uff0c\u5b83\u63d0\u4f9bAPI\u4ee5\u5b9e\u73b0\u53ef\u9760\u6027\u3001\u53ef\u7528\u6027\u548c\u53ef\u6269\u5c55\u6027\u3002<\/p>\n<p>\u8c37\u6b4c\uff08Google\uff09\u57282014\u5e74\u5f00\u53d1\u7684Kubernetes\uff0c\u57282017\u5e7410\u6708\u7684DockerCon EU\u4e0a\u5ba3\u5e03\u4e0eDocker\u96c6\u6210\u540e\uff0c\u6574\u4e2a\u73af\u5883\u53d1\u751f\u4e86\u5de8\u5927\u53d8\u5316\u3002\u76ee\u524d\uff0c\u5b83\u5df2\u5f97\u5230\u4e3b\u8981\u4e91\u670d\u52a1\u63d0\u4f9b\u5546\u7684\u652f\u6301\uff0c\u4f5c\u4e3a\u5bb9\u5668\u7f16\u6392\u5de5\u5177\u7684\u91cd\u8981\u6027\u4f9d\u7136\u4e0d\u53d8\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">GKE\uff08Google Kubernetes Engine\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Amazon EKS\uff08Amazon Elastic Container Service for Kubernetes\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">AKS\uff08Azure Kubernetes Service\uff09\uff08\u203b2\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">CEK\uff08Container Engine for Kubernetes\uff09\uff08\u203b3\uff09<\/ul>\n<p>\uff08\u203b1\uff09Google\u304c\u793e\u5185\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u57fa\u76e4\u3068\u3057\u3066\u5229\u7528\u3057\u3066\u3044\u305f\u300cBorg\u300d\u3068\u547c\u3070\u308c\u308b\u30b7\u30b9\u30c6\u30e0\u304c\u5143<br \/>\n\uff08\u203b2\uff09ACS\uff08Azure Container Service\uff09\u306e\u30b5\u30dd\u30fc\u30c8\u306f2020\u5e741\u670831\u65e5\u3092\u3082\u3063\u3066\u7d42\u4e86<br \/>\n\uff08\u203b3\uff09Oracle\u304c\u63d0\u4f9b\u3059\u308b\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9<\/p>\n<h3>\u97f3\u6a02\u914d\u5668\u6a02\u5668<\/h3>\n<p>\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u306b\u304a\u3051\u308b\u30b7\u30b9\u30c6\u30e0\u306e\u62e1\u5f35\u65b9\u5f0f\u306f\u3001\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3084\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u306e\u904b\u7528\u304c\u4e00\u822c\u7684\u3067\u3057\u305f\u304c\u3001\u30af\u30e9\u30a6\u30c9\u306e\u767b\u5834\u306b\u3088\u308a\u3001\u5fc5\u8981\u306a\u3068\u304d\u306b\u3001\u5fc5\u8981\u306a\u30ea\u30bd\u30fc\u30b9\u3092\u8fc5\u901f\u306b\u69cb\u7bc9\u3059\u308b\u4ed5\u7d44\u307f\u3068\u3057\u3066\u30aa\u30fc\u30b1\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u30c4\u30fc\u30eb\u304c\u751f\u307e\u308c\u307e\u3057\u305f\u3002\u30b3\u30f3\u30c6\u30ca\u306b\u4fc2\u308b\u30aa\u30fc\u30b1\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u30c4\u30fc\u30eb\u3068\u3057\u3066\u3001\u4e3b\u8981\u306a\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u4ee5\u5916\u3067\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div>\n<div class=\"post-table\">\u958b\u767a\u5143 \u3000\u30b5\u30fc\u30d3\u30b9Red HatOpenShiftPivotalPKSDockerSwarmApacheApache MesosRancher LabsRancherMesosphereMesosphere DC\/OSCloud FoundryCFCR\uff08Cloud Foundry Container Runtime\uff09<\/div>\n<\/div>\n<p>\u30aa\u30fc\u30b1\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u30c4\u30fc\u30eb\u306f\u3001Kubernetes\u306e\u30b7\u30a7\u30a2\u304c\u9ad8\u3044\u3067\u3059\u304c\u3001Google\u304c\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3057\u305fgVisor\u3001OpenStack Foundation\u304c\u958b\u767a\u3057\u305fKata Containers\u3001Kubernetes\u306b\u30cd\u30a4\u30c6\u30a3\u30d6\u5bfe\u5fdc\u3057\u305f\u30b3\u30a2\u30e9\u30f3\u30bf\u30a4\u30e0\u306econtainerd\u7b49\u591a\u69d8\u306a\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u767b\u5834\u3059\u308b\u3068\u898b\u8fbc\u307e\u308c\u3066\u304a\u308a\u3001\u30b3\u30f3\u30c6\u30ca\u578b\u4eee\u60f3\u5316\u6280\u8853\u306e\u52d5\u5411\u8e0f\u307e\u3048\u3066\u3001\u4eca\u5f8c\u3082\u76ee\u304c\u96e2\u305b\u307e\u305b\u3093\u3002<\/p>\n<h3>\u5efa\u7b51\u8bbe\u8ba1<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/58-0.png\" alt=\"k8s_arc.png\" \/><\/div>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Kubernetes\u3092\u69cb\u6210\u3059\u308b\u8981\u7d20\u306f\u30ea\u30bd\u30fc\u30b9\u3068\u3057\u3066\u533a\u5225\u3055\u308c\u3001Kubernetes Cluster\uff08\u4ee5\u964d\u3001\u30af\u30e9\u30b9\u30bf\uff09\u306fKubernetes\u306e\u7ba1\u7406\u3059\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u96c6\u5408\u4f53\u3067\u3042\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Node\u306fKubernetes \u30af\u30e9\u30b9\u30bf\u3067\u7ba1\u7406\u3055\u308c\u308bDocker\u30db\u30b9\u30c8\u3067\u3042\u308a\u3001Master\u3068Node\u306b\u533a\u5225\u3055\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u3067\u63d0\u4f9b\u3055\u308c\u308bGKE\u306e\u69d8\u306a\u30de\u30cd\u30fc\u30b8\u30c9\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3001\u958b\u767a\u8005\u304cMaster\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u306f\u307b\u3068\u3093\u3069\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Kubernetes \u30af\u30e9\u30b9\u30bf\u306e\u30ea\u30bd\u30fc\u30b9\u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u306f\u6a19\u6e96\u5316\u3055\u308c\u305fAPI\u306b\u3088\u308b\u884c\u3046<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Deployment\u30921\u3064\u306e\u5358\u4f4d\u3068\u3057\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b<\/ul>\n<h3>Kubernetes\u7684\u7ec4\u4ef6<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/61-0.png\" alt=\"k8s_com.png\" \/><\/div>\n<p>\u6211\u4eec\u5728Master\u4e0a\u63a5\u6536API\uff0c\u8fdb\u884cNode\u7684\u7ba1\u7406\u548cKubernetes\u96c6\u7fa4\u7684\u63a7\u5236\u3002\u901a\u8fc7Node\u4e2d\u7684kubelete\u6765\u7ba1\u7406Pod\u5185\u7684\u5bb9\u5668\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u4eea\u8868\u677f\u548cDNS\u7b49\u63d2\u4ef6\uff0c\u4f5c\u4e3aKubernetes\u96c6\u7fa4\u7684\u529f\u80fd\u3002<\/p>\n<p>\u8bf7\u53c2\u9605Kubernetes\u7ec4\u4ef6\u4ee5\u8be6\u7ec6\u4e86\u89e3Kubernetes\u7684\u7ec4\u4ef6\u3002<\/p>\n<h3>\u5bb9\u5668\u8fd0\u884c\u65f6\u63a5\u53e3<\/h3>\n<p>Kubernetes\u548cDocker\u4e4b\u95f4\u901a\u8fc7Kubernetes\u6807\u51c6\u5316\u7684CRI\uff08\u5bb9\u5668\u8fd0\u884c\u65f6\u63a5\u53e3\uff09\u8fdb\u884c\u4ea4\u4e92\u3002\u4ee5\u4e0b\u662f\u5173\u4e8eKubernetes\u4e2d\u5bb9\u5668\u8fd0\u884c\u65f6\u63a5\u53e3\uff08CRI\uff09\u7684\u4ecb\u7ecd\u7684\u535a\u5ba2\u6587\u7ae0\u3002<\/p>\n<p>\u5728Kubernetes\u4e2d\u5f15\u5165\u5bb9\u5668\u8fd0\u884c\u65f6\u63a5\u53e3\uff08CRI\uff09\u3002<\/p>\n<p>\u5173\u4e8eKubernetes\u548cCRI\u7684\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u8bf7\u53c2\u8003GitHub\u4e0acontainerd\/cri\u5b58\u50a8\u5e93\u7684README\u6587\u4ef6\u3002<\/p>\n<h3>Kubernetes\u7684\u610f\u4e49<\/h3>\n<p>\u8ba9\u6211\u4eec\u4e86\u89e3Kubernetes\u7684\u91cd\u8981\u6027\u3002<br \/>\n\u53ef\u4ee5\u901a\u8fc7\u4e86\u89e3Borg\u3001Omega\u548cKubernetes\u7684\u5386\u53f2\u6765\u4e86\u89e3Borg\u7684\u80cc\u666f\u3002<\/p>\n<h3>\u5176\u4ed6<\/h3>\n<p>\u4ee5\u4e0b\u662f\u4e0eKubernetes\u76f8\u5173\u7684\u5de5\u5177\u548c\u6846\u67b6\u7b49\u7684\u8be6\u7ec6\u63cf\u8ff0\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">kubeadm<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">kubeadm\u306f\u3001\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u6e96\u62e0\u3057\u305f\u6700\u4f4e\u9650\u5b9f\u884c\u53ef\u80fd\u306aKubernetes\u30af\u30e9\u30b9\u30bf\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30e9\u30c3\u30d7\u30c8\u30c3\u30d7\u3001\u30b5\u30fc\u30d0\u30fc\u3001Raspberry Pi\u7b49\u8272\u3005\u306a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">minikube<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">minikube\u306f\u3001macOS\u3001Linux\u3001\u304a\u3088\u3073Windows\u4e0a\u306b\u30ed\u30fc\u30ab\u30ebKubernetes\u30af\u30e9\u30b9\u30bf\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">k3s<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">k3s\u306f\u3001Rancher Labs\u793e\u304c\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u516c\u958b\u3057\u305fKubernetes\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002\u308f\u305a\u304b40MB\u3067\u3042\u308a\u306a\u304c\u3089\u3001\u6a19\u6e96\u306eKubernetes\u3068\u3057\u3066\u306e\u6a5f\u80fd\u3092\u5099\u3048\u3064\u3064\u3001Kubernetes\u8a8d\u8a3c\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3042\u308b\u300cCertified Kubernetes\u300d\u3092\u53d6\u5f97\u3002Rancher Labs\u3088\u308a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Knative<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Knative\u306f\u3001\u6700\u65b0\u306e\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u30d3\u30eb\u30c9\u3001\u30c7\u30d7\u30ed\u30a4\u3001\u7ba1\u7406\u3067\u304d\u308b Kubernetes \u30d9\u30fc\u30b9\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3002\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u3067\u5b9f\u884c\u3057\u3066\u3044\u308b\u74b0\u5883\u306b\u304a\u3044\u3066\u3082\u30b3\u30f3\u30c6\u30ca\u3092\u30d3\u30eb\u30c9\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">OpenFaaS<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">OpenFaaS\u306f\u3001Docker Swarm\u3068Kubernetes\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308bFaaS\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fdc\u3058\u3066\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3001\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u81ea\u52d5\u7684\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30b9\u30b1\u30fc\u30eb\u3055\u305b\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u3084\u5404\u793e\u306e\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u4e0a\u3067\u3082\u5c0e\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">kubeless<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Kubeless\u306f\u3001Kubernetes\u56fa\u6709\u306e\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3001\u57fa\u76e4\u3068\u306a\u308b\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u3092\u6c17\u306b\u305b\u305a\u306b\u5c0f\u3055\u306a\u30b3\u30fc\u30c9\uff08\u95a2\u6570\uff09\u3092\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Osiris<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Osiris\u306f\u3001\u30a2\u30a4\u30c9\u30eb\u72b6\u614b\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u81ea\u52d5\u7684\u306b\u30bc\u30ed\u307e\u3067\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3057\u3001\u30bc\u30ed\u307e\u3067\u306e\u30b9\u30b1\u30fc\u30eb\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u8981\u6c42\u306b\u3088\u3063\u3066\u30aa\u30f3\u30c7\u30de\u30f3\u30c9\u3067\u81ea\u52d5\u7684\u306b\u518d\u30a2\u30af\u30c6\u30a3\u30d6\u5316\u3059\u308b\u3053\u3068\u3092\u53ef\u80fd\u306b\u3059\u308b\u3053\u3068\u3067\u3001Kubernetes\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30ea\u30bd\u30fc\u30b9\u52b9\u7387\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\u3002\u307e\u3060\u3001\u958b\u767a\u4e2d\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u3088\u3046\u3067\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Virtual Kubelet<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Virtual Kubelet\u306f\u3001Microsoft\u304c\u59cb\u3081\u305fOSS\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002Kubernetes\u3092\u62e1\u5f35\u3057\u3066\u3001\u7279\u5b9a\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u30ce\u30fc\u30c9\u30ec\u30b9\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a4\u30e1\u30fc\u30b8\u3068\u3057\u3066\u306f\u3001VMware\u306evMotion\u306e\u3088\u3046\u306b\u3001Virtual Kubelet\u304c\u52d5\u4f5c\u3059\u308b\u30ce\u30fc\u30c9\u3068\u306f\u5225\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u30ea\u30bd\u30fc\u30b9\u306b\u3001\u30b3\u30f3\u30c6\u30ca\u3092\u5c55\u958b\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Anthos<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Anthos\u306f\u3001Kubernetes\u3092\u30d9\u30fc\u30b9\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30de\u30eb\u30c1\u30af\u30e9\u30a6\u30c9\u5bfe\u5fdc\u3092\u5b9f\u73fe\u3059\u308b\u65b0\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002Google Cloud\u4e0a\u3067\u306fGoogle Kubernetes Engine\uff08GKE\uff09\u4e0a\u3067\u7a3c\u50cd\u3057\u3001\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u3067\u306fGKE on Prem\u4e0a\u3067\u7a3c\u50cd\u3002\u3055\u3089\u306bAWS\u4e0a\u3067\u3082\u7a3c\u50cd\u4e88\u5b9a\u306e\u305f\u3081\u3001Google\u4ee5\u5916\u306e\u30af\u30e9\u30a6\u30c9\u30b5\u30dd\u30fc\u30c8\u304c\u898b\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u3067\u306eAnthos\u306e\u5b9f\u884c\u74b0\u5883\u306f\u3001\u73fe\u6642\u70b9\u3067\u306fGKE on prem\u306e\u7a3c\u50cd\u6761\u4ef6\u3067\u3042\u308bVMware 6.5\u4ee5\u4e0a\u3001F5 BIG-IP\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/ul>\n<h2>\u5b89\u88c5Kubernetes<\/h2>\n<p>\u8ba9\u6211\u4eec\u5728\u672c\u5730\u73af\u5883\u4e2d\u5b89\u88c5\u548c\u4f7f\u7528Kubernetes\u3002<\/p>\n<p>\u672c\u6587\u7684\u73af\u5883\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<p>\u8bbe\u5907\uff1aiMac<br \/>\n\u5148\u51b3\u6761\u4ef6\uff1a\u5df2\u5b89\u88c5Docker Desktop for Mac<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/77-3.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2019-03-02 09.21.12.png\" \/><\/div>\n<h2>\u4f7f\u7528Kubernetes\u7684\u64cd\u4f5c<\/h2>\n<p>Kubernetes\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u548c\u56fe\u5f62\u754c\u9762\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<h3>kubectl \u547d\u4ee4<\/h3>\n<p>kubectl\u662f\u7528\u4e8e\u5728\u547d\u4ee4\u884c\u4e2d\u64cd\u4f5cKubernetes\u7684\u5de5\u5177\u3002kubectl\u7684\u6982\u8ff0\uff08\u5305\u62ec\u547d\u4ee4\u7684\u8bed\u6cd5\u7b49\uff09\u8be6\u89c1kubectl\u7684\u6982\u8ff0\u3002<\/p>\n<h4>\u68c0\u67e5Kubernetes\u96c6\u7fa4\u7684\u72b6\u6001<\/h4>\n<p>\u4ee5\u4e0b\u662f\u7528\u4e8e\u68c0\u67e5Kubernetes\u96c6\u7fa4\u72b6\u6001\u7684\u547d\u4ee4\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30b9\u30bf\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl version<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">Client Version: version.Info{Major:\"1\", Minor:\"10\", GitVersion:\"v1.10.11\", GitCommit:\"637c7e288581ee40ab4ca210618a89a555b6e7e9\", GitTreeState:\"clean\", BuildDate:\"2018-11-26T14:38:32Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"darwin\/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"10\", GitVersion:\"v1.10.11\", GitCommit:\"637c7e288581ee40ab4ca210618a89a555b6e7e9\", GitTreeState:\"clean\", BuildDate:\"2018-11-26T14:25:46Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux\/amd64\"}\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30b9\u30bf\u306e\u6b63\u5e38\u6027\u78ba\u8a8d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get componentstatus<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">NAME                 STATUS    MESSAGE              ERROR\r\ncontroller-manager   Healthy   ok                   \r\nscheduler            Healthy   ok                   \r\netcd-0               Healthy   {\"health\": \"true\"}\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30b9\u30bf\u306e\u30ce\u30fc\u30c9\u4e00\u89a7\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get nodes<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">NAME                 STATUS    ROLES     AGE       VERSION\r\ndocker-for-desktop   Ready     master    59d       v1.10.11\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30b9\u30bf\u306e\u30ce\u30fc\u30c9\u8a73\u7d30\u60c5\u5831\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl describe nodes \u30ce\u30fc\u30c9\u540d<\/ul>\n<h3>\u4eea\u8868\u76d8 (y\u00ed<\/h3>\n<p>\u901a\u8fc7\u4f7f\u7528\u4eea\u8868\u677f\uff0c\u60a8\u53ef\u4ee5\u4ece\u6d4f\u89c8\u5668\u7ba1\u7406Kubernetes\u96c6\u7fa4\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5728\u672c\u5730\u5b89\u88c5Kubernetes\u63a7\u5236\u53f0\uff1akubectl apply -f https:\/\/raw.githubusercontent.com\/kubernetes\/dashboard\/v1.8.3\/src\/deploy\/recommended\/kubernetes-dashboard.yaml<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">secret \"kubernetes-dashboard-certs\" created\r\nserviceaccount \"kubernetes-dashboard\" created\r\nrole.rbac.authorization.k8s.io \"kubernetes-dashboard-minimal\" created\r\nrolebinding.rbac.authorization.k8s.io \"kubernetes-dashboard-minimal\" created\r\ndeployment.apps \"kubernetes-dashboard\" created\r\nservice \"kubernetes-dashboard\" created\r\n<\/span><\/code><\/pre>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u786e\u8ba4\u5df2\u90e8\u7f72\u6210\u529f\u3002<\/p>\n<p>\u83b7\u53d6\u5e26\u6709 k8s-app=kubernetes-dashboard \u6807\u7b7e\u7684 Kubernetes \u4eea\u8868\u76d8 Pod\uff0c\u5728 kube-system \u547d\u540d\u7a7a\u95f4\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">NAME                                    READY     STATUS    RESTARTS   AGE\r\nkubernetes-dashboard-7d5dcdb6d9-6tpxv   1\/1       Running   0          1m\r\n<\/span><\/code><\/pre>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u542f\u52a8\u4ee3\u7406\u670d\u52a1\u5668\u5e76\u8fde\u63a5\u5230\u4eea\u8868\u677f\u3002<\/p>\n<p>kubectl\u4ee3\u7406<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">Starting to serve on 127.0.0.1:8001\r\n<\/span><\/code><\/pre>\n<p>\u4ece\u6d4f\u89c8\u5668\u4e0a\u8bbf\u95ee\u4eea\u8868\u677f\u65f6\uff0c\u4f1a\u663e\u793a\u5982\u4e0b\u754c\u9762\uff0c\u70b9\u51fb&#8221;\u8df3\u8fc7&#8221;\u3002<\/p>\n<p>\u5f53\u4f60\u5728\u5b9e\u9645\u8fd0\u7528\u4e2d\u4f7f\u7528\u65f6\uff0c\u4f7f\u7528\u8ba4\u8bc1\u529f\u80fd\u5728\u5b89\u5168\u6027\u4e0a\u66f4\u4e3a\u7406\u60f3\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/104-0.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2019-03-02 09.37.21.png\" \/><\/div>\n<p>\u4f1a\u5c55\u793a\u4eea\u8868\u76d8\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/106-0.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2019-04-17 19.12.27.png\" \/><\/div>\n<h4>\u83b7\u53d6\u4ee4\u724c\u7684\u65b9\u5f0f<\/h4>\n<p>\u5728\u767b\u5f55\u4eea\u8868\u677f\u65f6\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u4ee4\u724c\u8fdb\u884c\u767b\u5f55\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u65b9\u6cd5\uff1a<\/p>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u786e\u5b9a\u9ed8\u8ba4\u4ee4\u724c\u3002<\/p>\n<p>kubectl -n kube-system get secret | grep default-token\u7684\u4e2d\u6587\u539f\u751f\u91ca\u4e49\u662f\uff1a\u5728kube-system\u547d\u540d\u7a7a\u95f4\u4e2d\u83b7\u53d6\u5bc6\u94a5\u5e76\u4f7f\u7528grep\u8fc7\u6ee4\u51fadefault-token\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">default-token-fx2v4                              kubernetes.io\/service-account-token   3         52d\r\n<\/span><\/code><\/pre>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u8f93\u51fatoken\u7684\u5185\u5bb9\u3002<\/p>\n<p>\u67e5\u770bkube-system\u547d\u540d\u7a7a\u95f4\u4e0bdefault-token-fx2v4\u7684\u5bc6\u94a5\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">Name:         default-token-fx2v4\r\nNamespace:    kube-system\r\n<\/span><span class=\"gp\">Labels:       &lt;none&gt;<\/span>\r\n<span class=\"go\">Annotations:  kubernetes.io\/service-account.name=default\r\n              kubernetes.io\/service-account.uid=d9b76415-3c80-11e9-9164-025000000001\r\n\r\nType:  kubernetes.io\/service-account-token\r\n\r\nData\r\n====\r\nca.crt:     1025 bytes\r\nnamespace:  11 bytes\r\ntoken:      \uff08\u203b\uff09\u30c8\u30fc\u30af\u30f3\u306e\u5185\u5bb9\u304c\u51fa\u529b\u3055\u308c\u308b\r\n<\/span><\/code><\/pre>\n<p>\u5728\u767b\u5f55\u4eea\u8868\u677f\u65f6\uff0c\u901a\u8fc7\u6307\u5b9a\u4ee4\u724c\uff0c\u5728\u4e0a\u8ff0\u547d\u4ee4\u8f93\u51fa\u7ed3\u679c\u4e2d\u8f93\u5165\u4ee4\u724c\u5373\u53ef\u5b8c\u6210\u767b\u5f55\u3002<\/p>\n<h3>Kubernetes API \u5bf9\u8c61<\/h3>\n<p>\u6240\u6709\u5728Kubernetes\u4e0a\u7684\u8d44\u6e90\u90fd\u4ee5RESTful\u8d44\u6e90\uff08Kubernetes\u5bf9\u8c61\uff09\u6765\u8868\u793a\u3002<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0cKubernetes Deployment \u662f\u4e00\u4e2a\u80fd\u591f\u8868\u793a\u5728 Kubernetes \u96c6\u7fa4\u4e0a\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u5bf9\u8c61\u3002\u4e3a\u4e86\u64cd\u4f5c Kubernetes \u5bf9\u8c61\uff0c\u6211\u4eec\u4f7f\u7528 Kubernetes API\u3002<\/p>\n<p>Kubernetes\u7684API\u5bf9\u8c61\u53ef\u4ee5\u7528YAML\u6216JSON\u8868\u793a\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528YAML\u6216JSON\u6587\u4ef6\u901a\u8fc7API\u8fdb\u884c\u5bf9\u8c61\u7684\u521b\u5efa\u3001\u66f4\u65b0\u3001\u5220\u9664\u7b49\u64cd\u4f5c\u3002<\/p>\n<h3>Pod: \u8c46\u835a<\/h3>\n<p>Pod\u662fKubernetes\u96c6\u7fa4\u4e2d\u7684\u6700\u5c0f\u90e8\u7f72\u5355\u5143\u3002Pod\u4e2d\u7684\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528\u76f8\u540c\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u3002Pod\u7684\u914d\u7f6e\u5728Pod\u6e05\u5355\u4e2d\u8fdb\u884c\u8bb0\u5f55\u3002<\/p>\n<p>Pod\u6e05\u5355\u53ef\u4ee5\u7528YAML\u6216JSON\u7f16\u5199\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528YAML\u7f16\u5199\u7684\u65b9\u5f0f\u66f4\u5e38\u89c1\u3002\u901a\u8fc7\u4f7f\u7528\u7f29\u8fdb\u6765\u8868\u793a\u6570\u636e\u7684\u5c42\u7ea7\u7ed3\u6784\uff0cYAML\u975e\u5e38\u6613\u4e8e\u9605\u8bfb\u548c\u7f16\u5199\uff0c\u4f46\u4e5f\u662f\u90e8\u7f72\u65f6\u51fa\u73b0\u9519\u8bef\u7684\u539f\u56e0\u4e4b\u4e00\u3002<\/p>\n<p>\u5728Chinese\uff08\u4e2d\u6587\uff09\u4e2d\u6709\u591a\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5bf9\u4ee5\u4e0b\u8fdb\u884c\u8868\u8fbe\uff0c\u8fd9\u91cc\u63d0\u4f9b\u4e00\u79cd\u9009\u9879\uff1a<br \/>\nKubernetes YAML\u683c\u5f0f\u7684\u7f16\u5199\u65b9\u6cd5\u8bf7\u53c2\u8003Understanding Kubernetes Objects\u3002<\/p>\n<h4>\u64ad\u5ba2\u64cd\u4f5c<\/h4>\n<p>\u4ee5\u4e0b\u662f\u6267\u884c\u57fa\u672cPod\u64cd\u4f5c\u7684\u547d\u4ee4\uff0c\u4ee5kuard\u4e3a\u4f8b\u3002<\/p>\n<p>\u5728kubectl\u547d\u4ee4\u7684\u53c2\u6570\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528&#8221;pod&#8221;\u6216&#8221;pods&#8221;\u6765\u6307\u5b9a\u8d44\u6e90\u7c7b\u578b\uff0c\u4e5f\u53ef\u4ee5\u7f29\u5199\u4e3a&#8221;po&#8221;\u6765\u6307\u5b9a\u3002<\/p>\n<ul class=\"post-ul\">kuard-pod.yaml<\/ul>\n<pre class=\"post-pre\"><code><span class=\"na\">apiVersion<\/span><span class=\"pi\">:<\/span> <span class=\"s\">v1<\/span>\r\n<span class=\"na\">kind<\/span><span class=\"pi\">:<\/span> <span class=\"s\">Pod<\/span>\r\n<span class=\"na\">metadata<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">kuard<\/span>\r\n<span class=\"na\">spec<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">containers<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">kuard<\/span>\r\n      <span class=\"na\">image<\/span><span class=\"pi\">:<\/span> <span class=\"s\">gcr.io\/kuar-demo\/kuard-amd64:1<\/span>\r\n      <span class=\"na\">ports<\/span><span class=\"pi\">:<\/span>\r\n        <span class=\"pi\">-<\/span> <span class=\"na\">containerPort<\/span><span class=\"pi\">:<\/span> <span class=\"m\">8080<\/span>\r\n          <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">echo<\/span>\r\n          <span class=\"na\">protocol<\/span><span class=\"pi\">:<\/span> <span class=\"s\">TCP<\/span>\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl apply -f kuard-pod.yaml<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">pod \"kuard\" created\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Pod\u306e\u4e00\u89a7\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get pod<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">NAME                READY     STATUS    RESTARTS   AGE\r\nkuard               1\/1       Running   0          5s\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Pod\u306e\u8a73\u7d30\u60c5\u5831\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl describe pod kuard<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">Name:         kuard\r\nNamespace:    default\r\nNode:         docker-for-desktop\/192.168.65.3\r\nStart Time:   Sun, 21 Apr 2019 20:41:37 +0900\r\n<\/span><span class=\"gp\">Labels:       &lt;none&gt;<\/span>\r\n<span class=\"go\">Annotations:  kubectl.kubernetes.io\/last-applied-configuration={\"apiVersion\":\"v1\",\"kind\":\"Pod\",\"metadata\":{\"annotations\":{},\"name\":\"kuard\",\"namespace\":\"default\"},\"spec\":{\"containers\":[{\"image\":\"gcr.io\/kuar-demo\/kua...\r\nStatus:       Running\r\nIP:           10.1.0.65\r\nContainers:\r\n  kuard:\r\n    Container ID:   docker:\/\/c5440df7d9eec2b10aa77baf29fe690597a98d68681d4ea49d1ee075745d5f78\r\n    Image:          gcr.io\/kuar-demo\/kuard-amd64:1\r\n    Image ID:       docker-pullable:\/\/gcr.io\/kuar-demo\/kuard-amd64@sha256:bd17153e9a3319f401acc7a27759243f37d422c06cbbf01cb3e1f54bbbfe14f4\r\n    Port:           8080\/TCP\r\n    Host Port:      0\/TCP\r\n    State:          Running\r\n      Started:      Sun, 21 Apr 2019 20:41:39 +0900\r\n    Ready:          True\r\n    Restart Count:  0\r\n<\/span><span class=\"gp\">    Environment:    &lt;none&gt;<\/span>\r\n<span class=\"go\">    Mounts:\r\n      \/var\/run\/secrets\/kubernetes.io\/serviceaccount from default-token-vgzn7 (ro)\r\nConditions:\r\n  Type           Status\r\n  Initialized    True \r\n  Ready          True \r\n  PodScheduled   True \r\nVolumes:\r\n  default-token-vgzn7:\r\n    Type:        Secret (a volume populated by a Secret)\r\n    SecretName:  default-token-vgzn7\r\n    Optional:    false\r\nQoS Class:       BestEffort\r\n<\/span><span class=\"gp\">Node-Selectors:  &lt;none&gt;<\/span>\r\n<span class=\"go\">Tolerations:     node.kubernetes.io\/not-ready:NoExecute for 300s\r\n                 node.kubernetes.io\/unreachable:NoExecute for 300s\r\nEvents:\r\n  Type    Reason                 Age   From                         Message\r\n  ----    ------                 ----  ----                         -------\r\n  Normal  Scheduled              41s   default-scheduler            Successfully assigned kuard to docker-for-desktop\r\n  Normal  SuccessfulMountVolume  41s   kubelet, docker-for-desktop  MountVolume.SetUp succeeded for volume \"default-token-vgzn7\"\r\n  Normal  Pulled                 40s   kubelet, docker-for-desktop  Container image \"gcr.io\/kuar-demo\/kuard-amd64:1\" already present on machine\r\n  Normal  Created                39s   kubelet, docker-for-desktop  Created container\r\n  Normal  Started                39s   kubelet, docker-for-desktop  Started container\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Pod\u306e\u524a\u9664<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">kubectl delete pod\/kuard<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl delete -f kuard-pod.yaml<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">pod \"kuard\" deleted\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30ed\u30b0\u53d6\u5f97<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl logs kuard<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">2019\/04\/23 09:10:58 Starting kuard version: v0.8.1-1\r\n2019\/04\/23 09:10:58 **********************************************************************\r\n2019\/04\/23 09:10:58 * WARNING: This server may expose sensitive\r\n2019\/04\/23 09:10:58 * and secret information. Be careful.\r\n2019\/04\/23 09:10:58 **********************************************************************\r\n2019\/04\/23 09:10:58 Config: \r\n{\r\n  \"address\": \":8080\",\r\n  \"debug\": false,\r\n  \"debug-sitedata-dir\": \".\/sitedata\",\r\n  \"keygen\": {\r\n    \"enable\": false,\r\n    \"exit-code\": 0,\r\n    \"exit-on-complete\": false,\r\n    \"memq-queue\": \"\",\r\n    \"memq-server\": \"\",\r\n    \"num-to-gen\": 0,\r\n    \"time-to-run\": 0\r\n  },\r\n  \"liveness\": {\r\n    \"fail-next\": 0\r\n  },\r\n  \"readiness\": {\r\n    \"fail-next\": 0\r\n  },\r\n  \"tls-address\": \":8443\",\r\n  \"tls-dir\": \"\/tls\"\r\n}\r\n2019\/04\/23 09:10:58 Could not find certificates to serve TLS\r\n2019\/04\/23 09:10:58 Serving on HTTP on :8080\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b3\u30f3\u30c6\u30ca\u63a5\u7d9a\uff08\u5bfe\u8a71\u7684\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">kubectl exec -it kuard ash<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c9<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl port-forward kuard 8080:8080<\/ul>\n<h3>\u590d\u5236\u96c6<\/h3>\n<p>&#8220;\u30ec\u30d7\u30ea\u30ab&#8221;\u3068\u3044\u3046\u8a00\u8449\u306f\u3001\u8907\u88fd\u3092\u6307\u3059\u610f\u5473\u3067\u3059\u3002<br \/>\n\u5728Kubernetes\u96c6\u7fa4\u4e2d\uff0cReplicaSet\u4f1a\u590d\u5236Pod\u3002<br \/>\n\u6839\u636eReplicaSet\u6e05\u5355\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684replicas\u503c\uff0c\u8fdb\u884cPod\u7684\u590d\u5236\u3002<\/p>\n<p>(\u203b)\u65e2\u306bPod\u304c\u8d77\u52d5\u3057\u3066\u3044\u3066\u3001\u4e0d\u8db3\u3057\u3066\u3044\u308c\u3070\u305d\u306e\u5206Pod\u3092\u8907\u88fd\u3057\u307e\u3059\u3002\u591a\u3044\u5834\u5408\u306bReplicaSet\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u9069\u7528\u3059\u308b\u3068\u3001\u305d\u306e\u5206\u524a\u9664\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>\u590d\u5236\u96c6\u64cd\u4f5c<\/h4>\n<p>kuard\u3092\u4f8b\u306b\u3001\u57fa\u672c\u7684\u306aReplicaSet\u64cd\u4f5c\u3092\u884c\u3046\u30b3\u30de\u30f3\u30c9\u3092\u4ee5\u4e0b\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<p>\u5728kubectl\u547d\u4ee4\u7684\u53c2\u6570\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528&#8221;replicaset&#8221;\u6216&#8221;replicasets&#8221;\u6765\u6307\u5b9a\u8d44\u6e90\u7c7b\u578b\u8fdb\u884c\u6267\u884c\u3002\u540c\u6837\u5730\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528&#8221;rs&#8221;\u4f5c\u4e3a\u7f29\u5199\u8fdb\u884c\u6307\u5b9a\u3002<\/p>\n<ul class=\"post-ul\">kuard-rs.yaml<\/ul>\n<pre class=\"post-pre\"><code><span class=\"na\">apiVersion<\/span><span class=\"pi\">:<\/span> <span class=\"s\">extensions\/v1beta1<\/span>\r\n<span class=\"na\">kind<\/span><span class=\"pi\">:<\/span> <span class=\"s\">ReplicaSet<\/span>\r\n<span class=\"na\">metadata<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">kuard<\/span>\r\n<span class=\"na\">spec<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">replicas<\/span><span class=\"pi\">:<\/span> <span class=\"m\">1<\/span>\r\n  <span class=\"na\">template<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"na\">metadata<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"na\">labels<\/span><span class=\"pi\">:<\/span>\r\n        <span class=\"na\">app<\/span><span class=\"pi\">:<\/span> <span class=\"s\">kuard<\/span>\r\n        <span class=\"na\">version<\/span><span class=\"pi\">:<\/span> <span class=\"s2\">\"<\/span><span class=\"s\">2\"<\/span>\r\n    <span class=\"na\">spec<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"na\">containers<\/span><span class=\"pi\">:<\/span>\r\n        <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">kuard<\/span>\r\n          <span class=\"na\">image<\/span><span class=\"pi\">:<\/span> <span class=\"s\">gcr.io\/kuar-demo\/kuard-amd64:2<\/span>\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ReplicaSet\u306e\u4f5c\u6210<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl apply -f kuard-rs.yaml<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">replicaset.extensions \"kuard\" created\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ReplicaSet\u306e\u4e00\u89a7\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get replicaset<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">NAME      DESIRED   CURRENT   READY     AGE\r\nkuard     1         1         1         6s```\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ReplicaSet\u306e\u8a73\u7d30\u60c5\u5831\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl describe rs kuard<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">Name:         kuard\r\nNamespace:    default\r\nSelector:     app=kuard,version=2\r\nLabels:       app=kuard\r\n              version=2\r\nAnnotations:  kubectl.kubernetes.io\/last-applied-configuration={\"apiVersion\":\"extensions\/v1beta1\",\"kind\":\"ReplicaSet\",\"metadata\":{\"annotations\":{},\"name\":\"kuard\",\"namespace\":\"default\"},\"spec\":{\"replicas\":1,\"templat...\r\nReplicas:     1 current \/ 1 desired\r\nPods Status:  1 Running \/ 0 Waiting \/ 0 Succeeded \/ 0 Failed\r\nPod Template:\r\n  Labels:  app=kuard\r\n           version=2\r\n  Containers:\r\n   kuard:\r\n    Image:        gcr.io\/kuar-demo\/kuard-amd64:2\r\n<\/span><span class=\"gp\">    Port:         &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Host Port:    &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Environment:  &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Mounts:       &lt;none&gt;<\/span>\r\n<span class=\"gp\">  Volumes:        &lt;none&gt;<\/span>\r\n<span class=\"go\">Events:\r\n  Type    Reason            Age   From                   Message\r\n  ----    ------            ----  ----                   -------\r\n  Normal  SuccessfulCreate  1m    replicaset-controller  Created pod: kuard-d65gb\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ReplicaSet\u306e\u30b9\u30b1\u30fc\u30eb<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl scale replicasets kuard &#8211;replicas=4<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">replicaset.extensions \"kuard\" scaled\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ReplicaSet\u306e\u524a\u9664<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl delete rs kuard<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">replicaset.extensions \"kuard\" deleted\r\n<\/span><\/code><\/pre>\n<h3>\u670d\u52a1 (f\u00fa w\u00f9)<\/h3>\n<p>Service\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u30c7\u30a3\u30b9\u30ab\u30d0\u30ea\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<br \/>\n\u30b5\u30fc\u30d3\u30b9\u30c7\u30a3\u30b9\u30ab\u30d0\u30ea\u3068\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u4e0a\u306e\u30a4\u30f3\u30d5\u30e9\u306b\u304a\u3051\u308b\u30b5\u30fc\u30d3\u30b9\u306e\u554f\u984c\u3092\u691c\u51fa\u3059\u308b\u3068\u8a00\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u30b5\u30fc\u30d3\u30b9\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u306b\u30b7\u30b9\u30c6\u30e0\u969c\u5bb3\u304c\u8d77\u304d\u3066\u505c\u6b62\u3057\u305f\u5834\u5408\u3001\u969c\u5bb3\u304c\u767a\u751f\u3057\u305f\u30b3\u30f3\u30c6\u30ca\uff08Pod\uff09\u306b\u5bfe\u3059\u308b\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ed6\u306b\u3082\u3001\u4f55\u3089\u304b\u306e\u30b7\u30b9\u30c6\u30e0\u969c\u5bb3\u767a\u751f\u6642\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u76e3\u8996\u306b\u3088\u308b\u691c\u77e5\u3067DNS\u30ec\u30b3\u30fc\u30c9\u3092\u66f4\u65b0\u3057\u305f\u308a\u3057\u3066\u3001DNS\u3067\u30b5\u30fc\u30d3\u30b9\u306e\u30c7\u30a3\u30b9\u30ab\u30d0\u30ea\u304c\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ed5\u7d44\u307f\u3068\u3057\u3066\u3001\u5404Pod\u306b\u306f\u56fa\u6709\u306eIP\u30a2\u30c9\u30ec\u30b9\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u308c\u3089\u306eIP\u306fService\u306a\u3057\u3067\u306f\u30af\u30e9\u30b9\u30bf\u306e\u5916\u90e8\u306b\u516c\u958b\u3055\u308c\u307e\u305b\u3093\u3002Service\u306b\u3088\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u53d7\u4fe1\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>ClusterIP<\/h4>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u3001ClusterIP\u306b\u306a\u308a\u307e\u3059\u3002ClusterIP\u306f\u30af\u30e9\u30b9\u30bf\u5185\u306e\u5185\u90e8\u306b\u30b5\u30fc\u30d3\u30b9\u3092\u516c\u958b\u3067\u304d\u307e\u3059\u3002ClusterIP\u306b\u3088\u308a\u3001\u30af\u30e9\u30b9\u30bf\u5185\u306ePod\u9593\u901a\u4fe1\u306fService\u3092\u4ecb\u3057\u3066\u884c\u3046\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u5916\u90e8\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<h4>\u8282\u70b9\u7aef\u53e3<\/h4>\n<p>\u4f7f\u7528\u7f51\u7edc\u5730\u5740\u8f6c\u6362\uff08NAT\uff09\u53ef\u4ee5\u4f7f\u5916\u90e8\u8bbf\u95ee\u96c6\u7fa4\u6210\u4e3a\u53ef\u80fd\u3002<\/p>\n<h4>\u8d1f\u8f7d\u5747\u8861\u5668<\/h4>\n<p>\u901a\u5e38\u4e0e\u4e91\u670d\u52a1\u63d0\u4f9b\u7684\u8d1f\u8f7d\u5747\u8861\u5668\u914d\u5408\u4f7f\u7528\u3002\u5982\u679c\u652f\u6301\u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u5219\u53ef\u4ee5\u4e3a\u670d\u52a1\u5206\u914d\u56fa\u5b9a\u7684\u5916\u90e8IP\u3002<\/p>\n<h4>ExternalName<\/h4>\n<p>\u30af\u30e9\u30b9\u30bf\u5185\u304b\u3089\u5916\u90e8\u306e\u30db\u30b9\u30c8\u306e\u540d\u524d\u89e3\u6c7a\u3092\u884c\u3046\u305f\u3081\u306e\u30a8\u30a4\u30ea\u30a2\u30b9\uff08CNAME record\uff09\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u306a\u304a\u3001\u672c\u6a5f\u80fd\u306fkube-dns v1.7\u4ee5\u4e0a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u8fdb\u53e3<\/h3>\n<p>Kubernetes v1.1\u5f15\u5165\u7684Ingress\u529f\u80fd\u5141\u8bb8\u4ece\u96c6\u7fa4\u5916\u90e8\u516c\u5f00HTTP\u548cHTTPS\u901a\u4fe1\u5230\u96c6\u7fa4\u5185\u7684Service\u3002<\/p>\n<h3>\u5de5\u4f5c<\/h3>\n<p>Job\u9002\u7528\u4e8e\u6279\u5904\u7406\u7b49\u4efb\u52a1\uff0c\u56e0\u4e3a\u5b83\u4f1a\u91cd\u590d\u521b\u5efaPod\u76f4\u5230\u6307\u5b9a\u6570\u91cf\u7684Pod\u6210\u529f\u5904\u7406\u5b8c\u6bd5\u3002<\/p>\n<h3>\u914d\u7f6e\u6620\u5c04<\/h3>\n<p>\u5728\u5bb9\u5668\u5316\u8fd0\u8425\u4e2d\uff0c\u91cd\u8981\u7684\u662f\u5728\u4e0d\u635f\u5931\u5bb9\u5668\u7279\u6027\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u8fd0\u8425\u3002\u4f8b\u5982\uff0c\u4e3a\u4e86\u4fee\u6539\u5177\u6709Web\u670d\u52a1\u5668\u529f\u80fd\u7684\u5bb9\u5668\u7684\u8bbe\u7f6e\uff0c\u66f4\u6539Nginx\u7684\u914d\u7f6e\u6587\u4ef6\u4f1a\u964d\u4f4e\u5176\u53ef\u79fb\u690d\u6027\u3002\u901a\u8fc7\u4f7f\u7528\u73af\u5883\u53d8\u91cf\uff0c\u53ef\u4ee5\u66f4\u5bb9\u6613\u5730\u8fdb\u884c\u8c03\u6574\u3002\u5173\u4e8e\u73af\u5883\u53d8\u91cf\u7684\u96c6\u6210\u6709\u5f88\u591a\u65b9\u6cd5\uff0c\u4f46Kubernetes\u63d0\u4f9b\u4e86\u4e00\u4e2a\u65b9\u4fbf\u7684\u529f\u80fd\u53ebConfigMap\u3002<\/p>\n<h4>ConfigMap\u7684\u64cd\u4f5c<\/h4>\n<p>\u4ee5\u4e0b\u662f\u57fa\u672c\u7684ConfigMap\u64cd\u4f5c\u547d\u4ee4\uff0c\u4ee5kuard\u4e3a\u4f8b\uff1a<\/p>\n<ul class=\"post-ul\">my-config.txt<\/ul>\n<pre class=\"post-pre\"><code>parameter1 = value1\r\nparameter2 = value2\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ConfigMap\u306e\u4f5c\u6210<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl create configmap my-config &#8211;from-file=my-config.txt &#8211;from-literal=extra-param=extra-value &#8211;from-literal=another-param=another-value<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">configmap \"my-config\" created\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ConfigMap\u306e\u4e00\u89a7\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get configmap<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">NAME        DATA      AGE\r\nmy-config   3         2d\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ConfigMap\u306e\u8a73\u7d30\u60c5\u5831\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get configmap my-config -o yaml<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">apiVersion: v1\r\ndata:\r\n  another-param: another-value\r\n  extra-param: extra-value\r\n  my-config.txt: |\r\n    parameter1 = value1\r\n    parameter2 = value2\r\nkind: ConfigMap\r\nmetadata:\r\n  creationTimestamp: 2019-04-25T06:23:43Z\r\n  name: my-config\r\n  namespace: default\r\n  resourceVersion: \"1030540\"\r\n  selfLink: \/api\/v1\/namespaces\/default\/configmaps\/my-config\r\n  uid: ac8694d8-6722-11e9-97d1-025000000001\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ConfigMap\u306e\u524a\u9664<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl delete configmap my-config<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">configmap \"my-config\" deleted\r\n<\/span><\/code><\/pre>\n<h3>\u90e8\u7f72<\/h3>\n<p>Deployment\u662f\u4e00\u4e2a\u80fd\u591f\u5728Kubernetes\u96c6\u7fa4\u4e0a\u5bf9\u90e8\u7f72\u7684\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u7248\u672c\u7ba1\u7406\u7684\u5bf9\u8c61\u3002\u901a\u8fc7Deployment\uff0c\u53ef\u4ee5\u5728\u4e0d\u4ea7\u751f\u505c\u673a\u65f6\u95f4\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u5e94\u7528\u7a0b\u5e8f\u7248\u672c\u7684\u5207\u6362\u3002\u6b64\u5916\uff0cDeployment\u8fd8\u8d1f\u8d23\u7ba1\u7406ReplicaSet\u3002<\/p>\n<h4>\u90e8\u7f72\u64cd\u4f5c<\/h4>\n<p>\u4ee5\u4e0b\u662f\u6267\u884c\u57fa\u672c\u7684\u90e8\u7f72\u64cd\u4f5c\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u5728kubectl\u547d\u4ee4\u7684\u53c2\u6570\u4e2d\u6307\u5b9a\u7684\u8d44\u6e90\u7c7b\u578b\u53ef\u4ee5\u662f&#8221;deployment&#8221;\u6216&#8221;deployments&#8221;\uff0c\u4e24\u8005\u90fd\u53ef\u4ee5\u6267\u884c\u3002\u6b64\u5916\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528&#8221;deploy&#8221;\u8fdb\u884c\u7f29\u5199\u6307\u5b9a\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">run\u30b3\u30de\u30f3\u30c9\u3067\u30c7\u30d7\u30ed\u30a4<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl run nginx &#8211;image=nginx:1.7.12<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">kubectl run nginx --image=nginx:1.7.12\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Deployment\u306e\u4e00\u89a7\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get deployment<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">kAME      DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE\r\nnginx     1         1         1            1           52s\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Deployment\u306e\u8a73\u7d30\u60c5\u5831\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl describe deployment nginx<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">dName:                   nginx\r\nNamespace:              default\r\nCreationTimestamp:      Sat, 27 Apr 2019 16:13:52 +0900\r\nLabels:                 run=nginx\r\nAnnotations:            deployment.kubernetes.io\/revision=1\r\nSelector:               run=nginx\r\nReplicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable\r\nStrategyType:           RollingUpdate\r\nMinReadySeconds:        0\r\nRollingUpdateStrategy:  1 max unavailable, 1 max surge\r\nPod Template:\r\n  Labels:  run=nginx\r\n  Containers:\r\n   nginx:\r\n    Image:        nginx:1.7.12\r\n<\/span><span class=\"gp\">    Port:         &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Host Port:    &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Environment:  &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Mounts:       &lt;none&gt;<\/span>\r\n<span class=\"gp\">  Volumes:        &lt;none&gt;<\/span>\r\n<span class=\"go\">Conditions:\r\n  Type           Status  Reason\r\n  ----           ------  ------\r\n  Available      True    MinimumReplicasAvailable\r\n  Progressing    True    NewReplicaSetAvailable\r\n<\/span><span class=\"gp\">OldReplicaSets:  &lt;none&gt;<\/span>\r\n<span class=\"go\">NewReplicaSet:   nginx-7d9bf79f9b (1\/1 replicas created)\r\nEvents:\r\n  Type    Reason             Age   From                   Message\r\n  ----    ------             ----  ----                   -------\r\n  Normal  ScalingReplicaSet  29s   deployment-controller  Scaled up replica set nginx-7d9bf79f9b to 1\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Deployment\u306e\u30b9\u30b1\u30fc\u30eb<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl scale deployment nginx &#8211;replicas=2<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">deployment.extensions \"nginx\" scaled\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Deployment\u306e\u524a\u9664<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl delete deployment nginx<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">deployment.extensions \"nginx\" deleted\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Deployment\u306e\u4f5c\u6210<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">kubectl get deployment nginx &#8211;export -o yaml &gt; nginx-deployments.yaml<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">nginx-deployments.yaml<\/ul>\n<pre class=\"post-pre\"><code><span class=\"na\">apiVersion<\/span><span class=\"pi\">:<\/span> <span class=\"s\">extensions\/v1beta1<\/span>\r\n<span class=\"na\">kind<\/span><span class=\"pi\">:<\/span> <span class=\"s\">Deployment<\/span>\r\n<span class=\"na\">metadata<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">annotations<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"s\">deployment.kubernetes.io\/revision<\/span><span class=\"pi\">:<\/span> <span class=\"s2\">\"<\/span><span class=\"s\">1\"<\/span>\r\n  <span class=\"na\">creationTimestamp<\/span><span class=\"pi\">:<\/span> <span class=\"no\">null<\/span>\r\n  <span class=\"na\">generation<\/span><span class=\"pi\">:<\/span> <span class=\"m\">1<\/span>\r\n  <span class=\"na\">labels<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"na\">run<\/span><span class=\"pi\">:<\/span> <span class=\"s\">nginx<\/span>\r\n  <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">nginx<\/span>\r\n  <span class=\"na\">selfLink<\/span><span class=\"pi\">:<\/span> <span class=\"s\">\/apis\/extensions\/v1beta1\/namespaces\/default\/deployments\/nginx<\/span>\r\n<span class=\"na\">spec<\/span><span class=\"pi\">:<\/span>\r\n  <span class=\"na\">progressDeadlineSeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">600<\/span>\r\n  <span class=\"na\">replicas<\/span><span class=\"pi\">:<\/span> <span class=\"m\">1<\/span>\r\n  <span class=\"na\">revisionHistoryLimit<\/span><span class=\"pi\">:<\/span> <span class=\"m\">10<\/span>\r\n  <span class=\"na\">selector<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"na\">matchLabels<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"na\">run<\/span><span class=\"pi\">:<\/span> <span class=\"s\">nginx<\/span>\r\n  <span class=\"na\">strategy<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"na\">rollingUpdate<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"na\">maxSurge<\/span><span class=\"pi\">:<\/span> <span class=\"m\">1<\/span>\r\n      <span class=\"na\">maxUnavailable<\/span><span class=\"pi\">:<\/span> <span class=\"m\">1<\/span>\r\n    <span class=\"na\">type<\/span><span class=\"pi\">:<\/span> <span class=\"s\">RollingUpdate<\/span>\r\n  <span class=\"na\">template<\/span><span class=\"pi\">:<\/span>\r\n    <span class=\"na\">metadata<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"na\">creationTimestamp<\/span><span class=\"pi\">:<\/span> <span class=\"no\">null<\/span>\r\n      <span class=\"na\">labels<\/span><span class=\"pi\">:<\/span>\r\n        <span class=\"na\">run<\/span><span class=\"pi\">:<\/span> <span class=\"s\">nginx<\/span>\r\n    <span class=\"na\">spec<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"na\">containers<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"pi\">-<\/span> <span class=\"na\">image<\/span><span class=\"pi\">:<\/span> <span class=\"s\">nginx:1.7.12<\/span>\r\n        <span class=\"na\">imagePullPolicy<\/span><span class=\"pi\">:<\/span> <span class=\"s\">IfNotPresent<\/span>\r\n        <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">nginx<\/span>\r\n        <span class=\"na\">resources<\/span><span class=\"pi\">:<\/span> <span class=\"pi\">{}<\/span>\r\n        <span class=\"na\">terminationMessagePath<\/span><span class=\"pi\">:<\/span> <span class=\"s\">\/dev\/termination-log<\/span>\r\n        <span class=\"na\">terminationMessagePolicy<\/span><span class=\"pi\">:<\/span> <span class=\"s\">File<\/span>\r\n      <span class=\"na\">dnsPolicy<\/span><span class=\"pi\">:<\/span> <span class=\"s\">ClusterFirst<\/span>\r\n      <span class=\"na\">restartPolicy<\/span><span class=\"pi\">:<\/span> <span class=\"s\">Always<\/span>\r\n      <span class=\"na\">schedulerName<\/span><span class=\"pi\">:<\/span> <span class=\"s\">default-scheduler<\/span>\r\n      <span class=\"na\">securityContext<\/span><span class=\"pi\">:<\/span> <span class=\"pi\">{}<\/span>\r\n      <span class=\"na\">terminationGracePeriodSeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">30<\/span>\r\n<span class=\"na\">status<\/span><span class=\"pi\">:<\/span> <span class=\"pi\">{}<\/span>\r\n<\/code><\/pre>\n<p>\u5982\u679c\u8981\u4ee5\u58f0\u660e\u65b9\u5f0f\u7ba1\u7406Deployment\u800c\u4e0d\u662f\u4f7f\u7528kubectl scale\u547d\u4ee4\uff0c\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539YAML\u6587\u4ef6\u4e2d\u7684\u526f\u672c\u6570\u91cf\uff0c\u5e76\u4f7f\u7528kubectl apply\u547d\u4ee4\u6765\u66f4\u65b0Deployment\u3002\u540c\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539\u5bb9\u5668\u6620\u50cf\u90e8\u5206\u6765\u5b9e\u73b0\u65b0\u7248\u672c\u7684\u6eda\u52a8\u66f4\u65b0\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30ed\u30fc\u30eb\u30a2\u30a6\u30c8\u306e\u72b6\u614b\u78ba\u8a8d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl rollout status deployment nginx<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">deployment \"nginx\" successfully rolled out\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Deployment\u304c\u7ba1\u7406\u3057\u3066\u3044\u308bReplicaSets\u306e\u30a4\u30e1\u30fc\u30b8\u78ba\u8a8d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl get replicasets -o wide<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">NAME               DESIRED   CURRENT   READY     AGE       CONTAINERS   IMAGES                                             SELECTOR\r\nnginx-784d96dbff   1         1         1         1m        nginx        nginx:1.9.10                                       pod-template-hash=3408528699,run=nginx\r\nnginx-7d9bf79f9b   0         0         0         35m       nginx        nginx:1.7.12                                       pod-template-hash=3856935956,run=nginx\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30ed\u30fc\u30eb\u30a2\u30a6\u30c8\u5c65\u6b74<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl rollout history deployment nginx<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">deployments \"nginx\"\r\nREVISION  CHANGE-CAUSE\r\n<\/span><span class=\"gp\">1         &lt;none&gt;<\/span>\r\n<span class=\"go\">2         Update nginx to 1.9.10\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u30ea\u30d3\u30b8\u30e7\u30f3\u306e\u8a73\u7d30\u60c5\u5831\u8868\u793a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl rollout history deployment nginx &#8211;revision=2<\/ul>\n<pre class=\"post-pre\"><code><span class=\"gp\">deployments \"nginx\" with revision #<\/span>2\r\n<span class=\"go\">Pod Template:\r\n  Labels:   pod-template-hash=3408528699\r\n    run=nginx\r\n  Annotations:  kubernetes.io\/change-cause=Update nginx to 1.9.10\r\n  Containers:\r\n   nginx:\r\n    Image:  nginx:1.9.10\r\n<\/span><span class=\"gp\">    Port:   &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Host Port:  &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Environment:    &lt;none&gt;<\/span>\r\n<span class=\"gp\">    Mounts: &lt;none&gt;<\/span>\r\n<span class=\"gp\">  Volumes:  &lt;none&gt;<\/span>\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30ed\u30fc\u30eb\u30d0\u30c3\u30af<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl rollout undo deployment nginx<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">deployment.apps \"nginx\"\r\n<\/span><\/code><\/pre>\n<h3>\u6301\u4e45\u6027\u5377 (ch\u00ed ji\u01d4<\/h3>\n<p>Kubernetes\u6709\u4e24\u79cd\u65b9\u6cd5\u6765\u4e3a\u5b58\u50a8\u8fdb\u884c\u914d\u7f6e\uff0c\u9759\u6001\u548c\u52a8\u6001\u3002<\/p>\n<p>\u6301\u4e45\u5377\u662f\u4e3a\u4e86\u7ba1\u7406\u72ec\u7acb\u7684\u6c38\u4e45\u6570\u636e\u800c\u9759\u6001\u63d0\u4f9b\u7684\u673a\u5236\uff0c\u4e0e\u5bb9\u5668\u5206\u5f00\u3002\u6b64\u5916\uff0c\u5728Kubernetes\u4e2d\uff0c\u5b83\u8fd8\u652f\u6301NFS\u3001iSCSI\u548c\u4e91\u670d\u52a1\u63d0\u4f9b\u5546\u7279\u5b9a\u7684\u5b58\u50a8\u7cfb\u7edf\u3002<\/p>\n<p>\u6709\u5173Persistent Volumes\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u8bf7\u53c2\u8003\u201c\u4e3aPod\u914d\u7f6e\u4f7f\u7528PersistentVolume\u8fdb\u884c\u5b58\u50a8\u201d\u3002<\/p>\n<h4>\u6301\u4e45\u5377\u7d22\u53d6<\/h4>\n<p>\u521b\u5efa\u6c38\u4e45\u5377\u540e\uff0c\u8fd8\u9700\u8981\u521b\u5efa\u6c38\u4e45\u5377\u7533\u8bf7\u3002<br \/>\n\u901a\u8fc7\u4f7f\u7528\u6c38\u4e45\u5377\uff0c\u53ef\u4ee5\u8fdb\u884c\u903b\u8f91\u5b58\u50a8\u5206\u914d\uff0c\u5e76\u5141\u8bb8Pod\u8bf7\u6c42\u8bbf\u95ee\u5b58\u50a8\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u901a\u8fc7\u4f7f\u7528StorageClasses\u5bf9\u8c61\uff0c\u53ef\u4ee5\u5b9e\u73b0\u52a8\u6001\u5377\u5206\u914d\u3002<\/p>\n<p>\u6709\u5173\u6301\u4e45\u6027\u5377\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003\u6301\u4e45\u5377\u3002<\/p>\n<h2>\u9519\u8bef\u65f6\u7684\u8981\u70b9<\/h2>\n<p>\u4ee5\u4e0b\u662f\u6211\u5728\u64b0\u5199\u672c\u6587\u65f6\u9047\u5230\u7684\u9519\u8bef\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Pod\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u5834\u5408\uff08\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30db\u30b9\u30c8\u306eFW\u3084\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30bd\u30d5\u30c8\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u4f8b\u3068\u3057\u3066\u3001\u30a6\u30a4\u30eb\u30b9\u5bfe\u7b56\u30bd\u30d5\u30c8\u306b\u3088\u308a\u30dd\u30fc\u30c8\u901a\u4fe1\u304c\u906e\u65ad\u3055\u308c\u308b\u3053\u3068\u306f\u3088\u304f\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ConfigMap\u3092\u4f7f\u7528\u3057\u3066\u3001Pod\u304c\u4f5c\u6210\u3067\u304d\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl describe pod \u30dd\u30c3\u30c9\u540d\u306e\u51fa\u529b\u7d50\u679c\u3088\u308a\u3001\u300cEvents\u300d\u3092\u898b\u3066\u3001\u300cError: Couldn&#8217;t find key \u74b0\u5883\u5909\u6570 in ConfigMap \u300d\u306e\u30ed\u30b0\u304c\u51fa\u529b\u3055\u308c\u3066\u3044\u305f\u3089\u3001ConfigMap\u306e\u74b0\u5883\u5909\u6570\u306b\u8b1d\u308a\u304c\u3042\u308a\u307e\u3059\u3002ConfigMap\u306e\u74b0\u5883\u5909\u6570\u304c\u6b63\u3057\u3044\u304b\u898b\u76f4\u3057\u307e\u3057\u3087\u3046\u3002<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">Warning  Failed                 4m (x7 over 5m)    kubelet, docker-for-desktop  Error: Couldn't find key extra-param in ConfigMap default\/my-config\r\n<\/span><\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">StatefulSet\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001MongoDB\u306ePod\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u539f\u56e0\u306f\u3001YAML\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u300cspec\u300d-\u300cserviceName\u300d\u3067\u5927\u6587\u5b57\u3092\u4f7f\u7528\u3057\u3066\u3044\u305f\u305f\u3081\u3002<\/ul>\n<pre class=\"post-pre\"><code><span class=\"go\">Events:\r\n  Type     Reason        Age               From                    Message\r\n  ----     ------        ----              ----                    -------\r\n  Warning  FailedCreate  3s (x10 over 5s)  statefulset-controller  create Pod mongo-0 in StatefulSet mongo failed error: Pod \"mongo-0\" is invalid: spec.subdomain: Invalid value: \"Mongo\": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')\r\n<\/span><\/code><\/pre>\n<h1>\u6700\u540e<\/h1>\n<p>\u5728\u6210\u4e3aDevOps\u5de5\u7a0b\u5e08\uff08\u203b\uff09\u7684\u8fc7\u7a0b\u4e2d\uff0c\u638c\u63e1Kubernetes\u662f\u81f3\u5173\u91cd\u8981\u7684\u6280\u80fd\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u8981\u8fdb\u4e00\u6b65\u7406\u89e3Kubernetes\uff0c\u8fd8\u9700\u8981\u638c\u63e1\u5bb9\u5668\u5316\u865a\u62df\u5316\u6280\u672f\u548cLinux\u7b49\u77e5\u8bc6\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u3002<\/p>\n<p>Kubernetes\u306f\u6df1\u6df5\u306e\u6d77\u306e\u3088\u3046\u306b\u7bc4\u56f2\u304c\u5e83\u304f\u6df1\u3044\u305f\u3081\u3001\u5b66\u7fd2\u30b3\u30b9\u30c8\u306f\u9ad8\u3044\u3067\u3059\u304c\u3001\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u306e\u30a4\u30f3\u30d5\u30e9\u7d4c\u9a13\u3092\u6d3b\u304b\u3057\u3066\u30b9\u30c6\u30c3\u30d7\u30a2\u30c3\u30d7\u3059\u308b\u3053\u3068\u306f\u5341\u5206\u306b\u53ef\u80fd\u3067\u3059\u3002\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2\u304b\u3089DevOps\u30a8\u30f3\u30b8\u30cb\u30a2\u3078\u306e\u968e\u6bb5\u3092\u767b\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5728\u65e5\u672c\uff0c\u6240\u8b02\u7684\u57fa\u790e\u8a2d\u65bd\u5de5\u7a0b\u5e2b\u5305\u62ec\u672c\u5730\u4f3a\u670d\u5668\uff08\u64cd\u4f5c\u7cfb\u7d71\/\u4e2d\u9593\u4ef6\uff09\u548c\u7db2\u8def\u7b49\u5ee3\u6cdb\u7684\u7bc4\u7587\u3002\u4f46\u662f\uff0c\u4ed6\u5011\u4e5f\u501f\u9452\u6d77\u5916\u7684\u958b\u767c\u548c\u904b\u71df\u76f8\u7d50\u5408\u7684DevOps\u65b9\u6cd5\uff0c\u4e26\u4e14\u69cb\u60f3\u4e86SRE\uff08\u7ad9\u9ede\u53ef\u9760\u6027\u5de5\u7a0b\uff09\u7684\u6982\u5ff5\u3002<\/p>\n<h2>\u8bf7\u5f15\u7528\u4ee5\u4e0b\u5185\u5bb9\u4e3a\u4f8b\uff0c\u4ec5\u9700\u8981\u4e00\u4e2a\u9009\u9879\uff1a<\/h2>\n<p>\u6211\u4eec\u6210\u7acb\u4e86\u4e00\u4e2a\u5c0f\u7ec4\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<p>\u672c\u8a18\u4e8b\u3067\u8a18\u8f09\u3057\u3066\u3044\u308b\u4e00\u90e8\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u3001\u4ee5\u4e0b\u306e\u66f8\u7c4d\u3092\u53c2\u8003\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>\u51fa\u5178\uff1a\u65e5\u672c\u8a9e\u7248\u300c\u5165\u9580 Kubernetes\u300dKelsey Hightower\u3001Brendan Burns\u3001Joe Beda\u3000\u8457\u3001\u30aa\u30e9\u30a4\u30ea\u30fc\u30fb\u30b8\u30e3\u30d1\u30f3\u3001ISBN978-4-87311-840-6<\/p><\/blockquote>\n<h3>\u516c\u5f0f\uff1a\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff0c\u8bf7\u7528\u4e2d\u6587\u540c\u4e49\u8bcd\u8868\u8fbe\u3002<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Installing kubeadm<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">kubectl\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/ul>\n<h3>GitHub (natively translated as \u6781 \u901f \u9886 \u79d1)<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">containerd<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">minikube<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">OpenFaaS<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">kubeless<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Osiris<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Virtual Kubelet<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u8fd9\u7bc7\u6587\u7ae0\u662f\u4e3a\u4e86\u5e2e\u52a9\u5373\u5c06\u5f00\u59cb\u5b66\u4e60Kubernetes\u7684\u4eba\u800c\u5199\u7684\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u5c3d\u5feb\u7406\u89e3\u5bb9\u5668\u5f00\u53d1\u7684\u57fa\u7840\u77e5\u8bc6\u800c\u63d0\u4f9b [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-35838","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60kubernetes\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 \u8fd9\u7bc7\u6587\u7ae0\u662f\u4e3a\u4e86\u5e2e\u52a9\u5373\u5c06\u5f00\u59cb\u5b66\u4e60Kubernetes\u7684\u4eba\u800c\u5199\u7684\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u5c3d\u5feb\u7406\u89e3\u5bb9\u5668\u5f00\u53d1\u7684\u57fa\u7840\u77e5\u8bc6\u800c\u63d0\u4f9b [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60kubernetes\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-11T15:24:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T00:49:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/10-0.png\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/\",\"name\":\"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-11-11T15:24:25+00:00\",\"dateModified\":\"2024-05-04T00:49:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60kubernetes\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes","og_description":"\u9996\u5148 \u8fd9\u7bc7\u6587\u7ae0\u662f\u4e3a\u4e86\u5e2e\u52a9\u5373\u5c06\u5f00\u59cb\u5b66\u4e60Kubernetes\u7684\u4eba\u800c\u5199\u7684\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u5c3d\u5feb\u7406\u89e3\u5bb9\u5668\u5f00\u53d1\u7684\u57fa\u7840\u77e5\u8bc6\u800c\u63d0\u4f9b [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60kubernetes\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-11-11T15:24:25+00:00","article_modified_time":"2024-05-04T00:49:31+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d257437434c4406c3345e\/10-0.png"}],"author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/","name":"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-11-11T15:24:25+00:00","dateModified":"2024-05-04T00:49:31+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5feb\u901f\u7406\u89e3\u57fa\u672c\u7684\u5bb9\u5668\u5f00\u53d1\uff0c\u72ec\u81ea\u5b66\u4e60Kubernetes"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bf%ab%e9%80%9f%e7%90%86%e8%a7%a3%e5%9f%ba%e6%9c%ac%e7%9a%84%e5%ae%b9%e5%99%a8%e5%bc%80%e5%8f%91%ef%bc%8c%e7%8b%ac%e8%87%aa%e5%ad%a6%e4%b9%a0kubernetes%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=35838"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35838\/revisions"}],"predecessor-version":[{"id":97327,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35838\/revisions\/97327"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=35838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=35838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=35838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}