{"id":11945,"date":"2023-08-18T23:08:09","date_gmt":"2023-08-18T15:08:09","guid":{"rendered":"http:\/\/92it.top\/?p=11945"},"modified":"2023-08-21T21:50:25","modified_gmt":"2023-08-21T13:50:25","slug":"k8s%e6%b7%b1%e5%85%a5%e5%ad%a6%e4%b9%a0-%e4%bd%a0%e5%bf%85%e9%a1%bb%e7%9f%a5%e9%81%93%e7%9a%84service","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=11945","title":{"rendered":"K8S\u6df1\u5165\u5b66\u4e60 \u4f60\u5fc5\u987b\u77e5\u9053\u7684Service"},"content":{"rendered":"\n<p>\u8f6c\u8f7d\uff1a<a href=\"https:\/\/www.cnblogs.com\/edisonchou\/p\/aspnet_core_on_k8s_deepstudy_part4.html\">https:\/\/www.cnblogs.com\/edisonchou\/p\/aspnet_core_on_k8s_deepstudy_part4.html<\/a><\/p>\n\n\n\n<p>\u672c\u7bc7\u5df2\u52a0\u5165\u300a<a href=\"https:\/\/www.cnblogs.com\/edisonchou\/p\/aspnet_core_k8s_artcles_index.html\" target=\"_blank\" rel=\"noreferrer noopener\">.NET Core on K8S\u5b66\u4e60\u5b9e\u8df5\u7cfb\u5217\u6587\u7ae0\u7d22\u5f15<\/a>\u300b\uff0c\u53ef\u4ee5\u70b9\u51fb\u67e5\u770b\u66f4\u591a\u5bb9\u5668\u5316\u6280\u672f\u76f8\u5173\u7cfb\u5217\u6587\u7ae0\u3002<\/p>\n\n\n\n<p>\u524d\u9762\u51e0\u7bc7\u6587\u7ae0\u6211\u4eec\u90fd\u662f\u4f7f\u7528\u7684ClusterIP\u4f9b\u96c6\u7fa4\u5185\u90e8\u8bbf\u95ee\uff0c\u6bcf\u4e2aPod\u90fd\u6709\u4e00\u4e2a\u81ea\u5df1\u7684IP\u5730\u5740\uff0c\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff1a\u5f53\u63a7\u5236\u5668\u4f7f\u7528\u65b0\u7684Pod\u66ff\u4ee3\u53d1\u751f\u6545\u969c\u7684Pod\u65f6\u53c8\u6216\u8005\u589e\u52a0\u65b0\u7684\u526f\u672cPod\u65f6\uff0c\u65b0Pod\u4f1a\u5206\u914d\u5230\u65b0\u7684IP\u5730\u5740\uff0c\u90a3\u4e48\u60f3\u8981\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1\u65f6\uff0c\u5ba2\u6237\u7aef\u5982\u4f55\u627e\u5230\u5e76\u8bbf\u95ee\u8fd9\u4e2a\u670d\u52a1\uff1f\u6ca1\u5173\u7cfb\uff0c\u522b\u62a0\u8111\u58f3\u4e86\uff0c\u672c\u6587\u4ecb\u7ecd\u7684Service\u5c31\u662f\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n\n\n\n<p><strong>\u4e00\u3001\u8ba4\u8bc6Service<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>1.1 \u4ec0\u4e48\u662fService\uff1f<\/strong><\/p>\n\n\n\n<p>Service\u662f\u4e00\u4e2a\u62bd\u8c61\u6982\u5ff5\uff0c\u5b83\u5b9a\u4e49\u4e86\u903b\u8f91\u96c6\u5408\u4e0b<strong>\u8bbf\u95eePod\u7ec4\u7684\u7b56\u7565<\/strong>\u3002\u901a\u8fc7\u4f7f\u7528Service\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u4e0d\u7528\u5173\u5fc3\u8fd9\u4e2a\u670d\u52a1\u4e0b\u9762\u7684Pod\u7684\u589e\u52a0\u548c\u51cf\u5c11\u3001\u6545\u969c\u91cd\u542f\u7b49\uff0c\u53ea\u9700\u901a\u8fc7Service\u5c31\u80fd\u591f\u8bbf\u95ee\u5230\u5bf9\u5e94\u670d\u52a1\u7684\u5bb9\u5668\uff0c\u5373<strong>\u901a\u8fc7Service\u6765\u66b4\u9732Pod\u7684\u8d44\u6e90<\/strong>\u3002<\/p>\n\n\n\n<p>\u8fd9\u6837\u8bf4\u53ef\u80fd\u8fd8\u662f\u6709\u70b9\u96be\u61c2\uff0c\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5047\u8bbe\u6211\u4eec\u7684\u4e00\u4e2a\u670d\u52a1Service A\u4e0b\u9762\u67093\u4e2aPod\uff0c\u6211\u4eec\u90fd\u77e5\u9053Pod\u7684IP\u90fd\u4e0d\u662f\u6301\u4e45\u5316\u7684\uff0c\u91cd\u542f\u4e4b\u540e\u5c31\u4f1a\u6709\u53d8\u5316\u3002\u90a3\u4e48Service B\u60f3\u8981\u8bbf\u95eeService A\u7684Pod\uff0c\u5b83\u53ea\u9700\u8ddf\u7ed1\u5b9a\u4e86\u8fd93\u4e2aPod\u7684Service A\u6253\u4ea4\u9053\u5c31\u53ef\u4ee5\u4e86\uff0c\u65e0\u987b\u5173\u5fc3\u4e0b\u9762\u76843\u4e2aPod\u7684IP\u548c\u7aef\u53e3\u7b49\u4fe1\u606f\u7684\u53d8\u5316\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5c31\u50cf\u4e00\u4e2aService Discovery\u670d\u52a1\u53d1\u73b0\u7684\u7ec4\u4ef6\uff0c\u4f60\u65e0\u987b\u5173\u5fc3\u5177\u4f53\u670d\u52a1\u7684URL\uff0c\u53ea\u9700\u77e5\u9053\u5b83\u4eec\u5728\u670d\u52a1\u53d1\u73b0\u4e2d\u6ce8\u518c\u7684Key\u5c31\u53ef\u4ee5\u901a\u8fc7\u7c7b\u4f3cConsul\u3001Eureka\u4e4b\u7c7b\u7684\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\u4e2d\u83b7\u53d6\u5b83\u4eec\u7684URL\u4e00\u6837\uff0c\u8fd8\u662f\u5b9e\u73b0\u4e86\u8d1f\u8f7d\u5747\u8861\u6548\u679c\u7684URL\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179.png\" alt=\"\" class=\"wp-image-11946\" width=\"427\" height=\"372\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179.png 852w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179-300x262.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179-768x671.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179-830x725.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179-230x201.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179-350x306.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-179-480x419.png 480w\" sizes=\"(max-width: 427px) 100vw, 427px\" \/><\/figure><\/div>\n\n\n\n<p><strong>1.2 Service\u7684\u51e0\u79cd\u7c7b\u578b<\/strong><\/p>\n\n\n\n<p><strong>\uff081\uff09ClusterIP<\/strong><\/p>\n\n\n\n<p>ClusterIP \u670d\u52a1\u662f Kubernetes \u7684\u9ed8\u8ba4\u670d\u52a1\u3002\u5b83\u7ed9\u4f60\u4e00\u4e2a\u96c6\u7fa4\u5185\u7684\u670d\u52a1\uff0c\u96c6\u7fa4\u5185\u7684\u5176\u5b83\u5e94\u7528\u90fd\u53ef\u4ee5\u8bbf\u95ee\u8be5\u670d\u52a1\uff0c\u4f46\u662f\u96c6\u7fa4\u5916\u90e8\u65e0\u6cd5\u8bbf\u95ee\u5b83\u3002<\/p>\n\n\n\n<p>\u56e0\u6b64\uff0c\u8fd9\u79cd\u670d\u52a1\u5e38\u88ab\u7528\u4e8e\u5185\u90e8\u7a0b\u5e8f\u4e92\u76f8\u7684\u8bbf\u95ee\uff0c\u4e14\u4e0d\u9700\u8981\u5916\u90e8\u8bbf\u95ee\uff0c\u90a3\u4e48\u8fd9\u4e2a\u65f6\u5019\u7528ClusterIP\u5c31\u6bd4\u8f83\u5408\u9002\uff0c\u5982\u4e0b\u9762\u7684yaml\u6587\u4ef6\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apiVersion: v1\nkind: Service\nmetadata:  \nname: my-internal-service\nselector:    \napp: my-app\nspec:\ntype: ClusterIP\nports:  \n- name: http\nport: 80\ntargetPort: 80\nprotocol: TCP<\/pre>\n\n\n\n<p>\u90a3\u4e48\uff0c\u5982\u679c\u9700\u8981\u4ece\u5916\u90e8\u8bbf\u95ee\u5462\uff08\u6bd4\u5982\u6211\u4eec\u5728\u5f00\u53d1\u6a21\u5f0f\u4e0b\u603b\u5f97\u8c03\u8bd5\u5427\uff09\uff1f\u53ef\u4ee5\u542f\u7528K8S\u7684\u4ee3\u7406\u6a21\u5f0f\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ kubectl proxy --port=8080<\/pre>\n\n\n\n<p>\u5982\u6b64\u4e00\u6765\uff0c\u4fbf\u53ef\u4ee5\u901a\u8fc7K8S\u7684API\u6765\u8bbf\u95ee\u4e86\uff0c\u4f8b\u5982\u4e0b\u9762\u8fd9\u4e2aURL\u5c31\u53ef\u4ee5\u8bbf\u95ee\u5728yaml\u4e2d\u5b9a\u4e49\u7684\u8fd9\u4e2amy-internal-service\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/localhost:8080\/api\/v1\/proxy\/namespaces\/default\/services\/my-internal-service:http\/<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">PS\uff1aClusterIP\u662f\u4e00\u4e2a\u865a\u62dfIP\uff0c\u7531K8S\u8282\u70b9\u4e0a\u7684iptables\u89c4\u5219\u7ba1\u7406\u7684\u3002iptables\u4f1a\u5c06\u8bbf\u95eeService\u7684\u6d41\u91cf\u8f6c\u53d1\u5230\u540e\u7aefPod\uff0c\u800c\u4e14\u4f7f\u7528\u7c7b\u4f3c\u4e8e\u8f6e\u8be2\u7684\u8d1f\u8f7d\u5747\u8861\u7b56\u7565\u8f6c\u53d1\u7684\u3002\u3000\u3000<\/pre>\n\n\n\n<p><strong>\uff082\uff09NodePort<\/strong><\/p>\n\n\n\n<p>\u9664\u4e86\u53ea\u5728\u5185\u90e8\u8bbf\u95ee\u7684\u670d\u52a1\uff0c\u6211\u4eec\u603b\u6709\u5f88\u591a\u662f\u9700\u8981\u66b4\u9732\u51fa\u6765\u516c\u5f00\u8bbf\u95ee\u7684\u670d\u52a1\u5427\u3002\u5728ClusterIP\u57fa\u7840\u4e0a\u4e3aService\u5728\u6bcf\u53f0\u673a\u5668\u4e0a\u7ed1\u5b9a\u4e00\u4e2a\u7aef\u53e3\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7:NodePort\u6765\u8bbf\u95ee\u8fd9\u4e9b\u670d\u52a1\u3002\u4f8b\u5982\uff0c\u4e0b\u9762\u8fd9\u4e2ayaml\u4e2d\u5b9a\u4e49\u4e86\u670d\u52a1\u4e3aNodePort\u7c7b\u578b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apiVersion: v1\nkind: Service\nmetadata:  \nname: my-nodeport-service\nselector:    \napp: my-app\nspec:\ntype: NodePort\nports:  \n- name: http\nport: 80\ntargetPort: 80\nnodePort: 30036\nprotocol: TCP<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">PS\uff1a\u8fd9\u79cd\u65b9\u5f0f\u987e\u540d\u601d\u4e49\u9700\u8981\u4e00\u4e2a\u989d\u5916\u7684\u7aef\u53e3\u6765\u8fdb\u884c\u66b4\u9732\uff0c\u4e14\u7aef\u53e3\u8303\u56f4\u53ea\u80fd\u662f 30000-32767\uff0c\u5982\u679c\u8282\u70b9\/VM \u7684 IP \u5730\u5740\u53d1\u751f\u53d8\u5316\uff0c\u4f60\u9700\u8981\u80fd\u5904\u7406\u8fd9\u79cd\u60c5\u51b5\u3002<\/pre>\n\n\n\n<p><strong>\uff083\uff09LoadBalancer<\/strong><\/p>\n\n\n\n<p>LoadBalancer \u670d\u52a1\u662f\u66b4\u9732\u670d\u52a1\u5230 internet \u7684\u6807\u51c6\u65b9\u5f0f\uff0c\u5b83\u501f\u52a9Cloud Provider\u521b\u5efa\u4e00\u4e2a\u5916\u90e8\u7684\u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u5e76\u5c06\u8bf7\u6c42\u8f6c\u53d1\u5230:NodePort\uff08\u5411\u8282\u70b9\u5bfc\u6d41\uff09\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\u4e0b\u9762\u8fd9\u4e2ayaml\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">kind: Service\napiVersion: v1\nmetadata:\n  name: my-service\nspec:\n  selector:\n    app: MyApp\n  ports:\n  - protocol: TCP\n    port: 80\n    targetPort: 9376\n  clusterIP: 10.0.171.239\n  loadBalancerIP: 78.11.24.19\n  type: LoadBalancer\nstatus:\n  loadBalancer:\n    ingress:\n    - ip: 146.148.47.155<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">PS\uff1a\u6bcf\u4e00\u4e2a\u7528 LoadBalancer \u66b4\u9732\u7684\u670d\u52a1\u90fd\u4f1a\u6709\u5b83\u81ea\u5df1\u7684 IP \u5730\u5740\uff0c\u6bcf\u4e2a\u7528\u5230\u7684 LoadBalancer \u90fd\u9700\u8981\u4ed8\u8d39\uff0c\u8fd9\u5c06\u662f\u6bd4\u8f83\u6602\u8d35\u7684\u82b1\u8d39\u3002\u3000<\/pre>\n\n\n\n<p><strong>\u4e8c\u3001Service\u7684\u521b\u5efa\u4e0e\u8fd0\u884c<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>2.1 \u521b\u5efaDeployment<\/strong><\/p>\n\n\n\n<p>\u8fd9\u91cc\u4ecd\u7136\u4ee5\u6211\u4eec\u7684\u4e00\u4e2aASP.NET Core WebAPI\u9879\u76ee\u4e3a\u4f8b\uff0c\u51c6\u5907\u4e00\u4e2aDeployment\u7684YAML\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: edc-webapi-deployment\n  namespace: aspnetcore\nspec:\n  replicas: 2\n  selector:\n    matchLabels:\n      name: edc-webapi\n  template:\n    metadata:\n      labels:\n        name: edc-webapi\n    spec:\n      containers:\n      - name: edc-webapi-container\n        image: edisonsaonian\/k8s-demo\n        ports:\n        - containerPort: 80\n        imagePullPolicy: IfNotPresent<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4eec\u9700\u8981\u6ce8\u610f\u7684\u5c31\u662f\u7ed9\u8be5Deployment\u6807\u6ce8<strong>selector\u7684matchLabels\u4ee5\u53catemplate\u4e2d\u7684labels<\/strong>\uff0c\u8fd9\u662f\u4e00\u4e2aKey\/Value\u5bf9\uff0c\u7528\u4e8e\u540e\u7eedService\u6765\u5339\u914d\u8981\u6311\u9009\u54ea\u4e9bPod\u4f5c\u4e3aService\u7684\u540e\u7aef\uff0c\u5373\u9700\u8981\u7ed9\u54ea\u4e9bPod\u63d0\u4f9b\u670d\u52a1\u53d1\u73b0\u4ee5\u53ca\u8d1f\u8f7d\u5747\u8861\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u540c\u6837\uff0c\u901a\u8fc7kubectl\u521b\u5efa\u8d44\u6e90\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">kubectl apply -f edc-api.yaml\n<\/pre>\n\n\n\n<p>\u7136\u540e\uff0c\u901a\u8fc7curl\u547d\u4ee4\u9a8c\u8bc1\u4e00\u4e0b\uff1a\uff08\u8fd9\u91cc\u7684\u4e24\u4e2aIP\u5730\u5740\u662fClusterIP\uff0c\u5b83\u4eec\u5206\u522b\u4f4d\u4e8e\u6211\u7684\u4e24\u4e2aK8S Node\u8282\u70b9\u4e0a\uff09<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl 10.244.1.40\/api\/values\ncurl 10.244.2.31\/api\/values<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-1024x73.png\" alt=\"\" class=\"wp-image-11947\" width=\"553\" height=\"39\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-1024x73.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-300x21.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-768x55.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-830x59.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-230x16.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-350x25.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180-480x34.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-180.png 1376w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u6211\u4eec\u7684ASP.NET Core WebAPI\u6b63\u5e38\u7684\u8fd4\u56de\u4e86JSON\u6570\u636e\u3002<\/p>\n\n\n\n<p><strong>2.2 \u521b\u5efaService<\/strong><\/p>\n\n\n\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u5c31\u4e3a\u4e0a\u9762\u7684\u4e24\u4e2aPod\u521b\u5efa\u4e00\u4e2aService\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apiVersion: v1\nkind: Service\nmetadata:\n  name: edc-webapi-service\n  namespace: aspnetcore\nspec:\n  ports:\n    - port: 8080\n      targetPort: 80\n  selector:\n    name: edc-webapi<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u51e0\u4e2a\u70b9\uff1a<\/p>\n\n\n\n<p>\uff081\uff09port : 8080 => \u6307\u5c06Service\u76848080\u7aef\u53e3\u6620\u5c04\u5230Pod\u7684\u5bf9\u5e94\u7aef\u53e3\u4e0a\uff0c\u8fd9\u91ccPod\u7684\u5bf9\u5e94\u7aef\u53e3\u7531 targetPort \u6307\u5b9a\u3002<\/p>\n\n\n\n<p>\uff082\uff09selector => \u6307\u5c06\u5177\u6709 name: edc-webapi \u8fd9\u4e2alabel\u7684Pod\u4f5c\u4e3a\u6211\u4eec\u8fd9\u4e2aService\u7684\u540e\u7aef\uff0c\u4e3a\u8fd9\u4e9bPod\u63d0\u4f9b\u7edf\u4e00IP\u548c\u7aef\u53e3\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4eec\u6765\u8fdb\u884c\u9a8c\u8bc1\u4e00\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">kubectl get service -n aspnetcore\ncurl 10.1.59.71:8080\/api\/values<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-1024x113.png\" alt=\"\" class=\"wp-image-11948\" width=\"540\" height=\"59\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-1024x113.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-300x33.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-768x85.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-830x92.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-230x25.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-350x39.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181-480x53.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-181.png 1396w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0bService\u7684\u7c7b\u578b\u65f6ClusterIP\uff0c\u53ea\u80fd\u63d0\u4f9b\u96c6\u7fa4\u5185\u90e8\u7684\u670d\u52a1\u8bbf\u95ee\u3002\u5982\u679c\u60f3\u8981\u4e3a\u5916\u90e8\u63d0\u4f9b\u8bbf\u95ee\uff0c\u90a3\u4e48\u9700\u8981\u6539\u4e3aNodePort\u3002<\/p>\n\n\n\n<p><strong>2.3 \u4f7f\u7528NodePort<\/strong><\/p>\n\n\n\n<p>\u4e0b\u9762\u4e3aService\u589e\u52a0NodePort\u8bbf\u95ee\u65b9\u5f0f\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apiVersion: v1\nkind: Service\nmetadata:\n  name: edc-webapi-service\n  namespace: aspnetcore\nspec:\n  type: NodePort\n  ports:\n    - port: 8080\n      targetPort: 80\n  selector:\n    name: edc-webapi<\/pre>\n\n\n\n<p>\u518d\u6b21\u8fdb\u884c\u521b\u5efa\uff0c\u4f1a\u8986\u76d6\u5df2\u6709\u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">kubectl apply -f edc-api-service.yaml<\/pre>\n\n\n\n<p>\u518d\u6b21\u8fdb\u884c\u9a8c\u8bc1\uff0c\u4f1a\u53d1\u73b0\u5df2\u7ecf\u6539\u4e3a\u4e86NodePort\u65b9\u5f0f\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-1024x93.png\" alt=\"\" class=\"wp-image-11949\" width=\"594\" height=\"54\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-1024x93.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-300x27.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-768x70.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-830x75.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-230x21.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-350x32.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182-480x43.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-182.png 1370w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/figure><\/div>\n\n\n\n<p>\u8fd9\u91cc\u7684PORT\u5df2\u7ecf\u53d8\u4e3a\u4e868080:32413\uff0c\u610f\u5473\u7740\u5b83\u5c06Service\u4e2d\u76848080\u7aef\u53e3\u6620\u5c04\u5230\u4e86Node\u8282\u70b9\u768432413\u7aef\u53e3\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95eeNode\u8282\u70b9\u768432413\u7aef\u53e3\u83b7\u53d6ASP.NET Core WebAPI\u8fd4\u56de\u7684\u63a5\u53e3\u6570\u636e\u4e86\u3002<\/p>\n\n\n\n<p>\u8bbf\u95eek8s-node1\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-183-1024x117.png\" alt=\"\" class=\"wp-image-11950\" width=\"511\" height=\"57\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-183-1024x117.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-183-300x34.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-183-830x95.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-183-230x26.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-183-350x40.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-183-480x55.png 480w\" sizes=\"(max-width: 511px) 100vw, 511px\" \/><\/figure><\/div>\n\n\n\n<p>\u8bbf\u95eek8s-node2\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-1024x121.png\" alt=\"\" class=\"wp-image-11951\" width=\"521\" height=\"61\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-1024x121.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-300x35.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-768x91.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-830x98.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-230x27.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-350x41.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184-480x57.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-184.png 1390w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/figure><\/div>\n\n\n\n<p><strong>2.4 \u6307\u5b9a\u7279\u5b9a\u7aef\u53e3<\/strong><\/p>\n\n\n\n<p>\u521a\u521a\u7684NodePort\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u968f\u673a\u9009\u62e9\u4e00\u4e2a\u7aef\u53e3\uff0830000-32767\u8303\u56f4\u5185\uff09\uff0c\u4e0d\u8fc7\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528nodePort\u5c5e\u6027\u6307\u5b9a\u4e00\u4e2a\u7279\u5b9a\u7aef\u53e3\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apiVersion: v1\nkind: Service\nmetadata:\n  name: edc-webapi-service\n  namespace: aspnetcore\nspec:\n  type: NodePort\n  ports:\n    - nodePort: 31000 \n      port: 8080\n      targetPort: 80\n  selector:\n    name: edc-webapi<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4eec\u81ea\u5df1\u6307\u5b9a\u4e86\u4e00\u4e2a\u5916\u90e8\u8bbf\u95ee\u7aef\u53e3\uff1a31000\uff0c\u901a\u8fc7kubectl\u8986\u76d6\u4e4b\u540e\uff0c\u6211\u4eec\u518d\u6b21\u9a8c\u8bc1\u4e00\u4e0b\uff1a<\/p>\n\n\n\n<p>\u8bbf\u95eek8s-node1\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-1024x107.png\" alt=\"\" class=\"wp-image-11952\" width=\"595\" height=\"61\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-1024x107.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-300x31.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-768x80.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-830x87.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-230x24.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-350x37.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185-480x50.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-185.png 1400w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/figure><\/div>\n\n\n\n<p>\u8bbf\u95eek8s-node2\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-1024x107.png\" alt=\"\" class=\"wp-image-11953\" width=\"545\" height=\"56\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-1024x107.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-300x31.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-768x81.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-830x87.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-230x24.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-350x37.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186-480x50.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-186.png 1410w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/figure><\/div>\n\n\n\n<p>\u6700\u540e\uff0c\u518d\u6b21\u603b\u7ed3\u4e00\u4e0b\u4e09\u4e2a\u7aef\u53e3\u914d\u7f6e\uff1a<\/p>\n\n\n\n<ul><li>\uff081\uff09nodePort => Node\u8282\u70b9\u4e0a\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u4e5f\u5c31\u662f\u5916\u90e8\u8bbf\u95ee\u7684Service\u7aef\u53e3<\/li><li>\uff082\uff09port => ClusterIP\u4e0a\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u5373\u5185\u90e8\u8bbf\u95ee\u7684Service\u7aef\u53e3<\/li><li>\uff083\uff09targetPort => Pod\u4e0a\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u5373\u5bb9\u5668\u5185\u90e8\u7684\u7aef\u53e3<\/li><\/ul>\n\n\n\n<p><strong>\u4e09\u3001DNS\u8bbf\u95eeService<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Kubernetes\u9ed8\u8ba4\u5b89\u88c5\u4e86\u4e00\u4e2adns\u7ec4\u4ef6coredns\uff0c\u5b83\u4f4d\u4e8ekube-system\u547d\u540d\u7a7a\u95f4\u4e2d\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-1024x149.png\" alt=\"\" class=\"wp-image-11954\" width=\"574\" height=\"83\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-1024x149.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-300x44.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-768x111.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-830x120.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-230x33.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-350x51.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187-480x70.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-187.png 1406w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><\/figure><\/div>\n\n\n\n<p>\u6bcf\u5f53\u6709\u65b0\u7684Service\u88ab\u521b\u5efa\u65f6\uff0ccoredns\u4f1a\u6dfb\u52a0\u8be5Service\u7684DNS\u8bb0\u5f55\uff0c\u4e8e\u662f\u5728Cluster\u4e2d\u7684Pod\u4fbf\u53ef\u4ee5\u901a\u8fc7servicename.namespacename\u6765\u8bbf\u95eeService\u4e86\uff0c\u4ece\u800c\u53ef\u4ee5\u505a\u5230\u4e00\u4e2a\u670d\u52a1\u53d1\u73b0\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4eec\u6765\u9a8c\u8bc1\u4e00\u4e0b\uff0c\u901a\u8fc7\u4e34\u65f6\u521b\u5efa\u4e00\u4e2abusybox Pod\u6765\u8bbf\u95eeedc-webapi-service.aspnetcore:8080\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">kubectl run busybox --rm -ti --image=busybox \/bin\/sh<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-1024x165.png\" alt=\"\" class=\"wp-image-11955\" width=\"546\" height=\"88\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-1024x165.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-300x48.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-768x124.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-830x134.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-230x37.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-350x56.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188-480x77.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-188.png 1390w\" sizes=\"(max-width: 546px) 100vw, 546px\" \/><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0ccoredns\u7ec4\u4ef6\u4e3a\u521a\u521a\u521b\u5efa\u7684Service edc-webapi-service\u521b\u5efa\u4e86DNS\u8bb0\u5f55\uff0c\u5728Cluster\u4e2d\u7684Pod\u65e0\u987b\u77e5\u9053edc-webapi-service\u7684IP\u5730\u5740\u53ea\u9700\u8981\u77e5\u9053ServiceName\u5373\u53ef\u8bbf\u95ee\u5230\u8be5Service\u3002<\/p>\n\n\n\n<p><strong>\u56db\u3001\u5c0f\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u3000\u672c\u6587\u4ecb\u7ecd\u4e86K8S\u4e2dService\u7684\u57fa\u672c\u6982\u5ff5\u53ca\u5e38\u7528\u7c7b\u578b\uff0c\u7136\u540e\u901a\u8fc7\u4e00\u4e2a\u5177\u4f53\u7684\u4f8b\u5b50\u6f14\u793a\u4e86\u5982\u4f55\u521b\u5efaService\u548c\u4f7f\u7528NodePort\u7684\u65b9\u5f0f\u5bf9\u5916\u63d0\u4f9b\u8bbf\u95ee\uff0c\u6700\u540e\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7DNS\u7684\u65b9\u5f0f\u8bbf\u95eeService\u4ece\u800c\u5b9e\u73b0\u670d\u52a1\u53d1\u73b0\u7684\u6548\u679c\u3002\u5f53\u7136\uff0c\u7b14\u8005\u4e5f\u662f\u521d\u5b66\uff0c\u5f88\u591a\u4e1c\u897f\u6ca1\u6709\u4ecb\u7ecd\u5230\uff0c\u4e5f\u8bf7\u5927\u5bb6\u591a\u591a\u53c2\u8003\u5176\u4ed6\u8d44\u6599\u66f4\u52a0\u6df1\u5165\u4e86\u89e3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\uff1ahttps:\/\/www.cnblogs.com\/edisonchou\/p\/aspnet_core_on_ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/11945"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11945"}],"version-history":[{"count":2,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/11945\/revisions"}],"predecessor-version":[{"id":12032,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/11945\/revisions\/12032"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}