	{"id":64449,"date":"2021-10-26T16:06:03","date_gmt":"2021-10-26T15:06:03","guid":{"rendered":"https:\/\/www.artefact.com\/?post_type=news&#038;p=64449"},"modified":"2024-09-20T17:45:46","modified_gmt":"2024-09-20T16:45:46","slug":"serving-ml-models-at-scale-using-mlflow-on-kubernetes-part-2-2","status":"publish","type":"blog","link":"https:\/\/www.artefact.com\/zh\/blog\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-part-2-2\/","title":{"rendered":"\u5728 Kubernetes \u4e0a\u4f7f\u7528 Mlflow \u5927\u89c4\u6a21\u670d\u52a1 ML \u6a21\u578b - \u7b2c 3 \u90e8\u5206"},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling article-author\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-background-color:#ffffff;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_2 1_2 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:50%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:50%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-1 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u4f5c\u8005<\/h2><\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27150%27%20height%3D%270%27%20viewBox%3D%270%200%20150%200%27%3E%3Crect%20width%3D%27150%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/kais-laribi.jpeg\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left article-author-image\" style=\"width: 150px; border-radius: 54% 46% 77% 23% \/ 74% 40% 60% 26%; overflow: hidden;\" width=\"150\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-2 fusion-sep-none fusion-title-text fusion-title-size-three article-author-name-title\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">\u51ef\u65af-\u62c9\u91cc\u6bd4<\/h3><\/div><div class=\"fusion-text fusion-text-1 article-author-description\"><p>Data \u9ad8\u7ea7\u79d1\u5b66\u5bb6\uff08Artefact<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center fusion-column-inner-bg-wrapper\" style=\"--awb-padding-top:20px;--awb-padding-right:20px;--awb-padding-bottom:20px;--awb-padding-left:20px;--awb-overflow:hidden;--awb-inner-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-top:1px;--awb-border-right:1px;--awb-border-bottom:1px;--awb-border-left:1px;--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-inner-bg-border-radius:4px 4px 4px 4px;--awb-inner-bg-overflow:hidden;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><span class=\"fusion-column-inner-bg hover-type-none\"><a class=\"fusion-column-anchor\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-a83390718a92\" rel=\"noopener noreferrer\" target=\"_blank\"><span class=\"fusion-column-inner-bg-image\"><\/span><\/a><\/span><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-row fusion-flex-align-items-center\"><div class=\"fusion-text fusion-text-2\"><p><u>\u9605\u8bfb\u6211\u4eec\u7684\u6587\u7ae0<\/u><\/p>\n<\/div><div class=\"fusion-image-element\" style=\"--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"4000\" height=\"992\" title=\"\u4e2d\u578b Blog\" src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" alt class=\"lazyload img-responsive wp-image-60582\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%274000%27%20height%3D%27992%27%20viewBox%3D%270%200%204000%20992%27%3E%3Crect%20width%3D%274000%27%20height%3D%27992%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-200x50.png 200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-400x99.png 400w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-600x149.png 600w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-800x198.png 800w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-1200x298.png 1200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png 4000w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 640px) 100vw, 4000px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-3\"><p>.<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-3 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-2 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-4 description\"><p>\u672c\u6587\u662f\u7cfb\u5217\u6587\u7ae0\u7684\u7b2c\u4e09\u90e8\u5206\uff0c\u5728\u8fd9\u4e00\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4f7f\u7528 Mlflow \u8bb0\u5f55\u6a21\u578b\u3001\u5728 Kubernetes \u5f15\u64ce\u4e0a\u63d0\u4f9b\u6a21\u578b\u5e76\u6700\u7ec8\u6839\u636e\u5e94\u7528\u9700\u6c42\u5bf9\u5176\u8fdb\u884c\u6269\u5c55\u7684\u8fc7\u7a0b\u3002\u867d\u7136\u672c\u6587\u53ef\u72ec\u7acb\u7528\u4e8e\u6d4b\u8bd5\u4efb\u4f55 API \u54cd\u5e94\uff0c\u4f46\u6211\u4eec\u5efa\u8bae\u60a8\u9605\u8bfb\u6211\u4eec\u4e4b\u524d\u7684\u4e24\u7bc7\u6587\u7ae0\uff08\u7b2c\u4e00\u90e8\u5206\u548c\u7b2c\u4e8c\u90e8\u5206\uff09\uff0c\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Mlflow \u90e8\u7f72\u8ddf\u8e2a\u5b9e\u4f8b\u5e76\u5c06\u6a21\u578b\u4f5c\u4e3a API \u63d0\u4f9b\u3002\u5728\u4e0b\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u5173\u6ce8\u53ef\u6269\u5c55\u6027\u95ee\u9898\uff0c\u5e76\u901a\u8fc7\u4e00\u4e9b\u5b9e\u9a8c\u6765\u4e86\u89e3 k8s \u96c6\u7fa4\u7684\u884c\u4e3a\uff0c\u5e76\u5c31\u5982\u4f55\u5904\u7406\u9ad8\u8d1f\u8f7d\u63d0\u51fa\u5efa\u8bae\u3002.<\/p>\n<\/div><\/div><\/div><\/div><\/div><article class=\"fusion-fullwidth fullwidth-box fusion-builder-row-4 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-3 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-3 fusion-sep-none fusion-title-text fusion-title-size-one\" style=\"--awb-margin-bottom-small:8px;\"><h1 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:70;line-height:1;\">\u7b2c 3 \u90e8\u5206 - \u5982\u4f55\u5904\u7406\u9ad8\u8d1f\u8f7d\u5e76\u4f7f\u6211\u4eec\u7684\u5e94\u7528\u7a0b\u5e8f\u5177\u6709\u53ef\u6269\u5c55\u6027\uff1f<\/h1><\/div><div class=\"fusion-title title fusion-title-4 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u5bfc\u8a00<\/h2><\/div><div class=\"fusion-text fusion-text-5\"><p>\u5728\u5178\u578b\u7684\u5e94\u7528\u573a\u666f\u4e2d\uff0c\u673a\u5668\u5b66\u4e60\u6a21\u578b\u88ab\u90e8\u7f72\u5728\u5e94\u7528\u7a0b\u5e8f\u6216\u4ea7\u54c1\u7684\u80cc\u540e\uff0c\u591a\u4e2a\u7528\u6237\u53ef\u4ee5\u540c\u65f6\u4e0e\u4e4b\u4ea4\u4e92\u4ee5\u751f\u6210\u9884\u6d4b\u3002\u56e0\u6b64\uff0c\u5206\u6790\u6211\u4eec\u7684\u57fa\u7840\u67b6\u6784\u80fd\u529b\u5e76\u5bf9\u5176\u8fdb\u884c\u76f8\u5e94\u7684\u8c03\u6574\u81f3\u5173\u91cd\u8981\u3002\u5c31 Kubernetes \u800c\u8a00\uff0c\u8fd9\u4e00\u70b9\u53d8\u5f97\u5c24\u4e3a\u6709\u8da3\uff0c\u56e0\u4e3a\u5b83\u53ef\u80fd\u4f1a\u5f71\u54cd\u5230\u662f\u5426\u4f7f\u7528\u81ea\u52a8\u6269\u5c55\u3001\u8003\u8651\u7684\u6700\u5927\u8282\u70b9\u6570......<\/p>\n<\/div><div class=\"fusion-text fusion-text-6\"><p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6536\u8d39\u6d4b\u8bd5\u53ef\u4ee5\u6a21\u62df\u591a\u4e2a\u540c\u65f6\u6216\u9012\u589e\u7684\u8bf7\u6c42\u6570\u91cf\uff0c\u5e76\u76d1\u63a7\u57fa\u7840\u8bbe\u65bd\u7684\u884c\u4e3a\uff08\u54cd\u5e94\u65f6\u95f4\u3001CPU \u4f7f\u7528\u7387\u3001\u5185\u5b58\u4f7f\u7528\u7387......\uff09\uff0c\u4ee5\u4fbf\u6b63\u786e\u8c03\u914d\u8d44\u6e90\uff0c\u907f\u514d\u51fa\u73b0\u74f6\u9888\u3002\u8fd9\u4e9b\u6d4b\u8bd5\u5c06\u4f7f\u7528\u540d\u4e3a Locust \u7684\u5de5\u5177\u8fdb\u884c\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-5 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u73af\u5883\u51c6\u5907<\/h2><\/div><div class=\"fusion-text fusion-text-7\"><p>\u672c\u7cfb\u5217\u7b2c\u4e00\u7bc7\u6587\u7ae0\u4e2d\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u672c\u6b21 \"\u5b9e\u8df5 \"\u7684\u8981\u6c42\uff0c\u4f46\u4f5c\u4e3a\u603b\u7ed3\uff0c\u5047\u8bbe\u6211\u4eec\u7684\u6a21\u578b\u5df2\u7ecf\u4f5c\u4e3a API \u90e8\u7f72\u5728 Kubernetes \u96c6\u7fa4 (mlflow-k8s) \u4e0a\uff0c\u4ee5\u4e0b\u662f\u672c\u90e8\u5206\u5177\u4f53\u9700\u8981\u7684\u4e3b\u8981\u5143\u7d20\u3002.<\/p>\n<p>\u5728\u8fd9\u90e8\u5206\u5b9e\u8df5\u4e2d\uff0c\u6211\u4eec\u9700\u8981<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-1 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u90e8\u7f72\u8757\u866b\u7684 GKE \u96c6\u7fa4\uff08\u6b64\u5904\u6211\u4eec\u5c06\u5176\u547d\u540d\u4e3a\u00a0<em class=\"jz\">\u52a0\u8f7d\u6d4b\u8bd5<\/em>)<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u5df2\u914d\u7f6e\u7684\u672c\u5730\u5de5\u4f5c\u7ad9\uff08gcloud\u3001kubectl\uff09<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\u5bfc\u51fa\u4ee5\u4e0b\u73af\u5883\u53d8\u91cf<\/p>\n<pre class=\"hp hq hr hs ht lb gv be\"><span id=\"c4c0\" class=\"ej lc ii dm ld b le lf lg s lh\" data-selectable-paragraph=\"\">export GCR_REPO=eu.gcr.io\/mlflow-on-k8s\/repo<\/span><\/pre>\n<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><a class=\"bv ig\" href=\"https:\/\/github.com\/artefactory-global\/mlflow-serving-example\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u5b58\u50a8\u5e93<\/a>\u00a0\u5b9e\u8df5\u4ee3\u7801\u6240\u5728\u4e4b\u5904<\/div><\/li><\/ul><div class=\"fusion-title title fusion-title-6 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u90e8\u7f72<\/h2><\/div><div class=\"fusion-title title fusion-title-7 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">1.\u6784\u5efa Locust docker \u955c\u50cf\u5e76\u5c06 Locust \u955c\u50cf\u63a8\u9001\u5230 GCR<\/h3><\/div><div class=\"fusion-text fusion-text-8\"><pre class=\"hp hq hr hs ht lb gv be\"><span id=\"df7b\" class=\"ej lc ii dm ld b le lf lg s lh\" data-selectable-paragraph=\"\">cd mlflow-serving-example<\/span><span id=\"f519\" class=\"ej lc ii dm ld b le lk ll lm ln lo lg s lh\" data-selectable-paragraph=\"\">docker build --tag $\/locust-tasks:v1\n\u6587\u4ef6 dockerfile_locust .<\/span><span id=\"dcc8\" class=\"ej lc ii dm ld b le lk ll lm ln lo lg s lh\" data-selectable-paragraph=\"\">docker push $\/locust-tasks:v1<\/span><\/pre>\n<\/div><div class=\"fusion-title title fusion-title-8 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">2.\u51c6\u5907\u6d4b\u8bd5\u4efb\u52a1<\/h3><\/div><div class=\"fusion-text fusion-text-9\"><p>\u4efb\u52a1\uff08Tasks\uff09\u662fLocust\u5728\u8d1f\u8f7d\u6d4b\u8bd5\u4e2d\u6267\u884c\u7684python\u51fd\u6570\u3002\u00a0<em>locust-tasks\/tasks.py<\/em>\u00a0\u6211\u4eec\u53ea\u9700\u5411 API \u53d1\u9001 POST \u8bf7\u6c42\uff0c\u8f93\u5165 data \u884c\u5373\u53ef\u83b7\u5f97\u9884\u6d4b\u7ed3\u679c\u3002.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27667%27%20height%3D%270%27%20viewBox%3D%270%200%20667%200%27%3E%3Crect%20width%3D%27667%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/Capture-de\u0301cran-2021-10-26-a\u0300-18.11.10.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 667px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"667\" height=\"auto\" \/><div class=\"fusion-text fusion-text-10\"><p>\u5728\u6b64\u4ee3\u7801\u7247\u6bb5\u4e2d \uff1a<\/p>\n<\/div><ul style=\"--awb-line-height:27.2px;--awb-icon-width:27.2px;--awb-icon-height:27.2px;--awb-icon-margin:11.2px;--awb-content-margin:38.4px;\" class=\"fusion-checklist fusion-checklist-2 fusion-checklist-default type-icons\"><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\">\n<p><em><strong>on_start<\/strong><strong>:<\/strong><\/em><em class=\"jz\"> \u662f\u00a0<\/em>\u4ec5\u5728\u542f\u52a8\u7ebf\u7a0b\u4e0b\u8f7d dataset \u65f6\u6267\u884c\u4e00\u6b21\u3002.<\/p>\n<\/div><\/li><li class=\"fusion-li-item\" style=\"\"><span class=\"icon-wrapper circle-no\"><i class=\"fusion-li-icon awb-icon-check\" aria-hidden=\"true\"><\/i><\/span><div class=\"fusion-li-item-content\"><em><strong>post_metrics<\/strong><\/em>\u8fd9\u662f\u6211\u4eec\u6d4b\u8bd5\u4efb\u52a1\u7684\u6838\u5fc3\uff0c\u8fd9\u91cc\u6211\u4eec\u53ea\u6709\u4e00\u4e2a\u5411 \/invocation \u7aef\u70b9\u53d1\u9001\u4e00\u6761\u8bb0\u5f55\u7684\u51fd\u6570\u3002.<\/div><\/li><\/ul><div class=\"fusion-text fusion-text-11\"><p>\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u5c3d\u53ef\u80fd\u591a\u7684\u529f\u80fd\u6765\u6267\u884c\u6211\u4eec\u60f3\u8981\u7684\u6d4b\u8bd5\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u53d1\u9001 data \u6279\u6b21\u7684\u529f\u80fd\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u00a0<strong>@task()<\/strong>\u00a0\u88c5\u9970\u5668\u4e3a\u4e0d\u540c\u7684\u4efb\u52a1\u8d4b\u4e88\u4f18\u5148\u7ea7\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-9 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">3.\u90e8\u7f72\u5230 Kubernetes<\/h3><\/div><div class=\"fusion-text fusion-text-12\"><p>\u73b0\u5728\u662f\u90e8\u7f72\u955c\u50cf\u5e76\u5728\u4e13\u7528\u96c6\u7fa4\u4e0a\u8fd0\u884c Locust \u7684\u65f6\u5019\u4e86\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4e0a\u4e0b\u6587\u8bbe\u7f6e\u5728\u00a0<em>\u52a0\u8f7d\u6d4b\u8bd5<\/em>\u00a0\u8fd0\u884c<\/p>\n<\/div><div class=\"fusion-text fusion-text-13\"><p>kubectl config get-contexts<br \/>\nkubectl config use-context NAME<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27667%27%20height%3D%270%27%20viewBox%3D%270%200%20667%200%27%3E%3Crect%20width%3D%27667%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-2.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 667px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"667\" height=\"auto\" \/><div class=\"fusion-text fusion-text-14\"><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u65b0\u90e8\u7f72\u6587\u4ef6\u00a0<em>deployments\/locust_load_test.yaml\u00a0<\/em>\u901a\u8fc7\u6307\u5b9a\u00a0<strong>GCR \u4e0a\u7684\u56fe\u50cf\u8def\u5f84<\/strong>\u548c<strong class=\"jh lj\">\u00a0<\/strong>\u6307\u5411\u00a0<strong>\u76ee\u6807\u4e3b\u673a<\/strong>\u00a0\u5230 API \u5730\u5740\u3002.<\/p>\n<\/div><div class=\"fusion-text fusion-text-15\"><div class=\"code\">\u79cd\u7c7b\u590d\u5236\u63a7\u5236\u5668<br \/>\napiVersion: v1<br \/>\n\u5143 data\uff1a<br \/>\n\u540d\u79f0\uff1a\u8757\u866b\u5927\u5e08<br \/>\n\u6807\u7b7e<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u4e3b\u4eba<br \/>\n\u89c4\u683c\uff1a<br \/>\n\u590d\u5236\u54c1\uff1a1<br \/>\n\u9009\u62e9\u5668\uff1a<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u4e3b\u4eba<br \/>\n\u6a21\u677f\uff1a<br \/>\n\u5143 data\uff1a<br \/>\n\u6807\u7b7e<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u4e3b\u4eba<br \/>\n\u89c4\u683c\uff1a<br \/>\n\u96c6\u88c5\u7bb1<br \/>\n- \u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u56fe\u50cf\uff1aGCR_REPO\/locust-tasks:v1 # \u5728\u6b64\u5904\u66f4\u6539<br \/>\nenv\uff1a<br \/>\n- \u540d\u79f0\uff1a LOCUST_MODE<br \/>\n\u503c\uff1a\u4e3b<br \/>\n- \u540d\u79f0\uff1a TARGET_HOST<br \/>\n\u503c\uff1a\u2018http:\/\/SERVING_IP:SERVING_PORT\u2019 # \u5728\u6b64\u5904\u66f4\u6539<br \/>\n\u7aef\u53e3\uff1a<br \/>\n- \u540d\u79f0\uff1a loc-master-web<br \/>\n\u5bb9\u5668\u7aef\u53e3\uff1a8089<br \/>\n\u534f\u8bae\uff1aTCP<br \/>\n- \u540d\u79f0\uff1a loc-master-p1<br \/>\n\u5bb9\u5668\u7aef\u53e3\uff1a5557<br \/>\n\u534f\u8bae\uff1aTCP<br \/>\n- \u540d\u79f0\uff1a loc-master-p2<br \/>\n\u5bb9\u5668\u7aef\u53e3\uff1a5558<br \/>\n\u534f\u8bae\uff1aTCP<br \/>\n-<br \/>\n\u79cd\u7c7b\u590d\u5236\u63a7\u5236\u5668<br \/>\napiVersion: v1<br \/>\n\u5143 data\uff1a<br \/>\n\u540d\u79f0\uff1a\u8757\u866b\u5de5\u4eba<br \/>\n\u6807\u7b7e<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u5de5\u4eba<br \/>\n\u89c4\u683c\uff1a<br \/>\n\u590d\u5236\u54c1\uff1a30<br \/>\n\u9009\u62e9\u5668\uff1a<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u5de5\u4eba<br \/>\n\u6a21\u677f\uff1a<br \/>\n\u5143 data\uff1a<br \/>\n\u6807\u7b7e<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u5de5\u4eba<br \/>\n\u89c4\u683c\uff1a<br \/>\n\u96c6\u88c5\u7bb1<br \/>\n- \u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u56fe\u50cf\uff1aGCR_REPO\/locust-tasks:v1 # \u5728\u6b64\u5904\u66f4\u6539<br \/>\nenv\uff1a<br \/>\n- \u540d\u79f0\uff1a LOCUST_MODE<br \/>\n\u503c\uff1a\u5de5\u4eba<br \/>\n- \u540d\u79f0\uff1a LOCUST_MASTER<br \/>\n\u503c\uff1a\u8757\u866b\u5927\u5e08<br \/>\n- \u540d\u79f0\uff1a TARGET_HOST<br \/>\n\u503c\uff1a\u2018http:\/\/SERVING_IP:SERVING_PORT\u2019 # \u5728\u6b64\u5904\u66f4\u6539<br \/>\n-<br \/>\n\u79cd\u7c7b\uff1a\u670d\u52a1<br \/>\napiVersion: v1<br \/>\n\u5143 data\uff1a<br \/>\n\u540d\u79f0\uff1a\u8757\u866b\u5927\u5e08<br \/>\n\u6807\u7b7e<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u4e3b\u4eba<br \/>\n\u89c4\u683c\uff1a<br \/>\n\u7aef\u53e3\uff1a<br \/>\n- \u6e2f\u53e38089<br \/>\ntargetPort: loc-master-web<br \/>\n\u534f\u8bae\uff1aTCP<br \/>\n\u540d\u79f0\uff1a loc-master-web<br \/>\n- \u6e2f\u53e35557<br \/>\ntargetPort: loc-master-p1<br \/>\n\u534f\u8bae\uff1aTCP<br \/>\n\u540d\u79f0\uff1a loc-master-p1<br \/>\n- \u6e2f\u53e35558<br \/>\ntargetPort: loc-master-p2<br \/>\n\u534f\u8bae\uff1aTCP<br \/>\n\u540d\u79f0\uff1a loc-master-p2<br \/>\n\u9009\u62e9\u5668\uff1a<br \/>\n\u540d\u79f0\uff1a\u8757\u866b<br \/>\n\u89d2\u8272\uff1a\u4e3b\u4eba<br \/>\n\u7c7b\u578b\u8d1f\u8f7d\u5e73\u8861\u5668<\/div>\n<\/div>\n\u79cd\u7c7b\u590d\u5236\u63a7\u5236\u5668\napiVersion: v1\nmetadata\uff1a\n  name: locust-master\n  labels\uff1a\n    \u540d\u79f0\uff1a\u8757\u866b\n    \u89d2\u8272\uff1a\u4e3b\u4eba\nspec\uff1a\n  replicas\uff1a1\n  \u9009\u62e9\u5668\n    \u540d\u79f0\uff1a\u8757\u866b\n    \u89d2\u8272\uff1a\u4e3b\n  \u6a21\u677f\n    metadata\uff1a\n      labels\uff1a\n        \u540d\u79f0\uff1a\u8757\u866b\n        \u89d2\u8272\uff1a\u4e3b\u4eba\n    spec\uff1a\n      containers\uff1a\n        - \u540d\u79f0\uff1a\u8757\u866b\n          image\uff1aGCR_REPO\/locust-tasks:v1 # \u5728\u6b64\u66f4\u6539\n          env\uff1a\n            - name: LOCUST_MODE\n              \u503c\uff1amaster\n            - name: TARGET_HOST\n              \u503c\uff1a 'http:\/\/SERVING_IP:SERVING_PORT' # \u5728\u6b64\u5904\u66f4\u6539\n          ports\uff1a\n            - \u540d\u79f0\uff1a loc-master-web\n              containerPort: 8089\n              \u534f\u8bae\uff1aTCP\n            - \u540d\u79f0\uff1a loc-master-p1\n              \u5bb9\u5668\u7aef\u53e3: 5557\n              \u534f\u8bae\uff1a TCPTCP\n            - \u540d\u79f0\uff1a loc-master-p2\n              \u5bb9\u5668\u7aef\u53e3: 5558\n              \u534f\u8bae\uff1a TCPTCP\n---\n\u7c7b\u578b\u590d\u5236\u63a7\u5236\u5668\napiVersion: v1\nmetadata\uff1a\n  name: locust-worker\n  labels\uff1a\n    \u540d\u79f0\uff1a\u8757\u866b\n    \u89d2\u8272\uff1a\u5de5\u4eba\nspec\uff1a\n  replicas\uff1a30\n  \u9009\u62e9\u5668\n    \u540d\u79f0\uff1a\u8757\u866b\n    \u89d2\u8272\uff1a\u5de5\u4f5c\u8005\n  template\uff1a\n    metadata\uff1a\n      labels\uff1a\n        \u540d\u79f0\uff1a\u8757\u866b\n        \u89d2\u8272\uff1a\u5de5\u4eba\n    spec\uff1a\n      containers\uff1a\n        - \u540d\u79f0\uff1a locust\n          image\uff1aGCR_REPO\/locust-tasks:v1 # \u5728\u6b64\u66f4\u6539\n          env\uff1a\n            - name: LOCUST_MODE\n              \u503c: worker\n            - name: LOCUST_MASTER\n              \u503c\uff1a locust-master\n            - name: TARGET_HOST\n              \u503c\uff1a 'http:\/\/SERVING_IP:SERVING_PORT' # \u5728\u6b64\u66f4\u6539\n---\nkind: \u670d\u52a1\napiVersion: v1\nmetadata\uff1a\n  name: locust-master\n  labels\uff1a\n    name: locust\n    \u89d2\u8272\uff1a\u4e3b\u4eba\nspec\uff1a\n  ports\uff1a\n    - port\uff1a8089\n      targetPort: loc-master-web\n      \u534f\u8bae\uff1a TCPTCP\n      \u540d\u79f0\uff1a loc-master-web\n    - \u7aef\u53e35557\n      targetPort: loc-master-p1\n      \u534f\u8bae\uff1aTCP\n      \u540d\u79f0\uff1a loc-master-p1\n    - port\uff1a5558\n      targetPort: loc-master-p2\n      \u534f\u8bae\uff1aTCP\n      \u540d\u79f0\uff1a loc-master-p2\n  \u9009\u62e9\u5668\n    \u540d\u79f0\uff1a locust\n    \u89d2\u8272\uff1a\u4e3b\u63a7\n  type\uff1a\u8d1f\u8f7d\u5e73\u8861\u5668<div class=\"fusion-text fusion-text-16\"><p>\u6700\u540e\uff0c\u8ba9\u6211\u4eec\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u90e8\u7f72\u3002.<\/p>\n<pre class=\"hp hq hr hs ht lb gv be\"><span id=\"30de\" class=\"ej lc ii dm ld b le lf lg s lh\" data-selectable-paragraph=\"\">kubectl create -f deployments\/locust_load_test.yaml<\/span><\/pre>\n<p>Locust \u5b9e\u4f8b\u73b0\u5728\u5e94\u8be5\u5df2\u7ecf\u542f\u52a8\uff0c\u65b0\u7684\u8d1f\u8f7d\u5e73\u8861\u5668\u5e94\u8be5\u5df2\u7ecf\u521b\u5efa\u3002\u6211\u4eec\u53ef\u4ee5\u952e\u5165 <em>kubectl get services\u00a0<\/em>\u5e76\u4f7f\u7528\u8d1f\u8f7d\u5e73\u8861\u5668 IP:8089 \u8bbf\u95ee\u63a5\u53e3<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27701%27%20height%3D%270%27%20viewBox%3D%270%200%20701%200%27%3E%3Crect%20width%3D%27701%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-3.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 701px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"701\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-10 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u5b9e\u9a8c<\/h2><\/div><div class=\"fusion-text fusion-text-17\"><p>\u6211\u4eec\u7684\u60f3\u6cd5\u662f\u4f7f\u7528 Locust \u6765\u6a21\u62df\u5bf9\u670d\u52a1 API \u7684\u5e76\u884c\u67e5\u8be2\uff0c\u5e76\u5206\u6790\u96c6\u7fa4\u7684\u884c\u4e3a\u548c\u54cd\u5e94\u65f6\u95f4\uff08\u7eff\u8272\u4e3a\u4e2d\u4f4d\u6570\uff0c\u6a59\u8272\u4e3a\u7b2c 95 \u767e\u5206\u4f4d\u6570\uff09\u3002\u8fd9\u6837\u505a\u7684\u76ee\u7684\u662f\u4e3a\u4e86\u7a81\u51fa Kubernetes \u63d0\u4f9b\u7684\u4e24\u4e2a\u529f\u80fd\uff0c\u5373\u6c34\u5e73\u548c\u5782\u76f4\uff08\u81ea\u52a8\uff09\u6269\u5c55\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-11 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">1.\u624b\u52a8\u7f29\u653e<\/h3><\/div><div class=\"fusion-text fusion-text-18\"><p>\u5728\u7b2c\u4e00\u4e2a\u5b9e\u9a8c\u4e2d\uff0c\u6211\u4eec\u8bd5\u56fe\u4e86\u89e3\u00a0<strong>\u591a\u835a <\/strong>\u4e3a\u6211\u4eec\u7684\u6a21\u578b\u63d0\u4f9b\u670d\u52a1\u3002\u6211\u4eec\u4ece\u4e00\u4e2a pod \u5f00\u59cb\uff0c\u5e76\u5c1d\u8bd5\u589e\u52a0\u8bf7\u6c42\u6570\u91cf\u3002\u5728\u4e0b\u56fe\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u4e0d\u540c\u914d\u7f6e\u548c\u8d39\u7528\u7684 4 \u4e2a\u9636\u6bb5\u3002.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27707%27%20height%3D%270%27%20viewBox%3D%270%200%20707%200%27%3E%3Crect%20width%3D%27707%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-4.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 707px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"707\" height=\"auto\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27686%27%20height%3D%270%27%20viewBox%3D%270%200%20686%200%27%3E%3Crect%20width%3D%27686%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-5.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 686px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"686\" height=\"auto\" \/><div class=\"fusion-text fusion-text-19\"><p>\u603b\u7684\u6765\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff0c\u59cb\u7ec8\u76d1\u63a7\u8d44\u6e90\u6307\u6807\uff08CPU\u3001\u5185\u5b58......\uff09\u4ee5\u8bc6\u522b\u74f6\u9888\u548c\u914d\u7f6e\u95ee\u9898\u975e\u5e38\u91cd\u8981\u3002\u5728\u6211\u4eec\u7684\u6848\u4f8b\u4e2d\uff0c\u53ea\u6709\u4e00\u4e2a pod \u5e76\u4e0d\u80fd\u8ba9\u6211\u4eec\u4ece\u53ef\u7528\u7684\u5904\u7406\u80fd\u529b\u4e2d\u83b7\u76ca\u3002\u56e0\u6b64\uff0c\u5728\u90e8\u7f72\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u8003\u8651\u5230\u540e\u53f0\u8fd0\u884c\u7684\u7cfb\u7edf\u670d\u52a1\uff0c\u5fc5\u987b\u8bbe\u7f6e\u5408\u9002\u7684 pod \u6570\u91cf\uff0c\u5e76\u4e3a\u6bcf\u4e2a pod \u8bbe\u7f6e\u8db3\u591f\u7684\u8d44\u6e90\uff0c\u4ee5\u6700\u5927\u9650\u5ea6\u5730\u63d0\u9ad8\u673a\u5668\u7684\u4f7f\u7528\u7387\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u5efa\u8bae\u4e0d\u8981\u5c06\u8282\u70b9\u7684 CPU \u4f7f\u7528\u7387\u63d0\u9ad8\u5230 80-90% \u4ee5\u4e0a\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-12 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">2.\u6c34\u5e73\u81ea\u52a8\u7f29\u653e<\/h3><\/div><div class=\"fusion-text fusion-text-20\"><p>\u5e78\u8fd0\u7684\u662f\uff0cKubernetes \u6709\u4e00\u4e2a\u00a0<strong>\u81ea\u52a8\u6c34\u5e73\u7f29\u653e\u529f\u80fd<\/strong>\u00a0\u6765\u81ea\u52a8\u76d1\u63a7 CPU \u4f7f\u7528\u60c5\u51b5\uff0c\u5e76\u5728\u5fc5\u8981\u65f6\u521b\u5efa\u65b0\u7684 pod \u6765\u5206\u914d\u8d1f\u8f7d\u3002\u53ea\u9700\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u6fc0\u6d3b\u8be5\u529f\u80fd\u3002.<\/p>\n<pre class=\"hp hq hr hs ht lb gv be\"><span id=\"a7cd\" class=\"ej lc ii dm ld b le lf lg s lh\" data-selectable-paragraph=\"\">kubectl autoscale deployment mlflow-serving --cpu-percent=80 --min=1 --max=12<\/span><\/pre>\n<p>\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u00a0<em>kubectl get hpa mlflow-serving<\/em>, \u5206\u6790\u96c6\u7fa4\u54cd\u5e94\u65f6\u95f4\u548c\u8d44\u6e90\u6d88\u8017\u3002.<br \/>\n\u4ee5\u4e0b\u5b9e\u9a8c\u7684\u76ee\u7684\u662f\u89c2\u5bdf Kubernetes \u5982\u4f55\u81ea\u52a8\u6dfb\u52a0 pod \u4ee5\u4f18\u5316\u8d44\u6e90\u4f7f\u7528\u5e76\u83b7\u5f97\u66f4\u597d\u7684\u54cd\u5e94\u65f6\u95f4\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u8be5\u5b9e\u9a8c\u5206\u4e3a\u4e09\u4e2a\u9636\u6bb5\u3002.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27686%27%20height%3D%270%27%20viewBox%3D%270%200%20686%200%27%3E%3Crect%20width%3D%27686%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-6.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 686px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"686\" height=\"auto\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27671%27%20height%3D%270%27%20viewBox%3D%270%200%20671%200%27%3E%3Crect%20width%3D%27671%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-7.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 671px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"671\" height=\"auto\" \/><div class=\"fusion-text fusion-text-21\"><p>\u5728\u7b2c\u4e8c\u4e2a\u5b9e\u9a8c\u4e2d\uff0c\u6211\u4eec\u6ce8\u610f\u5230\u6c34\u5e73\u81ea\u52a8\u6269\u5c55\u4f7f\u6211\u4eec\u80fd\u591f\u901a\u8fc7\u521b\u5efa\u65b0 pod \u548c\u5206\u914d\u66f4\u591a\u96c6\u7fa4\u8d44\u6e90\u6765\u7f29\u77ed\u54cd\u5e94\u65f6\u95f4\u3002\u4f46\u662f\uff0c\u5f53\u8fbe\u5230\u96c6\u7fa4\u5bb9\u91cf\u65f6\uff08\u7b2c\u4e09\u9636\u6bb5\uff09\uff0c\u65b0\u7684 pod \u4ecd\u5904\u4e8e\u5f85\u5904\u7406\u72b6\u6001\uff0c\u6211\u4eec\u7684\u54cd\u5e94\u65f6\u95f4\u518d\u6b21\u589e\u52a0\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-13 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">3.\u5782\u76f4\u81ea\u52a8\u7f29\u653e<\/h3><\/div><div class=\"fusion-text fusion-text-22\"><p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u63a2\u7d22 Kubernetes \u7684\u53e6\u4e00\u4e2a\u529f\u80fd\uff0c\u5373\u00a0<strong>\u5782\u76f4\u81ea\u52a8\u7f29\u653e\u00a0<\/strong>\u8be5\u529f\u80fd\u5305\u62ec\u5728\u9700\u8981\u65f6\u5206\u914d\u66f4\u591a\u8282\u70b9\u3002\u53ef\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6fc0\u6d3b\u8be5\u529f\u80fd\uff0c\u6307\u5b9a Kubernetes \u53ef\u5206\u914d\u7684\u6700\u5c0f\u548c\u6700\u5927\u8282\u70b9\u6570\u3002.<\/p>\n<pre class=\"hp hq hr hs ht lb gv be\"><span id=\"7f33\" class=\"ej lc ii dm ld b le lf lg s lh\" data-selectable-paragraph=\"\">gcloud \u5bb9\u5668\u7fa4\u96c6\u66f4\u65b0 mlflow-k8s\n--\u542f\u7528\u81ea\u52a8\u6269\u5c55 --min-nodes 3 --max-nodes 5 --node-pool POOL_NAME<\/span><\/pre>\n<p>\u6700\u540e\uff0c\u5728\u4e0b\u56fe\u603b\u7ed3\u7684\u6700\u540e\u4e00\u4e2a\u5b9e\u9a8c\u4e2d\uff0c\u542f\u7528\u5782\u76f4\u81ea\u52a8\u7f29\u653e\u529f\u80fd\u540e\uff0cKubernetes \u53ef\u4ee5\u81ea\u52a8\u6dfb\u52a0\u4e24\u4e2a\u65b0\u8282\u70b9\u5e76\u521b\u5efa\u65b0 pod \u6765\u8c03\u5ea6\u8d1f\u8f7d\uff0c\u786e\u4fdd\u66f4\u77ed\u7684\u54cd\u5e94\u65f6\u95f4\u3002\u5b9e\u9645\u4e0a\uff0cKubernetes \u68c0\u6d4b\u5230\u9700\u6c42\u5e76\u521b\u5efa\u8d44\u6e90\uff08\u7b2c 2 \u9636\u6bb5\uff09\u5927\u7ea6\u9700\u8981 1 \u5206\u949f\u3002\u6b64\u5916\uff0c\u5728\u8d1f\u8f7d\u8f83\u4f4e\u7684\u60c5\u51b5\u4e0b\uff08\u7b2c 3 \u9636\u6bb5\uff09\uff0cKubernetes \u901a\u8fc7\u6740\u6b7b pod \u6210\u529f\u91ca\u653e\u4e86\u4e24\u4e2a\u65b0\u8282\u70b9\uff0c\u5e76\u5728\u5927\u7ea6 15 \u5206\u949f\u5185\u5c06\u96c6\u7fa4\u7f29\u51cf\u5230\u6700\u5c11 3 \u4e2a\u8282\u70b9\u3002.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27661%27%20height%3D%270%27%20viewBox%3D%270%200%20661%200%27%3E%3Crect%20width%3D%27661%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-8.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 661px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"661\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-14 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">4.\u96c6\u7fa4\u89c4\u6a21\u4f30\u7b97<\/h3><\/div><div class=\"fusion-text fusion-text-23\"><p>\u65e2\u7136\u6211\u4eec\u5df2\u7ecf\u4e86\u89e3\u4e86 Kubernetes \u5728\u4f7f\u7528\u7eb5\u5411\u548c\u6a2a\u5411\u81ea\u52a8\u7f29\u653e\u529f\u80fd\u54cd\u5e94\u4e0d\u540c\u6536\u8d39\u6c34\u5e73\u65f6\u7684\u8868\u73b0\uff0c\u90a3\u4e48\u6700\u7ec8\u7684\u6b65\u9aa4\u5c31\u662f\u4f7f\u7528\u4e0d\u540c\u7684\u8d44\u6e90\u6267\u884c\u6027\u80fd\u6d4b\u8bd5\uff0c\u540c\u65f6\u8003\u8651\u5230\u6211\u4eec\u5e94\u7528\u7a0b\u5e8f\u7684\u8981\u6c42\u53ca\u5176\u7528\u6237\u6570\u91cf\u7684\u4f30\u8ba1\u3002\u5047\u8bbe\u8981\u6ee1\u8db3 SLA \u8981\u6c42\uff0c\u7b2c 95 \u767e\u5206\u4f4d\u6570\u54cd\u5e94\u65f6\u95f4\u5e94\u4f4e\u4e8e 1 \u79d2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u7ed8\u5236\u4e0b\u56fe\uff0c\u663e\u793a\u4e0d\u540c\u5185\u6838\u6570\u4e0b\u7684 API \u54cd\u5e94\u65f6\u95f4\uff0c\u4ece\u800c\u4e86\u89e3\u5e94\u7528\u7a0b\u5e8f\u5728\u4e0d\u540c\u6761\u4ef6\u4e0b\u7684\u6027\u80fd\u3002.<\/p>\n<p>\u7279\u522b\u662f\uff0c\u5bf9\u4e8e\u4f7f\u7528 Mlflow \u670d\u52a1\u7684 ML \u6a21\u578b\uff0c\u6211\u4eec\u53ef\u4ee5\u5728 12 \u4e2a\u5185\u6838\u7684 Kubernetes \u96c6\u7fa4\u4e0a\u540c\u65f6\u5bb9\u7eb3\u7ea6 120 \u4e2a\u7528\u6237\uff0c\u5e76\u4fdd\u8bc1\u54cd\u5e94\u65f6\u95f4\u4f4e\u4e8e 1 \u79d2\u3002.<\/p>\n<\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27625%27%20height%3D%270%27%20viewBox%3D%270%200%20625%200%27%3E%3Crect%20width%3D%27625%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part3-9.png\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left hover-enable\" style=\"width: 625px; border-radius: 59% 41% 41% 59% \/ 29% 48% 52% 71%; overflow: hidden;\" width=\"625\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-15 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u7ed3\u8bba<\/h2><\/div><div class=\"fusion-text fusion-text-24\"><p>\u5728\u8fd9\u4e00\u7cfb\u5217\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u7ecf\u5386\u4e86\u5728 Kubernetes \u5f15\u64ce\u4e0a\u90e8\u7f72 Mlflow \u8ddf\u8e2a\u5b9e\u4f8b\u5e76\u5c06\u6a21\u578b\u4f5c\u4e3a API \u670d\u52a1\u7684\u6574\u4e2a\u8fc7\u7a0b\uff0c\u4ece\u800c\u5145\u5206\u5229\u7528\u4e86\u5176\u8f7b\u677e\u6269\u5c55\u548c\u5904\u7406\u9ad8\u8d1f\u8f7d\u7684\u80fd\u529b\u3002\u6211\u4eec\u8fd8\u5c1d\u8bd5\u4e86 Kubernetes \u63d0\u4f9b\u7684\u4e24\u4e2a\u6709\u8da3\u529f\u80fd\uff0c\u5373\u6c34\u5e73\u548c\u5782\u76f4\u81ea\u52a8\u7f29\u653e\uff0c\u5e76\u5c55\u793a\u4e86\u76d1\u63a7\u8d44\u6e90\u4ee5\u786e\u4fdd\u9ad8\u6548\u4f7f\u7528\u8d44\u6e90\u7684\u91cd\u8981\u6027\u3002\u6700\u540e\uff0c\u6211\u4eec\u5c55\u793a\u4e86\u5982\u4f55\u6d4b\u8bd5\u6211\u4eec\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u6839\u636e\u5176\u5bf9\u4e0d\u540c\u6d4b\u8bd5\u573a\u666f\u7684\u54cd\u5e94\u505a\u51fa\u6709\u5173\u57fa\u7840\u8bbe\u65bd\u7684\u51b3\u7b56\u3002.<\/p>\n<\/div><\/div><\/div><\/div><\/article><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-5 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-4 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center fusion-column-inner-bg-wrapper\" style=\"--awb-padding-top:40px;--awb-padding-right:40px;--awb-padding-bottom:40px;--awb-padding-left:40px;--awb-overflow:hidden;--awb-inner-bg-position:left center;--awb-inner-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-inner-bg-border-radius:4px 4px 4px 4px;--awb-inner-bg-overflow:hidden;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><span class=\"fusion-column-inner-bg hover-type-none\"><a class=\"fusion-column-anchor\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-a83390718a92\" target=\"_blank\" rel=\"noopener\"><span class=\"fusion-column-inner-bg-image lazyload\" data-bg=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\"><\/span><\/a><\/span><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-column fusion-column-has-bg-image\" data-bg-url=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\"><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-2 hover-type-none\"><img decoding=\"async\" width=\"72\" height=\"41\" title=\"\u4e2d\u7b49\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2772%27%20height%3D%2741%27%20viewBox%3D%270%200%2072%2041%27%3E%3Crect%20width%3D%2772%27%20height%3D%2741%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/medium.png\" alt class=\"lazyload img-responsive wp-image-60927\"\/><\/span><\/div><div class=\"fusion-title title fusion-title-16 fusion-sep-none fusion-title-center fusion-title-text fusion-title-size-three\" style=\"--awb-margin-top:20px;--awb-margin-bottom:0px;--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-center fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">\u4e2d\u53f7 Blog by Artefact\u3002.<\/h3><\/div><div class=\"fusion-text fusion-text-25\" style=\"--awb-content-alignment:center;\"><p>\u672c\u6587\u6700\u521d\u53d1\u8868\u4e8e <strong>Medium.com<\/strong>.<br \/>\n\u5728\u6211\u4eec\u7684 Medium Blog \u4e0a\u5173\u6ce8\u6211\u4eec\uff01<\/p>\n<\/div><div style=\"text-align:center;\"><a class=\"fusion-button button-flat button-medium button-default fusion-button-default button-1 fusion-button-default-span fusion-button-default-type\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-a83390718a92\" aria-label=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-a83390718a92\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-bf27258775e7\"><span class=\"fusion-button-text awb-button__text awb-button__text--default\">\u9605\u8bfb\u6211\u4eec\u7684\u6587\u7ae0<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/p>","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u662f\u7cfb\u5217\u6587\u7ae0\u7684\u7b2c\u4e09\u90e8\u5206\uff0c\u5728\u8fd9\u4e00\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4f7f\u7528 Mlflow \u8bb0\u5f55\u6a21\u578b\u3001\u5728 Kubernetes \u5f15\u64ce\u4e0a\u63d0\u4f9b\u6a21\u578b\u5e76\u6700\u7ec8\u6839\u636e\u5e94\u7528\u9700\u6c42\u5bf9\u5176\u8fdb\u884c\u6269\u5c55\u7684\u8fc7\u7a0b\u3002\u867d\u7136\u672c\u6587\u53ef\u72ec\u7acb\u7528\u4e8e\u6d4b\u8bd5\u4efb\u4f55 API \u54cd\u5e94\uff0c\u4f46\u6211\u4eec\u5efa\u8bae\u60a8\u9605\u8bfb\u6211\u4eec\u4e4b\u524d\u7684\u4e24\u7bc7\u6587\u7ae0\uff08\u7b2c\u4e00\u90e8\u5206\u548c\u7b2c\u4e8c\u90e8\u5206\uff09\uff0c\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Mlflow \u90e8\u7f72\u8ddf\u8e2a\u5b9e\u4f8b\u5e76\u5c06\u6a21\u578b\u4f5c\u4e3a API \u63d0\u4f9b\u3002\u5728\u4e0b\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u5173\u6ce8\u53ef\u6269\u5c55\u6027\u95ee\u9898\uff0c\u5e76\u901a\u8fc7\u4e00\u4e9b\u5b9e\u9a8c\u6765\u4e86\u89e3 k8s \u96c6\u7fa4\u7684\u884c\u4e3a\uff0c\u5e76\u5c31\u5982\u4f55\u5904\u7406\u9ad8\u8d1f\u8f7d\u63d0\u51fa\u5efa\u8bae\u3002.<\/p>","protected":false},"featured_media":68688,"parent":0,"template":"","meta":{"_acf_changed":false,"ep_exclude_from_search":false},"blog-category":[21939],"blog-language":[2991],"class_list":["post-64449","blog","type-blog","status-publish","has-post-thumbnail","hentry","blog-category-medium","blog-language-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog\/64449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/types\/blog"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/media\/68688"}],"wp:attachment":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/media?parent=64449"}],"wp:term":[{"taxonomy":"blog-category","embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog-category?post=64449"},{"taxonomy":"blog-language","embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog-language?post=64449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}