{"id":33078,"date":"2022-12-01T07:23:17","date_gmt":"2023-07-08T22:51:49","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/"},"modified":"2024-04-29T03:15:30","modified_gmt":"2024-04-28T19:15:30","slug":"%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/","title":{"rendered":"\u4f7f\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World"},"content":{"rendered":"<h1>\u603b\u7ed3<\/h1>\n<p>\u672c\u4e66\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728Ubuntu\u4e0a\u4f7f\u7528minikube\u90e8\u7f72Nginx\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u914d\u7f6eConfigMap\uff0c\u4ee5\u4fbf\u5728\u90e8\u7f72\u4e86&#8221;Hello World&#8221; HTML\u6587\u4ef6\u7684Nginx\u4e0a\u8fdb\u884c\u663e\u793a\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6 t\u00ed<\/h2>\n<p>\u8bf7\u5728Ubuntu\u4e0a\u5b89\u88c5minikube\u3002\u6709\u5173minikube\u7684\u5b89\u88c5\u65b9\u6cd5\uff0c\u8bf7\u53c2\u8003\u4f5c\u8005\u64b0\u5199\u7684\u4e0b\u9762\u6587\u7ae0\uff1a\u300a\u5728Ubuntu 20.04.1 LTS\u4e0a\u5b89\u88c5minikube\u300b\u3002<\/p>\n<h3>\u521b\u5efaNginx\u7684YAML\u6587\u4ef6<\/h3>\n<p>\u4f7f\u7528vi nginx.yaml\u547d\u4ee4\u6253\u5f00Vi\u7f16\u8f91\u5668\uff0c\u521b\u5efa\u4ee5\u4e0bYAML\u6587\u4ef6\u6765\u751f\u6210Nginx\u7684YAML\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>apiVersion: v1 # \u4f7f\u7528\u3059\u308bKubernetes API\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5b9a\u7fa9\r\nkind: Service # Pod\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u3042\u308bService\u30ea\u30bd\u30fc\u30b9\u3092\u5b9a\u7fa9\r\nmetadata: # \u540d\u524d\u3084\u30e9\u30d9\u30eb\u3092\u6307\u5b9a\r\n  labels:\r\n    app: nginx-app\r\n    name: nginx\r\n  name: nginx-service\r\nspec: # spec\u5185\u306b\u30ea\u30bd\u30fc\u30b9\u306e\u4ed5\u69d8\u3092\u8a18\u8ff0\u3059\u308b\r\n  selector: # \u540c\u4e00\u306e\u30e9\u30d9\u30eb\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u30ea\u30bd\u30fc\u30b9\u3092\u53c2\u7167\r\n    app: nginx-app\r\n    name: nginx\r\n  type: NodePort # Kubenetes\u5916\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306bNodePort\u3092\u6307\u5b9a(\u30db\u30b9\u30c8OS\u304b\u3089Nginx\u306e\u753b\u9762\u304c\u78ba\u8a8d\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b)\r\n  ports:\r\n  - name: nginx-port #\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u6307\u5b9a\r\n    port: 80\r\n    protocol: TCP\r\n    targetPort: nginx-port\r\n---\r\napiVersion: apps\/v1\r\nkind: Deployment # Pod\u306e\u81ea\u5df1\u4fee\u5fa9\u6a5f\u80fd\u3092\u6301\u3064Deployment\u30ea\u30bd\u30fc\u30b9\u3092\u5b9a\u7fa9\r\nmetadata:\r\n  labels:\r\n    app: nginx-app\r\n    name: nginx\r\n  name: nginx\r\nspec:\r\n  replicas: 1 # \u4f5c\u6210\u3059\u308bPod\u6570\u3092\u5b9a\u7fa9\r\n  selector:\r\n    matchLabels:\r\n      app: nginx-app\r\n      name: nginx\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: nginx-app\r\n        name: nginx\r\n    spec:\r\n      containers:\r\n      - name: nginx\r\n        image: nginx:latest # Nginx\u306eDockerHub\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308bDockerImage\u306e\u540d\u79f0\u3068\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\r\n        ports:\r\n        - containerPort: 80 # Pod\u304b\u3089\u89e3\u653e\u3059\u308b\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u5b9a\u7fa9\r\n          name: nginx-port\r\n          protocol: TCP\r\n<\/code><\/pre>\n<h3>\uff12\uff0e\u90e8\u7f72 Nginx<\/h3>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u90e8\u7f72\u521b\u5efa\u7684YAML\u6587\u4ef6\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>$ kubectl apply -f nginx.yaml<\/p>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u786e\u8ba4\u5df2\u521b\u5efaNginx\u7684Pod\u548cService\u3002<\/p>\n<p>$ kubectl get pod | grep nginx<br \/>\nnginx-669bffdf57-hnmph 1\/1 Running 1 25m<br \/>\n$ kubectl get service | grep nginx<br \/>\nnginx-service NodePort 10.108.1.208 80:30348\/TCP 25m<\/p>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u83b7\u53d6\u80fd\u591f\u5728\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\uff08Ubuntu\uff09\u4e0a\u663e\u793aNginx\u9875\u9762\u7684IP\u5730\u5740\u3002<\/p>\n<p>$ minikube service nginx-service<br \/>\n|&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|<br \/>\n| NAMESPACE | NAME | TARGET PORT | URL |<br \/>\n|&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|<br \/>\n| default | nginx-service | nginx-port\/80 | http:\/\/192.168.49.2:30348 |<br \/>\n|&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|<br \/>\n* \u5728\u9ed8\u8ba4\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u670d\u52a1 default\/nginx-service&#8230;<\/p>\n<p>\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u4e0a\u8ff0\u5206\u914d\u7684IP\u5730\u5740\uff0c\u786e\u8ba4Nginx\u9ed8\u8ba4\u9875\u9762\u80fd\u591f\u663e\u793a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d157637434c4406bfe80e\/9-0.png\" alt=\"image.png\" \/><\/div>\n<h3>\u5c06index.html\u4fdd\u5b58\u5230Configmap\u8d44\u6e90\u4e2d\u3002<\/h3>\n<p>ConfigMap\u662f\u5c06\u914d\u7f6e\u6587\u4ef6\u5b58\u50a8\u5728\u8d44\u6e90\u5185\u5e76\u5728\u5c06\u5b58\u50a8\u7684\u914d\u7f6e\u6587\u4ef6\u6302\u8f7d\u5230Pod\u4e0a\u65f6\u4f7f\u7528\u7684\u5de5\u5177\u3002<br \/>\n\u8fd9\u662fKubernetes\u5b98\u65b9ConfigMap\u7684\u6982\u8ff0\u3002<\/p>\n<p>\u5728nginx-configmap.yaml\u4e2d\u6253\u5f00Vi\u7f16\u8f91\u5668\uff0c\u521b\u5efaConfigMap\u7684YAML\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>apiVersion: v1\r\nkind: ConfigMap # Pod\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u6e21\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u30ea\u30bd\u30fc\u30b9\r\nmetadata:\r\n  labels:\r\n    app: nginx-app\r\n    name: nginx\r\n  name: nginx-html\r\ndata: # \u4e0b\u8a18\u306bPod\u306b\u6e21\u3057\u305f\u3044\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u5b9a\u7fa9\r\n  index.html: | # \u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5b9a\u7fa9\r\n    &lt;html&gt; # \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u8a18\u8f09\r\n      &lt;head&gt;\r\n        &lt;title&gt;\r\n        Kubernetes Hello World\r\n        &lt;\/title&gt;\r\n      &lt;body&gt;\r\n        &lt;h1&gt;\r\n        Kubernetes Hello World\r\n        &lt;\/h1&gt;\r\n        &lt;h2&gt;\r\n        Kubernetes Nignx ConfigMap\r\n        &lt;\/h2&gt;\r\n      &lt;\/body&gt;\r\n    &lt;\/html&gt;\r\n<\/code><\/pre>\n<p>\u5728\u521b\u5efaYAML\u6587\u4ef6\u540e\uff0c\u6267\u884c &#8220;kubectl apply -f nginx-configmap.yaml&#8221; \u547d\u4ee4\u6765\u521b\u5efa ConfigMap \u8d44\u6e90\u3002\u8981\u786e\u8ba4 ConfigMap \u8d44\u6e90\u662f\u5426\u5df2\u521b\u5efa\uff0c\u8bf7\u6267\u884c &#8220;kubectl get configmap&#8221; \u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code>$ kubectl get configmap | grep nginx\r\nnginx-html         1      9m26s\r\n<\/code><\/pre>\n<h3>\u4f7f\u5f97\u5728Nginx\u7684Pod\u4e0a\u53ef\u89c1index.html\u6587\u4ef6\u3002<\/h3>\n<p>\u4e3a\u4e86\u5c06\u5148\u524d\u521b\u5efa\u7684ConfigMap\u8d44\u6e90\u6302\u8f7d\u5230Pod\u4e0a\uff0c\u9700\u8981\u4fee\u6539\u7b2c\u4e00\u7ae0\u4e2d\u521b\u5efa\u7684nginx.yaml\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>apiVersion: v1\r\nkind: Service\r\nmetadata:\r\n  labels:\r\n    app: nginx-app\r\n    name: nginx\r\n  name: nginx-service\r\nspec:\r\n  selector:\r\n    app: nginx-app\r\n    name: nginx\r\n  type: NodePort\r\n  ports:\r\n  - name: nginx-port\r\n    port: 80\r\n    protocol: TCP\r\n    targetPort: nginx-port\r\n---\r\napiVersion: apps\/v1\r\nkind: Deployment\r\nmetadata:\r\n  labels:\r\n    app: nginx-app\r\n    name: nginx\r\n  name: nginx\r\nspec:\r\n  replicas: 1\r\n  selector:\r\n    matchLabels:\r\n      app: nginx-app\r\n      name: nginx\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: nginx-app\r\n        name: nginx\r\n    spec:\r\n      containers:\r\n      - name: nginx\r\n        image: nginx:latest\r\n        ports:\r\n        - containerPort: 80\r\n          name: nginx-port\r\n          protocol: TCP\r\n        volumeMounts: # Pod\u4e0a\u306b\u30de\u30a6\u30f3\u30c8\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u5b9a\u7fa9\r\n        - name: nginx-html-file # \u30de\u30a6\u30f3\u30c8\u3057\u305f\u3044volume\u3092\u6307\u5b9a\r\n          mountPath: \/usr\/share\/nginx\/html\/index.html # \u914d\u7f6e\u3059\u308b\u30d1\u30b9\u3092\u6307\u5b9a(Nginx\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\/usr\/share\/nginx\/html)\r\n          subPath: index.html # \u30de\u30a6\u30f3\u30c8\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\r\n          readOnly: true\r\n      volumes: # \u30de\u30a6\u30f3\u30c8\u3057\u305f\u3044\u30ea\u30bd\u30fc\u30b9\u3092\u5b9a\u7fa9\r\n        - name: nginx-html-file # Pod\u306b\u30de\u30a6\u30f3\u30c8\u3059\u308bvolume\u3092\u5b9a\u7fa9\r\n          configMap:\r\n            name: nginx-html # \u4f7f\u7528\u3059\u308bConfigMap\u30ea\u30bd\u30fc\u30b9\u3092\u6307\u5b9a\r\n            items: # ConfigMap\u30ea\u30bd\u30fc\u30b9\u3067\u5b9a\u7fa9\u3057\u305f\u3001\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3059\u308b\u304b\u6307\u5b9a\u3059\u308b\r\n            - key: \"index.html\"\r\n              path: \"index.html\"\r\n<\/code><\/pre>\n<p>\u5728\u4fee\u6539 YAML \u6587\u4ef6\u540e\uff0c\u6267\u884c kubectl apply -f nginx.yaml \u547d\u4ee4\u6765\u5e94\u7528\u4fee\u6539\u5185\u5bb9\u3002\u7136\u540e\uff0c\u901a\u8fc7\u6d4f\u89c8\u5668\u786e\u8ba4 index.html \u7684\u5185\u5bb9\u662f\u5426\u88ab\u6b63\u786e\u663e\u793a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d157637434c4406bfe80e\/20-0.png\" alt=\"image.png\" \/><\/div>\n<h2>\u6700\u540e<\/h2>\n<p>\u901a\u8fc7\u4f7f\u7528ConfigMap\uff0c\u6211\u4eec\u80fd\u591f\u5728Nginx\u4e2d\u663e\u793aindex.html\u3002\u6211\u4eec\u53ef\u4ee5\u5c06Kubernetes(minikube)\u4e2d\u7684ConfigMap\u4e0eNginx\u7ec4\u5408\u4f7f\u7528\uff0c\u4ee5\u4fbf\u5728\u5b66\u4e60HTML\u6216\u8fdb\u884c\u64cd\u4f5c\u786e\u8ba4\u7b49\u65b9\u9762\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u603b\u7ed3 \u672c\u4e66\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728Ubuntu\u4e0a\u4f7f\u7528minikube\u90e8\u7f72Nginx\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u914d\u7f6eConfigMap\uff0c\u4ee5 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33078","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\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World - 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\u7528kubernetes\uff08minikube\uff09\u90e8\u7f72nginx\uff0c\u5e76\u5c55\u793ahello-world\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World\" \/>\n<meta property=\"og:description\" content=\"\u603b\u7ed3 \u672c\u4e66\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728Ubuntu\u4e0a\u4f7f\u7528minikube\u90e8\u7f72Nginx\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u914d\u7f6eConfigMap\uff0c\u4ee5 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528kubernetes\uff08minikube\uff09\u90e8\u7f72nginx\uff0c\u5e76\u5c55\u793ahello-world\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-08T22:51:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-28T19:15:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d157637434c4406bfe80e\/9-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \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%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/\",\"name\":\"\u4f7f\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-08T22:51:49+00:00\",\"dateModified\":\"2024-04-28T19:15:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%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\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World\"}]},{\"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World - 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\u7528kubernetes\uff08minikube\uff09\u90e8\u7f72nginx\uff0c\u5e76\u5c55\u793ahello-world\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World","og_description":"\u603b\u7ed3 \u672c\u4e66\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728Ubuntu\u4e0a\u4f7f\u7528minikube\u90e8\u7f72Nginx\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u914d\u7f6eConfigMap\uff0c\u4ee5 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528kubernetes\uff08minikube\uff09\u90e8\u7f72nginx\uff0c\u5e76\u5c55\u793ahello-world\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-08T22:51:49+00:00","article_modified_time":"2024-04-28T19:15:30+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d157637434c4406bfe80e\/9-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/","name":"\u4f7f\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-08T22:51:49+00:00","dateModified":"2024-04-28T19:15:30+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%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\u7528Kubernetes\uff08minikube\uff09\u90e8\u7f72Nginx\uff0c\u5e76\u5c55\u793aHello World"}]},{"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kubernetes%ef%bc%88minikube%ef%bc%89%e9%83%a8%e7%bd%b2nginx%ef%bc%8c%e5%b9%b6%e5%b1%95%e7%a4%bahello-world%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\/33078","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=33078"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33078\/revisions"}],"predecessor-version":[{"id":77683,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33078\/revisions\/77683"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=33078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=33078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=33078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}