{"id":148443,"date":"2019-06-25T09:48:17","date_gmt":"2019-06-25T01:48:17","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=148443"},"modified":"2019-06-20T09:49:00","modified_gmt":"2019-06-20T01:49:00","slug":"kubernetes-quick-installation","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/kubernetes-quick-installation.html","title":{"rendered":"\u5feb\u901f\u5b89\u88c5\u4e0e\u914d\u7f6ekubernetes\u96c6\u7fa4\u642d"},"content":{"rendered":"
\u9996\u5148\uff0c\u5b83\u662f\u4e00\u4e2a\u5168\u65b0\u7684\u57fa\u4e8e\u5bb9\u5668\u6280\u672f\u7684\u5206\u5e03\u5f0f\u67b6\u6784\u9886\u5148\u65b9\u6848\u3002\u8fd9\u4e2a\u65b9\u6848\u5c3d\u7136\u5f88\u65b0\uff0c\u4f46\u5b83\u662f\u8c37\u6b4c\u5341\u51e0\u5e74\u4ee5\u6765\u5927\u89c4\u6a21\u5e94\u7528\u5bb9\u5668\u6280\u672f\u7684\u7ecf\u9a8c\u79ef\u7d2f\u548c\u5347\u534e\u7684\u4e00\u4e2a\u91cd\u8981\u6210\u679c\u3002\u786e\u5207\u5730\u8bf4\uff0ckubernetes\u662f\u8c37\u6b4c\u4e25\u683c\u4fdd\u5bc6\u5341\u51e0\u5e74\u7684\u79d8\u5bc6\u6b66\u5668Borg\u7684\u4e00\u4e2a\u5f00\u6e90\u7248\u672c\u3002Borg\u662f\u8c37\u6b4c\u7684\u4e00\u4e2a\u4e45\u8d1f\u76db\u540d\u7684\u5185\u90e8\u4f7f\u7528\u7684\u5927\u89c4\u6a21\u96c6\u7fa4\u7ba1\u7406\u7cfb\u7edf\uff0c\u5b83\u57fa\u4e8e\u5bb9\u5668\u6280\u672f\uff0c\u76ee\u7684\u662f\u5b9e\u73b0\u8d44\u6e90\u7ba1\u7406\u7684\u81ea\u52a8\u5316\uff0c\u4ee5\u53ca\u8de8\u591a\u4e2a\u6570\u636e\u4e2d\u5fc3\u7684\u8d44\u6e90\u5229\u7528\u7387\u7684\u6700\u5927\u5316\u3002<\/p>\n
2015\u5e744\u6708\uff0c\u4f20\u95fb\u8bb8\u4e45\u7684Borg\u8bba\u6587\u4f34\u968fkubernetes\uff08K8S\uff09\u7684\u9ad8\u8c03\u5ba3\u4f20\u88ab\u8c37\u6b4c\u9996\u6b21\u516c\u5f00\uff0c\u5927\u5bb6\u624d\u5f97\u4ee5\u4e86\u89e3\u5b83\u7684\u66f4\u591a\u5185\u5e55\u3002\u6b63\u662f\u7531\u4e8e\u7ad9\u5728Borg\u8fd9\u4e2a\u524d\u8f88\u7684\u80a9\u8180\u4e0a\uff0c\u5438\u53d6\u4e86Borg\u8fc7\u53bb\u5341\u5e74\u95f4\u7684\u7ecf\u9a8c\u4e0e\u6559\u8bad\uff0c\u6240\u4ee5kubernetes\u4e00\u7ecf\u5f00\u6e90\u5c31\u4e00\u9e23\u60ca\u4eba\uff0c\u5e76\u8fc5\u901f\u79f0\u9738\u4e86\u5bb9\u5668\u6280\u672f\u9886\u57df\u3002<\/p>\n
\u5982\u679c\u6211\u4eec\u7684\u7cfb\u7edf\u8bbe\u8ba1\u9075\u5faa\u4e86kubernetes\u7684\u8bbe\u8ba1\u601d\u60f3\uff0c\u90a3\u4e48\u4f20\u7edf\u7cfb\u7edf\u67b6\u6784\u4e2d\u54ea\u4e9b\u548c\u4e1a\u52a1\u6ca1\u6709\u591a\u5927\u5173\u7cfb\u7684\u5e95\u5c42\u4ee3\u7801\u6216\u529f\u80fd\u6a21\u5757\uff0c\u90fd\u53ef\u4ee5\u7acb\u523b\u4ece\u6211\u4eec\u7684\u89c6\u7ebf\u4e2d\u6d88\u5931\uff0c\u6211\u4eec\u4e0d\u5fc5\u518d\u8d39\u5fc3\u4e8e\u8d1f\u8f7d\u5747\u8861\u7684\u9009\u578b\u548c\u90e8\u7f72\u5b9e\u65bd\u95ee\u9898\uff0c\u4e0d\u5fc5\u518d\u8003\u8651\u5f15\u5165\u6216\u81ea\u5df1\u5f00\u53d1\u4e00\u4e2a\u590d\u6742\u7684\u670d\u52a1\u6cbb\u7406\u6846\u67b6\uff0c\u4e0d\u5fc5\u518d\u5934\u75bc\u4e0e\u670d\u52a1\u76d1\u63a7\u548c\u6545\u969c\u5904\u7406\u6a21\u5757\u7684\u5f00\u53d1\u3002\u603b\u4e4b\uff0c\u4f7f\u7528kubernetes\u63d0\u4f9b\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u6211\u4eec\u8282\u7ea6\u4e86\u4e0d\u5c11\u4e8e30%\u7684\u5f00\u53d1\u6210\u672c\uff0c\u540c\u65f6\u53ef\u4ee5\u5c06\u7cbe\u529b\u66f4\u52a0\u96c6\u4e2d\u4e8e\u4e1a\u52a1\u672c\u8eab\uff0c\u800c\u4e14\u7531\u4e8ekubernetes\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u81ea\u52a8\u5316\u673a\u5236\uff0c\u6240\u4ee5\u7cfb\u7edf\u540e\u671f\u7684\u8fd0\u7ef4\u96be\u5ea6\u548c\u8fd0\u7ef4\u6210\u672c\u5927\u5e45\u964d\u4f4e\u3002<\/p>\n
\u968f\u7740 Docker \u6280\u672f\u7684\u53d1\u5c55\u548c\u5e7f\u6cdb\u6d41\u884c\uff0c\u4e91\u539f\u751f\u5e94\u7528\u548c\u5bb9\u5668\u8c03\u5ea6\u7ba1\u7406\u7cfb\u7edf\u4e5f\u6210\u4e3a IT \u9886\u57df\u5927\u70ed\u7684\u8bcd\u6c47\u3002\u4e8b\u5b9e\u4e0a\uff0c\u5728 Docker \u6280\u672f\u706b\u7206\u4e4b\u524d\uff0c\u4e91\u539f\u751f\u5e94\u7528\u7684\u601d\u60f3\u5df2\u7ecf\u7531\u4e91\u8ba1\u7b97\u6280\u672f\u7684\u9886\u5bfc\u8005\u548c\u5206\u5e03\u5f0f\u7cfb\u7edf\u67b6\u6784\u7684\u63a8\u5e7f\u8005\u5e7f\u6cdb\u4f20\u64ad\u3002\u4f8b\u5982\u65e9\u5728 2011 \u5e74 Heroku \u7684\u5de5\u7a0b\u5e08\u63d0\u51fa\u4e86\u4e91\u539f\u751f\u5e94\u7528\u7684 12 \u8981\u7d20\uff0c\u53ea\u4e0d\u8fc7\u4ee5\u865a\u62df\u673a\u6280\u672f\u4f5c\u4e3a\u4e91\u539f\u751f\u5e94\u7528\u7684\u57fa\u7840\u5b9e\u65bd\u3002\u7531\u4e8e\u865a\u62df\u673a\u955c\u50cf\u5927\u3001\u955c\u50cf\u6807\u51c6\u4e0d\u7edf\u4e00\u4ee5\u53ca\u6253\u5305\u6d41\u7a0b\u548c\u5de5\u5177\u4e0d\u7edf\u4e00\uff0c\u5bfc\u81f4\u4e86\u4e1a\u754c\u65e0\u6cd5\u5e7f\u6cdb\u63a5\u53d7\u7684\u4e91\u539f\u751f\u5e94\u7528\u6807\u51c6\uff0c\u9650\u5236\u4e86\u4e91\u539f\u751f\u5e94\u7528\u7684\u6d41\u884c\u3002\u800c Docker \u7684\u51fa\u73b0\u6b63\u597d\u89e3\u51b3\u4e86\u8fd9\u4e9b\u9650\u5236\u4e91\u539f\u751f\u5e94\u7528\u6784\u5efa\u3001\u4ea4\u4ed8\u548c\u8fd0\u884c\u7684\u74f6\u9888\uff0c\u4f7f\u5f97\u6784\u5efa\u4e91\u539f\u751f\u5e94\u7528\u6210\u4e3a\u4e86\u4f7f\u7528 Docker \u7684\u5f00\u53d1\u8005\u81ea\u7136\u800c\u7136\u7684\u9009\u62e9\u3002<\/p>\n
Kubernetes \u662f\u4e3a\u751f\u4ea7\u73af\u5883\u800c\u8bbe\u8ba1\u7684\u5bb9\u5668\u8c03\u5ea6\u7ba1\u7406\u7cfb\u7edf\uff0c\u5bf9\u4e8e\u8d1f\u8f7d\u5747\u8861\u3001\u670d\u52a1\u53d1\u73b0\u3001\u9ad8\u53ef\u7528\u3001\u6eda\u52a8\u5347\u7ea7\u3001\u81ea\u52a8\u4f38\u7f29\u7b49\u5bb9\u5668\u4e91\u5e73\u53f0\u7684\u529f\u80fd\u8981\u6c42\u6709\u539f\u751f\u652f\u6301\u3002\u7531\u4e8e Kubernetes \u5728K\u548cs\u95f4\u67098\u4e2a\u5b57\u6bcd\uff0c\u56e0\u6b64\u5e38\u7b80\u79f0 k8s\u3002\u4e8b\u5b9e\u4e0a\uff0c\u968f\u7740\u5bf9 k8s \u7cfb\u7edf\u67b6\u6784\u4e0e\u8bbe\u8ba1\u7406\u5ff5\u7684\u4e86\u89e3\u6df1\u5165\uff0c\u4f1a\u53d1\u73b0 K8s \u7cfb\u7edf\u6b63\u662f\u5904\u5904\u4e3a\u8fd0\u884c\u4e91\u539f\u751f\u5e94\u7528\u800c\u8bbe\u8ba1\u8003\u8651;\u540c\u65f6\uff0c\u968f\u7740\u5bf9 k8s \u7cfb\u7edf\u4f7f\u7528\u7684\u52a0\u6df1\u548c\u63a8\u5e7f\uff0c\u4e5f\u4f1a\u6709\u8d8a\u6765\u8d8a\u591a\u6709\u5173\u4e91\u539f\u751f\u5e94\u7528\u7684\u8bbe\u8ba1\u6a21\u5f0f\u4ea7\u751f\u51fa\u6765\uff0c\u4f7f\u5f97\u57fa\u4e8e k8s \u7cfb\u7edf\u8bbe\u8ba1\u548c\u5f00\u53d1\u751f\u4ea7\u7ea7\u7684\u590d\u6742\u4e91\u539f\u751f\u5e94\u7528\u53d8\u5f97\u50cf\u542f\u52a8\u4e00\u4e2a\u5355\u673a\u7248\u5bb9\u5668\u670d\u52a1\u90a3\u6837\u7b80\u5355\u6613\u7528\u3002<\/p>\n
\u4f7f\u7528 Kubernetes \u7684\u7406\u7531\u6709\u5f88\u591a\uff0c\u6700\u57fa\u672c\u7684\u4e00\u4e2a\u7406\u7531\u5c31\u662f\uff1aIT \u662f\u65b0\u6280\u672f\u9a71\u52a8\u884c\u4e1a\u3002Docker \u8fd9\u4e2a\u65b0\u5174\u7684\u5bb9\u5668\u5316\u6280\u672f\u5f53\u524d\u5df2\u7ecf\u88ab\u5f88\u591a\u516c\u53f8\u6240\u91c7\u7528\uff0c\u5176\u4ece\u5355\u673a\u8d70\u5411\u96c6\u7fa4\u5df2\u6210\u5fc5\u7136\uff0c\u800c\u4e91\u8ba1\u7b97\u7684\u84ec\u52c3\u53d1\u5c55\u6b63\u5728\u52a0\u901f\u8fd9\u4e00\u8fdb\u7a0b\u3002Kubernetes \u4f5c\u4e3a\u5f53\u524d\u552f\u4e00\u88ab\u4e1a\u754c\u5e7f\u6cdb\u8ba4\u53ef\u548c\u770b\u597d\u7684 Docker \u5206\u5e03\u5f0f\u7cfb\u7edf\u89e3\u51b3\u65b9\u6848\u3002\u53ef\u4ee5\u9884\u89c1\uff0c\u5728\u672a\u6765\u51e0\u5e74\u5185\uff0c\u4f1a\u6709\u5927\u91cf\u7684\u65b0\u7cfb\u7edf\u9009\u62e9\u5b83\uff0c\u4e0d\u7ba1\u662f\u8fd0\u884c\u5728\u4f01\u4e1a\u672c\u5730\u670d\u52a1\u5668\u4e0a\u8fd8\u662f\u88ab\u6258\u7ba1\u5230\u516c\u6709\u4e91\u4e0a\u3002<\/p>\n
\u4f7f\u7528 Kubernetes \u53c8\u4f1a\u6536\u83b7\u54ea\u4e9b\u597d\u5904\u5462?<\/p>\n
\u9996\u5148\uff0c\u4f7f\u7528 Kubernetes \u5c31\u662f\u5728\u5168\u9762\u62e5\u62b1\u5fae\u670d\u52a1\u67b6\u6784\u3002\u5fae\u670d\u52a1\u67b6\u6784\u7684\u6838\u5fc3\u5c31\u662f\u5c06\u4e00\u4e2a\u5de8\u5927\u7684\u5355\u4f53\u5e94\u7528\u5206\u89e3\u4e3a\u5f88\u591a\u5c0f\u7684\u4e92\u76f8\u8fde\u63a5\u7684\u5fae\u670d\u52a1\uff0c\u4e00\u4e2a\u5fae\u670d\u52a1\u80cc\u540e\u53ef\u80fd\u6709\u591a\u4e2a\u5b9e\u4f8b\u526f\u672c\u5728\u652f\u6491\uff0c\u526f\u672c\u7684\u6570\u91cf\u53ef\u80fd\u4f1a\u968f\u7740\u7cfb\u7edf\u7684\u8d1f\u8377\u53d8\u5316\u800c\u8fdb\u884c\u8c03\u6574\uff0c\u5185\u5d4c\u7684\u8d1f\u8f7d\u5747\u8861\u5668\u5728 k8s \u5e73\u53f0\u4e2d\u6709\u591a\u4e2a\u5b9e\u4f8b\u526f\u672c\u5728\u652f\u6491\uff0c\u526f\u672c\u7684\u6570\u91cf\u53ef\u80fd\u4f1a\u968f\u7740\u7cfb\u7edf\u7684\u8d1f\u8377\u53d8\u5316\u800c\u8fdb\u884c\u8c03\u6574\uff0c\u5185\u5d4c\u7684\u8d1f\u8f7d\u5747\u8861\u5668 k8s \u5e73\u53f0\u4e2d\u53d1\u6325\u4e86\u91cd\u8981\u7684\u4f5c\u7528\u3002\u5fae\u670d\u52a1\u67b6\u6784\u4f7f\u5f97\u6bcf\u4e2a\u670d\u52a1\u90fd\u53ef\u4ee5\u7531\u4e13\u95e8\u7684\u5f00\u53d1\u56e2\u961f\u6765\u5f00\u53d1\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u81ea\u7531\u9009\u62e9\u5f00\u53d1\u6280\u672f\uff0c\u8fd9\u5bf9\u4e8e\u5927\u89c4\u6a21\u56e2\u961f\u6765\u8bf4\u5f88\u6709\u4ef7\u503c\u3002\u53e6\u5916\uff0c\u6bcf\u4e2a\u5fae\u670d\u52a1\u72ec\u7acb\u5f00\u53d1\u3001\u5347\u7ea7\u3001\u6269\u5c55\uff0c\u4f7f\u5f97\u7cfb\u7edf\u5177\u5907\u5f88\u9ad8\u7684\u7a33\u5b9a\u6027\u548c\u5feb\u901f\u8fed\u4ee3\u8fdb\u5316\u80fd\u529b\u3002<\/p>\n
\u5176\u6b21\uff0cKubernetes \u7cfb\u7edf\u67b6\u6784\u5177\u5907\u4e86\u8d85\u5f3a\u7684\u6a2a\u5411\u6269\u5bb9\u80fd\u529b\u3002\u5bf9\u4e8e\u4e92\u8054\u7f51\u516c\u53f8\u6765\u8bf4\uff0c\u7528\u6237\u89c4\u6a21\u5c31\u7b49\u4ef7\u4e8e\u8d44\u4ea7\uff0c\u8c01\u62e5\u6709\u66f4\u591a\u7684\u7528\u6237\uff0c\u8c01\u5c31\u80fd\u5728\u7ade\u4e89\u4e2d\u80dc\u51fa\uff0c\u56e0\u6b64\u8d85\u5f3a\u7684\u6a2a\u5411\u6269\u5bb9\u80fd\u529b\u662f\u4e92\u8054\u7f51\u4e1a\u52a1\u7cfb\u7edf\u7684\u5173\u952e\u6307\u6807\u4e4b\u4e00\u3002\u4e0d\u7528\u4fee\u6539\u4ee3\u7801\uff0c\u4e00\u4e2a Kubernetes \u96c6\u7fa4\u5373\u53ef\u4ece\u53ea\u5305\u542b\u51e0\u4e2aNode \u7684\u5c0f\u96c6\u7fa4\u5e73\u6ed1\u6269\u5c55\u5230\u62e5\u6709\u6210\u767e\u4e0a\u5343 Noder \u5927\u89c4\u6a21\u96c6\u7fa4\uff0c\u5229\u7528 Kubernetes \u63d0\u4f9b\u7684\u5de5\u5177\uff0c\u751a\u81f3\u53ef\u4ee5\u5728\u7ebf\u5b8c\u6210\u96c6\u7fa4\u7684\u6269\u5bb9\u3002\u53ea\u8981\u5fae\u670d\u52a1\u8bbe\u8ba1\u7684\u5f97\u597d\uff0c\u7ed3\u5408\u786c\u4ef6\u6216\u8005\u516c\u6709\u4e91\u8d44\u6e90\u7684\u7ebf\u6027\u589e\u52a0\uff0c\u7cfb\u7edf\u5c31\u80fd\u591f\u627f\u53d7\u5927\u91cf\u7528\u6237\u5e76\u53d1\u8bbf\u95ee\u6240\u5e26\u6765\u7684\u538b\u529b\u3002<\/p>\n
Kubernetes\u4e2d\u7684\u5927\u90e8\u5206\u6982\u5ff5\u5982Node\u3001Pod\u3001Replication Controller\u3001Server\u3001Deploymeng\u3001Job\u3001DaemonSet \u7b49\u90fd\u53ef\u4ee5\u770b\u4f5c\u4e00\u79cd\u8d44\u6e90\u5bf9\u8c61\uff0c\u51e0\u4e4e\u6240\u6709\u7684\u8d44\u6e90\u5bf9\u8c61\u90fd\u53ef\u4ee5\u901a\u8fc7 Kubernetes\u63d0\u4f9b\u7684 kubectl \u5de5\u5177\u6267\u884c\u589e\u3001\u5220\u3001\u6539\u3001\u67e5\u7b49\u64cd\u4f5c\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u5728 etcd \u4e2d\u6301\u4e45\u5316\u5b58\u50a8\u3002\u4ece\u8fd9\u4e2a\u89d2\u5ea6\u6765\u770b\uff0cKubernets \u5176\u5b9e\u662f\u4e00\u4e2a\u9ad8\u5ea6\u81ea\u52a8\u5316\u7684\u8d44\u6e90\u63a7\u5236\u7cfb\u7edf\uff0c\u5b83\u901a\u8fc7\u8ddf\u8e2a\u5bf9\u6bd4 etcd \u5b58\u50a8\u91cc\u4fdd\u5b58\u7684\u8d44\u6e90\u671f\u671b\u72b6\u6001\u4e0e\u5f53\u524d\u73af\u5883\u4e2d\u7684\u5b9e\u9645\u8d44\u6e90\u72b6\u6001\u7684\u5dee\u5f02\u6765\u5b9e\u73b0\u81ea\u52a8\u63a7\u5236\u548c\u81ea\u52a8\u7ea0\u9519\u7684\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n
Kubernetes \u91cc\u7684 Master \u6307\u7684\u662f\u96c6\u7fa4\u63a7\u5236\u8282\u70b9\uff0c\u6bcf\u4e2a Kubernetes \u96c6\u7fa4\u91cc\u9700\u8981\u6709\u4e00\u4e2aMaster \u8282\u70b9\u6765\u8d1f\u8d23\u6574\u4e2a\u96c6\u7fa4\u7684\u7ba1\u7406\u7684\u63a7\u5236\uff0c\u57fa\u672c\u4e0a Kubernetes \u6240\u6709\u7684\u63a7\u5236\u547d\u4ee4\u8fdb\u662f\u53d1\u7ed9Master\uff0cMaster \u8d1f\u8d23\u5177\u4f53\u7684\u6267\u884c\u8fc7\u7a0b\uff0c\u540e\u9762\u6240\u6709\u6267\u884c\u7684\u547d\u4ee4\u57fa\u672c\u90fd\u662f\u5728 Master \u8282\u70b9\u4e0a\u8fd0\u884c\u7684\u3002Master \u8282\u70b9\u901a\u5e38\u4f1a\u5360\u636e\u4e00\u4e2a\u72ec\u7acb\u7684 X86 \u670d\u52a1\u5668\uff0c\u4e00\u4e2a\u4e3b\u8981\u7684\u539f\u56e0\u662f\u5b83\u592a\u91cd\u8981\u4e86\uff0c\u5b83\u662f\u6574\u4e2a\u96c6\u7fa4\u7684\u5927\u8111\uff0c\u5982\u679c\u5b83\u5b95\u673a\u6216\u8005\u4e0d\u53ef\u7528\uff0c\u90a3\u4e48\u6240\u6709\u7684\u63a7\u5236\u547d\u4ee4\u90fd\u5c06\u5931\u6548\u3002
\n\u3000\u3000
\nMaster \u8282\u70b9\u4e0a\u8fd0\u884c\u7740\u4ee5\u4e0b\u4e00\u7ec4\u5173\u952e\u8fdb\u7a0b\uff1a<\/p>\n
\r\nKube-apiserver\uff1a\u63d0\u4f9b\u4e86 HTTP Rest \u63a5\u53e3\u7684\u5173\u952e\u670d\u52a1\u8fdb\u7a0b\uff0c\u662f Kubernetes \u91cc\u6240\u6709\u8d44\u6e90\u7684\u589e\u3001\u5220\u3001\u6539\u3001\u67e5\u7b49\u64cd\u4f5c\u7684\u552f\u4e00\u5165\u53e3\uff0c\u4e5f\u662f\u96c6\u7fa4\u63a7\u5236\u5165\u53e3\u8fdb\u7a0b\u3002\r\nKube-controller-manager\uff1a\u662f Kubernetes \u91cc\u6240\u6709\u8d44\u6e90\u5bf9\u8c61\u7684\u81ea\u52a8\u5316\u63a7\u5236\u4e2d\u5fc3\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u8d44\u6e90\u5bf9\u8c61\u7684\u7ba1\u5bb6\u3002\r\nKube-scheduler\uff1a\u8d1f\u8d23\u8d44\u6e90\u8c03\u5ea6\u7684\u8fdb\u7a0b\uff0c\u76f8\u5f53\u4e8e\u516c\u4ea4\u516c\u53f8\u7684\u8c03\u5ea6\u5ba4\u3002\r\n<\/pre>\n<\/p>\n
\u5176\u5b9e Master \u8282\u70b9\u4e0a\u5f80\u5f80\u8fd8\u542f\u52a8\u4e86\u4e00\u4e2a etcd server \u8fdb\u7a0b\uff0c\u56e0\u4e3a Kubernetes \u91cc\u7684\u6240\u6709\u8d44\u6e90\u5bf9\u8c61\u7684\u6570\u636e\u5168\u90e8\u662f\u4fdd\u5b58\u5728 etcd \u4e2d\u7684\u3002<\/p>\n
Node<\/strong><\/span><\/div>\n\u9664\u4e86 Master\u3001Kubernetes \u96c6\u7fa4\u4e2d\u7684\u5176\u4ed6\u673a\u5668\u88ab\u79f0\u4e3a Node \u8282\u70b9\uff0c\u5728\u8f83\u65e9\u7684\u7248\u672c\u4e2d\u4e5f\u88ab\u79f0\u4e3a Minion\u3002\u4e0e Master \u4e00\u6837\uff0cNode \u8282\u70b9\u53ef\u4ee5\u662f\u4e00\u53f0\u7269\u7406\u4e3b\u673a\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u53f0\u865a\u62df\u673a\u3002Node\u8282\u70b9\u624d\u662f Kubernetes \u96c6\u7fa4\u4e2d\u7684\u5de5\u4f5c\u8d1f\u8f7d\u8282\u70b9\uff0c\u6bcf\u4e2a Node \u90fd\u4f1a\u88ab Master \u5206\u914d\u4e00\u4e9b\u8d1f\u8f7d\u3002\u5f53\u67d0\u4e2a Node \u5b95\u673a\u65f6\uff0c\u5176\u4e0a\u7684\u5de5\u4f5c\u8d1f\u8f7d\u4f1a\u88ab Master \u81ea\u52a8\u8f6c\u79fb\u5230\u5176\u4ed6\u8282\u70b9\u4e0a\u53bb\u3002<\/p>\n
\u6bcf\u4e2a Node \u8282\u70b9\u90fd\u8fd0\u884c\u7740\u4ee5\u4e0b\u4e00\u7ec4\u5173\u952e\u8fdb\u7a0b\uff1a<\/p>\n
\r\nKubelet\uff1a\u8d1f\u8d23 Pod \u5bf9\u5e94\u7684\u5bb9\u5668\u7684\u521b\u5efa\u3001\u542f\u505c\u7b49\u4efb\u52a1\uff0c\u540c\u65f6\u4e0e Master \u8282\u70b9\u5bc6\u5207\u534f\u4f5c\uff0c\u5b9e\u73b0\u96c6\u7fa4\u7ba1\u7406\u7684\u57fa\u672c\u529f\u80fd\u3002\r\nKube-proxy\uff1a\u5b9e\u73b0 Kubernetes Service \u7684\u901a\u4fe1\u4e0e\u8d1f\u8f7d\u5747\u8861\u673a\u5236\u7684\u91cd\u8981\u7ec4\u4ef6\u3002\r\n<\/pre>\n<\/p>\n
Pod\uff1a\u662fkubernetes\u6700\u91cd\u8981\u4e5f\u662f\u6700\u57fa\u672c\u7684\u6982\u5ff5\u3002\u6bcf\u4e2aPod\u90fd\u4f1a\u5305\u542b\u4e00\u4e2a \u201c\u6839\u5bb9\u5668\u201d\uff0c\u8fd8\u4f1a\u5305\u542b\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u7d27\u5bc6\u76f8\u8fde\u7684\u4e1a\u52a1\u5bb9\u5668\u3002<\/p>\n
<\/p>\n
Kubernetes\u4e3a\u6bcf\u4e2aPod\u90fd\u5206\u914d\u4e86\u552f\u4e00\u7684IP\u5730\u5740\uff0c\u79f0\u4e4b\u4e3aPodIP\uff0c\u4e00\u4e2aPod\u91cc\u7684\u591a\u4e2a\u5bb9\u5668\u5171\u4eabPodIP\u5730\u5740\u3002\u8981\u6c42\u5e95\u5c42\u7f51\u7edc\u652f\u6301\u96c6\u7fa4\u5185\u4efb\u610f\u4e24\u4e2aPod\u4e4b\u95f4\u7684\u76f4\u63a5\u901a\u4fe1\uff0c\u901a\u5e38\u91c7\u7528\u865a\u62df\u4e8c\u5c42\u7f51\u7edc\u6280\u672f\u6765\u5b9e\u73b0(Flannel)\u3002<\/p>\n
k8s\u96c6\u7fa4\u90e8\u7f72\u65b9\u6848<\/strong><\/div>\n\u5982\u4e0b\u662f\u6211\u7684\u96c6\u7fa4\u90e8\u7f72\u7b56\u7565\uff0c1\u4e2amaster + 2\u4e2anode(minion1.2\u4e4b\u524d\u7684\u53eb\u6cd5)\u3002\u6211\u7684\u5b58\u50a8\u96c6\u7fa4etcd\u662f\u5355\u70b9\u96c6\u7fa4\uff0c\u4e0d\u63a8\u8350\u6b64\u505a\u6cd5\u3002\u7f51\u7edc\u4f7f\u7528\u7684\u662fflannel\u865a\u62df\u4e8c\u6b21\u7f51\u7edc\u3002<\/p>\n
<\/p>\n
Kubernetes\u5177\u6709\u5b8c\u5907\u7684\u96c6\u7fa4\u7ba1\u7406\u80fd\u529b\uff1a<\/p>\n
\r\n \u5305\u62ec\u591a\u5c42\u6b21\u7684\u5b89\u5168\u9632\u62a4\u548c\u51c6\u5165\u673a\u5236\r\n \u591a\u79df\u6237\u5e94\u7528\u652f\u6491\u80fd\u529b\r\n \u900f\u660e\u7684\u670d\u52a1\u6ce8\u518c\u548c\u670d\u52a1\u53d1\u73b0\u673a\u5236\r\n \u5185\u5efa\u667a\u80fd\u8d1f\u8f7d\u5747\u8861\u5668\r\n \u5f3a\u5927\u7684\u6545\u969c\u53d1\u73b0\u548c\u81ea\u6211\u4fee\u590d\u80fd\u529b\r\n \u670d\u52a1\u6eda\u52a8\u5347\u7ea7\u548c\u5728\u7ebf\u6269\u5bb9\u80fd\u529b\r\n \u53ef\u6269\u5c55\u7684\u8d44\u6e90\u81ea\u52a8\u8c03\u5ea6\u673a\u5236\r\n \u4ee5\u53ca\u591a\u7c92\u5ea6\u7684\u8d44\u6e90\u7ba1\u7406\u80fd\u529b\r\n<\/pre>\n\u540c\u65f6\uff0ckubernetes\u63d0\u4f9b\u4e86\u5b8c\u5584\u7684\u7ba1\u7406\u5de5\u5177\uff0c\u8fd9\u4e9b\u5de5\u5177\u6db5\u76d6\u4e86\u5305\u62ec\u5f00\u53d1\u3001\u90e8\u7f72\u6d4b\u8bd5\u3001\u8fd0\u7ef4\u76d1\u63a7\u5728\u5185\u7684\u5404\u4e2a\u73af\u8282\u3002<\/p>\n
\u5728kubernetes\u4e2d\uff0cservice\uff08\u670d\u52a1\uff09\u662f\u5206\u5e03\u5f0f\u96c6\u7fa4\u67b6\u6784\u7684\u6838\u5fc3\uff0c\u4e00\u4e2aservice\u5bf9\u8c61\u62e5\u6709\u5982\u4e0b\u5173\u952e\u7279\u5f81\uff1a<\/p>\n
\r\n \u62e5\u6709\u4e00\u4e2a\u552f\u4e00\u6307\u5b9a\u7684\u540d\u5b57\uff08\u6bd4\u5982mysql-service\uff09\u3002\r\n \u62e5\u6709\u4e00\u4e2a\u865a\u62dfIP\uff08Cluster IP\u3001service IP\u6216VIP\uff09\u548c\u7aef\u53e3\u53f7\u3002\r\n \u80fd\u591f\u63d0\u4f9b\u67d0\u79cd\u8fdc\u7a0b\u670d\u52a1\u80fd\u529b\u3002\r\n \u88ab\u6620\u5c04\u5230\u4e86\u63d0\u4f9b\u8fd9\u79cd\u670d\u52a1\u80fd\u529b\u7684\u4e00\u7ec4\u5bb9\u5668\u5e94\u7528\u4e0a\u3002\r\n<\/pre>\nKubernetes.io\u5f00\u53d1\u4e86\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u6559\u7a0b\uff0c\u901a\u8fc7WEB\u6d4f\u89c8\u5668\u5c31\u80fd\u4f7f\u7528\u9884\u5148\u90e8\u7f72\u597d\u7684\u4e00\u4e2aKubernetes\u96c6\u7fa4\uff0c\u5feb\u901f\u4f53\u9a8ckubernetes\u7684\u529f\u80fd\u548c\u5e94\u7528\u573a\u666f\u3002<\/p>\n
\u94fe\u63a5\uff1ahttps:\/\/kubernetes.io\/docs\/tutorials\/kubernetes-basics\/<\/p>\n
K8s\u5b98\u65b9\u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/github.com\/kubernetes<\/p>\n
<\/p>\n
\u73af\u5883\u51c6\u5907\u5de5\u4f5c<\/strong><\/span><\/div>\n\r\n\u4e3b\u673a\u540d \t \u64cd\u4f5c\u7cfb\u7edf \t IP\u5730\u5740\r\nmaster \tCentos 7.4-x86_64 \t192.168.2.102\r\nnode1 \tCentos 7.4-x86_64 \t192.168.2.108\r\nnode2 \tCentos 7.4-x86_64 \t192.168.2.228\r\n<\/pre>\n\u5173\u95edCentOS7\u81ea\u5e26\u7684\u9632\u706b\u5899\u670d\u52a1<\/strong><\/span><\/div>\n\r\nsystemctl disable firewalld\r\nsystemctl stop firewalld\r\n<\/pre>\n\u4fee\u6539\u4e3b\u673a\u540d<\/strong><\/span><\/div>\n\r\n[root@localhost ~]# hostnamectl master \/\/192.168.2.102\r\n[root@localhost ~]# hostnamectl node1 \/\/192.168.2.108\r\n[root@localhost ~]# hostnamectl node2 \/\/192.168.2.228\r\n<\/pre>\n\u66f4\u6539Hostname\u4e3a master\u3001node1\u3001node2\uff0c\u914d\u7f6eIP\u5730\u5740,\u914d\u7f6e3\u53f0\u6d4b\u8bd5\u673a\u7684\/etc\/hosts\u6587\u4ef6\uff08\u5728\u4e09\u53f0\u670d\u52a1\u5668\u4e0a\u540c\u6b65\uff09<\/p>\n
\r\n[root@master ~]# cat \/etc\/hosts\r\n127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4\r\n::1 localhost localhost.localdomain localhost6 localhost6.localdomain6\r\n192.168.2.102 master\r\n192.168.2.108 node1\r\n192.168.2.228 node2\r\n[root@master ~]#\r\n <\/pre>\n\u65f6\u95f4\u6821\u5bf9\uff08\u4e09\u53f0\u673a\u5668\u90fd\u505a\u65f6\u95f4\u6821\u5bf9\uff09<\/strong><\/span><\/div>\n\r\n[root@master ~]# ntpdate ntp1.aliyun.com\r\n13 Sep 14:48:02 ntpdate[1596]: adjust time server 120.25.115.20 offset -0.015854 sec\r\n \r\n[root@master ~]# hwclock\r\n2018\u5e7409\u670813\u65e5 \u661f\u671f\u56db 14\u65f649\u520651\u79d2 -0.646898 \u79d2\r\n <\/pre>\n\u5b89\u88c5Kubernetes,\u914d\u7f6edockers\u955c\u50cf<\/strong><\/span><\/div>\n\r\n[root@master ~]# wget -O \/etc\/yum.repos.d\/docker-ce.repo https:\/\/mirrors.aliyun.com\/docker-ce\/linux\/centos\/docker-ce.repo\r\n <\/pre>\n<\/p>\n
\u914d\u7f6ekubernetes\u4ed3\u5e93<\/strong><\/span><\/div>\n\r\n[root@master yum.repos.d]# vim kubernetes.repo\r\n[kubernetes]\r\nname=kubernetes Repo\r\nbaseurl=https:\/\/mirrors.aliyun.com\/kubernetes\/yum\/repos\/kubernetes-el7-x86_64\/\r\ngpgcheck=1\r\ngpgkey=https:\/\/mirrors.aliyun.com\/kubernetes\/yum\/doc\/yum-key.gpg\r\nenabled=1\r\n <\/pre>\n<\/p>\n
\r\n[root@master ~]# wget https:\/\/mirrors.aliyun.com\/kubernetes\/yum\/doc\/rpm-package-key.gpg\r\n[root@master ~]# rpm --import rpm-package-key.gpg\r\n[root@master yum.repos.d]# yum repolist\r\n <\/pre>\n<\/p>\n
\r\n[root@master yum.repos.d]# scp CentOS-Base.repo docker-ce.repo kubernetes.repo node1:\/etc\/yum.repos.d\/\r\n <\/pre>\n<\/p>\n
\u5b89\u88c5docker\u548ckubelet<\/strong><\/span><\/div>\n\r\n[root@master ~]# yum -y install docker-ce kubelet kubeadm kubectl\r\n<\/pre>\n<\/p>\n
\u73af\u5883\u53d8\u91cf<\/strong><\/span><\/div>\n\r\n[root@master ~]# vim \/usr\/lib\/systemd\/system\/docker.service\r\n\u624b\u52a8\u6dfb\u52a0\u4e00\u884c\r\nEnvironment=\"HTTPS_PROXY=http:\/\/www.ik8s.io:10080\"\r\nEnvironment=\"NO_PROXY=127.0.0.0\/8,172.0.0.0\/16\"\r\n<\/pre>\n<\/p>\n
\r\n[root@master ~]# systemctl daemon-reload\r\n \r\n\u542f\u52a8docker\r\n[root@master ~]# systemctl start docker\r\n \r\n\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\r\n[root@master ~]# systemctl enable docker\r\n[root@master ~]# docker info\r\n \r\n\u4fdd\u8bc1\u8f93\u51fa\u7684\u90fd\u662f1\r\n[root@master ~]# cat \/proc\/sys\/net\/bridge\/bridge-nf-call-ip6tables\r\n1\r\n[root@master ~]# cat \/proc\/sys\/net\/bridge\/bridge-nf-call-iptables\r\n1\r\n \r\n[root@master ~]# rpm -ql kubelet\r\n\/etc\/kubernetes\/manifests #\u6e05\u5355\u76ee\u5f55\r\n\/etc\/sysconfig\/kubelet #\u914d\u7f6e\u6587\u4ef6\r\n\/etc\/systemd\/system\/kubelet.service \r\n\/usr\/bin\/kubelet #\u4e3b\u7a0b\u5e8f\r\n \r\n\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\r\n[root@master ~]# systemctl enable kubelet\r\n<\/pre>\n<\/p>\n
\u521d\u59cb\u5316<\/strong><\/span><\/div>\n\r\n[root@master ~]# kubeadm init --kubernetes-version=v1.11.1 --pod-network-cidr=10.244.0.0\/16 --service-cidr=10.96.0.0\/12\r\n<\/pre>\n<\/p>\n
\u62a5\u9519\u4fe1\u606f\uff0c\u89e3\u51b3\u529e\u6cd5\uff1a<\/p>\n
\r\n[root@master ~]# vim \/etc\/sysconfig\/kubelet\r\nKUBELET_EXTRA_ARGS=\"--fail-swap-on=false\"\r\n \r\n[root@master ~]# kubeadm init --kubernetes-version=v1.11.1 --pod-network-cidr=10.244.0.0\/16 --service-cidr=10.96.0.0\/12 --ignore-preflight-errors=Swap\r\n<\/pre>\n<\/p>\n
\u6ce8\u610f\u8fd9\u4e00\u6761\u547d\u4ee4\u9700\u8981\u4fdd\u5b58\u597d\uff08\u6dfb\u52a0\u96c6\u7fa4\u4f7f\u7528\uff09<\/p>\n
\r\nkubeadm join 192.168.2.102:6443 --token ns4kps.j8cuqwf78emp5a5b --discovery-token-ca-cert-hash sha256:b71b7e52c318959bab3f05f02f6fe51d6396d8c54ea6849ec7556927d1c6c88a\r\n\r\n[root@master ~]# docker image ls\r\n<\/pre>\n<\/p>\n
\r\n[root@master ~]# ss \u2013ntl\r\n<\/pre>\n<\/p>\n
\r\n[root@master ~]# mkdir -p $HOME\/.kube\r\n[root@master ~]# cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\r\n\r\n\u68c0\u6d4b\u7ec4\u4ef6\u8fd0\u884c\u662f\u5426\u6b63\u5e38\r\n[root@master ~]# kubectl get cs\r\n<\/pre>\n<\/p>\n
\u67e5\u770b\u5e76\u9a8c\u8bc1\u8282\u70b9\u4fe1\u606f\u662f\u5426\u6210\u529f<\/strong><\/span><\/div>\n\r\n[root@master ~]# kubectl get nodes\r\nNAME STATUS ROLES AGE VERSION\r\nmaster NotReady master 44m v1.11.3\r\n<\/pre>\n\u5b89\u88c5flannel<\/strong><\/span><\/div>\n\r\n[root@master ~]# kubectl apply -f https:\/\/raw.githubusercontent.com\/coreos\/flannel\/master\/Documentation\/kube-flannel.yml\r\n[root@master ~]# curl -sSL \"https:\/\/github.com\/coreos\/flannel\/blob\/master\/Documentation\/kube-flannel.yml?raw=true\" | kubectl create -f -\r\n<\/pre>\n<\/p>\n
\r\n[root@master ~]# docker image ls\r\n<\/pre>\n<\/p>\n
\u67e5\u770b\u5e76\u9a8c\u8bc1\u8282\u70b9\u4fe1\u606f\u662f\u5426\u6210\u529f<\/strong><\/span><\/div>\n\r\n[root@master ~]# kubectl get nodes\r\nNAME STATUS ROLES AGE VERSION\r\nmaster Ready master 2h v1.11.3\r\n<\/pre>\n\u67e5\u770bpod\u8fd0\u884c\u60c5\u51b5<\/strong><\/span><\/div>\n\r\n[root@master ~]# kubectl get pods -n kube-system\r\n<\/pre>\n<\/p>\n
\u914d\u7f6e\u6587\u4ef6\u4f20\u5230node1\u3001node2<\/strong><\/span><\/div>\n\r\n[root@master ~]# scp \/usr\/lib\/systemd\/system\/docker.service node1:\/usr\/lib\/systemd\/system\/docker.service\r\n\r\n[root@master ~]# scp \/etc\/sysconfig\/kubelet node1:\/etc\/sysconfig\/\r\n\r\n[root@master ~]# scp \/usr\/lib\/systemd\/system\/docker.service node2:\/usr\/lib\/systemd\/system\/docker.service\r\n\r\n[root@master ~]# scp \/etc\/sysconfig\/kubelet node2:\/etc\/sysconfig\/\r\n<\/pre>\nnode1\u670d\u52a1\u5668\u914d\u7f6e<\/strong><\/div>\n\r\n[root@node1 ~]# wget https:\/\/mirrors.aliyun.com\/kubernetes\/yum\/doc\/rpm-package-key.gpg\r\n<\/pre>\n<\/p>\n
\r\n[root@node1 ~]# rpm --import rpm-package-key.gpg\r\n<\/pre>\n\u5b89\u88c5docker\u3001kubelet<\/strong><\/span><\/div>\n\r\n[root@node1 ~]# yum -y install docker-ce kubelet kubeadm\r\n<\/pre>\n<\/p>\n
\u542f\u52a8docker<\/strong><\/span><\/div>\n\r\n[root@node1 ~]# systemctl start docker\r\n[root@node1 ~]# systemctl enable docker kubelet\r\n\r\n[root@node1 ~]# docker info\r\n<\/pre>\n\u6dfb\u52a0\u4e3b\u96c6\u7fa4\u91cc<\/strong><\/span><\/div>\n\r\n[root@node1 ~]# kubeadm join 192.168.2.102:6443 --token ns4kps.j8cuqwf78emp5a5b --discovery-token-ca-cert-hash sha256:b71b7e52c318959bab3f05f02f6fe51d6396d8c54ea6849ec7556927d1c6c88a --ignore-preflight-errors=Swap\r\n<\/pre>\n<\/p>\n
\u67e5\u770b\u4e0b\u8f7d\u955c\u50cf<\/strong><\/span><\/div>\n\r\n[root@node1 ~]# docker image ls\r\n<\/pre>\n<\/p>\n
\u5728master\u670d\u52a1\u5668\u4e0a\u53ef\u4ee5\u67e5\u8282\u70b9\u4fe1\u606f<\/strong><\/span><\/div>\n\r\n[root@master ~]# kubectl get nodes\r\nNAME STATUS ROLES AGE VERSION\r\nmaster Ready master 3h v1.11.3\r\nnode1 Ready7m v1.11.3\r\n \r\n[root@master ~]# kubectl get pods -n kube-system -o wide\r\n<\/none><\/pre>\n <\/p>\n
node2\u670d\u52a1\u5668\u914d\u7f6e<\/strong><\/div>\n\r\n[root@node2 ~]# wget https:\/\/mirrors.aliyun.com\/kubernetes\/yum\/doc\/rpm-package-key.gpg\r\n<\/pre>\n<\/p>\n
\r\n[root@node2 ~]# rpm --import rpm-package-key.gpg\r\n <\/pre>\n\u5b89\u88c5docker\u3001kubelet <\/strong><\/span><\/div>\n\r\n[root@node2 ~]# yum -y install docker-ce kubelet kubeadm\r\n<\/pre>\n<\/p>\n
\u542f\u52a8docker<\/strong><\/span><\/div>\n\r\n[root@node2 ~]# systemctl start docker\r\n[root@node2 ~]# systemctl enable docker kubelet\r\n[root@node2 ~]# docker info\r\n<\/pre>\n<\/p>\n
\u6dfb\u52a0\u4e3b\u96c6\u7fa4\u91cc<\/strong><\/span><\/div>\n\r\n[root@node2 ~]# kubeadm join 192.168.2.102:6443 --token ns4kps.j8cuqwf78emp5a5b --discovery-token-ca-cert-hash sha256:b71b7e52c318959bab3f05f02f6fe51d6396d8c54ea6849ec7556927d1c6c88a --ignore-preflight-errors=Swap\r\n<\/pre>\n<\/p>\n
\u5728master\u670d\u52a1\u5668\u4e0a\u53ef\u4ee5\u67e5\u8282\u70b9\u4fe1\u606f<\/strong><\/span><\/div>\n\r\n[root@master ~]# kubectl get nodes\r\n<\/pre>\n<\/p>\n
\r\n[root@master ~]# kubectl get pods -n kube-system -o wide\r\n<\/pre>\n<\/p>\n","protected":false},"excerpt":{"rendered":"
\u9996\u5148\uff0c\u5b83\u662f\u4e00\u4e2a\u5168\u65b0\u7684\u57fa\u4e8e\u5bb9\u5668\u6280\u672f\u7684\u5206\u5e03\u5f0f\u67b6\u6784\u9886\u5148\u65b9\u6848\u3002\u8fd9\u4e2a\u65b9\u6848\u5c3d\u7136\u5f88\u65b0\uff0c\u4f46\u5b83\u662f\u8c37\u6b4c\u5341\u51e0\u5e74\u4ee5\u6765\u5927\u89c4\u6a21\u5e94\u7528\u5bb9\u5668\u6280\u672f […]<\/p>\n","protected":false},"author":1479,"featured_media":142103,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-148443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/148443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1479"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=148443"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/148443\/revisions"}],"predecessor-version":[{"id":148728,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/148443\/revisions\/148728"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/142103"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=148443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=148443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=148443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}