{"id":1478,"date":"2022-04-13T19:38:36","date_gmt":"2022-04-13T11:38:36","guid":{"rendered":"https:\/\/www.buyao007.icu\/?p=1478"},"modified":"2022-04-27T21:31:16","modified_gmt":"2022-04-27T13:31:16","slug":"13-k8s%e5%8c%85%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7helm%e7%9a%84%e5%9f%ba%e6%9c%ac%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.buyao007.icu\/?p=1478","title":{"rendered":"13.k8s\u5305\u7ba1\u7406\u5de5\u5177helm\u7684\u57fa\u672c\u4f7f\u7528"},"content":{"rendered":"\n<p>\u5b59\u5bcc\u9633\uff0c \u6c5f\u6e56\u4eba\u79f0\u6ca1\u4eba\u79f0\u3002\u591a\u5e74\u4e92\u8054\u7f51\u8fd0\u7ef4\u5de5\u4f5c\u7ecf\u9a8c\uff0c\u66fe\u8d1f\u8d23\u8fc7\u5b59\u5e03\u65af\u5927\u89c4\u6a21\u96c6\u7fa4\u67b6\u6784\u81ea\u52a8\u5316\u8fd0\u7ef4\u7ba1\u7406\u5de5\u4f5c\u3002\u64c5\u957fWeb\u96c6\u7fa4\u67b6\u6784\u4e0e\u81ea\u52a8\u5316\u8fd0\u7ef4\uff0c\u66fe\u8d1f\u8d23\u56fd\u5185\u67d0\u5927\u578b\u535a\u5ba2\u7f51\u7ad9\u8fd0\u7ef4\u5de5\u4f5c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_0\">1.Helm\u6982\u8ff0<\/h2>\n\n\n\n<p><strong><em>1.\u4e3a\u4ec0\u4e48\u9700\u8981Helm<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    \u7531\u4e8eKubernetes\u7f3a\u5c11\u5bf9\u53d1\u5e03\u7684\u5e94\u7528\u7248\u672c\u7ba1\u7406\u548c\u63a7\u5236\uff0c\u4f7f\u5f97\u90e8\u7f72\u7684\u5e94\u7528\u7ef4\u62a4\u548c\u66f4\u65b0\u7b49\u9762\u4e34\u8bf8\u591a\u7684\u592a\u6311\u6218\u3002\u4e3b\u8981\u9762\u4e34\u4ee5\u4e0b\u95ee\u9898:\r\n        (1)\u5982\u4f55\u5c06\u8fd9\u4e9b\u670d\u52a1\u4f5c\u4e3a\u4e00\u4e2a\u6574\u4f53\u7ba1\u7406?\r\n        (2)\u8fd9\u4e9b\u8d44\u6e90\u6587\u4ef6\u5982\u4f55\u9ad8\u6548\u590d\u7528?\r\n        (3)\u4e0d\u652f\u6301\u5e94\u7528\u7ea7\u522b\u7684\u7248\u672c\u7ba1\u7406?\r\n<\/code><\/pre>\n\n\n\n<p><strong><em>2.Helm\u4ecb\u7ecd<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Helm\u662fKubernetes\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u5c31\u50cfLinux\u4e0b\u7684\u5305\u7ba1\u7406\u5668\uff0c\u5982centos\u7cfb\u7edf\u7684yum\uff0cUbuntu\u7cfb\u7edf\u7684apt\u7b49\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5c06\u4e4b\u524d\u6253\u5305\u597d\u7684yaml\u6587\u4ef6\u90e8\u7f72\u5230Kubernetes\u4e0a\u3002\r\n\r\nhelm\u6709\u4ee5\u4e0b\u51e0\u4e2a\u91cd\u8981\u6982\u5ff5:\r\n    helm:\r\n        \u4e00\u4e2a\u547d\u4ee4\u884c\u5ba2\u6237\u7aef\u5de5\u5177\uff0c\u4e3b\u8981\u7528\u4e8ekubernetes\u5e94\u7528chart\u7684\u521b\u5efa\uff0c\u6253\u5305\uff0c\u53d1\u5e03\u548c\u7ba1\u7406\u3002\r\n    chart:\r\n        \u5e94\u7528\u63cf\u8ff0\uff0c\u4e00\u7cfb\u5217\u7528\u4e8e\u63cf\u8ff0K8S\u8d44\u6e90\u76f8\u5173\u6587\u4ef6\u7684\u96c6\u5408\u3002\r\n    Release:\r\n        \u57fa\u4e8eChart\u7684\u90e8\u7f72\u5b9e\u4f53\uff0c\u4e00\u4e2achart\u88abHelm\u8fd0\u884c\u540e\u5c06\u4f1a\u751f\u6210\u5bf9\u5e94\u7684\u4e00\u4e2arelease;\u5c06\u5728K8S\u4e2d\u521b\u5efa\u51fa\u771f\u5b9e\u8fd0\u884c\u7684\u8d44\u6e90\u5bf9\u8c61\u3002\r<\/code><\/pre>\n\n\n\n<p><strong><em>3.Helm\u7248\u672c\u4ecb\u7ecd<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Helm\u76ee\u524d\u6709\u4e24\u4e2a\u7248\u672c\uff0c\u5373V2\u548cV3\u3002\r\n    2019\u5e7411\u6708Helm\u56e2\u961f\u53d1\u5e03V3\u7248\u672c\uff0c\u76f8\u6bd4v2\u7248\u672c\u6700\u5927\u53d8\u5316\u662f\u5c06Tiller\u5220\u9664\uff0c\u5e76\u5927\u90e8\u5206\u4ee3\u7801\u91cd\u6784\u3002\r\n    helm v3\u76f8\u6bd4helm v2\u8fd8\u505a\u4e86\u5f88\u591a\u4f18\u5316\uff0c\u6bd4\u5982\u4e0d\u540c\u547d\u540d\u7a7a\u95f4\u8d44\u6e90\u540c\u540d\u7684\u60c5\u51b5\u5728v3\u7248\u672c\u662f\u5141\u8bb8\u7684\uff0c\u6211\u4eec\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u5efa\u8bae\u642d\u5efa\u4f7f\u7528v3\u7248\u672c\uff0c\u4e0d\u4ec5\u4ec5\u662f\u56e0\u4e3a\u5b83\u7248\u672c\u529f\u80fd\u8f83\u5f3a\uff0c\u800c\u4e14\u76f8\u5bf9\u6765\u8bf4\u4e5f\u66f4\u52a0\u7a33\u5b9a\u4e86\u3002\r\n    \u5b98\u65b9\u5730\u5740:\r\n        https:&#47;&#47;helm.sh\/docs\/intro\/install\/\r\n    github\u5730\u5740:\r\n        https:\/\/github.com\/helm\/helm\/releases\r<\/code><\/pre>\n\n\n\n<p><strong><em>4.Helm\u7684\u5de5\u4f5c\u6d41\u7a0b\u6982\u8ff0<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>helm\u6709\u4ee5\u4e0b\u51e0\u4e2a\u6838\u5fc3\u529f\u80fd:\r\n    (1)\u5c06\u53d8\u91cf\u4ece\"value.yaml\"\u6587\u4ef6\u4e2d\u83b7\u53d6\uff0c\u5e76\u6e32\u67d3\u5230chart\u6a21\u677f\u6587\u4ef6\u4e2d;\r\n    (2)chart\u6a21\u677f\u6587\u4ef6\u5bf9\u5e94\u7684\u662f\u4e00\u7cfb\u5217yaml\u6587\u4ef6\uff0c\u4f1a\u57fa\u4e8e\u8fd9\u4e9byaml\u6e05\u5355\u6765\u90e8\u7f72\u5e94\u7528\u5230kuberntes\u96c6\u7fa4;\r\n    (3)helm\u4e5f\u6709\u5176\u5bf9\u5e94\u7684Chart\u4ed3\u5e93\uff0c\u8fd9\u4e9b\u516c\u5171\u4ed3\u5e93\u662f\u4e00\u4e9b\u5176\u4ed6\u5f00\u53d1\u6216\u8005\u8fd0\u7ef4\u4eba\u5458\u7f16\u5199\u597d\u7684chart\uff0c\u5982\u679c\u4ed6\u4eec\u5199\u7684chart\u5728\u6211\u4eec\u5de5\u4f5c\u4e2d\u80fd\u7528\u5230\u5c31\u662f\u6700\u597d\u7684\u4e86;\r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_0\">2.Helm\u5ba2\u6237\u7aef\u90e8\u7f72<\/h2>\n\n\n\n<p><strong><em>1.\u4e0b\u8f7dhelm\u4e8c\u8fdb\u5236\u8f6f\u4ef6\u5305<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    \u4f7f\u7528heml\u5f88\u7b80\u5355\uff0c\u4f60\u53ea\u9700\u8981\u4e0b\u8f7d\u4e00\u4e2a\u4e8c\u8fdb\u5236\u5ba2\u6237\u7aef\u5305\u5373\u53ef\uff0c\u4f1a\u901a\u8fc7kubeconfig\u914d\u7f6e(\u901a\u5e38\u4f4d\u7f6e\u5728\"$HOME\/.kube\/config\")\u6765\u8fde\u63a5kubernetes\u96c6\u7fa4\u3002\r\n    \u5982\u4e0b\u56fe\u6240\u793a\uff0c\u6211\u4eec\u4e0b\u8f7d\u6700\u65b0\u7684helm\u8f6f\u4ef6\u5305\uff0c\u4e0b\u8f7d\u5730\u5740\u4e3a:\"https:\/\/github.com\/helm\/helm\/releases\"\r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"467\" src=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-95.png\" alt=\"\" class=\"wp-image-1484\" srcset=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-95.png 865w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-95-300x162.png 300w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-95-768x415.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p><strong><em>2.\u89e3\u538bhelm\u4e8c\u8fdb\u5236\u8f6f\u4ef6\u5305\u5e76\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@k8s-master helm]# mkdir -pv \/helm\r\n&#91;root@k8s-master helm]# tar zxf helm-v3.7.1-linux-amd64.tar.gz -C \/helm\r\n&#91;root@k8s-master helm]# ln -sv \/helm\/linux-amd64\/helm \/usr\/bin\/\r\n&#91;root@k8s-master helm]# helm version\r<\/code><\/pre>\n\n\n\n<p><strong><em>3.helm\u53ef\u7528\u547d\u4ee4\u6982\u8ff0<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>completion:\r\n        \u751f\u6210\u547d\u4ee4\u8865\u5168\u7684\u529f\u80fd\u3002\u4f7f\u7528\"source &lt;(helm completion bash)\"\r\n    create:\r\n        \u521b\u5efa\u4e00\u4e2achart\u5e76\u6307\u5b9a\u540d\u79f0\u3002\r\n    dependency:\r\n        \u7ba1\u7406chart\u4f9d\u8d56\u5173\u7cfb\u3002\r\n    env:\r\n        \u67e5\u770b\u5f53\u524d\u5ba2\u6237\u7aef\u7684helm\u73af\u5883\u53d8\u91cf\u4fe1\u606f\u3002\r\n    get:\r\n        \u4e0b\u8f7d\u6307\u5b9a\u7248\u672c\u7684\u6269\u5c55\u4fe1\u606f\u3002\r\n    help:\r\n        \u67e5\u770b\u5e2e\u52a9\u4fe1\u606f\u3002\r\n    history:\r\n        \u83b7\u53d6\u53d1\u5e03\u5386\u53f2\u8bb0\u5f55\u3002\r\n    install:\r\n        \u5b89\u88c5chart\u3002\r\n    lint:\r\n        \u68c0\u67e5chart\u4e2d\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\u3002\r\n    list:\r\n        \u5217\u51fareleases\u4fe1\u606f\u3002\r\n    package:\r\n        \u5c06chart\u76ee\u5f55\u6253\u5305\u5230chart\u5b58\u6863\u6587\u4ef6\u4e2d\u3002\r\n    plugin:\r\n        \u5b89\u88c5\u3001\u5217\u51fa\u6216\u5378\u8f7dHelm\u63d2\u4ef6\u3002\r\n    pull:\r\n        \u4ece\u5b58\u50a8\u5e93\u4e0b\u8f7dchart\u5e76\u5c06\u5176\u89e3\u5305\u5230\u672c\u5730\u76ee\u5f55\u3002\r\n    repo:\r\n        \u6dfb\u52a0\u3001\u5217\u51fa\u3001\u5220\u9664\u3001\u66f4\u65b0\u548c\u7d22\u5f15chart\u5b58\u50a8\u5e93\u3002\r\n    rollback:\r\n        \u5c06\u7248\u672c\u56de\u6eda\u5230\u4ee5\u524d\u7684\u7248\u672c\u3002\r\n    search:\r\n        \u5728chart\u4e2d\u641c\u7d22\u5173\u952e\u5b57\u3002\r\n    show\uff1a\r\n        \u663e\u793achart\u8be6\u7ec6\u4fe1\u606f\u3002\r\n    status:\r\n        \u663e\u793a\u5df2\u6709\u7684\"RELEASE_NAME\"\u72b6\u6001\u3002\r\n    template:\r\n        \u672c\u5730\u6e32\u67d3\u6a21\u677f\u3002\r\n    test:\r\n        \u8fd0\u884c\u7248\u672c\u6d4b\u8bd5\u3002\r\n    uninstall:\r\n        \u5378\u8f7d\u7248\u672c\u3002\r\n    upgrade:\r\n        \u5347\u7ea7\u7248\u672c\u3002\r\n    verify:\r\n        \u9a8c\u8bc1\u7ed9\u5b9a\u8def\u5f84\u4e0a\u7684chart\u662f\u5426\u5df2\u7b7e\u540d\u4e14\u6709\u6548\r\n    version:\r\n        \u67e5\u770b\u5ba2\u6237\u7aef\u7248\u672c\r<\/code><\/pre>\n\n\n\n<p><strong><em>4.\u914d\u7f6ehelm\u547d\u4ee4\u81ea\u52a8\u8865\u5168<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>helm completion bash > .helmrc &amp;&amp; echo \"source .helmrc\" >> .bashrc \r\nsource .bashrc\r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_0\">3.Helm\u5de5\u5177\u521b\u5efachart<\/h2>\n\n\n\n<p><strong><em>1.Chart\u7684\u7ec4\u7ec7\u7ed3\u6784<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chart\u662f\u4e00\u4e2a\u7ec4\u7ec7\u5728\u6587\u4ef6\u76ee\u5f55\u4e2d\u7684\u96c6\u5408\u3002\u76ee\u5f55\u540d\u79f0\u5c31\u662fchart\u540d\u79f0\uff08\u6ca1\u6709\u7248\u672c\u4fe1\u606f\uff09\u3002\r\n\r\n\u56e0\u800c\u63cf\u8ff0WordPress\u7684chart\u53ef\u4ee5\u5b58\u50a8\u5728\"wordpress\/\"\u76ee\u5f55\u4e2d\u3002\u4ee5\u5b98\u65b9\u7684\"wordpress\"\u4e3a\u4f8b\uff0c\u5176\u5305\u542b\u4ee5\u4e0b\u6587\u4ef6\u5185\u5bb9:\r\n\tChart.yaml\r\n  \t\t\u4e00\u4e2a\u5305\u542bchart\u7684\u4fe1\u606f\u3002\r\n  \t\t\r\n  \tLICENSE\r\n  \t\t\u5305\u542bchart\u8bb8\u53ef\u8bc1\u7684\u7eaf\u6587\u672c\u6587\u4ef6\u3002\r\n  \t\r\n\tREADME.md\r\n  \t\t\u4e00\u4e2a\u53ef\u8bfb\u7684\u81ea\u8ff0\u6587\u4ef6\uff0c\u901a\u5e38\u662f\u7ed9\u7528\u6237\u770b\u7684\uff0c\u4ee5\u4fbf\u4e8e\u7528\u6237\u66f4\u52a0\u4e86\u89e3\u8be5Chart\u7684\u4f7f\u7528\u3002\r\n  \t\r\n\tvalues.yaml\r\n  \t\t\u5b9a\u4e49\u6b64chart\u7684\u9ed8\u8ba4\u914d\u7f6e\u503c\u3002\r\n  \t\t\r\n  \tvalues.schema.json  \r\n  \t\t\u7528\u4e8e\u5728values.yaml\u6587\u4ef6\u4e0a\u65bd\u52a0\u7ed3\u6784\u7684JSON\u6a21\u5f0f\r\n\r\n\tcharts\/\r\n    \t\u5305\u542b\u6b64Chart\u7684\u4efb\u4f55\u56fe\u8868(chart)\u7684\u76ee\u5f55\u3002\r\n    \t\r\n    crds\/\r\n  \t\t\u81ea\u5b9a\u4e49\u8d44\u6e90\u5b9a\u4e49\r\n\r\n\ttemplates\/         \r\n\t\t\u6a21\u677f\u76ee\u5f55\uff0c\u4e0evalues.yaml\u4e2d\u7684\u503c\u7ec4\u5408\u4f7f\u7528\uff0c\u5c06\u7528\u6765\u751f\u6210Kubernetes\u6e05\u5355\u6587\u4ef6\u3002\r\n\t\r\n\ttemplates\/NOTES.txt \r\n\t\t\u5305\u542b\u7b80\u77ed\u7528\u6cd5\u8bf4\u660e\u7684\u7eaf\u6587\u672c\u6587\u4ef6\u3002\r\n\t\t\r\n\t\t\r\n\u53c2\u8003\u94fe\u63a5:\r\n\thttps:&#47;&#47;helm.sh\/docs\/topics\/charts\/#the-chart-file-structure\r\n\thttps:\/\/helm.sh\/zh\/docs\/topics\/charts\/#chart-%E6%96%87%E4%BB%B6%E7%BB%93%E6%9E%84\r<\/code><\/pre>\n\n\n\n<p><strong><em>2.\u4f7f\u7528helm\u7ba1\u7406chart\u7684\u751f\u547d\u5468\u671f<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(1)\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\"linux\"\u7684Chart(\u9ed8\u8ba4\u90e8\u7f72\u7684\u662fnginx 1.16)\r\n&#91;root@k8s-master helm]# mkdir chart\r\n&#91;root@k8s-master helm]# cd chart\/\r\n&#91;root@k8s-master chart]# helm create linux \r\n(2)\u521b\u5efakubernetes\u547d\u540d\u7a7a\u95f4\r\n&#91;root@k8s-master chart]# kubectl create namespace helm \r\n(3)\u90e8\u7f72\u81ea\u5b9a\u4e49\u7684Chart\r\n&#91;root@k8s-master chart]# helm install my-web01 .\/linux -n helm \r\n(4)\u67e5\u770breleases\u4fe1\u606f\u548cPod\u4fe1\u606f\r\n&#91;root@k8s-master chart]# helm list -n helm \r\n&#91;root@k8s-master chart]# kubectl get pods -n helm  -o wide \r\n(5)\u5378\u8f7d\u81ea\u5b9a\u4e49\u7684Chart\r\n&#91;root@k8s-master chart]# helm uninstall my-web01 -n helm \r\n\u6e29\u99a8\u63d0\u793a:\r\n    \u4e00\u65e6\u6211\u4eec\u5378\u8f7d\u4e86\u4e00\u4e2aChart\uff0c\u8fd9\u610f\u5473\u7740\u5176\u521b\u5efa\u7684K8S\u8d44\u6e90\u4e5f\u5c06\u88ab\u968f\u4e4b\u5220\u9664\uff0c\u56e0\u6b64\u751f\u4ea7\u73af\u5883\u4e2d\u8c28\u614e\u64cd\u4f5c\uff01\r<\/code><\/pre>\n\n\n\n<p><strong><em>3.\u4f7f\u7528helm\u90e8\u7f72wordpress\u5e94\u7528-\u672a\u4f7f\u7528\u53d8\u91cf\u6587\u4ef6<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>###\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\" linux\"\u7684Chart\r\n&#91;root@k8s-master helm]# mkdir chart\r\n&#91;root@k8s-master helm]# cd chart\/\r\n&#91;root@k8s-master chart]# helm create linux \r\n###\u5220\u9664\u6a21\u677f\u6587\u4ef6\r\n&#91;root@k8s-master chart]# rm -rf\r\n###\u81ea\u5b9a\u4e49\u90e8\u7f72chart\u540e\u7684\u63d0\u793a\u4fe1\u606f\r\n&#91;root@k8s-master linux]# > values.yaml \r\n&#91;root@k8s-master linux]# echo \"Welcome to my Wordpress\" > templates\/NOTES.txt\r\n&#91;root@k8s-master linux]# cat Chart.yaml\r\napiVersion: v2\r\nname: linux\r\ndescription: A Helm chart for Kubernetes\r\ntype: application\r\nversion: 0.1.0\r\nappVersion: \"1.0\"\r\n#\u5c06\u6a21\u677f\u6587\u4ef6\u653e\u5230templates\u76ee\u5f55\u4e0b\r\n&#91;root@k8s-master linux]# cd templates\/\r\n&#91;root@k8s-master templates]# cat > deployment-mysql.yaml &lt;&lt;EOF\r\n> apiVersion: extensions\/v1beta1\r\n> kind: Deployment\r\n> metadata:\r\n>   name: mysql\r\n>   namespace: kube-system\r\n> spec:\r\n>   replicas: 1\r\n>   template:\r\n>     metadata:\r\n>       labels:\r\n>         app: mysql\r\n>     spec:\r\n>       containers:\r\n>       - name: mysql\r\n>         image: mysql:5.7\r\n>         ports:\r\n>         - containerPort: 3306\r\n>         env:\r\n>         - name: MYSQL_ROOT_PASSWORD\r\n>           value: somewordpress\r\n>         - name: MYSQL_DATABASE\r\n>           value: wordpress\r\n>         - name: MYSQL_USER\r\n>           value: wordpress\r\n>         - name: MYSQL_PASSWORD\r\n>           value: wordpress\r\n> EOF\r\n&#91;root@k8s-master templates]# cat > svc-mysql.yaml &lt;&lt;EOF\r\n> apiVersion: v1\r\n> kind: Service   #\u7b80\u79f0svc\r\n> metadata:\r\n>   name: musql-svc\r\n>   namespace: kube-system\r\n> spec:\r\n>   type: ClusterIP\r\n>   ports:\r\n>     - port: 3306\r\n>       targetPort: 3306    #pod port\r\n>   selector:\r\n>     app: mysql\r\n> EOF\r\n&#91;root@k8s-master templates]# cat > deployment-wordpress.yaml &lt;&lt;EOF\r\n> apiVersion: extensions\/v1beta1\r\n> kind: Deployment\r\n> metadata:\r\n>   name: wordpress\r\n> spec:\r\n>   replicas: 1\r\n>   template:\r\n>     metadata:\r\n>       labels:\r\n>         app: wordpress\r\n>     spec:\r\n>       containers:\r\n>       - name: wordpress\r\n>         image: wordpress:latest\r\n>         ports:\r\n>         - containerPort: 80\r\n>         env:\r\n>         - name: WORDPRESS_DB_HOST\r\n>           value: musql-svc.kube-system.svc.cluster.local\r\n>         - name: WORDPRESS_DB_USER\r\n>           value: wordpress\r\n>         - name: WORDPRESS_DB_PASSWORD\r\n>           value: wordpress\r\n> EOF\r\n&#91;root@k8s-master templates]# cat  >  svc-wordpress.yaml  &lt;&lt;EOF\r\n> apiVersion: v1\r\n> kind: Service   #\u7b80\u79f0svc\r\n> metadata:\r\n>   name: wordpress-svc\r\n> spec: \r\n>   type: NodePort\r\n>   ports:\r\n>     - port: 80\r\n>       nodePort: 31001\r\n>       targetPort: 80   #pod port\r\n>   selector:\r\n>     app: wordpress\r\n> EOF\r\n###\u5b89\u88c5\u54b1\u4eec\u81ea\u5b9a\u4e49\u7684chart\r\n&#91;root@k8s-master templates]# cd ..\/..\/\r\n&#91;root@k8s-master chart]# helm install wordpress linux\/ -n helm\r\n###\u67e5\u770b\u5b89\u88c5\u662f\u5426\u6210\u529f\r<\/code><\/pre>\n\n\n\n<p><strong><em>4.\u4f7f\u7528helm\u90e8\u7f72nginx\u5e94\u7528-\u4f7f\u7528\u53d8\u91cf\u6587\u4ef6<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>###\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\"nginx\"\u7684Chart\r\n&#91;root@k8s-master chart]# helm create nginx\r\n###\u81ea\u5b9a\u4e49\"values.yaml\"\u6587\u4ef6\r\n&#91;root@k8s-master nginx]# cat values.yaml \r\nschool: &#91;\"\u5317\u4eac\",\"\u4e0a\u6d77\",\"\u6df1\u5733\"]\r\nreplicas: 3\r\nimage: \"nginx\"\r\nimageTag: \"1.13\"\r\n###\u5220\u9664\u65e0\u7528\u7684\u6587\u4ef6\r\n&#91;root@k8s-master nginx]# rm -rf templates\/*\r\n&#91;root@k8s-master nginx]# cat NOTES.txt \r\n\u5317\u4eac\u6b22\u8fce\u60a8......&#91; \u535a\u5ba2\u5730\u5740: https:\/\/www.buyao007.icu\/ ]\r\n\u6211\u53bb\u8fc7\u7684\u57ce\u5e02: {{ .Values.school }}, image: &#91;{{ .Values.image }}:{{ .Values.imageTag }}]\r\n###\u521b\u5efa\u8d44\u6e90\u7684\u914d\u7f6e\u6587\u4ef6\u5e76\u5f15\u7528\"values.yaml\"\u6587\u4ef6\u4e2d\u7684\u53d8\u91cf\r\n&#91;root@k8s-master nginx]# cd templates\/\r\n&#91;root@k8s-master templates]# cat > myweb-deployment.yaml &lt;&lt; EOF\r\n> apiVersion: apps\/v1\r\n> kind: Deployment\r\n> metadata:\r\n>   # \u6ce8\u610f\u54c8\uff0c\u6b64\u5904\u7684\".Release.Name\"\u6211\u4eec\u5e76\u6ca1\u6709\u5728\"..\/values.yaml\"\u6587\u4ef6\u4e2d\u5b9a\u4e49\uff0c\u8be5\u53d8\u91cf\u8868\u793a\u7684\u662f\u6211\u4eec\u5728\u90e8\u7f72chart\u65f6\u6307\u5b9aRelease\u7684\u540d\u79f0\r\n>   name: {{ .Release.Name }}-deployment\r\n>   namespace: helm\r\n> spec:\r\n>   # \u6b64\u5904\u6211\u5f15\u7528\u7684\u662f\"..\/values.yaml\"\u6587\u4ef6\u4e2d\u7684\"replicas\"\u53d8\u91cf\r\n>   replicas: {{ .Values.replicas }}\r\n>   selector:\r\n>     matchLabels:\r\n>       app: mynginx\r\n>   template:\r\n>     metadata:\r\n>       labels:\r\n>         app: mynginx\r\n>     spec:\r\n>       containers:\r\n>       - name: web\r\n>         # \u6b64\u5904\u6211\u5f15\u7528\u7684\u662f\"..\/values.yaml\"\u6587\u4ef6\u4e2d\u7684\u53d8\u91cf\r\n>         image: {{ .Values.image }}:{{ .Values.imageTag }}\r\n> EOF\r\n&#91;root@k8s-master templates]# cat > myweb-service.yaml &lt;&lt; EOF\r\n> apiVersion: v1\r\n> kind: Service\r\n> metadata:\r\n>   name: {{ .Release.Name }}-service\r\n>   namespace: helm\r\n> spec:\r\n>   ports:\r\n>   - port: 80\r\n>     protocol: TCP\r\n>     targetPort: 80\r\n>   selector:\r\n>     app: mynginx\r\n>   type: NodePort\r\n> EOF\r\n###\u90e8\u7f72\u670d\u52a1\r\n&#91;root@k8s-master templates]# cd ..\/..\/\r\n&#91;root@k8s-master chart]# helm install web-nginx nginx\/ -n helm\r<\/code><\/pre>\n\n\n\n<p><strong><em>5.\u4f7f\u7528\"--dry-run\"\u9009\u9879\u5e76\u672a\u771f\u6b63\u90e8\u7f72!\u5b83\u4f1a\u5217\u51fa\u8981\u6267\u884c\u7684yaml\u6587\u4ef6\u5185\u5bb9!<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@k8s-master chart]# helm  install nginx nginx\/ -n helm --dry-run<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_0\">4.Helm\u5de5\u5177\u5347\u7ea7\u4e0e\u56de\u6edaChart\u7684Release<\/h2>\n\n\n\n<p><strong><em>1.\u57fa\u4e8ehelm\u5347\u7ea7Chart\u7684Release\u6982\u8ff0<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4e3a\u4e86\u5b9e\u73b0Chart\u590d\u7528\uff0c\u53ef\u52a8\u6001\u4f20\u53c2\u4fee\u6539\"values.yaml\"\u6587\u4ef6\u4e2d\u7684\u53d8\u91cf\u503c\uff0c\u6709\u4ee5\u4e0b\u4e24\u79cd\u65b9\u5f0f:\r\n\t--values,-f:\r\n\t\t\u57fa\u4e8eyaml\u914d\u7f6e\u6587\u4ef6\u65b9\u5f0f\u5347\u7ea7Release\u3002\r\n\t\t\u4f8b\u5982:\"helm upgrade  -f values.yaml myweb02 nginx\"\r\n\t--set:\r\n\t\t\u57fa\u4e8e\u547d\u4ee4\u884c\u65b9\u5f0f\u5347\u7ea7Release\u3002\u4f8b\u5982:\"helm upgrade --set imageTag=1.18 myweb02 oldboyedu-nginx\"\r\n    \u5982\u4e0b\u56fe\u6240\u793a\uff0c\u5bf9\u6bd4\u4e86\u57fa\u4e8eyaml\u914d\u7f6e\u6587\u4ef6\u548c\u57fa\u4e8e\u547d\u4ee4\u884c\u65b9\u5f0f\u5347\u7ea7Release\u7684\u5dee\u522b\u3002\r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"449\" src=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-96.png\" alt=\"\" class=\"wp-image-1497\" srcset=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-96.png 865w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-96-300x156.png 300w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-96-768x399.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p><strong><em>2.\u4f7f\u7528helm\u57fa\u4e8eyaml\u914d\u7f6e\u6587\u4ef6\u65b9\u5f0f\u5347\u7ea7Nginx\u5e94\u7528<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@k8s-master nginx]# cat values.yaml \r\nschool: &#91;\"\u5317\u4eac\",\"\u4e0a\u6d77\",\"\u6df1\u5733\"]\r\nreplicas: 3\r\nimage: \"nginx\"\r\nimageTag: \"1.14\"###\u4fee\u6539\u7248\u672c\u4e3a1.14\r\n&#91;root@k8s-master nginx]# helm upgrade -n helm web-nginx ..\/nginx\/\r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"554\" src=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-97.png\" alt=\"\" class=\"wp-image-1498\" srcset=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-97.png 865w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-97-300x192.png 300w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-97-768x492.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p><strong><em>3.\u4f7f\u7528helm\u57fa\u4e8e\u547d\u4ee4\u884c\u65b9\u5f0f\u5347\u7ea7Nginx\u5e94\u7528<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@k8s-master nginx]# helm upgrade --set imageTag=1.15    -n helm web-nginx ..\/nginx<\/code><\/pre>\n\n\n\n<p><strong><em>4.Helm\u5de5\u5177\u56de\u6edaChart\u7684Release<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>###\u67e5\u770b\u67d0\u4e2aChart\u7684\u5386\u53f2\u53d1\u5e03\u7248\u672c\u4fe1\u606f\r\n&#91;root@k8s-master nginx]# helm history -n helm web-nginx\r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"187\" src=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-98.png\" alt=\"\" class=\"wp-image-1499\" srcset=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-98.png 865w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-98-300x65.png 300w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-98-768x166.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>###\u56de\u6eda\u5230\u4e0a\u4e00\u4e2a\u7248\u672c\r\n&#91;root@k8s-master nginx]# helm rollback -n helm web-nginx\r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"149\" src=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-99.png\" alt=\"\" class=\"wp-image-1500\" srcset=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-99.png 865w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-99-300x52.png 300w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-99-768x132.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>###\u56de\u6eda\u5230\u6307\u5b9a\u7684\u7248\u672c\r\n&#91;root@k8s-master nginx]# helm rollback -n helm web-nginx 1\r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"257\" src=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-100.png\" alt=\"\" class=\"wp-image-1501\" srcset=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-100.png 865w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-100-300x89.png 300w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-100-768x228.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_0\">5.Helm\u5de5\u5177\u516c\u5171Chart\u4ed3\u5e93\u7ba1\u7406<\/h2>\n\n\n\n<p><strong><em>1.\u4e3b\u6d41\u7684Chart\u4ed3\u5e93\u6982\u8ff0<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u56fd\u5185Chart\u4ed3\u5e93\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u4ed6\u4eec\u5236\u4f5c\u597d\u7684\u5305:\r\n        \u5b98\u65b9\u4ed3\u5e93:\r\n            https:&#47;&#47;hub.kubeapps.com\/charts\/incubator\r\n        \u5fae\u8f6f\u4ed3\u5e93:\r\n            http:\/\/mirror.azure.cn\/kubernetes\/charts\/\r\n        \u963f\u91cc\u4e91\u4ed3\u5e93:\r\n            https:\/\/kubernetes.oss-cn-hangzhou.aliyuncs.com\/charts\r\n    \u6dfb\u52a0\u4ed3\u5e93\u7684\u65b9\u5f0f:\r\n        helm repo list\r\n            \u67e5\u770b\u73b0\u6709\u7684\u4ed3\u5e93\u4fe1\u606f\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u6ca1\u6709\u4efb\u4f55\u4ed3\u5e93\u5730\u5740\u7684\r\n        helm repo add azure http:\/\/mirror.azure.cn\/kubernetes\/charts\/ \r\n            \u6b64\u5904\u6211\u4eec\u5c06\u5fae\u8f6f\u4e91\u7684\u4ed3\u5e93\u6dfb\u52a0\u5230\u54b1\u4eec\u7684helm\u5ba2\u6237\u7aef\u4ed3\u5e93\r\n        helm repo update  \r\n            \u6211\u4eec\u4e5f\u53ef\u4ee5\u66f4\u65b0\u4ed3\u5e93\u4fe1\u606f\r<\/code><\/pre>\n\n\n\n<p><strong><em>2.\u624b\u52a8\u6dfb\u52a0\u5fae\u8f6f\u4e91\u548c\u963f\u91cc\u4e91Chart\u4ed3\u5e93<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(1)\u672a\u6dfb\u52a0\u5b58\u50a8\u5e93\u4e4b\u524d\uff0c\u5148\u67e5\u770b\u4ed3\u5e93\u4fe1\u606f\r\nhelm repo list\r\n\r\n(2)\u6dfb\u52a0\u5fae\u8f6f\u4e91\u7684Chart\u4ed3\u5e93repositories\r\nhelm repo add azure http:\/\/mirror.azure.cn\/kubernetes\/charts\/\r\n(3)\u6dfb\u52a0\u963f\u91cc\u4e91\u7684Chart\u4ed3\u5e93 repositories\r\nhelm repo add aliyun https:\/\/kubernetes.oss-cn-hangzhou.aliyuncs.com\/charts\r\n\r\n(4)\u518d\u6b21\u67e5\u770b\u4ed3\u5e93\u4fe1\u606f\r\nhelm repo list\r\n\r\n(5)\u66f4\u65b0\u4ed3\u5e93\u4fe1\u606f\r\nhelm repo update\r\n\u6e29\u99a8\u63d0\u793a:\r\n\t\u5f53\u6211\u4eec\u6210\u529f\u6dfb\u52a0\u4e86\u5b58\u50a8\u5e93\u540e\u8bb0\u5f97\u66f4\u65b0\u4e00\u4e0b\r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_0\">6.Helm\u5de5\u5177\u79c1\u6709Chart\u4ed3\u5e93\u7ba1\u7406<\/h2>\n\n\n\n<p><strong><em>1.\u4f7f\u7528docker\u90e8\u7f72Chartmuseum\u79c1\u6709Chart\u4ed3\u5e93<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(1)\u521b\u5efa\u6570\u636e\u6301\u4e45\u5316\u76ee\u5f55\r\nmkdir -pv \/data\/chartmuseum\r\n\r\n(2)\u542f\u52a8chartmuseum\u5bb9\u5668\r\ndocker container run -d \\\r\n  -p 8080:8080 \\\r\n  -e DEBUG=1 \\\r\n  -e STORAGE=local \\\r\n  -e STORAGE_LOCAL_ROOTDIR=\/charts \\\r\n  -v \/data\/chartmuseum:\/charts \\\r\n  --restart always \\\r\n  chartmuseum\/chartmuseum:latest\r\n\r\n(3)\u4f7f\u7528curl\u5de5\u5177\u8bbf\u95ee\u4e0b\u63a5\u53e3\uff0c\u6ca1\u6709\u62a5\u9519\u5c31\u884c\uff0c\u5f53\u524d\u4ed3\u5e93\u5185\u5bb9\u8fd8\u662f\u7a7a\u7684\r\ncurl http:\/\/10.0.0.11:8080\/api\/charts\r\n\u63a8\u8350\u9605\u8bfb:\r\n\thttps:&#47;&#47;github.com\/helm\/chartmuseum\r<\/code><\/pre>\n\n\n\n<p><strong><em>2.\u51c6\u5907helm\u53ca\u79bb\u7ebfchart\uff0c\u63a8\u9001\u5230\u79c1\u6709\u5e93<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@k8s-master chartmuseum]# helm pull aliyun\/redis\r\n&#91;root@k8s-master chartmuseum]# helm pull aliyun\/mysql\r\n&#91;root@k8s-master chartmuseum]# curl http:\/\/10.0.0.11:8080\/api\/charts###\u53d1\u73b0\u5df2\u7ecf\u6709\u6570\u636e\u4e86\r<\/code><\/pre>\n\n\n\n<p><strong><em>3.\u6dfb\u52a0\u79c1\u6709\u7684\u4ed3\u5e93\u5e76\u4e0a\u4f20\u81ea\u5df1\u7684chart<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@k8s-master chartmuseum]# helm repo add sfy-helm http:\/\/10.0.0.11:8080\/\r\n(1)\u5c06\u81ea\u5b9a\u4e49\u7684Chart\u8fdb\u884c\u6253\u5305\r\n&#91;root@k8s-master nginx]# helm package ..\/nginx\/\r\n(2)\u4fee\u6539\u6743\u9650\uff0c\u5426\u5219\u6267\u884c\u4e0b\u4e00\u6761\u547d\u4ee4\u65f6\u4f1a\u62a5\u9519\"\"\r\n&#91;root@k8s-master nginx]# chmod -R 777 \/data\r\n(3)\u4f7f\u7528 helm cm-push \u63d2\u4ef6\u4e0a\u4f20\u81ea\u5b9a\u4e49Chart\r\n&#91;root@k8s-master nginx]# yum -y install git\r\n&#91;root@k8s-master nginx]# helm plugin install https:\/\/gitee.com\/jasonyin2020\/helm-push.git\r\n&#91;root@k8s-master nginx]# helm cm-push nginx-0.1.0.tgz sfy-helm\r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"223\" src=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-101.png\" alt=\"\" class=\"wp-image-1508\" srcset=\"https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-101.png 865w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-101-300x77.png 300w, https:\/\/www.buyao007.icu\/wp-content\/uploads\/2022\/04\/image-101-768x198.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b59\u5bcc\u9633\uff0c \u6c5f\u6e56\u4eba\u79f0\u6ca1\u4eba\u79f0\u3002\u591a\u5e74\u4e92\u8054\u7f51\u8fd0\u7ef4\u5de5\u4f5c\u7ecf\u9a8c\uff0c\u66fe\u8d1f\u8d23\u8fc7\u5b59\u5e03\u65af\u5927\u89c4\u6a21\u96c6\u7fa4\u67b6\u6784\u81ea\u52a8\u5316\u8fd0\u7ef4\u7ba1\u7406\u5de5\u4f5c\u3002\u64c5\u957fWeb\u96c6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":246,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"_links":{"self":[{"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=\/wp\/v2\/posts\/1478"}],"collection":[{"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1478"}],"version-history":[{"count":15,"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=\/wp\/v2\/posts\/1478\/revisions"}],"predecessor-version":[{"id":1509,"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=\/wp\/v2\/posts\/1478\/revisions\/1509"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=\/wp\/v2\/media\/246"}],"wp:attachment":[{"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.buyao007.icu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}