{"id":49239,"date":"2023-12-27T00:01:30","date_gmt":"2023-11-10T02:21:31","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/"},"modified":"2024-05-04T15:33:12","modified_gmt":"2024-05-04T07:33:12","slug":"%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/","title":{"rendered":"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4"},"content":{"rendered":"<h1>\u8fd9\u662f\u4ec0\u4e48\uff1f<\/h1>\n<p>\u4ee5\u4e0b\u662f\u5728Oracle Cloud Infrastructure\uff08\u7b80\u79f0OCI\uff0cOracle\u7684IaaS\uff09\u4e0a\u6784\u5efaKubernetes\u96c6\u7fa4\u7684\u6b65\u9aa4\u3002<\/p>\n<p>\u5728\u8fd9\u4e2a\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528Oracle\u4f5c\u4e3aOSS\u516c\u5f00\u7684\u57fa\u4e8eTerraform\u7684Kubernetes\u5b89\u88c5\u7a0b\u5e8f\u3002<\/p>\n<p>\uff082018\/06\/29\u66f4\u65b0\uff09<br \/>\n\u7531\u4e8eOCI\u63a7\u5236\u53f0\u7684\u7528\u6237\u754c\u9762\u5df2\u7ecf\u8fdb\u884c\u4e86\u90e8\u5206\u66f4\u6539\uff0c\u56e0\u6b64\u672c\u6761\u76ee\u7684\u5c4f\u5e55\u56fe\u50cf\u4e0e\u5b9e\u9645\u63a7\u5236\u53f0\u4e0d\u540c\u3002<br \/>\n\u8bf7\u6ce8\u610f\uff0c\u5c4f\u5e55\u56fe\u50cf\u4e2d\u5728\u63a7\u5236\u53f0\u9876\u90e8\u7684\u6807\u7b7e\u548c\u5de6\u4fa7\u7684\u83dc\u5355\u5bfc\u822a\u5df2\u7ecf\u88ab\u66f4\u6539\u4e3a\u5c55\u5f00\u5de6\u4e0a\u89d2\u7684\u6c49\u5821\u83dc\u5355\u6765\u64cd\u4f5c\uff09<\/p>\n<h2>\u53ea\u9700\u8981\u4e00\u4e2a\u9009\u9879\uff1a\u80fd\u591f\u786e\u8ba4\u52a8\u4f5c\u7684\u6761\u4ef6\u3002<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30a6\u30c9<\/ul>\n<\/li>\n<\/ul>\n<p>North America \u30ea\u30fc\u30b8\u30e7\u30f3\u306eDC\u304c\u6709\u52b9\u306aOracle Cloud\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u3042\u308b\u3053\u3068<\/p>\n<p>\u30ed\u30fc\u30ab\u30ebPC<\/p>\n<p>Ubuntu 16.04\uff08\u591a\u5206Mac\u3067\u3082\u3044\u3051\u308b\uff09<\/p>\n<p>Oracle Cloud\u63d0\u4f9b\u4e86\u4e00\u79cd\u8bd5\u7528\u5e10\u6237\uff0c\u60a8\u53ef\u4ee5\u514d\u8d39\u4f7f\u7528\u4e91\u8ba2\u9605\u670d\u52a135000\u5206\u949f\uff08\u622a\u81f32018\/03\/03\uff09\u3002\u8fd9\u4e2a\u6559\u7a0b\u4e5f\u53ef\u4ee5\u5728\u4e0a\u8ff0\u8bd5\u7528\u5e10\u6237\u4e0a\u8fdb\u884c\u3002<\/p>\n<p>\u5728\u8bd5\u7528\u8d26\u6237\u767b\u5f55\u65f6\uff0c\u5c06\u9ed8\u8ba4\u6570\u636e\u4e2d\u5fc3\/\u5730\u533a\u8bbe\u4e3a\u5317\u7f8e\uff0c\u53ef\u4ee5\u4f7f\u672c\u6559\u7a0b\u7684\u6267\u884c\u66f4\u52a0\u987a\u5229\u3002<\/p>\n<h1>\u6574\u4f53\u7684\u52a8\u6001<\/h1>\n<p>\u5927\u81f4\u7684\u6b65\u9aa4\u6d41\u7a0b\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5728OCI\u4e0a\u505a\u51c6\u5907\u5de5\u4f5c<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u4f7f\u7528\u57fa\u4e8eTerraform\u7684Kubernetes\u5b89\u88c5\u7a0b\u5e8f\u6784\u5efaKubernetes\u96c6\u7fa4<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u8bbe\u7f6e\u5ba2\u6237\u7aef\u4ee5\u8bbf\u95ee\u96c6\u7fa4\u73af\u5883<\/ol>\n<h1>1. \u5728OCI\u4e0a\u7684\u51c6\u5907\u5de5\u4f5c\u3002<\/h1>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5c06\u5728OCI\u4e0a\u521b\u5efa\u7528\u4e8eKubernetes\u7684\u533a\u57df\uff08Compartment\uff09\u4ee5\u53ca\u8be5\u533a\u57df\u7684\u7ba1\u7406\u5458\u5e10\u6237\u7b49\u6240\u9700\u8d44\u6e90\u3002<\/p>\n<h2>1-1. \u521b\u5efa API \u8bbf\u95ee\u5bc6\u94a5<\/h2>\n<p>\u5728\u540e\u7eed\u7684\u6b65\u9aa4\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528Kubernetes\u5b89\u88c5\u7a0b\u5e8f\u6765\u5b9e\u73b0\u5176\u529f\u80fd\uff0c\u5b83\u5229\u7528OCI\u7684API\u3002\u4e3a\u4e86\u4f7f\u7528\u8be5API\uff0c\u9700\u8981\u5728OCI\u4fa7\u8bbe\u7f6e\u9002\u5f53\u7684\u8bbf\u95ee\u5bc6\u94a5\u3002<\/p>\n<p>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7528\u4f5c\u4e0a\u8ff0\u8bbf\u95ee\u5bc6\u94a5\u7684\u5bc6\u94a5\u5bf9\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; mkdir ~\/.oci\r\n&gt; openssl genrsa -out ~\/.oci\/oci_api_key.pem 2048\r\nGenerating RSA private key, 2048 bit long modulus\r\n........................................................+++\r\n..................................+++\r\ne is 65537 (0x10001)\r\n&gt; chmod go-rwx ~\/.oci\/oci_api_key.pem\r\n&gt; openssl rsa -pubout -in ~\/.oci\/oci_api_key.pem -out ~\/.oci\/oci_api_key_public.pem\r\n&gt; ls .oci\/\r\noci_api_key.pem  oci_api_key_public.pem\r\n<\/code><\/pre>\n<h2>\u5728OCI\u4e0a\u521b\u5efa\u6240\u9700\u7684\u8d44\u6e90\u3002<\/h2>\n<p>\u6211\u5c06\u901a\u8fc7\u64cd\u4f5cOCI\u7684\u670d\u52a1\u63a7\u5236\u53f0\u6765\u521b\u5efa\u6240\u9700\u7684\u8d44\u6e90\uff0c\u5982Compartment\u7b49\u3002<\/p>\n<h3>1-2-1. \u8bbf\u95eeOCI\u7684\u670d\u52a1\u63a7\u5236\u53f0<\/h3>\n<p>\u767b\u5f55Oracle\u4e91\u7684\u4eea\u8868\u76d8\uff0c\u5728\u4eea\u8868\u76d8\u754c\u9762\u4e0a\uff0c\u6309\u987a\u5e8f\u70b9\u51fb\u201cCompute\u201d\u9762\u677f\u53f3\u4e0b\u89d2\u7684\u83dc\u5355\u56fe\u6807\uff0c\u7136\u540e\u70b9\u51fb\u201c\u6253\u5f00\u670d\u52a1\u63a7\u5236\u53f0\u201d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/21-0.png\" alt=\"\" \/><\/div>\n<p>\u5982\u679c\u6ca1\u6709\u663e\u793a&#8221;Compute&#8221;\u9762\u677f\uff0c\u8bf7\u70b9\u51fb\u4f4d\u4e8e\u5c4f\u5e55\u4e0a\u534a\u90e8\u5206\u84dd\u8272\u533a\u57df\u5185\u7684&#8221;\u4eea\u8868\u677f\u5b9a\u5236&#8221;\uff0c\u4ee5\u542f\u7528&#8221;Compute&#8221;\u9762\u677f\u7684\u663e\u793a\u3002<\/p>\n<h3>\u521b\u5efa\u4e00\u4e2a1-2-2\u7684\u9694\u95f4<\/h3>\n<p>Compartment\u662fOCI\u79df\u6237\u5185\u90e8\u7684\u9694\u95f4\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u5176\u4e2d\u653e\u7f6e\u5404\u79cd\u8d44\u6e90\u6216\u5206\u914d\u7b56\u7565\u7ed9Compartment\u6765\u7ba1\u7406\u8d26\u6237\u6743\u9650\u3002<br \/>\n\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u914d\u7f6eKubernetes\u96c6\u7fa4\u7684Compartment\uff0c\u7528\u4e8e\u653e\u7f6e\u5404\u79cd\u8d44\u6e90\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5728OCI\u670d\u52a1\u63a7\u5236\u53f0\u7684\u53f3\u4e0a\u65b9\u7684\u9009\u9879\u5361\u4e2d\uff0c\u70b9\u51fb\u201c\u8eab\u4efd\u201d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/26-0.png\" alt=\"\" \/><\/div>\n<p>\u5728\u753b\u9762\u5de6\u4fa7\u7684\u83dc\u5355\u4e2d\u70b9\u51fb\u201cCompartment\u201d\uff0c\u7136\u540e\u518d\u70b9\u51fb\u201c\u521b\u5efaCompartment\u201d\u6309\u94ae\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/28-0.png\" alt=\"\" \/><\/div>\n<p>\u5728\u201c\u521b\u5efa\u9694\u79bb\u533a\u201d\u5bf9\u8bdd\u6846\u4e2d\u8bbe\u7f6e\u4ee5\u4e0b\u503c\uff0c\u7136\u540e\u70b9\u51fb\u201c\u521b\u5efa\u9694\u79bb\u533a\u201d\u6309\u94ae\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">NAME: k8s<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">DESCRIPTION: k8s on OCI<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\uff08\u4e0a\u8a18\u4ee5\u5916\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\uff09<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/31-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u4ee5\u4e0a\uff0cCompartment\u7684\u521b\u5efa\u5de5\u4f5c\u5df2\u7ecf\u5b8c\u6210\u3002<\/p>\n<h3>\u521b\u5efa\u7528\u4e8e\u7ba1\u7406Compartment\u7684\u7ba1\u7406\u5458\u8d26\u6237\u7ec4\u3002<\/h3>\n<p>\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u7ba1\u7406Compartment\u7ba1\u7406\u5458\u5e10\u6237\u7684\u7fa4\u7ec4\u3002<\/p>\n<p>\u5728\u753b\u9762\u5de6\u4fa7\u7684\u83dc\u5355\u70b9\u51fb\u201c\u7fa4\u7ec4\u201d\uff0c\u7136\u540e\u518d\u70b9\u51fb\u201c\u521b\u5efa\u7fa4\u7ec4\u201d\u6309\u94ae\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/36-0.png\" alt=\"\" \/><\/div>\n<p>\u5728\u201c\u521b\u5efa\u7fa4\u7ec4\u201d\u5bf9\u8bdd\u6846\u4e2d\u8bbe\u7f6e\u4ee5\u4e0b\u6570\u503c\uff0c\u7136\u540e\u70b9\u51fb\u201c\u63d0\u4ea4\u201d\u6309\u94ae\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">NAME: k8s_administrators<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">DESCRIPTION: k8s administrators<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\uff08\u4e0a\u8a18\u4ee5\u5916\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\uff09<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/39-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u4ee5\u4e0a\u662f\u7ba1\u7406\u5458\u8d26\u6237\u7ec4\u7684\u521b\u5efa\u5b8c\u6210\u3002<\/p>\n<h3>\u521b\u5efa\u9002\u7528\u4e8eGroup\u7684Policy<\/h3>\n<p>\u901a\u8fc7\u8bbe\u7f6e\u6240\u9700\u7684\u7b56\u7565\uff0c\u53ef\u4ee5\u5c06\u6743\u9650\u5206\u914d\u7ed9\u76ee\u6807\u7fa4\u7ec4\u3002<br \/>\n\u5728\u6b64\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u5206\u914d\u7ed9\u7ba1\u7406\u5458\u5e10\u6237\u7fa4\u7ec4\u7684\u7b56\u7565\u3002\u5728\u6b64\u7b56\u7565\u4e2d\uff0c\u6211\u4eec\u5c06\u62e5\u6709\u5bf9\u7ec4\u4ef6\u7684\u5168\u6743\u9650\u3002<\/p>\n<p>\u8bf7\u70b9\u51fb\u753b\u9762\u5de6\u4fa7\u7684\u83dc\u5355\u4e2d\u7684&#8221;\u653f\u7b56&#8221;\u9009\u9879\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/44-0.png\" alt=\"\" \/><\/div>\n<p>\u5728\u5c4f\u5e55\u7684\u5de6\u4e0b\u89d2\u7684&#8221;List Scope&#8221;\u83dc\u5355\u4e2d\u9009\u62e9&#8221;k8s&#8221;\u7684\u5bb9\u5668\u3002\u7136\u540e\uff0c\u70b9\u51fb&#8221;Create Policy&#8221;\u6309\u94ae\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/46-0.png\" alt=\"\" \/><\/div>\n<p>\u5728&#8221;\u521b\u5efa\u7b56\u7565&#8221;\u5bf9\u8bdd\u6846\u4e2d\uff0c\u6309\u7167\u4ee5\u4e0b\u65b9\u5f0f\u8bbe\u7f6e\u6570\u503c\uff0c\u7136\u540e\u70b9\u51fb&#8221;\u521b\u5efa&#8221;\u6309\u94ae\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">NAME: k8s_admin_policy<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">DESCRIPTION: Grants users full permissions on the k8s compartment<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Policy Statements<\/ul>\n<\/li>\n<\/ul>\n<p>STATEMENT: Allow group k8s_administrators to manage all-resources in compartment k8s<\/p>\n<p>\uff08\u4e0a\u8a18\u4ee5\u5916\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\uff09<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/49-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u4ee5\u4e0a\uff0c\u5df2\u7ecf\u5b8c\u6210\u4e86\u9002\u7528\u4e8eGroup\u7684Policy\u7684\u521b\u5efa\u3002<\/p>\n<h3>\u521b\u5efa1-2-5\u533a\u57df\u7684\u7ba1\u7406\u5458\u7528\u6237<\/h3>\n<p>\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u7ba1\u7406\u6b64Compartment\u7684\u7528\u6237\u3002<br \/>\n\u901a\u8fc7\u5c06\u6b64\u7528\u6237\u5206\u914d\u5230\u7528\u4e8e\u7ba1\u7406\u5458\u5e10\u6237\u7684\u7ec4\u4e2d\uff0c\u4f7f\u5176\u5bf9Compartment\u62e5\u6709\u5b8c\u5168\u6743\u9650\u3002\u53e6\u5916\uff0c\u901a\u8fc7\u8bbe\u7f6e\u5728\u6b65\u9aa41\u4e2d\u521b\u5efa\u7684API\u8bbf\u95ee\u5bc6\u94a5\uff0c\u4f7f\u5f97\u8be5\u7528\u6237\u53ef\u4ee5\u4ee5\u5176\u6743\u9650\u4ece\u5916\u90e8\u6267\u884cOCI\u7684API\u64cd\u4f5c\u3002<\/p>\n<p>\u5728\u753b\u9762\u5de6\u4fa7\u7684\u83dc\u5355\u4e2d\u70b9\u51fb\u201c\u7528\u6237\u201d\uff0c\u7136\u540e\u518d\u70b9\u51fb\u201c\u521b\u5efa\u7528\u6237\u201d\u6309\u94ae\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/54-0.png\" alt=\"\" \/><\/div>\n<p>\u5728&#8221;\u521b\u5efa\u7528\u6237&#8221;\u5bf9\u8bdd\u6846\u4e2d\u8bbe\u7f6e\u4ee5\u4e0b\u503c\uff0c\u7136\u540e\u70b9\u51fb&#8221;\u521b\u5efa&#8221;\u6309\u94ae\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">NAME: k8s_admin<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">DESCRIPTION: k8s administrator<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\uff08\u4e0a\u8a18\u4ee5\u5916\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u307e\u307e\uff09<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/57-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u5728\u7528\u6237\u5217\u8868\u9875\u9762\u4e0a\uff0c\u70b9\u51fb&#8221;k8s_admin&#8221;\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/59-0.png\" alt=\"\" \/><\/div>\n<p>\u5728\u5de6\u4e0b\u89d2\u7684\u83dc\u5355\u4e2d\u70b9\u51fb\u201c\u7fa4\u7ec4\u201d\uff0c\u7136\u540e\u518d\u70b9\u51fb\u201c\u6dfb\u52a0\u7528\u6237\u5230\u7fa4\u7ec4\u201d\u6309\u94ae\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/61-0.png\" alt=\"\" \/><\/div>\n<p>\u5728\u201c\u6dfb\u52a0\u7528\u6237\u5230\u7ec4\u201d\u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9\u201ck8s_administrators\u201d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/63-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u5728\u753b\u9762\u7684\u5de6\u4e0b\u89d2\u83dc\u5355\u4e2d\uff0c\u70b9\u51fb\u201cAPI Keys\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201cAdd Public Key\u201d\u6309\u94ae\u3002<\/p>\n<p>\u5728\u201c\u6dfb\u52a0\u516c\u94a5\u201d\u5bf9\u8bdd\u6846\u4e2d\uff0c\u5c06\u6b65\u9aa41-1\u4e2d\u521b\u5efa\u7684\u516c\u94a5\u5b57\u7b26\u4e32~\/.oci\/oci_api_key_public.pem\u7c98\u8d34\u5230\u201cPUBLIC KEY\u201d\u6587\u672c\u6846\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; cat ~\/.oci\/oci_api_key_public.pem     \uff08&lt;-- \u3053\u306e\u7d50\u679c\u8868\u793a\u3055\u308c\u308b\u6587\u5b57\u5217\u3092\u30b3\u30d4\u30fc\uff0f\u30da\u30fc\u30b9\u30c8\uff09\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/68-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u8bf7\u6700\u540e\u70b9\u51fb\u201c\u6dfb\u52a0\u201d\u6309\u94ae\u3002<\/p>\n<p>\u4ee5\u4e0a\u5b8c\u6210\u4e86\u521b\u5efaCompartement\u7ba1\u7406\u5458\u7528\u6237\u7684\u4efb\u52a1\u3002<\/p>\n<h2>\u6536\u96c6Kubernetes\u5b89\u88c5\u7a0b\u5e8f\u6240\u9700\u7684\u5404\u79cd\u503c<\/h2>\n<p>\u4e3a\u4e86\u8ba9Kubernetes\u5b89\u88c5\u7a0b\u5e8f\u80fd\u591f\u8bbf\u95ee\u8be5Compartment\uff0c\u9700\u8981\u4ee5\u4e0b\u6570\u503c\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">API\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u306eFingerprint<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">OCI\u306e\u30c6\u30ca\u30f3\u30c8\u306eOCID<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Compartment\u306e\u7ba1\u7406\u8005\u306eOCID<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Compartment\u306eOCID<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e\u30ea\u30fc\u30b8\u30e7\u30f3<\/ul>\n<p>OCID\u662fOCI\u4e2d\u5404\u79cd\u8d44\u6e90\u7684\u6807\u8bc6\u7b26\u3002\u6211\u4eec\u5c06\u4eceOCI\u670d\u52a1\u63a7\u5236\u53f0\u4e2d\u6536\u96c6\u8fd9\u4e9b\u503c\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5728\u521b\u5efa\u7528\u6237\u540e\u7684\u754c\u9762\u4e2d\uff0c\u83b7\u53d6\u6dfb\u52a0\u7684API\u8bbf\u95ee\u5bc6\u94a5\u7684\u6307\u7eb9\u548c\u79df\u6237\u7684OCID\u3002<br \/>\n\u524d\u8005\u5728\u540d\u4e3a&#8221;API Keys&#8221;\u7684\u6807\u9898\u5217\u8868\u4e2d\uff0c\u79df\u6237\u7684OCID\u5728\u754c\u9762\u7684\u9875\u811a\u4e2d\u663e\u793a\uff0c\u56e0\u6b64\u5c06\u8fd9\u4e9b\u503c\u590d\u5236\/\u7c98\u8d34\u5230\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u5907\u7528\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/76-0.png\" alt=\"\" \/><\/div>\n<p>\u5411\u4e0a\u6eda\u52a8\u5c4f\u5e55\uff0c\u53ef\u4ee5\u5728\u201c\u7528\u6237\u4fe1\u606f\u201d\u9009\u9879\u5361\u4e2d\u627e\u5230OCID\u4fe1\u606f\u3002<br \/>\n\u70b9\u51fb\u201c\u590d\u5236\u201d\u6309\u94ae\uff0c\u8be5\u7528\u6237\uff08\u533a\u5757\u7ba1\u7406\u5458\uff09\u7684OCID\u5c06\u88ab\u590d\u5236\u5230\u526a\u8d34\u677f\u4e0a\uff0c\u60a8\u53ef\u4ee5\u5c06\u5176\u7c98\u8d34\u5230\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u4fdd\u5b58\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/78-0.png\" alt=\"\" \/><\/div>\n<p>\u63a5\u4e0b\u6765\u662fCompartment\u7684OCID\u3002\u70b9\u51fb\u5c4f\u5e55\u5de6\u4e0a\u89d2\u7684\u9762\u5305\u5c51\u5bfc\u822a\u680f\u4e2d\u7684&#8221;\u8eab\u4efd&#8221;\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/80-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u5728\u753b\u9762\u5de6\u4fa7\u7684\u83dc\u5355\u4e2d\uff0c\u70b9\u51fb\u201c\u7ec4\u4ef6\u201d\uff0c\u5c06\u663e\u793a\u201c\u7ec4\u4ef6\u201d\u5217\u8868\u3002<br \/>\n\u5728\u5217\u8868\u4e2d\uff0c\u70b9\u51fb\u201ck8s\u201d\u7684\u201c\u590d\u5236\u201d\uff0c\u5c06\u628a\u6b64\u7ec4\u4ef6\u7684OCID\u590d\u5236\u5230\u526a\u8d34\u677f\uff0c\u7136\u540e\u53ef\u4ee5\u5c06\u5176\u7c98\u8d34\u5230\u6587\u672c\u7f16\u8f91\u5668\u7b49\u4f4d\u7f6e\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/82-0.png\" alt=\"\" \/><\/div>\n<p>\u6700\u540e\u662f\u6570\u636e\u4e2d\u5fc3\u533a\u57df\u3002\u60a8\u53ef\u4ee5\u5728\u670d\u52a1\u63a7\u5236\u53f0\u7684\u9875\u5934\u4e2d\u786e\u8ba4\u3002\u5728\u540e\u7eed\u6b65\u9aa4\u4e2d\u5c06\u5176\u8f93\u5165\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/84-0.png\" alt=\"undefined\" \/><\/div>\n<p>\u4ee5\u4e0a\u3067\u3001\u5de5\u4f5c\u5728OCI\u7684\u670d\u52a1\u63a7\u5236\u53f0\u4e2d\u5df2\u5b8c\u6210\u3002<\/p>\n<h1>2. \u5efa\u7acb Kubernetes \u96c6\u7fa4<\/h1>\n<p>\u4f7f\u7528OCI\u7684Terraform\u57fa\u4e8eKubernetes\u7684\u5b89\u88c5\u7a0b\u5e8f(Terraform Kubernetes Installer)\uff0c\u5728OCI\u4e0a\u6784\u5efaKubernetes\u96c6\u7fa4\u3002<\/p>\n<h2>2-1. \u5b89\u88c5Terraform Kubernetes Installer<\/h2>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5c06\u8bbe\u7f6e\u4e00\u4e2a\u53ef\u4ee5\u4f7f\u7528Terraform Kubernetes Installer\u7684\u73af\u5883\u3002<\/p>\n<h3>\u5b89\u88c5Terraform<\/h3>\n<p>\u5b89\u88c5Terraform\u3002\u6839\u636e\u4f7f\u7528\u7684\u8ba1\u7b97\u673a\u5e73\u53f0\u4e0b\u8f7d\u5b98\u65b9\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230PATH\u5373\u53ef\u3002\u8981\u786e\u8ba4\u4e0b\u8f7d\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684URL\uff0c\u8bf7\u53c2\u8003\u5b98\u65b9\u4e0b\u8f7d\u9875\u9762\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u5728Ubuntu 16.04\u4e0a\u5b89\u88c5\u7684\u793a\u4f8b\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; wget https:\/\/releases.hashicorp.com\/terraform\/0.11.3\/terraform_0.11.3_linux_amd64.zip\r\n&gt; unzip terraform_0.11.3_linux_amd64.zip\r\n&gt; sudo mv terraform \/usr\/local\/bin\/\r\n<\/code><\/pre>\n<p>\u6211\u5c06\u786e\u8ba4\u662f\u5426\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; terraform --version\r\nTerraform v0.11.3\r\n<\/code><\/pre>\n<h3>2-1-2. \u5b89\u88c5 terraform-provider-oci.<\/h3>\n<p>\u4e3a\u4e86\u64cd\u4f5cOCI\uff0c\u5b89\u88c5\u4e00\u4e2a\u7528\u4e8eTerraform\u7684\u63d2\u4ef6\u3002\u6839\u636e\u4f7f\u7528\u7684\u4e2a\u4eba\u7535\u8111\u5e73\u53f0\uff0c\u4e0b\u8f7d\u9002\u5f53\u7684\u63d2\u4ef6\u3002\u4eceGithub\u7684Releases\u9875\u9762\u786e\u8ba4\u4e0b\u8f7d\u7684URL\u3002<\/p>\n<p>\u8fd9\u662f\u5728Ubuntu 16.04\u4e0a\u5b89\u88c5\u7684\u4e00\u4e2a\u793a\u4f8b\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; wget https:\/\/github.com\/oracle\/terraform-provider-oci\/releases\/download\/2.0.7\/linux.tar.gz\r\n&gt; tar xvf linux.tar.gz\r\n<\/code><\/pre>\n<p>\u5c06Terraform\u63d2\u4ef6\u653e\u7f6e\u5728~\/.terraform.d\/plugins\u76ee\u5f55\u4e2d\u3002\u5982\u679c\u8be5\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u5219\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; mkdir -p ~\/.terraform.d\/plugins\r\n<\/code><\/pre>\n<p>\u6700\u540e\uff0c\u5c06\u63d2\u4ef6\u7684\u4e3b\u4f53\u590d\u5236\u5230\u4e0a\u9762\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; mv linux_amd64\/terraform-provider-oci_v2.0.7 ~\/.terraform.d\/plugins\/\r\n<\/code><\/pre>\n<h3>\u51c6\u5907 Terraform Kubernetes \u5b89\u88c5\u7a0b\u5e8f 2-1-3 \u3002<\/h3>\n<p>\u514b\u9686 Terraform Kubernetes Installer\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; git clone -b v1.3.0 https:\/\/github.com\/oracle\/terraform-kubernetes-installer.git\r\n&gt; cd terraform-kubernetes-installer\/\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u5df2\u7ecf\u521b\u5efa\u4e86\u4e00\u4e2a\u8fd0\u884cTerraform Kubernetes Installer\u7684\u73af\u5883\u3002<\/p>\n<h2>\u4e3aTerraform Kubernetes Installer\u8bbe\u7f6e\u53c2\u6570\u7684\u914d\u7f6e\u3002<\/h2>\n<p>\u4f7f\u7528Terraform\u7684\u53c2\u6570\u6587\u4ef6terraform.tfvars\u6765\u4fee\u6539\u57fa\u4e8eOCI\u6784\u5efa\u7684Kubernetes\u914d\u7f6e\u7684\u8bbe\u7f6e\u3002<\/p>\n<p>\u590d\u5236\u57fa\u672c\u53c2\u6570\u6587\u4ef6\uff0c\u7136\u540e\u8fdb\u884c\u7f16\u8f91\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; cp terraform.example.tfvars terraform.tfvars\r\n&gt; vim terraform.tfvars\r\n<\/code><\/pre>\n<p>\u5728\u53c2\u6570\u6587\u4ef6\u7684\u5f00\u5934\uff0c\u6709\u4e00\u4e2a\u90e8\u5206\u8bb0\u5f55\u4e86OCI\u73af\u5883\u4fe1\u606f\u548cAPI\u8bbf\u95ee\u5bc6\u94a5\u7684\u8bbe\u7f6e\u4fe1\u606f\u3002\u6211\u4eec\u5c06\u4f1a\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u4ee5\u4e0e1-3\u4e2d\u6536\u96c6\u5230\u7684\u4fe1\u606f\u76f8\u5339\u914d\u3002<br \/>\n\u53e6\u5916\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u5728\u8fd9\u91cc\u6307\u5b9a1-1\u4e2d\u521b\u5efa\u7684API\u8bbf\u95ee\u5bc6\u94a5\uff08\u79c1\u94a5\u6587\u4ef6\uff09\u7684\u8def\u5f84\u548c\u8981\u4f7f\u7528\u7684OCI\u533a\u57df\u3002<\/p>\n<p>\u5bf9\u8c61\u7684\u53c2\u6570\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<div>\n<div class=\"post-table\">keyvaluetenancy_ocidOCI\u306e\u30c6\u30ca\u30f3\u30c8\u306eOCIDcompartment_ocidCompartment\u306eOCIDuser_ocidCompartment\u306e\u7ba1\u7406\u8005\u306eOCIDfingerprintAPI\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u306eFingerprintprivate_key_pathAPI\u30a2\u30af\u30bb\u30b9\u30ad\u30fcregion\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e\u30ea\u30fc\u30b8\u30e7\u30f3<\/div>\n<\/div>\n<p>\u53e6\u5916\uff0c\u6211\u4eec\u4f1a\u5bf9Kubernetes\u6bcf\u4e2a\u8282\u70b9\u7684\u5f62\u6001\u548c\u9632\u706b\u5899\u8bbe\u7f6e\u8fdb\u884c\u914d\u7f6e\u3002\u8bf7\u53c2\u8003Terraform Kubernetes Installer\u6587\u6863\u4e86\u89e3\u6bcf\u4e2a\u53c2\u6570\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u53c2\u6570\u6587\u4ef6\u7684\u63cf\u8ff0\u793a\u4f8b\u3002<br \/>\n\u8fd9\u4e2a\u8bbe\u7f6e\u5141\u8bb8\u5bf9\u8282\u70b9\u8fdb\u884cSSH\uff0c\u5e76\u4e14\u5141\u8bb8\u4ece\u4e92\u8054\u7f51\u8bbf\u95ee\u8282\u70b9\uff0c\u4ee5\u4fbf\u5728\u6784\u5efa\u540e\u7684\u73af\u5883\u4e2d\u66f4\u5bb9\u6613\u8fdb\u884c\u68c0\u67e5\u3002\u8bf7\u6ce8\u610f\uff0c\u8fd9\u53ea\u662f\u7528\u4e8e\u64cd\u4f5c\u9a8c\u8bc1\u7684\u8bbe\u7f6e\u3002<\/p>\n<p>2018\/06\/29\u7684\u88dc\u5145\uff1a\u5728OCI\u76ee\u524d\u4e26\u6c92\u6709\u63d0\u4f9b\u9810\u8a2d\u7684\u4f5c\u696d\u7cfb\u7d71\u6620\u50cf\uff0c\u56e0\u6b64\u9700\u8981\u4f7f\u7528xxx_ol_image_name\u53c3\u6578\u4f86\u6307\u5b9a\u4f5c\u696d\u7cfb\u7d71\u6620\u50cf\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\"># BMCS Service\r\n<\/span><span class=\"py\">tenancy_ocid<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"<\/span>\r\n<span class=\"py\">compartment_ocid<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"<\/span>\r\n<span class=\"py\">fingerprint<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff\"<\/span>\r\n<span class=\"py\">private_key_path<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"\/home\/hhiroshell\/.oci\/oci_api_key.pem\"<\/span>\r\n<span class=\"py\">user_ocid<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"ocid1.user.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"<\/span>\r\n<span class=\"py\">region<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"us-ashburn-1\"<\/span>\r\n\r\n<span class=\"c\"># CCM user\r\n#cloud_controller_user_ocid = \"ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\r\n#cloud_controller_user_fingerprint = \"00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff\"\r\n#cloud_controller_user_private_key_path = \"\/tmp\/bmcs_api_key.pem\"\r\n<\/span>\r\n<span class=\"py\">etcdShape<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"VM.Standard1.2\"<\/span>\r\n<span class=\"py\">k8sMasterShape<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"VM.Standard1.2\"<\/span>\r\n<span class=\"py\">k8sWorkerShape<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"VM.Standard1.2\"<\/span>\r\n\r\n<span class=\"c\"># OS image names for Master\/Workder\/etcd\/nat\r\n<\/span><span class=\"py\">master_ol_image_name<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"Oracle-Linux-7.5-2018.06.14-0\"<\/span>\r\n<span class=\"py\">worker_ol_image_name<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"Oracle-Linux-7.5-2018.06.14-0\"<\/span>\r\n<span class=\"py\">etcd_ol_image_name<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"Oracle-Linux-7.5-2018.06.14-0\"<\/span>\r\n<span class=\"py\">nat_ol_image_name<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"Oracle-Linux-7.4-2018.06.14-0\"<\/span>\r\n\r\n<span class=\"py\">etcdAd1Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n<span class=\"py\">etcdAd2Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n<span class=\"py\">etcdAd3Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n\r\n<span class=\"py\">k8sMasterAd1Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n<span class=\"py\">k8sMasterAd2Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n<span class=\"py\">k8sMasterAd3Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n\r\n<span class=\"py\">k8sWorkerAd1Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n<span class=\"py\">k8sWorkerAd2Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n<span class=\"py\">k8sWorkerAd3Count<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"1\"<\/span>\r\n\r\n<span class=\"c\">#etcdLBShape = \"100Mbps\"\r\n#k8sMasterLBShape = \"100Mbps\"\r\n<\/span>\r\n<span class=\"py\">etcd_ssh_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n<span class=\"py\">etcd_cluster_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n<span class=\"py\">master_ssh_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n<span class=\"py\">worker_ssh_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n<span class=\"py\">master_https_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n<span class=\"py\">worker_nodeport_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n\r\n<span class=\"py\">control_plane_subnet_access<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"public\"<\/span>\r\n<span class=\"py\">k8s_master_lb_access<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"public\"<\/span>\r\n<span class=\"py\">natInstanceShape<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"VM.Standard1.2\"<\/span>\r\n<span class=\"c\">#nat_instance_ad1_enabled = \"true\"\r\n#nat_instance_ad2_enabled = \"false\"\r\n#nat_instance_ad3_enabled = \"true\"\r\n<\/span><span class=\"py\">nat_ssh_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n<span class=\"py\">public_subnet_http_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n<span class=\"py\">public_subnet_https_ingress<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"0.0.0.0\/0\"<\/span>\r\n\r\n<span class=\"c\">#worker_iscsi_volume_create is a bool not a string\r\n#worker_iscsi_volume_create = true\r\n#worker_iscsi_volume_size = 100\r\n<\/span>\r\n<span class=\"c\">#etcd_iscsi_volume_create = true\r\n#etcd_iscsi_volume_size = 50\r\n<\/span><\/code><\/pre>\n<h2>\u6267\u884cTerraform Kubernetes Installer\u3002<\/h2>\n<p>\u7ec8\u4e8e\u5f00\u59cb\u6267\u884cTerraform Kubernetes Installer\u6765\u6784\u5efa\u96c6\u7fa4\u3002<\/p>\n<p>\u9996\u5148\u8fdb\u884cterraform init\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; terraform init\r\n\u2026\r\nTerraform has been successfully initialized!\r\n<\/code><\/pre>\n<p>\u8ba1\u5212\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; terraform plan\r\n...\r\nPlan: 46 to add, 0 to change, 0 to destroy.\r\n<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u9636\u6bb5\uff0c\u5b9e\u9645\u7684\u73af\u5883\u914d\u7f6e\u5c1a\u672a\u5b8c\u6210\u3002\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u4e14\u6ca1\u6709\u51fa\u73b0\u9519\u8bef\uff0c\u6700\u540e\u6267\u884cterraform apply\u6765\u5f00\u59cb\u6784\u5efa\u73af\u5883\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; terraform apply\r\n<\/code><\/pre>\n<p>\u69cb\u7bc9\u9700\u8981\u4e00\u4e9b\u65f6\u95f4\u3002\u5728\u6b64\u671f\u95f4\uff0c\u60a8\u53ef\u4ee5\u67e5\u770bOCI\u7684\u670d\u52a1\u63a7\u5236\u53f0\uff0c\u786e\u8ba4Kubernetes\u6240\u9700\u7684\u7f51\u7edc\u548c\u8282\u70b9\u7684\u521b\u5efa\u60c5\u51b5\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u663e\u793a\u7f51\u7edc\u8d44\u6e90\u7684\u793a\u4f8b\u3002\u5728\u5c4f\u5e55\u53f3\u4e0a\u65b9\u7684\u9009\u9879\u5361\u83dc\u5355\u4e2d\u70b9\u51fb&#8221;Network&#8221;\uff0c\u7136\u540e\u5728\u5c4f\u5e55\u5de6\u4fa7\u7684COMPARTMENT\u5217\u8868\u4e2d\u9009\u62e9&#8221;k8s&#8221;\u5373\u53ef\u663e\u793a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/129-0.png\" alt=\"\" \/><\/div>\n<p>\u4ee5\u4e0b\u662f\u663e\u793aCompute Instance\u8d44\u6e90\u7684\u793a\u4f8b\u3002\u5728\u5c4f\u5e55\u53f3\u4e0a\u65b9\u7684\u9009\u9879\u5361\u83dc\u5355\u4e2d\u70b9\u51fb&#8221;Compute&#8221;\uff0c\u7136\u540e\u5728\u5c4f\u5e55\u5de6\u4fa7\u7684COMPARTMENT\u5217\u8868\u4e2d\u9009\u62e9&#8221;k8s&#8221;\u5373\u53ef\u663e\u793a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/131-0.png\" alt=\"24.png\" \/><\/div>\n<h2>2-4. \u78ba\u8a8d\u9023\u63a5<\/h2>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u9644\u5e26\u7684\u8fde\u63a5\u68c0\u6d4b\u811a\u672c\u6765\u786e\u8ba4\u96c6\u7fa4\u662f\u5426\u6b63\u5e38\u6784\u5efa\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u811a\u672c\u5728\u96c6\u7fa4\u6784\u5efa\u5c1a\u672a\u5b8c\u6210\u7684\u60c5\u51b5\u4e0b\u7684\u6267\u884c\u7ed3\u679c\u793a\u4f8b\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; scripts\/cluster-check.sh\r\n[cluster-check.sh] Running some basic checks on Kubernetes cluster....\r\n[cluster-check.sh]   Checking SSH connectivity to each node (from this host)...\r\n[cluster-check.sh]   Checking whether instance bootstrap has completed on each node...\r\n[cluster-check.sh]   [FAILED] cloud-init has not finished running on master xxx.xxx.xxx.xxx\r\n[cluster-check.sh]   If this does not complete soon, log into the BMC instance and examine the \/var\/log\/cloud-init-output.log file.\r\n<\/code><\/pre>\n<p>\u5f53\u96c6\u7fa4\u6784\u5efa\u5b8c\u6210\u540e\uff0c\u5c06\u663e\u793a\u4ee5\u4e0b\u7ed3\u679c\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; scripts\/cluster-check.sh\r\n[cluster-check.sh] Running some basic checks on Kubernetes cluster....\r\n[cluster-check.sh]   Checking SSH connectivity to each node (from this host)...\r\n[cluster-check.sh]   Checking whether instance bootstrap has completed on each node...\r\n[cluster-check.sh]   Checking Flannel's etcd key from each node...\r\n[cluster-check.sh]   Checking whether expected system services are running on each node...\r\n[cluster-check.sh]   Checking status of \/healthz endpoint at the LB...\r\n[cluster-check.sh]   Running 'kubectl get nodes' a number of times through the master LB...\r\n[cluster-check.sh]   Checking status of kube-dns pod...\r\n[cluster-check.sh]   Checking an app deployment of nginx exposed as a service...\r\n\r\nThe Kubernetes cluster is up and appears to be healthy.\r\nKubernetes master is running at https:\/\/xxx.xxx.xxx.xxx:443\r\nKubeDNS is running at https:\/\/xxx.xxx.xxx.xxx:443\/api\/v1\/namespaces\/kube-system\/services\/kube-dns:dns\/proxy\r\n<\/code><\/pre>\n<h2>2-7. \u6e05\u7406\u5de5\u4f5c<\/h2>\n<p>\u8981\u5220\u9664\u96c6\u7fa4\uff0c\u8bf7\u8fd0\u884cterraform destroy\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; terraform destroy\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u6210\u529f\u5728OCI\u4e0a\u642d\u5efa\u4e86Kubernetes\u96c6\u7fa4\u3002<\/p>\n<h1>3. \u5982\u4f55\u8bbf\u95ee\u73af\u5883<\/h1>\n<p>\u6211\u4eec\u5c06\u901a\u8fc7kubectl\u548cSSH\u8bbf\u95ee\u6211\u4eec\u5728\u4e0a\u9762\u6b65\u9aa4\u4e2d\u6784\u5efa\u7684Kubernetes\u96c6\u7fa4\u3002<\/p>\n<h2>3-1. \u4f7f\u7528 kubectl<\/h2>\n<p>kubectl\u7684\u914d\u7f6e\u6587\u4ef6\u4f1a\u81ea\u52a8\u5728Terraform Kubernetes Installer\u7684\u751f\u6210\u76ee\u5f55\u4e2d\u751f\u6210\u3002\u5728\u6267\u884ckubectl\u65f6\uff0c\u53ea\u9700\u4f7f\u7528\u8be5\u914d\u7f6e\u6587\u4ef6\u5373\u53ef\u3002<\/p>\n<p>\u8fd9\u4e2a\u4f8b\u5b50\u662f\u6307\u5b9a\u73af\u5883\u53d8\u91cfKUBECONFIG\u6765\u8bbe\u7f6e\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u7684\u65b9\u6cd5\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; export KUBECONFIG=~\/terraform-kubernetes-installer\/generated\/kubeconfig\r\n<\/code><\/pre>\n<p>\u6211\u5011\u5c07\u4f7f\u7528\u4e00\u500b\u547d\u4ee4\u4f86\u7372\u53d6\u96c6\u7fa4\u7684\u4e00\u822c\u4fe1\u606f\uff0c\u4ee5\u78ba\u8a8d\u5176\u904b\u4f5c\u60c5\u6cc1\u3002\u5982\u679c\u8fd4\u56de\u4ee5\u4e0b\u985e\u4f3c\u7684\u56de\u61c9\uff0c\u5247\u8868\u793a\u6211\u5011\u5df2\u6210\u529f\u8a2a\u554f\u96c6\u7fa4\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; kubectl cluster-info\r\nKubernetes master is running at https:\/\/xxx.xxx.xxx.xxx:443\r\nKubeDNS is running at https:\/\/xxx.xxx.xxx.xxx:443\/api\/v1\/namespaces\/kube-system\/services\/kube-dns:dns\/proxy\r\n\r\nTo further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.\r\n<\/code><\/pre>\n<h2>3-2. SSH<\/h2>\n<p>Secure Shell (SSH)<\/p>\n<p>\u8981\u8bbf\u95ee\u914d\u7f6eKubernetes\u8282\u70b9\u7684SSH\uff0c\u9996\u5148\u9700\u8981\u4eceTerraform\u7684\u72b6\u6001\u4fe1\u606f\u4e2d\u63d0\u53d6SSH\u7684\u5bc6\u94a5\uff0c\u5e76\u521b\u5efa\u5bc6\u94a5\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; mkdir ssh\r\n&gt; terraform output ssh_private_key &gt;ssh\/private_key\r\n&gt; chmod 600 ssh\/private_key\r\n<\/code><\/pre>\n<p>\u60a8\u8fd8\u53ef\u4ee5\u4eceTerraform\u7684\u72b6\u6001\u4fe1\u606f\u4e2d\u83b7\u53d6Node\u7684IP\u5730\u5740\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; terraform output worker_public_ips\r\n&gt; terraform output master_public_ips\r\n&gt; terraform output etcd_public_ips\r\n<\/code><\/pre>\n<p>\u53ea\u9700\u4f7f\u7528\u6b64\u79c1\u94a5\u5c06\u5176\u8fde\u63a5\u5230\u8282\u70b9\u7684SSH\uff0c\u4f46\u5728\u8bbf\u95ee\u8282\u70b9\u65f6\uff0c\u5e10\u6237\u540d\u5fc5\u987b\u4e3a&#8221;opc&#8221;\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; ssh -i ssh\/private_key opc@xxx.xxx.xxx.xxx\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u4f7f\u7528Terraform\uff0c\u5728Oracle\u7684IaaS\u4e0a\u6210\u529f\u521b\u5efa\u4e86Kubernetes\u96c6\u7fa4\u3002\u8f9b\u82e6\u4e86\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u4ec0\u4e48\uff1f \u4ee5\u4e0b\u662f\u5728Oracle Cloud Infrastructure\uff08\u7b80\u79f0OCI\uff0cOracle\u7684IaaS [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-49239","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528terraform\u5728oracle\u7684iaas\u4e0a\u521b\u5efakubernetes\u96c6\u7fa4\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u662f\u4ec0\u4e48\uff1f \u4ee5\u4e0b\u662f\u5728Oracle Cloud Infrastructure\uff08\u7b80\u79f0OCI\uff0cOracle\u7684IaaS [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528terraform\u5728oracle\u7684iaas\u4e0a\u521b\u5efakubernetes\u96c6\u7fa4\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-10T02:21:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T07:33:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/21-0.png\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/\",\"name\":\"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-11-10T02:21:31+00:00\",\"dateModified\":\"2024-05-04T07:33:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528terraform\u5728oracle\u7684iaas\u4e0a\u521b\u5efakubernetes\u96c6\u7fa4\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4","og_description":"\u8fd9\u662f\u4ec0\u4e48\uff1f \u4ee5\u4e0b\u662f\u5728Oracle Cloud Infrastructure\uff08\u7b80\u79f0OCI\uff0cOracle\u7684IaaS [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528terraform\u5728oracle\u7684iaas\u4e0a\u521b\u5efakubernetes\u96c6\u7fa4\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-11-10T02:21:31+00:00","article_modified_time":"2024-05-04T07:33:12+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d89c4913a08637a6c7a8d\/21-0.png"}],"author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/","name":"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-11-10T02:21:31+00:00","dateModified":"2024-05-04T07:33:12+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Terraform\u5728Oracle\u7684IaaS\u4e0a\u521b\u5efaKubernetes\u96c6\u7fa4"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8terraform%e5%9c%a8oracle%e7%9a%84iaas%e4%b8%8a%e5%88%9b%e5%bb%bakubernetes%e9%9b%86%e7%be%a4%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/49239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=49239"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/49239\/revisions"}],"predecessor-version":[{"id":99165,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/49239\/revisions\/99165"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=49239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=49239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=49239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}