{"id":1894,"date":"2023-03-31T06:31:36","date_gmt":"2023-03-30T22:31:36","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1894"},"modified":"2023-04-22T08:58:33","modified_gmt":"2023-04-22T00:58:33","slug":"kubernetes-publish-applications","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/31\/kubernetes-publish-applications\/","title":{"rendered":"Kubernetes\u516c\u5e03\u5e94\u7528\u7a0b\u5e8f"},"content":{"rendered":"<p>\u672c\u6587\u7ffb\u8bd1\u81ea Kubernetes \u5b98\u7f51 <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/kubernetes.io\/docs\/tutorials\/kubernetes-basics\/expose\/expose-intro\/\" title=\"Using a Service to Expose Your App\">Using a Service to Expose Your App<\/a>\uff0c\u5e76\u6709\u6240\u6539\u5199<\/p>\n<h2>\u76ee\u6807<\/h2>\n<ul>\n<li>\u4e86\u89e3 Kubernetes \u7684 Service\uff08\u670d\u52a1\uff09<\/li>\n<li>\u4e86\u89e3 Labels\uff08\u6807\u7b7e\uff09\u548c LabelSelector\uff08\u6807\u7b7e\u9009\u62e9\u5668\uff09\u4e0e Service\uff08\u670d\u52a1\uff09\u7684\u5173\u7cfb<\/li>\n<li>\u5728 Kubernetes \u96c6\u7fa4\u4e2d\uff0c\u901a\u8fc7 Service\uff08\u670d\u52a1\uff09\u5411\u5916\u516c\u5e03\u5e94\u7528\u7a0b\u5e8f<\/li>\n<\/ul>\n<p><!-- more --><\/p>\n<h2>Kubernetes Service\uff08\u670d\u52a1\uff09\u6982\u8ff0<\/h2>\n<p>\u4e8b\u5b9e\u4e0a\uff0cPod\uff08\u5bb9\u5668\u7ec4\uff09\u6709\u81ea\u5df1\u7684 <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/pods\/pod-lifecycle\/\" title=\"\u751f\u547d\u5468\u671f\">\u751f\u547d\u5468\u671f<\/a>\u3002\u5f53 worker node\uff08\u8282\u70b9\uff09\u6545\u969c\u65f6\uff0c\u8282\u70b9\u4e0a\u8fd0\u884c\u7684 Pod\uff08\u5bb9\u5668\u7ec4\uff09\u4e5f\u4f1a\u6d88\u5931\u3002\u7136\u540e\uff0c<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/deployment\/\" title=\"Deployment\">Deployment<\/a> \u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u65b0\u7684 Pod\uff08\u5bb9\u5668\u7ec4\uff09\u6765\u52a8\u6001\u5730\u5c06\u7fa4\u96c6\u8c03\u6574\u56de\u539f\u6765\u7684\u72b6\u6001\uff0c\u4ee5\u4f7f\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u8fd0\u884c\u3002<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5047\u8bbe\u6709\u4e00\u4e2a\u56fe\u50cf\u5904\u7406\u540e\u7aef\u7a0b\u5e8f\uff0c\u5177\u6709 3 \u4e2a\u8fd0\u884c\u65f6\u526f\u672c\u3002\u8fd9 3 \u4e2a\u526f\u672c\u662f\u53ef\u4ee5\u66ff\u6362\u7684\uff08\u65e0\u72b6\u6001\u5e94\u7528\uff09\uff0c\u5373\u4f7f Pod\uff08\u5bb9\u5668\u7ec4\uff09\u6d88\u5931\u5e76\u88ab\u91cd\u65b0\u521b\u5efa\uff0c\u6216\u8005\u526f\u672c\u6570\u7531 3 \u589e\u52a0\u5230 5\uff0c\u524d\u7aef\u7cfb\u7edf\u4e5f\u65e0\u9700\u5173\u6ce8\u540e\u7aef\u526f\u672c\u7684\u53d8\u5316\u3002\u7531\u4e8e Kubernetes \u96c6\u7fa4\u4e2d\u6bcf\u4e2a Pod\uff08\u5bb9\u5668\u7ec4\uff09\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u7684 IP \u5730\u5740\uff08\u5373\u4f7f\u662f\u540c\u4e00\u4e2a Node \u4e0a\u7684\u4e0d\u540c Pod\uff09\uff0c\u6211\u4eec\u9700\u8981\u4e00\u79cd\u673a\u5236\uff0c\u4e3a\u524d\u7aef\u7cfb\u7edf\u5c4f\u853d\u540e\u7aef\u7cfb\u7edf\u7684 Pod\uff08\u5bb9\u5668\u7ec4\uff09\u5728\u9500\u6bc1\u3001\u521b\u5efa\u8fc7\u7a0b\u4e2d\u6240\u5e26\u6765\u7684 IP \u5730\u5740\u7684\u53d8\u5316\u3002<\/p>\n<p>Kubernetes \u4e2d\u7684 <strong>Service\uff08\u670d\u52a1\uff09<\/strong> \u63d0\u4f9b\u4e86\u8fd9\u6837\u7684\u4e00\u4e2a\u62bd\u8c61\u5c42\uff0c\u5b83\u9009\u62e9\u5177\u5907\u67d0\u4e9b\u7279\u5f81\u7684 Pod\uff08\u5bb9\u5668\u7ec4\uff09\u5e76\u4e3a\u5b83\u4eec\u5b9a\u4e49\u4e00\u4e2a\u8bbf\u95ee\u65b9\u5f0f\u3002Service\uff08\u670d\u52a1\uff09\u4f7f Pod\uff08\u5bb9\u5668\u7ec4\uff09\u4e4b\u95f4\u7684\u76f8\u4e92\u4f9d\u8d56\u89e3\u8026\uff08\u539f\u672c\u4ece\u4e00\u4e2a Pod \u4e2d\u8bbf\u95ee\u53e6\u5916\u4e00\u4e2a Pod\uff0c\u9700\u8981\u77e5\u9053\u5bf9\u65b9\u7684 IP \u5730\u5740\uff09\u3002\u4e00\u4e2a Service\uff08\u670d\u52a1\uff09\u9009\u5b9a\u54ea\u4e9b <strong>Pod\uff08\u5bb9\u5668\u7ec4\uff09<\/strong> \u901a\u5e38\u7531 <strong>LabelSelector\uff08\u6807\u7b7e\u9009\u62e9\u5668\uff09<\/strong> \u6765\u51b3\u5b9a\u3002<\/p>\n<p>\u5728\u521b\u5efaService\u7684\u65f6\u5019\uff0c\u901a\u8fc7\u8bbe\u7f6e\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684<code>spec.type<\/code>\u5b57\u6bb5\u7684\u503c\uff0c\u53ef\u4ee5\u4ee5\u4e0d\u540c\u65b9\u5f0f\u5411\u5916\u90e8\u66b4\u9732\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<ul>\n<li><strong>ClusterIP<\/strong>\uff08\u9ed8\u8ba4\uff09<\/li>\n<\/ul>\n<p>\u5728\u7fa4\u96c6\u4e2d\u7684\u5185\u90e8IP\u4e0a\u516c\u5e03\u670d\u52a1\uff0c\u8fd9\u79cd\u65b9\u5f0f\u7684 Service\uff08\u670d\u52a1\uff09\u53ea\u5728\u96c6\u7fa4\u5185\u90e8\u53ef\u4ee5\u8bbf\u95ee\u5230<\/p>\n<ul>\n<li><strong>NodePort<\/strong><\/li>\n<\/ul>\n<p>\u4f7f\u7528 NAT \u5728\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u7684\u540c\u4e00\u7aef\u53e3\u4e0a\u516c\u5e03\u670d\u52a1\u3002\u8fd9\u79cd\u65b9\u5f0f\u4e0b\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee\u96c6\u7fa4\u4e2d\u4efb\u610f\u8282\u70b9+\u7aef\u53e3\u53f7\u7684\u65b9\u5f0f\u8bbf\u95ee\u670d\u52a1 <code>&lt;NodeIP&gt;:&lt;NodePort&gt;<\/code>\u3002\u6b64\u65f6 ClusterIP \u7684\u8bbf\u95ee\u65b9\u5f0f\u4ecd\u7136\u53ef\u7528\u3002<\/p>\n<ul>\n<li><strong>LoadBalancer<\/strong><\/li>\n<\/ul>\n<p>\u5728\u4e91\u73af\u5883\u4e2d\uff08\u9700\u8981\u4e91\u4f9b\u5e94\u5546\u53ef\u4ee5\u652f\u6301\uff09\u521b\u5efa\u4e00\u4e2a\u96c6\u7fa4\u5916\u90e8\u7684\u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u5e76\u4e3a\u4f7f\u7528\u8be5\u8d1f\u8f7d\u5747\u8861\u5668\u7684 IP \u5730\u5740\u4f5c\u4e3a\u670d\u52a1\u7684\u8bbf\u95ee\u5730\u5740\u3002\u6b64\u65f6 ClusterIP \u548c NodePort \u7684\u8bbf\u95ee\u65b9\u5f0f\u4ecd\u7136\u53ef\u7528\u3002<\/p>\n<blockquote>\n<p>Service\u662f\u4e00\u4e2a\u62bd\u8c61\u5c42\uff0c\u5b83\u901a\u8fc7 LabelSelector \u9009\u62e9\u4e86\u4e00\u7ec4 Pod\uff08\u5bb9\u5668\u7ec4\uff09\uff0c\u628a\u8fd9\u4e9b Pod \u7684\u6307\u5b9a\u7aef\u53e3\u516c\u5e03\u5230\u5230\u96c6\u7fa4\u5916\u90e8\uff0c\u5e76\u652f\u6301\u8d1f\u8f7d\u5747\u8861\u548c\u670d\u52a1\u53d1\u73b0\u3002<\/p>\n<ul>\n<li>\u516c\u5e03 Pod \u7684\u7aef\u53e3\u4ee5\u4f7f\u5176\u53ef\u8bbf\u95ee<\/li>\n<li>\u5728\u591a\u4e2a Pod \u95f4\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861<\/li>\n<li>\u4f7f\u7528 Label \u548c LabelSelector<\/li>\n<\/ul>\n<\/blockquote>\n<h2>\u670d\u52a1\u548c\u6807\u7b7e<\/h2>\n<p>\u4e0b\u56fe\u4e2d\u6709\u4e24\u4e2a\u670d\u52a1Service A(\u9ec4\u8272\u865a\u7ebf)\u548cService B(\u84dd\u8272\u865a\u7ebf)\uff0cService A \u5c06\u8bf7\u6c42\u8f6c\u53d1\u5230 IP \u4e3a 10.10.10.1 \u7684Pod\u4e0a\uff0c Service B \u5c06\u8bf7\u6c42\u8f6c\u53d1\u5230 IP \u4e3a 10.10.10.2\u300110.10.10.3\u300110.10.10.4 \u7684Pod\u4e0a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.kuboard.cn\/assets\/img\/module_04_services.11cdc7bc.svg\" alt=\"Kubernetes Service\u4e0eNode\u548cPod\u7684\u5173\u7cfb\" \/><\/p>\n<p>Service \u5c06\u5916\u90e8\u8bf7\u6c42\u8def\u7531\u5230\u4e00\u7ec4 Pod \u4e2d\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u62bd\u8c61\u5c42\uff0c\u4f7f\u5f97 Kubernetes \u53ef\u4ee5\u5728\u4e0d\u5f71\u54cd\u670d\u52a1\u8c03\u7528\u8005\u7684\u60c5\u51b5\u4e0b\uff0c\u52a8\u6001\u8c03\u5ea6\u5bb9\u5668\u7ec4\uff08\u5728\u5bb9\u5668\u7ec4\u5931\u6548\u540e\u91cd\u65b0\u521b\u5efa\u5bb9\u5668\u7ec4\uff0c\u589e\u52a0\u6216\u8005\u51cf\u5c11\u540c\u4e00\u4e2a Deployment \u5bf9\u5e94\u5bb9\u5668\u7ec4\u7684\u6570\u91cf\u7b49\uff09\u3002<\/p>\n<p>Service\u4f7f\u7528<code>Labels<\/code>\u3001<code>LabelSelector(\u6807\u7b7e\u548c\u9009\u62e9\u5668)<\/code> \u5339\u914d\u4e00\u7ec4 Pod\u3002Labels\uff08\u6807\u7b7e\uff09\u662f\u9644\u52a0\u5230 Kubernetes \u5bf9\u8c61\u7684\u952e\/\u503c\u5bf9\uff0c\u5176\u7528\u9014\u6709\u591a\u79cd\uff1a<\/p>\n<ul>\n<li>\u5c06 Kubernetes \u5bf9\u8c61\uff08Node\u3001Deployment\u3001Pod\u3001Service\u7b49\uff09\u6307\u6d3e\u7528\u4e8e\u5f00\u53d1\u73af\u5883\u3001\u6d4b\u8bd5\u73af\u5883\u6216\u751f\u4ea7\u73af\u5883<\/li>\n<li>\u5d4c\u5165\u7248\u672c\u6807\u7b7e\uff0c\u4f7f\u7528\u6807\u7b7e\u533a\u522b\u4e0d\u540c\u5e94\u7528\u8f6f\u4ef6\u7248\u672c<\/li>\n<li>\u4f7f\u7528\u6807\u7b7e\u5bf9 Kubernetes \u5bf9\u8c61\u8fdb\u884c\u5206\u7c7b<\/li>\n<\/ul>\n<p>\u4e0b\u56fe\u4f53\u73b0\u4e86 Labels\uff08\u6807\u7b7e\uff09\u548c LabelSelector\uff08\u6807\u7b7e\u9009\u62e9\u5668\uff09\u4e4b\u95f4\u7684\u5173\u8054\u5173\u7cfb<\/p>\n<ul>\n<li>Deployment B \u542b\u6709 LabelSelector \u4e3a app=B \u901a\u8fc7\u6b64\u65b9\u5f0f\u58f0\u660e\u542b\u6709 app=B \u6807\u7b7e\u7684 Pod \u4e0e\u4e4b\u5173\u8054<\/li>\n<li>\u901a\u8fc7 Deployment B \u521b\u5efa\u7684 Pod \u5305\u542b\u6807\u7b7e\u4e3a app=B<\/li>\n<li>Service B \u901a\u8fc7\u6807\u7b7e\u9009\u62e9\u5668 app=B \u9009\u62e9\u53ef\u4ee5\u8def\u7531\u7684 Pod<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.kuboard.cn\/assets\/img\/module_04_labels.3255e3d0.svg\" alt=\"Kubernetes Labels\u4e0eLabelSelector\u5173\u7cfb\" \/><\/p>\n<p>Labels\uff08\u6807\u7b7e\uff09\u53ef\u4ee5\u5728\u521b\u5efa Kubernetes \u5bf9\u8c61\u65f6\u9644\u52a0\u4e0a\u53bb\uff0c\u4e5f\u53ef\u4ee5\u5728\u521b\u5efa\u4e4b\u540e\u518d\u9644\u52a0\u4e0a\u53bb\u3002\u4efb\u4f55\u65f6\u5019\u90fd\u53ef\u4ee5\u4fee\u6539\u4e00\u4e2a Kubernetes \u5bf9\u8c61\u7684 Labels\uff08\u6807\u7b7e\uff09<\/p>\n<h2>\u5b9e\u6218\uff1a\u4e3a nginx Deployment \u521b\u5efa\u4e00\u4e2a Service<\/h2>\n<h3>\u4f7f\u7528kubectl<\/h3>\n<p>\uff081\uff09\u521b\u5efanginx\u7684Deployment\u4e2d\u5b9a\u4e49\u4e86Labels\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-yml\">metadata:    #\u8bd1\u540d\u4e3a\u5143\u6570\u636e\uff0c\u5373Deployment\u7684\u4e00\u4e9b\u57fa\u672c\u5c5e\u6027\u548c\u4fe1\u606f\n  name: nginx-deployment    #Deployment\u7684\u540d\u79f0\n  labels:    #\u6807\u7b7e\uff0c\u53ef\u4ee5\u7075\u6d3b\u5b9a\u4f4d\u4e00\u4e2a\u6216\u591a\u4e2a\u8d44\u6e90\uff0c\u5176\u4e2dkey\u548cvalue\u5747\u53ef\u81ea\u5b9a\u4e49\uff0c\u53ef\u4ee5\u5b9a\u4e49\u591a\u7ec4\n    app: nginx    #\u4e3a\u8be5Deployment\u8bbe\u7f6ekey\u4e3aapp\uff0cvalue\u4e3anginx\u7684\u6807\u7b7e<\/code><\/pre>\n<p>\uff082\uff09\u521b\u5efa\u6587\u4ef6 nginx-service.yaml<\/p>\n<pre><code class=\"language-bash\">vim nginx-service.yaml<\/code><\/pre>\n<p>\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-yml\">apiVersion: v1\nkind: Service\nmetadata:\n  name: nginx-service    #Service \u7684\u540d\u79f0\n  labels:         #Service \u81ea\u5df1\u7684\u6807\u7b7e\n    app: nginx    #\u4e3a\u8be5 Service \u8bbe\u7f6e key \u4e3a app\uff0cvalue \u4e3a nginx \u7684\u6807\u7b7e\nspec:        #\u8fd9\u662f\u5173\u4e8e\u8be5 Service \u7684\u5b9a\u4e49\uff0c\u63cf\u8ff0\u4e86 Service \u5982\u4f55\u9009\u62e9 Pod\uff0c\u5982\u4f55\u88ab\u8bbf\u95ee\n  selector:        #\u6807\u7b7e\u9009\u62e9\u5668\n    app: nginx    #\u9009\u62e9\u5305\u542b\u6807\u7b7e app:nginx \u7684 Pod\n  ports:\n  - name: nginx-port    #\u7aef\u53e3\u7684\u540d\u5b57\n    protocol: TCP        #\u534f\u8bae\u7c7b\u578b TCP\/UDP\n    port: 80            #\u96c6\u7fa4\u5185\u7684\u5176\u4ed6\u5bb9\u5668\u7ec4\u53ef\u901a\u8fc7 80 \u7aef\u53e3\u8bbf\u95ee Service\n    nodePort: 32600   #\u901a\u8fc7\u4efb\u610f\u8282\u70b9\u7684 32600 \u7aef\u53e3\u8bbf\u95ee Service\n    targetPort: 80    #\u5c06\u8bf7\u6c42\u8f6c\u53d1\u5230\u5339\u914d Pod \u7684 80 \u7aef\u53e3\n  type: NodePort    #Serive\u7684\u7c7b\u578b\uff0cClusterIP\/NodePort\/LoaderBalancer<\/code><\/pre>\n<p>\uff083\uff09\u6267\u884c\u547d\u4ee4<\/p>\n<pre><code class=\"language-bash\">kubectl apply -f nginx-service.yaml<\/code><\/pre>\n<p>\uff084\uff09\u68c0\u67e5\u6267\u884c\u7ed3\u679c<\/p>\n<pre><code class=\"language-bash\">kubectl get services -o wide<\/code><\/pre>\n<p>\u53ef\u67e5\u770b\u5230\u540d\u79f0\u4e3a<code>nginx-service<\/code>\u7684\u670d\u52a1\u3002<\/p>\n<p>\uff085\uff09\u8bbf\u95ee\u670d\u52a1<\/p>\n<pre><code class=\"language-bash\">curl &lt;\u4efb\u610f\u8282\u70b9\u7684 IP&gt;:32600<\/code><\/pre>\n<p>\u5982\u679c\u96c6\u7fa4\u5728\u4e91\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e91\u670d\u52a1\u5546\u7684\u5b89\u5168\u7ec4\u5f00\u653e 32600 \u7aef\u53e3\u7684\u8bbf\u95ee<\/p>\n<h3>\u4f7f\u7528Kuboard<\/h3>\n<ul>\n<li>\u5728\u4e0a\u4e00\u4e2a\u6b65\u9aa4\u4e2d\u521b\u5efa\u7684\u5de5\u4f5c\u8d1f\u8f7d\u67e5\u770b\u754c\u9762\u70b9\u51fb <strong>\u7f16\u8f91<\/strong> \u6309\u94ae\uff0c\u8be5\u6309\u94ae\u7684\u4f4d\u7f6e\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/kuboard.cn\/assets\/img\/image-20210403203205997.c4d6dcdd.png\" alt=\"Kuboard \u6dfb\u52a0Service\" \/><\/p>\n<ul>\n<li>\u5728\u5de5\u4f5c\u8d1f\u8f7d\u7f16\u8f91\u9875\u5207\u6362\u5230 <strong>\u670d\u52a1\/\u5e94\u7528\u8def\u7531<\/strong> \u6807\u7b7e\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/kuboard.cn\/assets\/img\/image-20210403203348389.a770464a.png\" alt=\"Kuboard \u6dfb\u52a0Service\" \/><\/p>\n<p>\u670d\u52a1\u7c7b\u578b\uff1a NodePort<\/p>\n<p>\u586b\u5199\u8868\u5355\u5982\u4e0b\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u534f\u8bae<\/th>\n<th style=\"text-align: left;\">\u670d\u52a1\u7aef\u53e3\uff08port\uff09<\/th>\n<th style=\"text-align: left;\">\u8282\u70b9\u7aef\u53e3\uff08nodePort\uff09<\/th>\n<th style=\"text-align: left;\">\u5bb9\u5668\u7aef\u53e3\uff08targetPort\uff09<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">TCP<\/td>\n<td style=\"text-align: left;\">80<\/td>\n<td style=\"text-align: left;\">32601<\/td>\n<td style=\"text-align: left;\">80<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\n<p>\u70b9\u51fb <strong>\u4fdd\u5b58<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u8bbf\u95ee\u670d\u52a1<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u5728\u6d4f\u89c8\u5668\u6253\u5f00 <code>http:\/\/&lt;\u4efb\u610f\u8282\u70b9\u7684 IP&gt;:32601<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u7ffb\u8bd1\u81ea Kubernetes \u5b98\u7f51 Using a Service to Expose Your App\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[483],"class_list":["post-1894","post","type-post","status-publish","format-standard","hentry","category-k8s","tag-kuboard"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1894"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1894\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}