{"query_id": "q-en-website-00aa66da7bd6e747d4783005f15f5f1a75641b841a0fa7651cd77fc665499846", "query": "It's possible to configure `kubeadm join` with a configuration file instead of command line flags, and some more advanced features may only be available as configuration file options. This file is passed using the `--config` flag and it must contain a `JoinConfiguration` structure. contain a `JoinConfiguration` structure. Mixing `--config` with others flags may not be allowed in some cases. To print the default values of `JoinConfiguration` run the following command: The default configuration can be printed out using the [kubeadm config print](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command. ```shell kubeadm config print join-defaults ``` If your configuration is not using the latest version it is **recommended** that you migrate using the [kubeadm config migrate](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command. For details on individual fields in `JoinConfiguration` see [the godoc](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#JoinConfiguration). For more information on the fields and usage of the configuration you can navigate to our API reference page and pick a version from [the list](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#pkg-subdirectories). ## {{% heading \"whatsnext\" %}}", "positive_passages": [{"docid": "doc-en-website-f435a53ad40dbd03e80b0aa9c7bf4f13ebb408c300243b552d0130741c5550bb", "text": "It is very difficult to find any links to the . This is a huge roadblock to new users trying to do anything custom with kubeadm. As a new user, I don't expect to have to read about to find information about configuring the tool. To someone who is unfamiliar with the project, that seems like more advanced documentation than I should need, and therefore not somewhere I would expect to find basic config file documentation. I also was able to find the long before I found the more user-friendly documentation, which made it seem like that was the only documentation that exists. I would expect a link to those docs to be available on the kubeadm-config page, as well as where config files are mentioned in the kubeadm-init and kubeadm-join pages.\n/language en\nit seems you have missed these two sections: and for these commands the kubeadm API is actually the most important for. linking the command line reference page to the API makes sense. but instead of linking to a particular version of the API we should link to: and let users navigate to a particular API version. this is done with the idea that can also migrate v1beta1 -v1beta2. PRs welcome. thanks /sig cluster-lifecycle /priority backlog /help wanted\n. I will keep most of the discussion over there for now.\n/remove-help /assign /lifecycle-active sending a PR with:", "commid": "website_issue_22885", "tokennum": 312}], "negative_passages": []} {"query_id": "q-en-website-0172be1c623b76bf04c131f1e366428d29a621b0db743fd3161c8939c6a177f6", "query": " --- layout: blog title: '\u5728 Ingress-NGINX v1.2.0 \u4e2d\u63d0\u9ad8\u5b89\u5168\u6807\u51c6' date: 2022-04-28 slug: ingress-nginx-1-2-0 --- **\u4f5c\u8005\uff1a** Ricardo Katz (VMware), James Strong (Chainguard) [Ingress](/zh-cn/docs/concepts/services-networking/ingress/) \u53ef\u80fd\u662f Kubernetes \u6700\u5bb9\u6613\u53d7\u653b\u51fb\u7684\u7ec4\u4ef6\u4e4b\u4e00\u3002 Ingress \u901a\u5e38\u5b9a\u4e49\u4e00\u4e2a HTTP \u53cd\u5411\u4ee3\u7406\uff0c\u66b4\u9732\u5728\u4e92\u8054\u7f51\u4e0a\uff0c\u5305\u542b\u591a\u4e2a\u7f51\u7ad9\uff0c\u5e76\u5177\u6709\u5bf9 Kubernetes API \u7684\u4e00\u4e9b\u7279\u6743\u8bbf\u95ee\uff08\u4f8b\u5982\u8bfb\u53d6\u4e0e TLS \u8bc1\u4e66\u53ca\u5176\u79c1\u94a5\u76f8\u5173\u7684 Secret\uff09\u3002 \u867d\u7136\u5b83\u662f\u67b6\u6784\u4e2d\u7684\u4e00\u4e2a\u98ce\u9669\u7ec4\u4ef6\uff0c\u4f46\u5b83\u4ecd\u7136\u662f\u6b63\u5e38\u516c\u5f00\u670d\u52a1\u7684\u6700\u6d41\u884c\u65b9\u5f0f\u3002 Ingress-NGINX \u4e00\u76f4\u662f\u5b89\u5168\u8bc4\u4f30\u7684\u91cd\u5934\u620f\uff0c\u8fd9\u7c7b\u8bc4\u4f30\u4f1a\u53d1\u73b0\u6211\u4eec\u6709\u7740\u5f88\u5927\u7684\u95ee\u9898\uff1a \u5728\u5c06\u914d\u7f6e\u8f6c\u6362\u4e3a `nginx.conf` \u6587\u4ef6\u4e4b\u524d\uff0c\u6211\u4eec\u6ca1\u6709\u8fdb\u884c\u6240\u6709\u9002\u5f53\u7684\u6e05\u7406\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4fe1\u606f\u6cc4\u9732\u98ce\u9669\u3002 \u867d\u7136\u6211\u4eec\u4e86\u89e3\u6b64\u98ce\u9669\u4ee5\u53ca\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u771f\u6b63\u9700\u6c42\uff0c\u4f46\u8fd9\u5e76\u4e0d\u662f\u4e00\u4e2a\u5bb9\u6613\u7684\u8fc7\u7a0b\uff0c \u56e0\u6b64\u6211\u4eec\u5728\u5f53\u524d(v1.2.0)\u7248\u672c\u4e2d\u91c7\u53d6\u4e86\u53e6\u4e00\u79cd\u65b9\u6cd5\u6765\u51cf\u5c11\uff08\u4f46\u4e0d\u662f\u6d88\u9664\uff01\uff09\u8fd9\u79cd\u98ce\u9669\u3002 ## \u4e86\u89e3 Ingress NGINX v1.2.0 \u548c chrooted NGINX \u8fdb\u7a0b \u4e3b\u8981\u6311\u6218\u4e4b\u4e00\u662f Ingress-NGINX \u8fd0\u884c\u7740 Web \u4ee3\u7406\u670d\u52a1\u5668\uff08NGINX\uff09\uff0c\u5e76\u4e0e Ingress \u63a7\u5236\u5668\u4e00\u8d77\u8fd0\u884c \uff08\u540e\u8005\u662f\u4e00\u4e2a\u53ef\u4ee5\u8bbf\u95ee Kubernetes API \u5e76\u521b\u5efa `nginx.conf` \u7684\u7ec4\u4ef6\uff09\u3002 \u56e0\u6b64\uff0cNGINX \u5bf9\u63a7\u5236\u5668\u7684\u6587\u4ef6\u7cfb\u7edf\uff08\u548c Kubernetes \u670d\u52a1\u5e10\u6237\u4ee4\u724c\uff0c\u4ee5\u53ca\u5bb9\u5668\u4e2d\u7684\u5176\u4ed6\u914d\u7f6e\uff09\u5177\u6709\u76f8\u540c\u7684\u8bbf\u95ee\u6743\u9650\u3002 \u867d\u7136\u62c6\u5206\u8fd9\u4e9b\u7ec4\u4ef6\u662f\u6211\u4eec\u7684\u6700\u7ec8\u76ee\u6807\uff0c\u4f46\u8be5\u9879\u76ee\u9700\u8981\u5feb\u901f\u54cd\u5e94\uff1b\u8fd9\u8ba9\u6211\u4eec\u60f3\u5230\u4e86\u4f7f\u7528 `chroot()`\u3002 \u8ba9\u6211\u4eec\u770b\u4e00\u4e0b Ingress-NGINX \u5bb9\u5668\u5728\u6b64\u66f4\u6539\u4e4b\u524d\u7684\u6837\u5b50\uff1a ![Ingress NGINX pre chroot](ingress-pre-chroot.png) \u6b63\u5982\u6211\u4eec\u6240\u89c1\uff0c\u7528\u6765\u63d0\u4f9b HTTP Proxy \u7684\u5bb9\u5668\uff08\u4e0d\u662f Pod\uff0c\u662f\u5bb9\u5668\uff01\uff09\u4e5f\u662f\u662f\u76d1\u89c6 Ingress \u5bf9\u8c61\u5e76\u5c06\u6570\u636e\u5199\u5165\u5bb9\u5668\u5377\u7684\u5bb9\u5668\u3002 \u73b0\u5728\uff0c\u89c1\u8bc6\u4e00\u4e0b\u65b0\u67b6\u6784\uff1a ![Ingress NGINX post chroot](ingress-post-chroot.png) \u8fd9\u4e00\u5207\u610f\u5473\u7740\u4ec0\u4e48\uff1f\u4e00\u4e2a\u57fa\u672c\u7684\u603b\u7ed3\u662f\uff1a\u6211\u4eec\u5c06 NGINX \u670d\u52a1\u9694\u79bb\u4e3a\u63a7\u5236\u5668\u5bb9\u5668\u5185\u7684\u5bb9\u5668\u3002 \u867d\u7136\u8fd9\u5e76\u4e0d\u5b8c\u5168\u6b63\u786e\uff0c\u4f46\u8981\u4e86\u89e3\u8fd9\u91cc\u6240\u505a\u7684\u4e8b\u60c5\uff0c\u6700\u597d\u4e86\u89e3 Linux \u5bb9\u5668\uff08\u4ee5\u53ca\u5185\u6838\u547d\u540d\u7a7a\u95f4\u7b49\u5e95\u5c42\u673a\u5236\uff09\u662f\u5982\u4f55\u5de5\u4f5c\u7684\u3002 \u4f60\u53ef\u4ee5\u5728 Kubernetes \u8bcd\u6c47\u8868\u4e2d\u9605\u8bfb\u6709\u5173 cgroup \u7684\u4fe1\u606f\uff1a[`cgroup`](/zh-cn/docs/reference/glossary/?fundamental=true#term-cgroup)\uff0c \u5e76\u5728 NGINX \u9879\u76ee\u6587\u7ae0[\u4ec0\u4e48\u662f\u547d\u540d\u7a7a\u95f4\u548c cgroup\uff0c\u4ee5\u53ca\u5b83\u4eec\u5982\u4f55\u5de5\u4f5c\uff1f](https://www.nginx.com/blog/what-are-namespaces-cgroups-how-do-they-work/) \u4e2d\u4e86\u89e3\u6709\u5173 cgroup \u4e0e\u547d\u540d\u7a7a\u95f4\u4ea4\u4e92\u7684\u66f4\u591a\u4fe1\u606f\u3002\uff08\u5f53\u4f60\u9605\u8bfb\u65f6\uff0c\u8bf7\u8bb0\u4f4f Linux \u5185\u6838\u547d\u540d\u7a7a\u95f4\u4e0e [Kubernetes \u547d\u540d\u7a7a\u95f4](/zh-cn/docs/concepts/overview/working-with-objects/namespaces/)\u4e0d\u540c\uff09\u3002 ## \u8df3\u8fc7\u8c08\u8bdd\uff0c\u6211\u9700\u8981\u4ec0\u4e48\u624d\u80fd\u4f7f\u7528\u8fd9\u79cd\u65b0\u65b9\u6cd5\uff1f \u867d\u7136\u8fd9\u589e\u52a0\u4e86\u5b89\u5168\u6027\uff0c\u4f46\u6211\u4eec\u5728\u8fd9\u4e2a\u7248\u672c\u4e2d\u628a\u8fd9\u4e2a\u529f\u80fd\u4f5c\u4e3a\u4e00\u4e2a\u9009\u9879\uff0c\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u6709\u65f6\u95f4\u5728\u4f60\u7684\u73af\u5883\u4e2d\u505a\u51fa\u6b63\u786e\u7684\u8c03\u6574\u3002 \u6b64\u65b0\u529f\u80fd\u4ec5\u5728 Ingress-NGINX \u63a7\u5236\u5668\u7684 v1.2.0 \u7248\u672c\u4e2d\u53ef\u7528\u3002 \u8981\u4f7f\u7528\u8fd9\u4e2a\u529f\u80fd\uff0c\u5728\u4f60\u7684\u90e8\u7f72\u4e2d\u6709\u4e24\u4e2a\u5fc5\u8981\u7684\u6539\u53d8\uff1a * \u5c06\u540e\u7f00 \"-chroot\" \u6dfb\u52a0\u5230\u5bb9\u5668\u955c\u50cf\u540d\u79f0\u4e2d\u3002\u4f8b\u5982\uff1a`gcr.io/k8s-staging-ingress-nginx/controller-chroot:v1.2.0` * \u5728\u4f60\u7684 Ingress \u63a7\u5236\u5668\u7684 Pod \u6a21\u677f\u4e2d\uff0c\u627e\u5230\u6dfb\u52a0 `NET_BIND_SERVICE` \u6743\u80fd\u7684\u4f4d\u7f6e\u5e76\u6dfb\u52a0 `SYS_CHROOT` \u6743\u80fd\u3002 \u7f16\u8f91\u6e05\u5355\u540e\uff0c\u4f60\u5c06\u770b\u5230\u5982\u4e0b\u4ee3\u7801\u6bb5\uff1a ```yaml capabilities: drop: - ALL add: - NET_BIND_SERVICE - SYS_CHROOT ``` \u5982\u679c\u4f60\u4f7f\u7528\u5b98\u65b9 Helm Chart \u90e8\u7f72\u63a7\u5236\u5668\uff0c\u5219\u5728 `values.yaml` \u4e2d\u66f4\u6539\u4ee5\u4e0b\u8bbe\u7f6e\uff1a ```yaml controller: image: chroot: true ``` Ingress \u63a7\u5236\u5668\u901a\u5e38\u90e8\u7f72\u5728\u96c6\u7fa4\u4f5c\u7528\u57df\uff08IngressClass API \u662f\u96c6\u7fa4\u4f5c\u7528\u57df\u7684\uff09\u3002 \u5982\u679c\u4f60\u7ba1\u7406 Ingress-NGINX \u63a7\u5236\u5668\u4f46\u4f60\u4e0d\u662f\u6574\u4e2a\u96c6\u7fa4\u7684\u64cd\u4f5c\u5458\uff0c \u8bf7\u5728\u90e8\u7f72\u4e2d\u542f\u7528\u5b83**\u4e4b\u524d**\u4e0e\u96c6\u7fa4\u7ba1\u7406\u5458\u786e\u8ba4\u4f60\u662f\u5426\u53ef\u4ee5\u4f7f\u7528 `SYS_CHROOT` \u529f\u80fd\u3002 ## \u597d\u5427\uff0c\u4f46\u8fd9\u5982\u4f55\u80fd\u63d0\u9ad8\u6211\u7684 Ingress \u63a7\u5236\u5668\u7684\u5b89\u5168\u6027\u5462\uff1f \u4ee5\u4e0b\u9762\u7684\u914d\u7f6e\u7247\u6bb5\u4e3a\u4f8b\uff0c\u60f3\u8c61\u4e00\u4e0b\uff0c\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\uff0c\u5b83\u88ab\u6dfb\u52a0\u5230\u4f60\u7684 `nginx.conf` \u4e2d\uff1a ``` location /randomthing/ { alias /; autoindex on; } ``` \u5982\u679c\u4f60\u90e8\u7f72\u4e86\u8fd9\u79cd\u914d\u7f6e\uff0c\u6709\u4eba\u53ef\u4ee5\u8c03\u7528 `http://website.example/randomthing` \u5e76\u83b7\u53d6\u5bf9 Ingress \u63a7\u5236\u5668\u7684\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u4e00\u4e9b\u5217\u8868\uff08\u548c\u8bbf\u95ee\u6743\u9650\uff09\u3002 \u73b0\u5728\uff0c\u4f60\u80fd\u5728\u4e0b\u9762\u7684\u5217\u8868\u4e2d\u53d1\u73b0 chroot \u5904\u7406\u8fc7\u548c\u672a\u7ecf chroot \u5904\u7406\u8fc7\u7684 Nginx \u4e4b\u95f4\u7684\u533a\u522b\u5417\uff1f | \u4e0d\u989d\u5916\u8c03\u7528 `chroot()` | \u989d\u5916\u8c03\u7528 `chroot()` | |----------------------------|--------| | `bin` | `bin` | | `dev` | `dev` | | `etc` | `etc` | | `home` | | | `lib` | `lib` | | `media` | | | `mnt` | | | `opt` | `opt` | | `proc` | `proc` | | `root` | | | `run` | `run` | | `sbin` | | | `srv` | | | `sys` | | | `tmp` | `tmp` | | `usr` | `usr` | | `var` | `var` | | `dbg` | | | `nginx-ingress-controller` | | | `wait-shutdown` | | \u5de6\u4fa7\u7684\u90a3\u4e2a\u6ca1\u6709 chroot \u5904\u7406\u3002\u6240\u4ee5 NGINX \u53ef\u4ee5\u5b8c\u5168\u8bbf\u95ee\u6587\u4ef6\u7cfb\u7edf\u3002\u53f3\u4fa7\u7684\u90a3\u4e2a\u7ecf\u8fc7 chroot \u5904\u7406\uff0c \u56e0\u6b64\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u6587\u4ef6\u7cfb\u7edf\uff0c\u5176\u4e2d\u53ea\u6709\u4f7f NGINX \u5de5\u4f5c\u6240\u9700\u7684\u6587\u4ef6\u3002 ## \u6b64\u7248\u672c\u4e2d\u7684\u5176\u4ed6\u5b89\u5168\u6539\u8fdb\u5982\u4f55\uff1f \u6211\u4eec\u77e5\u9053\u65b0\u7684 `chroot()` \u673a\u5236\u6709\u52a9\u4e8e\u89e3\u51b3\u90e8\u5206\u98ce\u9669\uff0c\u4f46\u4ecd\u7136\u6709\u4eba\u53ef\u4ee5\u5c1d\u8bd5\u6ce8\u5165\u547d\u4ee4\u6765\u8bfb\u53d6\uff0c\u4f8b\u5982 `nginx.conf` \u6587\u4ef6\u5e76\u63d0\u53d6\u654f\u611f\u4fe1\u606f\u3002 \u6240\u4ee5\uff0c\u8fd9\u4e2a\u7248\u672c\u7684\u53e6\u4e00\u4e2a\u53d8\u5316\uff08\u53ef\u9009\u62e9\u53d6\u6d88\uff09\u662f **\u6df1\u5ea6\u63a2\u6d4b\uff08Deep Inspector\uff09**\u3002 \u6211\u4eec\u77e5\u9053\u67d0\u4e9b\u6307\u4ee4\u6216\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u80fd\u5bf9 NGINX \u9020\u6210\u5371\u9669\uff0c\u56e0\u6b64\u6df1\u5ea6\u63a2\u6d4b\u5668\u4f1a\u68c0\u67e5 Ingress \u5bf9\u8c61\u4e2d\u7684\u6240\u6709\u5b57\u6bb5 \uff08\u5728\u5176\u534f\u8c03\u671f\u95f4\uff0c\u5e76\u4e14\u8fd8\u4f7f\u7528[\u9a8c\u8bc1\u51c6\u5165 webhook](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook)) \u9a8c\u8bc1\u662f\u5426\u6709\u4efb\u4f55\u5b57\u6bb5\u5305\u542b\u8fd9\u4e9b\u5371\u9669\u6307\u4ee4\u3002 Ingress \u63a7\u5236\u5668\u5df2\u7ecf\u901a\u8fc7\u6ce8\u89e3\u505a\u4e86\u8fd9\u4e2a\u5de5\u4f5c\uff0c\u6211\u4eec\u7684\u76ee\u6807\u662f\u628a\u73b0\u6709\u7684\u9a8c\u8bc1\u8f6c\u79fb\u5230\u6df1\u5ea6\u63a2\u6d4b\u4e2d\uff0c\u4f5c\u4e3a\u672a\u6765\u7248\u672c\u7684\u4e00\u90e8\u5206\u3002 \u4f60\u53ef\u4ee5\u5728 [https://github.com/kubernetes/ingress-nginx/blob/main/internal/ingress/inspector/rules.go](https://github.com/kubernetes/ingress-nginx/blob/main/internal/ingress/inspector/rules.go) \u4e2d\u67e5\u770b\u73b0\u6709\u89c4\u5219\u3002 \u7531\u4e8e\u68c0\u67e5\u548c\u5339\u914d\u76f8\u5173 Ingress \u5bf9\u8c61\u4e2d\u7684\u6240\u6709\u5b57\u7b26\u4e32\u7684\u6027\u8d28\uff0c\u6b64\u65b0\u529f\u80fd\u53ef\u80fd\u4f1a\u6d88\u8017\u66f4\u591a CPU\u3002 \u4f60\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u547d\u4ee4\u884c\u53c2\u6570 `--deep-inspect=false` \u8fd0\u884c Ingress \u63a7\u5236\u5668\u6765\u7981\u7528\u5b83\u3002 ## \u4e0b\u4e00\u6b65\u662f\u4ec0\u4e48? \u8fd9\u4e0d\u662f\u6211\u4eec\u7684\u6700\u7ec8\u76ee\u6807\u3002\u6211\u4eec\u7684\u6700\u7ec8\u76ee\u6807\u662f\u62c6\u5206\u63a7\u5236\u5e73\u9762\u548c\u6570\u636e\u5e73\u9762\u8fdb\u7a0b\u3002 \u4e8b\u5b9e\u4e0a\uff0c\u8fd9\u6837\u505a\u4e5f\u5c06\u5e2e\u52a9\u6211\u4eec\u5b9e\u73b0 [Gateway](https://gateway-api.sigs.k8s.io/) API \u5b9e\u73b0\uff0c \u56e0\u4e3a\u4e00\u65e6\u5b83\u201c\u77e5\u9053\u201d\u8981\u63d0\u4f9b\u4ec0\u4e48\uff0c\u6211\u4eec\u53ef\u80fd\u4f1a\u6709\u4e0d\u540c\u7684\u63a7\u5236\u5668 \u6570\u636e\u5e73\u9762\uff08\u6211\u4eec\u9700\u8981\u4e00\u4e9b\u5e2e\u52a9\uff01\uff01\uff09 Kubernetes \u4e2d\u7684\u5176\u4ed6\u4e00\u4e9b\u9879\u76ee\u5df2\u7ecf\u91c7\u7528\u4e86\u8fd9\u79cd\u65b9\u6cd5\uff08\u5982 [KPNG](https://github.com/kubernetes-sigs/kpng)\uff0c \u5efa\u8bae\u66ff\u6362 `kube-proxy`\uff09\uff0c\u6211\u4eec\u8ba1\u5212\u4e0e\u4ed6\u4eec\u4fdd\u6301\u4e00\u81f4\uff0c\u5e76\u4e3a Ingress-NGINX \u83b7\u5f97\u76f8\u540c\u7684\u4f53\u9a8c\u3002 ## \u5ef6\u4f38\u9605\u8bfb \u5982\u679c\u4f60\u60f3\u4e86\u89e3\u5982\u4f55\u5728 Ingress NGINX \u4e2d\u5b8c\u6210 chrooting\uff0c\u8bf7\u67e5\u770b [https://github.com/kubernetes/ingress-nginx/pull/8337](https://github.com/kubernetes/ingress-nginx/pull/8337)\u3002 \u5305\u542b\u6240\u6709\u66f4\u6539\u7684\u7248\u672c v1.2.0 \u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u627e\u5230 [https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.2.0](https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.2.0) ", "positive_passages": [{"docid": "doc-en-website-7ed003f36ff037851e1ce066cfc8070e195e0a4b519adc19daf864395a404cf6", "text": "This is a Feature Report Problem: misssing Chinese translation docs: content/en/blog/_posts/2022-04-28-Increasing-the-security-bar-in-Ingress-NGINX Proposed Solution: add Chinese translation docs in website Kubernetes Blog Comments /language zh /assign\nEnglish page:\n/triage accepted", "commid": "website_issue_35158", "tokennum": 75}], "negative_passages": []} {"query_id": "q-en-website-03515a45f4d729b6a0d27d16dc85afbfb16c8dc2423af140926a779e71f6d634", "query": "cpu: 100m memory: 100Mi ports: - containerPort: 80 No newline at end of file - containerPort: 80 ", "positive_passages": [{"docid": "doc-en-website-e57b7680d2e86886a7ad728991517aafbdee1fb54290590e43a6a80bfb87b18b", "text": "The yaml file in \"Creating the Guestbook Frontend Deployment\" uses an image no more available ( ) I solved the issue by using Here is the working version I used!\nHey Can you share us a pic of the solved issue here?\n/kind bug\n/triage accepted\n/assign", "commid": "website_issue_44190", "tokennum": 58}], "negative_passages": []} {"query_id": "q-en-website-03515a45f4d729b6a0d27d16dc85afbfb16c8dc2423af140926a779e71f6d634", "query": "cpu: 100m memory: 100Mi ports: - containerPort: 80 No newline at end of file - containerPort: 80 ", "positive_passages": [{"docid": "doc-en-website-21e4b499f1dcceee878577892b0db6508f2070d9dba4dadf97992141af08ad83", "text": "The image file download for the frontend- is currently failing. I fixed by changing it to: image: us-\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. --- title: Tutorials main_menu: true weight: 60 content_template: templates/concept --- {{% capture overview %}} Questa sezione della documentazione di Kubernetes contiene i tutorials. Un tutorial mostra come raggiungere un obiettivo pi\u00f9 complesso di un singolo [task](/docs/tasks/). Solitamente un tutorial ha diverse sezioni, ognuna delle quali consiste in una sequenza di pi\u00f9 task. Prima di procedere con vari tutorial, raccomandiamo di aggiungere il [Glossario](/docs/reference/glossary/) ai tuoi bookmark per riferimenti successivi. {{% /capture %}} {{% capture body %}} ## Per cominciare * [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) \u00e8 un approfondito tutorial che aiuta a capire cosa \u00e8 Kubernetes e che permette di testare in modo interattivo alcune semplici funzionalit\u00e0 di Kubernetes. * [Introduction to Kubernetes (edX)](https://www.edx.org/course/introduction-kubernetes-linuxfoundationx-lfs158x#) * [Hello Minikube](/docs/tutorials/hello-minikube/) ## Configurazione * [Configurare Redis utilizzando una ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/) ## Stateless Applications * [Esporre un External IP Address per permettere l'accesso alle applicazioni nel Cluster](/docs/tutorials/stateless-application/expose-external-ip-address/) * [Esempio: Rilasciare l'applicazione PHP Guestbook con Redis](/docs/tutorials/stateless-application/guestbook/) ## Stateful Applications * [StatefulSet Basics](/docs/tutorials/stateful-application/basic-stateful-set/) * [Esempio: WordPress e MySQL con i PersistentVolumes](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) * [Esempio: Rilasciare Cassandra con i StatefulSets](/docs/tutorials/stateful-application/cassandra/) * [Eseguire ZooKeeper, un sistema distribuito CP](/docs/tutorials/stateful-application/zookeeper/) ## CI/CD Pipelines * [Set Up a CI/CD Pipeline with Kubernetes Part 1: Overview](https://www.linux.com/blog/learn/chapter/Intro-to-Kubernetes/2017/5/set-cicd-pipeline-kubernetes-part-1-overview) * [Set Up a CI/CD Pipeline with a Jenkins Pod in Kubernetes (Part 2)](https://www.linux.com/blog/learn/chapter/Intro-to-Kubernetes/2017/6/set-cicd-pipeline-jenkins-pod-kubernetes-part-2) * [Run and Scale a Distributed Crossword Puzzle App with CI/CD on Kubernetes (Part 3)](https://www.linux.com/blog/learn/chapter/intro-to-kubernetes/2017/6/run-and-scale-distributed-crossword-puzzle-app-cicd-kubernetes-part-3) * [Set Up CI/CD for a Distributed Crossword Puzzle App on Kubernetes (Part 4)](https://www.linux.com/blog/learn/chapter/intro-to-kubernetes/2017/6/set-cicd-distributed-crossword-puzzle-app-kubernetes-part-4) ## Clusters * [AppArmor](/docs/tutorials/clusters/apparmor/) ## Servizi * [Utilizzare Source IP](/docs/tutorials/services/source-ip/) {{% /capture %}} {{% capture whatsnext %}} Se sei interessato a scrivere un tutorial, vedi [Utilizzare i Page Templates](/docs/home/contribute/page-templates/) per informazioni su come creare una tutorial page e sul tutorial template. {{% /capture %}} ", "positive_passages": [{"docid": "doc-en-website-94469e35708c1aae59532a41388e148ea2931abdb2f0efcc2cc194beffeffbc5", "text": "This is a Bug Report Esta tarea muestra c\u00f3mo utilizar `kubectl patch` para actualizar un objeto del API sin reemplazarlo. Los ejercicios de esta tarea demuestran el uso de \"strategic merge patch\" y \"JSON merge patch\" ## {{% heading \"prerequisites\" %}} {{< include \"task-tutorial-prereqs.md\" >}} {{< version-check >}} ## Usa strategic merge patch para actualizar un Deployment Aqu\u00ed est\u00e1 el archivo de configuraci\u00f3n para un Deployment con dos r\u00e9plicas. Cada r\u00e9plica es un Pod que tiene un contenedor: {{% code_sample file=\"application/deployment-patch.yaml\" %}} Crea el Deployment: ```shell kubectl apply -f https://k8s.io/examples/application/deployment-patch.yaml ``` Revisa los Pods asociados con tu Deployment: ```shell kubectl get pods ``` El resultado muestra que el Deployment tiene dos Pods. El `1/1` indica que cada Pod tiene un contenedor: ``` NAME READY STATUS RESTARTS AGE patch-demo-28633765-670qr 1/1 Running 0 23s patch-demo-28633765-j5qs3 1/1 Running 0 23s ``` Toma nota de los nombres de los Pods que se est\u00e1n ejecutando. Ver\u00e1s que estos Pods son terminados y reemplazados posteriormente. En este punto cada Pod tiene un contenedor que ejecuta una imagen de nginx. Ahora sup\u00f3n que quieres que cada Pod tenga dos contenedores: uno que ejecute nginx y otro que ejecute redis. Crea un archivo llamado `patch-file.yaml` con el siguiente contenido: ```yaml spec: template: spec: containers: - name: patch-demo-ctr-2 image: redis ``` Modifica tu Deployment usando Patch: ```shell kubectl patch deployment patch-demo --patch-file patch-file.yaml ``` Revisa el Deployment modificado: ```shell kubectl get deployment patch-demo --output yaml ``` El resultado muestra que el PodSpec del Deployment tiene dos contenedores: ```yaml containers: - image: redis imagePullPolicy: Always name: patch-demo-ctr-2 ... - image: nginx imagePullPolicy: Always name: patch-demo-ctr ... ``` Revisa los Pods asociados con tu Deployment modificado: ```shell kubectl get pods ``` El resultado muestra que los Pods tienen un nombre distinto a los que se estaban ejecutando anteriormente. El Deployment termin\u00f3 los Pods viejos y creo dos nuevos que cumplen con la especificaci\u00f3n actualizada del Deployment. El `2/2` indica que cada Pod tiene dos contenedores: ``` NAME READY STATUS RESTARTS AGE patch-demo-1081991389-2wrn5 2/2 Running 0 1m patch-demo-1081991389-jmg7b 2/2 Running 0 1m ``` Un vistazo m\u00e1s de cerca a uno de los Pods del patch-demo: ```shell kubectl get pod --output yaml ``` El resultado muestra que el Pod tienen dos contenedores: uno ejecutando nginx y otro redis: ``` containers: - image: redis ... - image: nginx ... ``` ### Notas acerca de strategic merge patch El patch que hiciste en el ejercicio anterior se llama *strategic merge patch*. Toma en cuenta que el path no reemplaz\u00f3 la lista `containers`. Sino que agreg\u00f3 un contenedor nuevo a la lista. En otras palabras, la lista en el patch fue agregada a la lista ya existente. Esto no es lo que pasa siempre que se utiliza strategic merge patch en una lista. En algunos casos la lista existente podr\u00eda ser reemplazada en lugar de unir ambas. Con strategic merge patch, la lista existente puede ser reemplazada o unida con la nueva dependiendo de la estrategia de patch. La estrategia de patch se especifica en el valor de la clave `patchStrategy`en un campo tag del c\u00f3digo fuente de Kubernetes. Por ejemplo el campo `Containers` de la struct `PodSpec` tiene un valor de `merge` en su clave `patchStrategy`: ```go type PodSpec struct { ... Containers []Container `json:\"containers\" patchStrategy:\"merge\" patchMergeKey:\"name\" ...` ... } ``` Tambi\u00e9n puedes consultar la estrategia de patch en [OpenApi spec](https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json): ```yaml \"io.k8s.api.core.v1.PodSpec\": { ..., \"containers\": { \"description\": \"List of containers belonging to the pod. ....\" }, \"x-kubernetes-patch-merge-key\": \"name\", \"x-kubernetes-patch-strategy\": \"merge\" } ``` Y puedes consultar la estrategia de patch en la [Documentaci\u00f3n del API Kubernetes](/docs/reference/generated/kubernetes-api/{{< param \"version\" >}}/#podspec-v1-core). Crea un archivo llamado `patch-file-tolerations.yaml` que tenga el siguiente contenido: ```yaml spec: template: spec: tolerations: - effect: NoSchedule key: disktype value: ssd ``` Modifica tu Deployment utilizando Patch: ```shell kubectl patch deployment patch-demo --patch-file patch-file-tolerations.yaml ``` Revisa el Deployment modificado: ```shell kubectl get deployment patch-demo --output yaml ``` El resultado muestra que el PodsSpec del Deployment tiene solo un Toleration: ```yaml tolerations: - effect: NoSchedule key: disktype value: ssd ``` Toma en cuenta que la lista de `tolerations` en el PodSpec fue reemplazada, no unida. Esto es porque el campo de Tolerations del PodSpec no tiene una clave `patchStrategy` en su campo de tag. por lo tanto strategic merge patch utiliza la estrategia de patch por defecto, la cual es `replace`. ```go type PodSpec struct { ... Tolerations []Toleration `json:\"tolerations,omitempty\" protobuf:\"bytes,22,opt,name=tolerations\"` ... } ``` ## Usa JSON merge patch para actualizar un Deployment Un strategic merge patch es distinto a un [JSON merge patch](https://tools.ietf.org/html/rfc7386). Con JSON merge patch, si quieres actualizar una lista tienes que especificar la lista nueva en su totalidad y reemplazar la lista existente con la lista nueva. El comando `kubectl patch` tiene un par\u00e1metro `type` que acepta los siguientes valores:
Valor del par\u00e1metrotipo de uni\u00f3n
jsonJSON Patch, RFC 6902
mergeJSON Merge Patch, RFC 7386
strategicStrategic merge patch
Para una comparaci\u00f3n entre JSON patch y JSON merge patch, revisa [JSON Patch y JSON Merge Patch](https://erosb.github.io/post/json-patch-vs-merge-patch/). El valor predeterminado para el par\u00e1metro `type` es `strategic`. Entonces en el ejercicio anterior hiciste un strategic merge patch. A continuaci\u00f3n haz un JSON merge path en el mismo Deployment. Crea un archivo llamado `patch-file-2.yaml` que tenga el siguiente contenido: ```yaml spec: template: spec: containers: - name: patch-demo-ctr-3 image: gcr.io/google-samples/node-hello:1.0 ``` En el comando patch configura el valor de `type` como `merge` ```shell kubectl patch deployment patch-demo --type merge --patch-file patch-file-2.yaml ``` Revisa el Deployment modificado: ```shell kubectl get deployment patch-demo --output yaml ``` La lista `containers` que especificaste en el patch solo tiene un contenedor. el resultado muestra que tu lista con un contenedor reemplaz\u00f3 a la lista `containers` preexistente. ```yaml spec: containers: - image: gcr.io/google-samples/node-hello:1.0 ... name: patch-demo-ctr-3 ``` Revisa los Pods en ejecuci\u00f3n: ```shell kubectl get pods ``` En el resultado se puede ver que los Pods existentes fueron terminados y se crearon Pods nuevos. El `1/1` indica que cada Pod nuevo esta ejecutando un solo contenedor. ```shell NAME READY STATUS RESTARTS AGE patch-demo-1307768864-69308 1/1 Running 0 1m patch-demo-1307768864-c86dc 1/1 Running 0 1m ``` ## Usa strategic merge patch para actualizar un Deployment utilizando la estrategia retainKeys Aqu\u00ed esta el archivo de configuraci\u00f3n para un Deployment que usa la estrategia `RollingUpdate`: {{% code_sample file=\"application/deployment-retainkeys.yaml\" %}} Crea el Deployment: ```shell kubectl apply -f https://k8s.io/examples/application/deployment-retainkeys.yaml ``` En este punto, el Deployment es creado y est\u00e1 usando la estrategia `RollingUpdate`. Crea un archivo llamado `patch-file-no-retainkeys.yaml` con el siguiente contenido: ```yaml spec: strategy: type: Recreate ``` Modifica tu Deployment: ```shell kubectl patch deployment retainkeys-demo --type strategic --patch-file patch-file-no-retainkeys.yaml ``` En el resultado se puede ver que no es posible definir el `type` como `Recreate` cuando hay un value definido para `spec.strategy.rollingUpdate`: ``` The Deployment \"retainkeys-demo\" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy `type` is 'Recreate' ``` La forma para quitar el valor para `spec.strategy.rollingUpdate` al momento de cambiar el valor `type` es usar la estrategia `retainKeys` para el strategic merge. Crea otro archivo llamado `patch-file-retainkeys.yaml` con el siguiente contenido: ```yaml spec: strategy: $retainKeys: - type type: Recreate ``` Con este Patch definimos que solo queremos conservar la clave `type` del objeto `strategy`. Por lo tanto la clave `rollingUpdate` ser\u00e1 eliminada durante la operaci\u00f3n de modificaci\u00f3n. Modifica tu Deployment de nuevo con este nuevo Patch: ```shell kubectl patch deployment retainkeys-demo --type strategic --patch-file patch-file-retainkeys.yaml ``` Revisa el contenido del Deployment: ```shell kubectl get deployment retainkeys-demo --output yaml ``` El resultado muestra que el objeto `strategy` en el Deployment ya no contiene la clave `rollingUpdate`: ```yaml spec: strategy: type: Recreate template: ``` ### Notas acerca de strategic merge patch utilizando la estrategia retainKeys La modificaci\u00f3n realizada en el ejercicio anterior tiene el nombre de *strategic merge patch con estrategia retainKeys*. Este m\u00e9todo introduce una nueva directiva `$retainKeys` que tiene las siguientes estrategias: - Contiene una lista de strings. - Todos los campos que necesiten ser preservados deben estar presentes en la lista `$retainKeys`. - Todos los campos que est\u00e9n presentes ser\u00e1n combinados con el objeto existente. - Todos los campos faltantes ser\u00e1n removidos o vaciados al momento de la modificaci\u00f3n. - Todos los campos en la lista `$retainKeys` deber\u00e1n ser un superconjunto o id\u00e9ntico a los campos presentes en el Patch. La estrategia `retainKeys` no funciona para todos los objetos. Solo funciona cuando el valor de la key `patchStrategy`en el campo tag de el c\u00f3digo fuente de Kubernetes contenga `retainKeys`. Por ejemplo, el campo `Strategy` del struct `DeploymentSpec` tiene un valor de `retainKeys` en su tag `patchStrategy` ```go type DeploymentSpec struct { ... // +patchStrategy=retainKeys Strategy DeploymentStrategy `json:\"strategy,omitempty\" patchStrategy:\"retainKeys\" ...` ... } ``` Tambi\u00e9n puedes revisar la estrategia `retainKeys` en la especificaci\u00f3n de [OpenApi](https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json): ```yaml \"io.k8s.api.apps.v1.DeploymentSpec\": { ..., \"strategy\": { \"$ref\": \"#/definitions/io.k8s.api.apps.v1.DeploymentStrategy\", \"description\": \"The deployment strategy to use to replace existing pods with new ones.\", \"x-kubernetes-patch-strategy\": \"retainKeys\" }, .... } ``` Adem\u00e1s puedes revisar la estrategia `retainKeys` en la [documentaci\u00f3n del API de k8s](/docs/reference/generated/kubernetes-api/{{< param \"version\" >}}/#deploymentspec-v1-apps). ### Formas alternativas del comando kubectl patch El comando `kubectl patch` toma como entrada un archivo en formato YAML o JSON desde el sistema de archivos o la l\u00ednea de comandos. Crea un archivo llamado `patch-file.json` que contenga lo siguiente: ```json { \"spec\": { \"template\": { \"spec\": { \"containers\": [ { \"name\": \"patch-demo-ctr-2\", \"image\": \"redis\" } ] } } } } ``` Los siguientes comandos son equivalentes: ```shell kubectl patch deployment patch-demo --patch-file patch-file.yaml kubectl patch deployment patch-demo --patch 'spec:n template:n spec:n containers:n - name: patch-demo-ctr-2n image: redis' kubectl patch deployment patch-demo --patch-file patch-file.json kubectl patch deployment patch-demo --patch '{\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"patch-demo-ctr-2\",\"image\": \"redis\"}]}}}}' ``` ### Actualiza la cantidad de r\u00e9plicas de un objeto utilizando `kubectl patch` con `--subresource` {#scale-kubectl-patch} {{< feature-state for_k8s_version=\"v1.24\" state=\"alpha\" >}} La bandera `--subresource=[subresource-name]` es utilizada con comandos de kubectl como get, patch y replace para obtener y actualizar los subrecursos `status` y `scale` de los recursos (aplicable para las versiones de kubectl de v1.24 en adelante). Esta bandera se utiliza con todos los recursos del API (incluidos en k8s o CRs) que tengan los subrecursos `status` o `scale`. Deployment es un ejemplo de un objeto con estos subrecursos. A continuaci\u00f3n se muestra un ejemplo de un Deployment con dos r\u00e9plicas: {{% code_sample file=\"application/deployment.yaml\" %}} Crea el Deployment: ```shell kubectl apply -f https://k8s.io/examples/application/deployment.yaml ``` Revisa los Pods asociados al Deployment ```shell kubectl get pods -l app=nginx ``` En el resultado se puede observar que el Deployment tiene dos Pods: ``` NAME READY STATUS RESTARTS AGE nginx-deployment-7fb96c846b-22567 1/1 Running 0 47s nginx-deployment-7fb96c846b-mlgns 1/1 Running 0 47s ``` Ahora modifica el Deployment utilizando Patch con la bandera `--subresource=[subresource-name]`: ```shell kubectl patch deployment nginx-deployment --subresource='scale' --type='merge' -p '{\"spec\":{\"replicas\":3}}' ``` El resultado es : ```shell scale.autoscaling/nginx-deployment patched ``` Revisa los Pods asociados al Deployment modificado: ```shell kubectl get pods -l app=nginx ``` En el resultado se puede apreciar que se ha creado un Pod nuevo. Ahora tienes 3 Pods en ejecuci\u00f3n. ``` NAME READY STATUS RESTARTS AGE nginx-deployment-7fb96c846b-22567 1/1 Running 0 107s nginx-deployment-7fb96c846b-lxfr2 1/1 Running 0 14s nginx-deployment-7fb96c846b-mlgns 1/1 Running 0 107s ``` Revisa el Deployment modificado ```shell kubectl get deployment nginx-deployment -o yaml ``` ```yaml ... spec: replicas: 3 ... status: ... availableReplicas: 3 readyReplicas: 3 replicas: 3 ``` {{< note >}} Si ejecutas `kubectl patch` y especificas la bandera `--subresource` para un recurso que no soporte un subrecurso en particular, el servidor del API regresar\u00e1 un error 404 Not Found. {{< /note >}} ## Resumen En este ejercicio utilizaste `kubectl patch` para cambiar la configuraci\u00f3n en ejecuci\u00f3n de un objeto de tipo Deployment. No hubo cambios al archivo de configuraci\u00f3n que se utiliz\u00f3 originalmente para crear el Deployment. Otros comandos utilizados para actualizar objetos del API incluyen: [kubectl annotate](/docs/reference/generated/kubectl/kubectl-commands/#annotate), [kubectl edit](/docs/reference/generated/kubectl/kubectl-commands/#edit), [kubectl replace](/docs/reference/generated/kubectl/kubectl-commands/#replace), [kubectl scale](/docs/reference/generated/kubectl/kubectl-commands/#scale), y [kubectl apply](/docs/reference/generated/kubectl/kubectl-commands/#apply). {{< note >}} Strategic merge patch no tiene soporte para Custom Resources (CRs). {{< /note >}} ## {{% heading \"whatsnext\" %}} * [Manejo de Objetos de Kubernetes](/docs/concepts/overview/working-with-objects/object-management/) * [Manejo de Objetos de Kubernetes usando comandos imperativos](/docs/tasks/manage-kubernetes-objects/imperative-command/) * [Manejo Imperativo de Objetos de Kubernetes usando archivos de configuraci\u00f3n](/docs/tasks/manage-kubernetes-objects/imperative-config/) * [Manejo Declarativo de Objetos de Kubernetes usando archivos de configuraci\u00f3n](/docs/tasks/manage-kubernetes-objects/declarative-config/) ", "positive_passages": [{"docid": "doc-en-website-b2649880e3cb9da273ab09ced2385f39950a405230caa5c4daefbf6f6280429c", "text": "This is a Feature Request What would you like to be Localize to Spanish Why is this needed There is no Spanish localization for this file. Comments /triage accepted /kind feature /language es /sig docs /area localization\n/assign\n/unassign", "commid": "website_issue_44742", "tokennum": 55}], "negative_passages": []} {"query_id": "q-en-website-061c7b738049556fd9f34973f3f4c673eb160928323706dd03a3017c80b57354", "query": "title: \"Your Title Here\" date: YYYY-MM-DD slug: text-for-URL-link-here-no-spaces author: > Author-1 (Affiliation), Author-2 (Affiliation), Author-3 (Affiliation) --- ```", "positive_passages": [{"docid": "doc-en-website-d4fe701f4dba532aeeb3d806c7157cab718e70ea21b79afac6939020e66f1b85", "text": "This is a Feature Request {{ if not $feature_gate_name }} {{ if not $is_valid }} {{ errorf \"%q is not a valid feature-state, use one of %q\" $state $valid_states }} {{ else }}
{{ T \"feature_state\" }} {{T \"feature_state_kubernetes_label\" }} {{ $for_k8s_version }} [{{ $state }}]
{{ T \"feature_state\" }} {{ T \"feature_state_kubernetes_label\" }} {{ $for_k8s_version }} [{{ $state }}]
{{ end }} {{- else -}} {{ else }} {{- $featureGateDescriptionFilesPath := \"/docs/reference/command-line-tools-reference/feature-gates\" -}} {{- with index (where .Site.Sites \"Language.Lang\" \"eq\" \"en\") 0 -}} {{- with .GetPage $featureGateDescriptionFilesPath -}} {{- $sortedFeatureGates := sort (.Resources.ByType \"page\") -}} {{- $featureGateFound := false -}} {{- range $featureGateFile := $sortedFeatureGates -}} {{- $featureGateNameFromFile := $featureGateFile.Params.Title -}} {{- if eq $featureGateNameFromFile $feature_gate_name -}} {{- $currentStage := index $featureGateFile.Params.stages (sub (len $featureGateFile.Params.stages) 1) -}} {{- with $currentStage -}}
{{ T \"feature_state\" }} {{T \"feature_state_kubernetes_label\" }} v{{ .fromVersion }} [{{ .stage }}]
{{ T \"feature_state\" }} {{ T \"feature_state_kubernetes_label\" }} v{{ .fromVersion }} [{{ .stage }}]
{{- $featureGateFound = true -}} {{- end -}} {{- end -}} {{- end -}} {{- if not $featureGateFound -}} {{- errorf \"Invalid feature gate: '%s' is not recognized or lacks a matching description file in '%s'\" $feature_gate_name (print \"en\" $featureGateDescriptionFilesPath) -}} {{- errorf \"Invalid feature gate: '%s' is not recognized or lacks a matching description file in '%s'\" $feature_gate_name (print \"en\" $featureGateDescriptionFilesPath) -}} {{- end -}} {{- end -}}", "positive_passages": [{"docid": "doc-en-website-8769fbaf5ac8ed1fcee300521f9dc6975f0ec1e4a0366a33d117a7bc15e7f9fd", "text": "This is a Bug Report Problem: On the Kubernetes documentation page for Ephemeral Storage Consumption Management (), under the \"Filesystem project quota\" tab, HTML tags are being displayed incorrectly. This results in the raw HTML code being visible instead of the intended formatted content. Proposed Solution: The HTML tags should be removed from the displayed content, and the text should be properly rendered without the raw HTML markup. The content should be reviewed and corrected to ensure it is presented in a readable and user-friendly format. Page to Update: \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30ce\u30fc\u30c9\u304c\u4f7f\u7528\u3057\u3066\u3044\u308b[\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0](/docs/setup/production-environment/container-runtimes/)\u3092\u78ba\u8a8d\u3059\u308b\u624b\u9806\u3092\u6982\u8aac\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30ce\u30fc\u30c9\u304c\u4f7f\u7528\u3057\u3066\u3044\u308b[\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0](/ja/docs/setup/production-environment/container-runtimes/)\u3092\u78ba\u8a8d\u3059\u308b\u624b\u9806\u3092\u6982\u8aac\u3057\u3066\u3044\u307e\u3059\u3002 \u30af\u30e9\u30b9\u30bf\u30fc\u306e\u5b9f\u884c\u65b9\u6cd5\u306b\u3088\u3063\u3066\u306f\u3001\u30ce\u30fc\u30c9\u7528\u306e\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u4e8b\u524d\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3068\u3001\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u30de\u30cd\u30fc\u30b8\u30c9Kubernetes\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30ce\u30fc\u30c9\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u30d9\u30f3\u30c0\u30fc\u56fa\u6709\u306e\u65b9\u6cd5\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002", "positive_passages": [{"docid": "doc-en-website-ce76db007c0a91a66f52e17aec135a19b1fc010ece3748a48d11e33013c9a8b5", "text": "This is a Feature Request {{% thirdparty-content %}} Los complementos ampl\u00edan las funcionalidades de Kubernetes. En esta p\u00e1gina se listan algunos de los complementos disponibles con sus respectivos enlaces de instrucciones para su instalaci\u00f3n y uso. La lista no pretende ser exhaustiva. ## Redes y Pol\u00edtica de Redes * [ACI](https://www.github.com/noironetworks/aci-containers) (Cisco ACI) proporciona redes de contenedores integradas y seguridad de red. * [Antrea](https://antrea.io/) proporciona servicios de red y seguridad para Kubernetes, aprovechando Open vSwitch como plano de datos de red, opera en la capa 3/4. Antrea es un [proyecto de la CNCF de nivel Sandbox](https://www.cncf.io/projects/antrea/). * [Calico](https://www.tigera.io/project-calico/) es un proveedor de redes y pol\u00edticas de red. Calico admite un conjunto flexible de opciones de red, para poder elegir la opci\u00f3n m\u00e1s eficiente para su situaci\u00f3n, incluidas las redes superpuestas y no superpuestas, con o sin BGP (Border Gateway Protocol). Calico utiliza el mismo motor para aplicar las pol\u00edticas de red para hosts, Pods, y (si se usa Istio y Envoy) aplicaciones en la capa de la malla de servicios. * [Canal](https://projectcalico.docs.tigera.io/getting-started/kubernetes/flannel/flannel) Es la uni\u00f3n de Flannel y Calico, proporciona redes y pol\u00edticas de redes. * [Cilium](https://github.com/cilium/cilium) es una soluci\u00f3n de red, observabilidad y seguridad con un plano de datos basado en eBPF. Cilium proporciona una red sencilla y plana en capa 3 con la capacidad de abarcar varios cl\u00fasteres en un modo de enrutamiento nativo o de superposici\u00f3n/encapsulaci\u00f3n, y puede aplicar pol\u00edticas de red en L3-L7 utilizando un modelo de seguridad basado en identidad que est\u00e1 desacoplado del direccionamiento de red. Cilium puede actuar como sustituto de kube-proxy, tambi\u00e9n ofrece caracter\u00edsticas adicionales de observabilidad y seguridad de manera opcional. Cilium es un [proyecto de la CNCF de nivel Incubaci\u00f3n](https://www.cncf.io/projects/cilium/). * [CNI-Genie](https://github.com/cni-genie/CNI-Genie) permite a Kubernetes conectarse sin problemas a una selecci\u00f3n de complementos de CNI, como Calico, Canal, Flannel o Weave. CNI-Genie es un [proyecto de la CNCF de nivel Sandbox](https://www.cncf.io/projects/cni-genie/). * [Contiv](https://contivpp.io/) proporciona redes configurables (L3 nativo mediante BGP, con superposici\u00f3n mediante vxlan, L2 cl\u00e1sica y Cisco-SDN/ACI) para diversos casos de uso y un vasto marco de pol\u00edticas. El proyecto Contiv es de [c\u00f3digo abierto](https://github.com/contiv). El [instalador](https://github.com/contiv/install) ofrece opciones de instalaci\u00f3n basadas en kubeadm y no basadas en kubeadm. * [Contrail](https://www.juniper.net/us/en/products-services/sdn/contrail/contrail-networking/), basada en [Tungsten Fabric](https://tungsten.io), es una plataforma de gesti\u00f3n de pol\u00edticas y virtualizaci\u00f3n de redes multicloud de c\u00f3digo abierto. Contrail y Tungsten Fabric se integran con sistemas de orquestaci\u00f3n como Kubernetes, OpenShift, OpenStack y Mesos, y proporcionan modos de aislamiento para m\u00e1quinas virtuales, contenedores/Pods y cargas de trabajo para bare metal. * [Flannel](https://github.com/flannel-io/flannel#deploying-flannel-manually) es un proveedor de red superpuesta que se puede usar con Kubernetes. * [Knitter](https://github.com/ZTE/Knitter/) es un complemento que soportar m\u00faltiples interfaces de red en un Pod de Kubernetes. * [Multus](https://github.com/k8snetworkplumbingwg/multus-cni) es un multicomplemento para soporte de m\u00faltiple redes en Kubernetes, que admite todos los complementos de CNI (ej. Calico, Cilium, Contiv, Flannel), adem\u00e1s de SRIOV, DPDK, OVS-DPDK y cargas de trabajo basadas en VPP en Kubernetes. * [OVN-Kubernetes](https://github.com/ovn-org/ovn-kubernetes/) es un proveedor de red para Kubernetes basado en [OVN (Open Virtual Network)](https://github.com/ovn-org/ovn/), es una implementaci\u00f3n de red virtual que surgi\u00f3 del proyecto Open vSwitch (OVS). OVN-Kubernetes proporciona una implementaci\u00f3n de red basada en la superposici\u00f3n para Kubernetes, incluyendo una implementaci\u00f3n basada en OVS de balanceo de carga y pol\u00edtica de red. * [Nodus](https://github.com/akraino-edge-stack/icn-nodus) es un complemento de controlador CNI basado en OVN para proveer Service function chaining(SFC) con base nativa para la nube. * [NSX-T](https://docs.vmware.com/en/VMware-NSX-T-Data-Center/index.html) Container Plug-in (NCP) proporciona integraci\u00f3n entre VMware NSX-T y orquestadores de contenedores como Kubernetes, as\u00ed como integraci\u00f3n entre NSX-T y plataformas CaaS/PaaS basadas en contenedores como Pivotal Container Service (PKS) y OpenShift. * [Nuage](https://github.com/nuagenetworks/nuage-kubernetes/blob/v5.1.1-1/docs/kubernetes-1-installation.rst) es una plataforma SDN que proporciona redes basadas en pol\u00edticas entre Kubernetes Pods y entornos no Kubernetes con visibilidad y supervisi\u00f3n de la seguridad. * [Romana](https://github.com/romana) es una soluci\u00f3n de red de capa 3 para las redes de Pods que tambi\u00e9n son compatibles con la API de [NetworkPolicy](/docs/concepts/services-networking/network-policies/). * [Weave Net](https://www.weave.works/docs/net/latest/kubernetes/kube-addon/) proporciona redes y pol\u00edticas de red, funciona en ambos lados de una partici\u00f3n de red y no requiere una base de datos externa. ## Detecci\u00f3n de Servicios * [CoreDNS](https://coredns.io) es un servidor de DNS flexible y extensible que puede [instalarse](https://github.com/coredns/deployment/tree/master/kubernetes) como DNS dentro del cl\u00faster para los Pods. ## Visualizaci\u00f3n y Control * [Dashboard](https://github.com/kubernetes/dashboard#kubernetes-dashboard) es un panel de control con una interfaz web para Kubernetes. * [Weave Scope](https://www.weave.works/documentation/scope-latest-installing/#k8s) es una herramienta para visualizar gr\u00e1ficamente tus contenedores, Pods, Services, etc. Util\u00edcela junto con una [cuenta de Weave Cloud](https://cloud.weave.works/) o aloje la interfaz de usuario usted mismo. ## Infraestructura * [KubeVirt](https://kubevirt.io/user-guide/#/installation/installation) es un complemento para ejecutar m\u00e1quinas virtuales en Kubernetes. Suele ejecutarse en cl\u00fasteres de Bare metal. * El [detector de problemas de nodo](https://github.com/kubernetes/node-problem-detector) se ejecuta en nodos Linux e informa de los problemas del sistema como [Eventos](/docs/reference/kubernetes-api/cluster-resources/event-v1/) o [Condiciones de nodo](/docs/concepts/architecture/nodes/#condition). ## Complementos Antiguos Hay otros complementos documentados como obsoletos en el directorio [cluster/addons](https://git.k8s.io/kubernetes/cluster/addons). Los que mejor mantenimiento tienen deben estar vinculados aqu\u00ed. !PRs son bienvenidos! No newline at end of file", "positive_passages": [{"docid": "doc-en-website-a7d669695782b48e9880ca785375bff6d82509fd22b4de93798454f13ffb3d20", "text": "This is a Feature Request What would you like to be Localize to Spanish Why is this needed There is no Spanish localization for this file. Comments /triage accepted /kind feature /language es /sig docs\n/assign\nGitHub didn't allow me to assign the following users: nilofe. Note that only with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see }} TODO: Add more information about return codes once CRI implementation have checkpoint/restore. This TODO cannot be fixed before the release, because the CRI implementation need the Kubernetes changes to be merged to implement the new CheckpointContainer CRI API the Kubernetes changes to be merged to implement the new ContainerCheckpoint CRI API call. We need to wait after the 1.25 release to fix this. {{< /comment >}}", "positive_passages": [{"docid": "doc-en-website-4b301adbe566d8c6ca397149360665110e3bb31daff9b809296e535c8b83a12e", "text": "Feature Gate ChecpointContainer is unrecognized by kubelet. I've tried to set up a new 1.25 cluster with kubeadm with kubelet config And it fails with I've also tried to set up another cluster without this feature gate and enable it after, and it goes the same. Kubelet is started and checkpoint api is accessible. To reproduce try to install a new cluster with kubeadm v1.25.0 and use next kubelet config Or try to enable this feature gate on already installed 1.25.0 cluster No response }} [cosConfigureHelper]: https://github.com/kubernetes/kubernetes/blob/{{< param \"githubbranch\" >}}/cluster/gce/gci/configure-helper.sh [cosConfigureHelper]: https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/configure-helper.sh ### Logs de componentes do sistema", "positive_passages": [{"docid": "doc-en-website-6ece21b9b066d6d6b5617dce9d256853c6ea1cf4a2f9d94b34bfe9e55d29b5ab", "text": "This is a Bug Report Problem: Regarding , I found the similar broken links on other pages. English pages have already been fixed. ref: pt pages also need to be fixed. Proposed Solution: Fixes broken links including {{< param \"githubbranch\" }} to master. In the case of link to , fixes to {{< param \"fullversion\" }}. ref:\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. [outdated_blog__message] other = \"Ten artyku\u0142 jest starszy ni\u017c rok, wi\u0119c cz\u0119\u015b\u0107 informacji mo\u017ce by\u0107 ju\u017c nieaktualnych. Upewnij si\u0119, \u017ce zawarto\u015b\u0107 tej strony ci\u0105gle jest poprawna.\" [patch_release] other = \"Patch Release\" [post_create_issue] other = \"Zg\u0142o\u015b problem\"", "positive_passages": [{"docid": "doc-en-website-516b27d4334505acafad63912c2292699a6dd2cf94c51042b28b88a309ded93a", "text": "What would you like to be This issue is a follow-up task from displays some English text: ! To replace this text with localized strings, you can update with from . Specifically, these:\n/language pl\n/sig docs\n/triage accepted", "commid": "website_issue_36761", "tokennum": 51}], "negative_passages": []} {"query_id": "q-en-website-0d873fdd81ef355ac4ff1db02d5466e5f5eab210d62f5cc1400b130d6b61b4a2", "query": " --- title: \u542f\u7528\u62d3\u6251\u611f\u77e5\u63d0\u793a content_type: task min-kubernetes-server-version: 1.21 --- {{< feature-state for_k8s_version=\"v1.21\" state=\"alpha\" >}} _\u62d3\u6251\u611f\u77e5\u63d0\u793a_ \u542f\u7528\u5177\u6709\u62d3\u6251\u611f\u77e5\u80fd\u529b\u7684\u8def\u7531\uff0c\u5176\u4e2d\u62d3\u6251\u611f\u77e5\u4fe1\u606f\u5305\u542b\u5728 {{< glossary_tooltip text=\"EndpointSlices\" term_id=\"endpoint-slice\" >}} \u4e2d\u3002 \u6b64\u529f\u80fd\u5c3d\u91cf\u5c06\u6d41\u91cf\u9650\u5236\u5728\u5b83\u7684\u53d1\u8d77\u533a\u57df\u9644\u8fd1\uff1b \u53ef\u4ee5\u964d\u4f4e\u6210\u672c\uff0c\u6216\u8005\u63d0\u9ad8\u7f51\u7edc\u6027\u80fd\u3002 ## {{% heading \"prerequisites\" %}} {{< include \"task-tutorial-prereqs.md\" >}} {{< version-check >}} \u4e3a\u4e86\u542f\u7528\u62d3\u6251\u611f\u77e5\u63d0\u793a\uff0c\u5148\u8981\u6ee1\u8db3\u4ee5\u4e0b\u5148\u51b3\u6761\u4ef6\uff1a * \u914d\u7f6e {{< glossary_tooltip text=\"kube-proxy\" term_id=\"kube-proxy\" >}} \u4ee5 iptables \u6216 IPVS \u6a21\u5f0f\u8fd0\u884c * \u786e\u4fdd\u672a\u7981\u7528 EndpointSlices ## \u542f\u52a8\u62d3\u6251\u611f\u77e5\u63d0\u793a {#enable-topology-aware-hints} \u8981\u542f\u7528\u670d\u52a1\u62d3\u6251\u611f\u77e5\uff0c\u8bf7\u542f\u7528 kube-apiserver\u3001kube-controller-manager\u3001\u548c kube-proxy \u7684 [\u7279\u6027\u95e8\u63a7](/zh/docs/reference/command-line-tools-reference/feature-gates/) `TopologyAwareHints`\u3002 ``` --feature-gates=\"TopologyAwareHints=true\" ``` ## {{% heading \"whatsnext\" %}} * \u53c2\u9605\u9762\u5411\u670d\u52a1\u7684[\u62d3\u6251\u611f\u77e5\u63d0\u793a](/zh/docs/concepts/services-networking/topology-aware-hints) * \u53c2\u9605[\u7528\u670d\u52a1\u8fde\u901a\u5e94\u7528](/zh/docs/concepts/services-networking/connect-applications-service/) ", "positive_passages": [{"docid": "doc-en-website-c39ee55ba0b4cece4bbf57571f6e8923268277ef57bdaa932a5ad6b299eb2e4f", "text": "This is a Feature Request translate /docs/tasks/administer-cluster/enabling-topology-aware- into Chinese. What would you like to be /zh/docs/tasks/administer-cluster/enabling-topology-aware- /language zh /assign\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. ", "positive_passages": [{"docid": "doc-en-website-9469cd9dc186faaf8e0c82bdd9bb3057d622b1958edfc7e52fd6830186f72a18", "text": "This is a Feature Request ### \u7b80\u4ecb {#introduction} kubectl \u7684 Bash \u8865\u5168\u811a\u672c\u53ef\u4ee5\u7528\u547d\u4ee4 `kubectl completion bash` \u751f\u6210\u3002 \u5728 shell \u4e2d\u5bfc\u5165\uff08Sourcing\uff09\u8865\u5168\u811a\u672c\uff0c\u5c06\u542f\u7528 kubectl \u81ea\u52a8\u8865\u5168\u529f\u80fd\u3002 \u7136\u800c\uff0c\u8865\u5168\u811a\u672c\u4f9d\u8d56\u4e8e\u5de5\u5177 [**bash-completion**](https://github.com/scop/bash-completion)\uff0c \u6240\u4ee5\u8981\u5148\u5b89\u88c5\u5b83\uff08\u53ef\u4ee5\u7528\u547d\u4ee4 `type _init_completion` \u68c0\u67e5 bash-completion \u662f\u5426\u5df2\u5b89\u88c5\uff09\u3002 ### \u5b89\u88c5 bash-completion {#install-bash-comletion} \u5f88\u591a\u5305\u7ba1\u7406\u5de5\u5177\u5747\u652f\u6301 bash-completion\uff08\u53c2\u89c1[\u8fd9\u91cc](https://github.com/scop/bash-completion#installation)\uff09\u3002 \u53ef\u4ee5\u901a\u8fc7 `apt-get install bash-completion` \u6216 `yum install bash-completion` \u7b49\u547d\u4ee4\u6765\u5b89\u88c5\u5b83\u3002 \u4e0a\u8ff0\u547d\u4ee4\u5c06\u521b\u5efa\u6587\u4ef6 `/usr/share/bash-completion/bash_completion`\uff0c\u5b83\u662f bash-completion \u7684\u4e3b\u811a\u672c\u3002 \u4f9d\u636e\u5305\u7ba1\u7406\u5de5\u5177\u7684\u5b9e\u9645\u60c5\u51b5\uff0c\u4f60\u9700\u8981\u5728 `~/.bashrc` \u6587\u4ef6\u4e2d\u624b\u5de5\u5bfc\u5165\u6b64\u6587\u4ef6\u3002 \u8981\u67e5\u770b\u7ed3\u679c\uff0c\u8bf7\u91cd\u65b0\u52a0\u8f7d\u4f60\u7684 shell\uff0c\u5e76\u8fd0\u884c\u547d\u4ee4 `type _init_completion`\u3002 \u5982\u679c\u547d\u4ee4\u6267\u884c\u6210\u529f\uff0c\u5219\u8bbe\u7f6e\u5b8c\u6210\uff0c\u5426\u5219\u5c06\u4e0b\u9762\u5185\u5bb9\u6dfb\u52a0\u5230\u6587\u4ef6 `~/.bashrc` \u4e2d\uff1a ```bash source /usr/share/bash-completion/bash_completion ``` \u91cd\u65b0\u52a0\u8f7d shell\uff0c\u518d\u8f93\u5165\u547d\u4ee4 `type _init_completion` \u6765\u9a8c\u8bc1 bash-completion \u7684\u5b89\u88c5\u72b6\u6001\u3002 ### \u542f\u52a8 kubectl \u81ea\u52a8\u8865\u5168\u529f\u80fd {#enable-kubectl-autocompletion} \u4f60\u73b0\u5728\u9700\u8981\u786e\u4fdd\u4e00\u70b9\uff1akubectl \u8865\u5168\u811a\u672c\u5df2\u7ecf\u5bfc\u5165\uff08sourced\uff09\u5230 shell \u4f1a\u8bdd\u4e2d\u3002 \u8fd9\u91cc\u6709\u4e24\u79cd\u9a8c\u8bc1\u65b9\u6cd5\uff1a - \u5728\u6587\u4ef6 `~/.bashrc` \u4e2d\u5bfc\u5165\uff08source\uff09\u8865\u5168\u811a\u672c\uff1a ```bash echo 'source <(kubectl completion bash)' >>~/.bashrc ``` - \u5c06\u8865\u5168\u811a\u672c\u6dfb\u52a0\u5230\u76ee\u5f55 `/etc/bash_completion.d` \u4e2d\uff1a ```bash kubectl completion bash >/etc/bash_completion.d/kubectl ``` \u5982\u679c kubectl \u6709\u5173\u8054\u7684\u522b\u540d\uff0c\u4f60\u53ef\u4ee5\u6269\u5c55 shell \u8865\u5168\u6765\u9002\u914d\u6b64\u522b\u540d\uff1a ```bash echo 'alias k=kubectl' >>~/.bashrc echo 'complete -F __start_kubectl k' >>~/.bashrc ``` {{< note >}} bash-completion \u8d1f\u8d23\u5bfc\u5165 `/etc/bash_completion.d` \u76ee\u5f55\u4e2d\u7684\u6240\u6709\u8865\u5168\u811a\u672c\u3002 {{< /note >}} \u4e24\u79cd\u65b9\u5f0f\u7684\u6548\u679c\u76f8\u540c\u3002\u91cd\u65b0\u52a0\u8f7d shell \u540e\uff0ckubectl \u81ea\u52a8\u8865\u5168\u529f\u80fd\u5373\u53ef\u751f\u6548\u3002 ", "positive_passages": [{"docid": "doc-en-website-b9b97b635b211fcadbcf336461efbdbe8ea320ad06426906ea27434f0027dd35", "text": "This is a Feature Request translate content/docs/tasks/tools/install-kubectl- into Chinese What would you like to be content/zh/docs/tasks/tools/install-kubectl- /assign /language zh\n/triage accepted", "commid": "website_issue_27002", "tokennum": 59}], "negative_passages": []} {"query_id": "q-en-website-178df86120eae6559fae0c7840482e2f7db415b8c83ff991d09dd4ffb3862555", "query": "## \ub17c \uadf8\ub808\uc774\uc2a4\ud480 \ub178\ub4dc \uc167\ub2e4\uc6b4 {#non-graceful-node-shutdown} {{< feature-state state=\"alpha\" for_k8s_version=\"v1.24\" >}} {{< feature-state state=\"beta\" for_k8s_version=\"v1.26\" >}} \uc804\ub2ec\ud55c \uba85\ub839\uc774 kubelet\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 \uae08\uc9c0 \uc7a0\uae08 \uba54\ucee4\ub2c8\uc998(inhibitor locks mechanism)\uc744 \ud2b8\ub9ac\uac70\ud558\uc9c0 \uc54a\uac70\ub098, \ub610\ub294 \uc0ac\uc6a9\uc790 \uc624\ub958(\uc608: ShutdownGracePeriod \ubc0f ShutdownGracePeriodCriticalPods\uac00 \uc81c\ub300\ub85c \uc124\uc815\ub418\uc9c0 \uc54a\uc74c)\ub85c \uc778\ud574", "positive_passages": [{"docid": "doc-en-website-e289f12cb15adfa0293a068568f23c493a89351509b05ae38d842a04488feb5c", "text": "This is a Feature Request Korean Localization for branch. What would you like to be Any localization contributions for Korean. Comments This issue is to notify the schedule of Korean localization to contributors. is the current work branch for Korean localization. Important dates A Korean localization work branch is merged to branch after we complete around 3~4 weeks job. PR Freeze: 01/16 (PR opened after freeze will be requested to rebase to next work branch) Branch Merge: 01/19 (merge to main branch) 2~3 , main . PR : 01/16 ( PR , PR ) : 01/19 (main , k8s.io ) /language ko /help\nThis request has been marked as needing help from a contributor. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. --- layout: blog title: \"Kubernetes 1.24: \u8282\u70b9\u975e\u4f53\u9762\u5173\u95ed\u7279\u6027\u8fdb\u5165 Alpha \u9636\u6bb5\" date: 2022-05-20 slug: kubernetes-1-24-non-graceful-node-shutdown-alpha --- **\u4f5c\u8005**\uff1aXing Yang \u548c Yassine Tijani (VMware) Kubernetes v1.24 \u5f15\u5165\u4e86\u5bf9[\u8282\u70b9\u975e\u4f53\u9762\u5173\u95ed](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/2268-non-graceful-shutdown) \uff08Non-Graceful Node Shutdown\uff09\u7684 Alpha \u652f\u6301\u3002 \u6b64\u7279\u6027\u5141\u8bb8\u6709\u72b6\u6001\u5de5\u4f5c\u8d1f\u8f7d\u5728\u539f\u8282\u70b9\u5173\u95ed\u6216\u5904\u4e8e\u4e0d\u53ef\u6062\u590d\u72b6\u6001\uff08\u5982\u786c\u4ef6\u6545\u969c\u6216\u64cd\u4f5c\u7cfb\u7edf\u635f\u574f\uff09\u540e\uff0c\u6545\u969c\u8f6c\u79fb\u5230\u4e0d\u540c\u7684\u8282\u70b9\u3002 ## \u8fd9\u4e0e\u8282\u70b9\u4f53\u9762\u5173\u95ed\u6709\u4f55\u4e0d\u540c \u4f60\u53ef\u80fd\u542c\u8bf4\u8fc7 Kubernetes \u7684[\u8282\u70b9\u4f53\u9762\u5173\u95ed](/zh-cn/docs/concepts/architecture/nodes/#graceful-node-shutdown)\u7279\u6027\uff0c \u5e76\u4e14\u60f3\u77e5\u9053\u8282\u70b9\u975e\u4f53\u9762\u5173\u95ed\u7279\u6027\u4e0e\u4e4b\u6709\u4f55\u4e0d\u540c\u3002\u8282\u70b9\u4f53\u9762\u5173\u95ed\u5141\u8bb8 Kubernetes \u68c0\u6d4b\u8282\u70b9\u4f55\u65f6\u5b8c\u5168\u5173\u95ed\uff0c\u5e76\u9002\u5f53\u5730\u5904\u7406\u8fd9\u79cd\u60c5\u51b5\u3002 \u53ea\u6709\u5f53 kubelet \u5728\u5b9e\u9645\u5173\u95ed\u4e4b\u524d\u68c0\u6d4b\u5230\u8282\u70b9\u5173\u95ed\u52a8\u4f5c\u65f6\uff0c\u8282\u70b9\u5173\u95ed\u624d\u662f\u201c\u4f53\u9762\uff08graceful\uff09\u201d\u7684\u3002 \u4f46\u662f\uff0c\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0ckubelet \u53ef\u80fd\u68c0\u6d4b\u4e0d\u5230\u8282\u70b9\u5173\u95ed\u64cd\u4f5c\u3002 \u8fd9\u53ef\u80fd\u662f\u56e0\u4e3a shutdown \u547d\u4ee4\u6ca1\u6709\u89e6\u53d1 kubelet \u6240\u4f9d\u8d56\u7684 systemd \u6291\u5236\u9501\u673a\u5236\uff0c \u6216\u8005\u662f\u56e0\u4e3a\u914d\u7f6e\u9519\u8bef\uff08`ShutdownGracePeriod` \u548c `ShutdownGracePeriodCriticalPods` \u914d\u7f6e\u4e0d\u6b63\u786e\uff09\u3002 \u8282\u70b9\u4f53\u9762\u5173\u95ed\u4f9d\u8d56\u4e8e\u7279\u5b9a Linux \u7684\u652f\u6301\u3002 kubelet \u4e0d\u76d1\u89c6 Windows \u8282\u70b9\u4e0a\u5373\u5c06\u5173\u95ed\u7684\u60c5\u51b5\uff08\u8fd9\u53ef\u80fd\u5728\u672a\u6765\u7684 Kubernetes \u7248\u672c\u4e2d\u4f1a\u6709\u6240\u6539\u53d8\uff09\u3002 \u5f53\u4e00\u4e2a\u8282\u70b9\u88ab\u5173\u95ed\u4f46 kubelet \u6ca1\u6709\u68c0\u6d4b\u5230\u65f6\uff0c\u8be5\u8282\u70b9\u4e0a\u7684 Pod \u4e5f\u4f1a\u975e\u4f53\u9762\u5730\u5173\u95ed\u3002 \u5bf9\u4e8e\u65e0\u72b6\u6001\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u901a\u5e38\u4e0d\u662f\u95ee\u9898\uff08\u4e00\u65e6\u96c6\u7fa4\u68c0\u6d4b\u5230\u53d7\u5f71\u54cd\u7684\u8282\u70b9\u6216 Pod \u51fa\u73b0\u6545\u969c\uff0cReplicaSet \u5c31\u4f1a\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684 Pod\uff09\u3002 \u5bf9\u4e8e\u6709\u72b6\u6001\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u60c5\u51b5\u8981\u590d\u6742\u5f97\u591a\u3002\u5982\u679c\u4f60\u4f7f\u7528\u4e00\u4e2a StatefulSet\uff0c \u5e76\u4e14\u8be5 StatefulSet \u4e2d\u7684\u4e00\u4e2a Pod \u5728\u67d0\u4e2a\u8282\u70b9\u4e0a\u53d1\u751f\u4e86\u4e0d\u5e72\u51c0\u6545\u969c\uff0c\u5219\u8be5\u53d7\u5f71\u54cd\u7684 Pod \u5c06\u88ab\u6807\u8bb0\u4e3a\u7ec8\u6b62\uff08Terminating\uff09\uff1b StatefulSet \u65e0\u6cd5\u521b\u5efa\u66ff\u6362 Pod\uff0c\u56e0\u4e3a\u8be5 Pod \u4ecd\u5b58\u5728\u4e8e\u96c6\u7fa4\u4e2d\u3002 \u56e0\u6b64\uff0c\u5728 StatefulSet \u4e0a\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u53ef\u80fd\u4f1a\u964d\u7ea7\u751a\u81f3\u79bb\u7ebf\u3002 \u5982\u679c\u5df2\u5173\u95ed\u7684\u539f\u8282\u70b9\u518d\u6b21\u51fa\u73b0\uff0c\u8be5\u8282\u70b9\u4e0a\u7684 kubelet \u4f1a\u6267\u884c\u62a5\u5230\u64cd\u4f5c\uff0c\u5220\u9664\u73b0\u6709\u7684 Pod\uff0c \u5e76\u4e14\u63a7\u5236\u5e73\u9762\u4f1a\u5728\u4e0d\u540c\u7684\u8fd0\u884c\u8282\u70b9\u4e0a\u4e3a\u8be5 StatefulSet \u751f\u6210\u4e00\u4e2a\u66ff\u6362 Pod\u3002 \u5982\u679c\u539f\u8282\u70b9\u51fa\u73b0\u6545\u969c\u5e76\u4e14\u6ca1\u6709\u6062\u590d\uff0c\u8fd9\u4e9b\u6709\u72b6\u6001\u7684 Pod \u5c06\u5904\u4e8e\u7ec8\u6b62\u72b6\u6001\u4e14\u65e0\u9650\u671f\u5730\u505c\u7559\u5728\u8be5\u6545\u969c\u8282\u70b9\u4e0a\u3002 ``` $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES web-0 1/1 Running 0 100m 10.244.2.4 k8s-node-876-1639279816 web-1 1/1 Terminating 0 100m 10.244.1.3 k8s-node-433-1639279804 ``` ## \u5c1d\u8bd5\u65b0\u7684\u975e\u4f53\u9762\u5173\u95ed\u5904\u7406 \u8981\u4f7f\u7528\u8282\u70b9\u975e\u4f53\u9762\u5173\u95ed\u5904\u7406\uff0c\u4f60\u5fc5\u987b\u4e3a `kube-controller-manager` \u7ec4\u4ef6\u542f\u7528 `NodeOutOfServiceVolumeDetach` [\u7279\u6027\u95e8\u63a7](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)\u3002 \u5728\u8282\u70b9\u5173\u95ed\u7684\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u4ee5\u624b\u52a8\u4e3a\u8be5\u8282\u70b9\u6807\u8bb0\u6c61\u70b9\uff0c\u6807\u793a\u5176\u5df2\u505c\u6b62\u670d\u52a1\u3002 \u5728\u6dfb\u52a0\u6c61\u70b9\u4e4b\u524d\uff0c\u4f60\u5e94\u8be5\u786e\u4fdd\u8282\u70b9\u786e\u5b9e\u5173\u95ed\u4e86\uff08\u4e0d\u662f\u5728\u91cd\u542f\u8fc7\u7a0b\u4e2d\uff09\u3002 \u4f60\u53ef\u4ee5\u5728\u53d1\u751f\u4e86\u8282\u70b9\u5173\u95ed\u4e8b\u4ef6\uff0c\u4e14\u8be5\u4e8b\u4ef6\u6ca1\u6709\u88ab kubelet \u63d0\u524d\u68c0\u6d4b\u548c\u5904\u7406\u7684\u60c5\u51b5\u4e0b\uff0c\u5728\u8282\u70b9\u5173\u95ed\u4e4b\u540e\u6dfb\u52a0\u6c61\u70b9\uff1b \u4f60\u53ef\u4ee5\u4f7f\u7528\u8be5\u6c61\u70b9\u7684\u53e6\u4e00\u79cd\u60c5\u51b5\u662f\u5f53\u8282\u70b9\u7531\u4e8e\u786c\u4ef6\u6545\u969c\u6216\u64cd\u4f5c\u7cfb\u7edf\u635f\u574f\u800c\u5904\u4e8e\u4e0d\u53ef\u6062\u590d\u72b6\u6001\u65f6\u3002 \u4f60\u53ef\u4ee5\u4e3a\u8be5\u6c61\u70b9\u8bbe\u7f6e\u7684\u503c\u662f `node.kubernetes.io/out-of-service=nodeshutdown: \"NoExecute\"` \u6216 `node.kubernetes.io/out-of-service=nodeshutdown: \"NoSchedule\"`\u3002 \u5982\u679c\u4f60\u5df2\u7ecf\u542f\u7528\u4e86\u524d\u9762\u63d0\u5230\u7684\u7279\u6027\u95e8\u63a7\uff0c\u5728\u8282\u70b9\u4e0a\u8bbe\u7f6e out-of-service \u6c61\u70b9\u610f\u5473\u7740\u8282\u70b9\u4e0a\u7684 Pod \u5c06\u88ab\u5220\u9664\uff0c \u9664\u975e Pod \u4e0a\u8bbe\u7f6e\u6709\u4e0e\u4e4b\u5339\u914d\u7684\u5bb9\u5fcd\u5ea6\u3002\u539f\u6765\u6302\u63a5\u5230\u5df2\u5173\u95ed\u8282\u70b9\u7684\u6301\u4e45\u5377\uff08Persistent volume\uff09\u5c06\u88ab\u89e3\u9664\u6302\u63a5\uff0c \u5bf9\u4e8e StatefulSet\uff0c\u7cfb\u7edf\u5c06\u5728\u4e0d\u540c\u7684\u8fd0\u884c\u8282\u70b9\u4e0a\u6210\u529f\u521b\u5efa\u66ff\u6362 Pod\u3002 ``` $ kubectl taint nodes node.kubernetes.io/out-of-service=nodeshutdown:NoExecute $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES web-0 1/1 Running 0 150m 10.244.2.4 k8s-node-876-1639279816 web-1 1/1 Running 0 10m 10.244.1.7 k8s-node-433-1639279804 ``` \u6ce8\u610f\uff1a\u5728\u5e94\u7528 out-of-service \u6c61\u70b9\u4e4b\u524d\uff0c\u4f60**\u5fc5\u987b**\u786e\u8ba4\u8282\u70b9\u662f\u5426\u5df2\u7ecf\u5904\u4e8e\u5173\u95ed\u6216\u65ad\u7535\u72b6\u6001\uff08\u4e0d\u662f\u5728\u91cd\u65b0\u542f\u52a8\u8fc7\u7a0b\u4e2d\uff09\uff0c \u8282\u70b9\u5173\u95ed\u7684\u539f\u56e0\u53ef\u80fd\u662f\u7528\u6237\u6709\u610f\u5c06\u5176\u5173\u95ed\uff0c\u4e5f\u53ef\u80fd\u662f\u8282\u70b9\u7531\u4e8e\u786c\u4ef6\u6545\u969c\u3001\u64cd\u4f5c\u7cfb\u7edf\u95ee\u9898\u7b49\u800c\u5173\u95ed\u3002 \u4e00\u65e6\u5173\u8054\u5230\u65e0\u6cd5\u63d0\u4f9b\u670d\u52a1\u7684\u8282\u70b9\u7684\u6240\u6709\u5de5\u4f5c\u8d1f\u8f7d Pod \u90fd\u88ab\u79fb\u52a8\u5230\u65b0\u7684\u8fd0\u884c\u4e2d\u7684\u8282\u70b9\uff0c\u5e76\u4e14\u5173\u95ed\u4e86\u7684\u8282\u70b9\u4e5f\u5df2\u6062\u590d\uff0c \u4f60\u5e94\u8be5\u5728\u8282\u70b9\u6062\u590d\u540e\u5220\u9664\u53d7\u5f71\u54cd\u8282\u70b9\u4e0a\u7684\u6c61\u70b9\u3002\u5982\u679c\u4f60\u77e5\u9053\u8be5\u8282\u70b9\u4e0d\u4f1a\u6062\u590d\u670d\u52a1\uff0c\u5219\u53ef\u4ee5\u6539\u4e3a\u4ece\u96c6\u7fa4\u4e2d\u5220\u9664\u8be5\u8282\u70b9\u3002 ## \u4e0b\u4e00\u6b65\u662f\u4ec0\u4e48\uff1f \u6839\u636e\u53cd\u9988\u548c\u91c7\u7528\u60c5\u51b5\uff0cKubernetes \u56e2\u961f\u8ba1\u5212\u5728 1.25 \u6216 1.26 \u7248\u672c\u4e2d\u5c06\u8282\u70b9\u975e\u4f53\u9762\u5173\u95ed\u5b9e\u73b0\u63a8\u9001\u5230 Beta \u9636\u6bb5\u3002 \u6b64\u529f\u80fd\u9700\u8981\u7528\u6237\u624b\u52a8\u5411\u8282\u70b9\u6dfb\u52a0\u6c61\u70b9\u4ee5\u89e6\u53d1\u5de5\u4f5c\u8d1f\u8f7d\u6545\u969c\u8f6c\u79fb\uff0c\u5e76\u8981\u6c42\u7528\u6237\u5728\u8282\u70b9\u6062\u590d\u540e\u79fb\u9664\u6c61\u70b9\u3002 \u672a\u6765\uff0c\u6211\u4eec\u8ba1\u5212\u5bfb\u627e\u65b9\u6cd5\u6765\u81ea\u52a8\u68c0\u6d4b\u548c\u9694\u79bb\u5df2\u5173\u95ed\u7684\u6216\u5df2\u5931\u8d25\u7684\u8282\u70b9\uff0c\u5e76\u81ea\u52a8\u5c06\u5de5\u4f5c\u8d1f\u8f7d\u6545\u969c\u8f6c\u79fb\u5230\u53e6\u4e00\u4e2a\u8282\u70b9\u3002 ## \u600e\u6837\u624d\u80fd\u4e86\u89e3\u66f4\u591a\uff1f \u67e5\u770b\u8282\u70b9\u975e\u4f53\u9762\u5173\u95ed\u76f8\u5173[\u6587\u6863](/zh-cn/docs/concepts/architecture/nodes/#non-graceful-node-shutdown)\u3002 ## \u5982\u4f55\u53c2\u4e0e\uff1f \u6b64\u529f\u80fd\u7279\u6027\u7531\u6765\u5df2\u4e45\u3002Yassine Tijani\uff08[yastij](https://github.com/yastij)\uff09\u5728\u4e24\u5e74\u591a\u524d\u542f\u52a8\u4e86\u8fd9\u4e2a KEP\u3002 Xing Yang\uff08[xing-yang](https://github.com/xing-yang)\uff09\u7ee7\u7eed\u63a8\u52a8\u8fd9\u9879\u5de5\u4f5c\u3002 SIG-Storage\u3001SIG-Node \u548c API \u8bc4\u5ba1\u4eba\u5458\u4eec\u8fdb\u884c\u4e86\u591a\u6b21\u8ba8\u8bba\uff0c\u4ee5\u786e\u5b9a\u8bbe\u8ba1\u7ec6\u8282\u3002 Ashutosh Kumar\uff08[sonasingh46](https://github.com/sonasingh46)\uff09 \u5b8c\u6210\u4e86\u5927\u90e8\u5206\u5b9e\u73b0\u5e76\u5728 Kubernetes 1.24 \u7248\u672c\u4e2d\u5c06\u5176\u5f15\u8fdb\u5230 Alpha \u9636\u6bb5\u3002 \u6211\u4eec\u8981\u611f\u8c22\u4ee5\u4e0b\u4eba\u5458\u7684\u8bc4\u5ba1\uff1aTim Hockin\uff08[thockin](https://github.com/thockin)\uff09\u5bf9\u8bbe\u8ba1\u7684\u6307\u5bfc\uff1b \u6765\u81ea SIG-Storage \u7684 Jing Xu\uff08[jingxu97](https://github.com/jingxu97)\uff09\u3001 Hemant Kumar\uff08[gnufied](https://github.com/gnufied)\uff09 \u548c Michelle Au\uff08[msau42](https://github.com/msau42)\uff09\u7684\u8bc4\u8bba\uff1b \u4ee5\u53ca Mrunal Patel\uff08[mrunalp](https://github.com/mrunalp)\uff09\u3001 David Porter\uff08[bobbypage](https://github.com/bobbypage)\uff09\u3001 Derek Carr\uff08[derekwaynecarr](https://github.com/derekwaynecarr)\uff09 \u548c Danielle Endocrimes\uff08[endocrimes](https://github.com/endocrimes)\uff09\u6765\u81ea SIG-Node \u65b9\u9762\u7684\u8bc4\u8bba\u3002 \u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u6709\u5f88\u591a\u4eba\u5e2e\u52a9\u5ba1\u67e5\u4e86\u8bbe\u8ba1\u548c\u5b9e\u73b0\u3002\u6211\u4eec\u8981\u611f\u8c22\u6240\u6709\u4e3a\u6b64\u505a\u51fa\u8d21\u732e\u7684\u4eba\uff0c \u5305\u62ec\u5728\u8fc7\u53bb\u51e0\u5e74\u4e2d\u5ba1\u6838 [KEP](https://github.com/kubernetes/enhancements/pull/1116) \u548c\u5b9e\u73b0\u7684\u5927\u7ea6 30 \u4eba\u3002 \u6b64\u7279\u6027\u662f SIG-Storage \u548c SIG-Node \u4e4b\u95f4\u7684\u534f\u4f5c\u3002 \u5bf9\u4e8e\u90a3\u4e9b\u6709\u5174\u8da3\u53c2\u4e0e Kubernetes Storage \u7cfb\u7edf\u4efb\u4f55\u90e8\u5206\u7684\u8bbe\u8ba1\u548c\u5f00\u53d1\u7684\u4eba\uff0c \u8bf7\u52a0\u5165 [Kubernetes \u5b58\u50a8\u7279\u522b\u5174\u8da3\u5c0f\u7ec4](https://github.com/kubernetes/community/tree/master/sig-storage)\uff08SIG-Storage\uff09\u3002 \u5bf9\u4e8e\u90a3\u4e9b\u6709\u5174\u8da3\u53c2\u4e0e\u652f\u6301 Pod \u548c\u4e3b\u673a\u8d44\u6e90\u4e4b\u95f4\u53d7\u63a7\u4ea4\u4e92\u7684\u7ec4\u4ef6\u7684\u8bbe\u8ba1\u548c\u5f00\u53d1\u7684\u4eba\uff0c \u8bf7\u52a0\u5165 [Kubernetes Node SIG](https://github.com/kubernetes/community/tree/master/sig-node)\u3002 ", "positive_passages": [{"docid": "doc-en-website-78c363ef7795f1fa169a9476645678596b6a053c229ec3767851377cf2fae547", "text": "This is a Feature Request This page blog/2022-05-20-non-graceful-node- has no Chinese version What would you like to be Translate Chinese version for blog/2022-05-20-non-graceful-node- Comments /language zh /assign\n/triage accepted", "commid": "website_issue_35774", "tokennum": 62}], "negative_passages": []} {"query_id": "q-en-website-186f16d60a9b5b64b1bbe8e0d6abf1bdde8d6bac268d8647e3731274151fd76f", "query": "\u2022 [VirtualBox](https://www.virtualbox.org/wiki/Downloads) {{< note >}} minikube\u306f\u3001VM\u3067\u306f\u306a\u304f\u30db\u30b9\u30c8\u3067Kubernetes\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u5b9f\u884c\u3059\u308b`--vm-driver=none`\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 Minikube\u306f\u3001VM\u3067\u306f\u306a\u304f\u30db\u30b9\u30c8\u3067Kubernetes\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u5b9f\u884c\u3059\u308b`--vm-driver=none`\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001[Docker](https://www.docker.com/products/docker-desktop)\u3068Linux\u74b0\u5883\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u306f\u4e0d\u8981\u3067\u3059\u3002 none\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001[Docker](https://www.docker.com/products/docker-desktop)\u304b\u3089docker\u306eapt\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002 docker\u306esnap\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001minikube\u3067\u306f\u6a5f\u80fd\u3057\u307e\u305b\u3093\u3002 {{< /note >}} Debian\u7cfb\u306eLinux\u3067`none`\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001snap\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u306f\u306a\u304f`.deb`\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u7528\u3057\u3066Docker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002snap\u30d1\u30c3\u30b1\u30fc\u30b8\u306fMinikube\u3067\u306f\u6a5f\u80fd\u3057\u307e\u305b\u3093\u3002 [Docker](https://www.docker.com/products/docker-desktop)\u304b\u3089`.deb`\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002 {{< caution >}} `none` VM\u30c9\u30e9\u30a4\u30d0\u30fc\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u30c7\u30fc\u30bf\u640d\u5931\u306e\u554f\u984c\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 `--vm-driver=none`\u3092\u4f7f\u7528\u3059\u308b\u524d\u306b\u3001\u8a73\u7d30\u306b\u3064\u3044\u3066[\u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8](https://minikube.sigs.k8s.io/docs/reference/drivers/none/) \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 {{< /caution >}} Minikube\u306fDocker\u30c9\u30e9\u30a4\u30d0\u30fc\u3068\u4f3c\u305f\u3088\u3046\u306a`vm-driver=podman`\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002Podman\u3092\u7279\u6a29\u30e6\u30fc\u30b6\u30fc\u6a29\u9650(root user)\u3067\u5b9f\u884c\u3059\u308b\u3053\u3068\u306f\u3001\u30b3\u30f3\u30c6\u30ca\u304c\u30b7\u30b9\u30c6\u30e0\u4e0a\u306e\u5229\u7528\u53ef\u80fd\u306a\u6a5f\u80fd\u3078\u5b8c\u5168\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u6700\u3082\u3088\u3044\u65b9\u6cd5\u3067\u3059\u3002 {{< caution >}} `podman` \u30c9\u30e9\u30a4\u30d0\u30fc\u306f\u3001root\u3067\u30b3\u30f3\u30c6\u30ca\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u901a\u5e38\u306e\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u3001\u30b3\u30f3\u30c6\u30ca\u306e\u5b9f\u884c\u306b\u5fc5\u8981\u3068\u3055\u308c\u308b\u3059\u3079\u3066\u306eOS\u6a5f\u80fd\u3078\u306e\u5b8c\u5168\u306a\u30a2\u30af\u30bb\u30b9\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u305f\u3081\u3067\u3059\u3002 {{< /caution >}} ### \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5229\u7528\u3057\u305fMinikube\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb", "positive_passages": [{"docid": "doc-en-website-811c037c136209d9690f80fd6d2f591c46daeaecb249412503292caf69b2e117", "text": "This is a Feature Request In Kubernetes, some objects are *owners* of other objects. For example, a {{}} is the owner of a set of Pods. These owned objects are *dependents* In Kubernetes, some {{< glossary_tooltip text=\"objects\" term_id=\"Object\" >}} are *owners* of other objects. For example, a {{}} is the owner of a set of {{}}. These owned objects are *dependents* of their owner. Ownership is different from the [labels and selectors](/docs/concepts/overview/working-with-objects/labels/) mechanism that some resources also use. For example, consider a Service that creates `EndpointSlice` objects. The Service uses labels to allow the control plane to creates `EndpointSlice` objects. The Service uses {{}} to allow the control plane to determine which `EndpointSlice` objects are used for that Service. In addition to the labels, each `EndpointSlice` that is managed on behalf of a Service has an owner reference. Owner references help different parts of Kubernetes avoid", "positive_passages": [{"docid": "doc-en-website-418bae61b4c8db9d2545fb3261286fd392e45f1529f978dd7b9e12daa3f6d13b", "text": "This is a Feature Request What would you like to be There are terms that can use the addition of a glossary tooltip to show the meaning of the said term. Some terms can add into What's next section like: ReplicaSets, DaemonSets, Deployments, Jobs and CronJobs, and ReplicationControllers. Why is this needed This will enhance user experience and bring more clarity and less confusion. Comments Page to update:\n/sig docs /language en /assign\nThis issue is fixed here .\nIMO this is an acceptable change but I'd like another org member to chime in\n/triage accepted\nHi Thanks for sharing your feedback and triage accepted.", "commid": "website_issue_38136", "tokennum": 143}], "negative_passages": []} {"query_id": "q-en-website-241ddd6e74b6b2c54a0452efff3fbb069ace3545585191984cd4d368694b17a4", "query": "Issues should be sorted into different buckets of work using the following labels and definitions. If an issue doesn't have enough information to identify a problem that can be researched, reviewed, or worked on (i.e. the issue doesn't fit into any of the categories below) you should close the issue with a comment explaining why it is being closed. ### Needs Clarification * Issues that need more information from the original submitter to make them actionable. Issues with this label that aren't followed up within a week may be closed. * Issues that need more information from the original submitter to make them actionable. Issues with this label that aren't followed up within a week may be closed. ### Actionable * Issues that can be worked on with current information (or may need a comment to explain what needs to be done to make it more clear)", "positive_passages": [{"docid": "doc-en-website-eaa8bf0bfeed07bdd2b4831affb0ead19d8d687ec85a495f603a2d26df3db476", "text": " \u3057\u3070\u3057\u3070\u5206\u6563\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u5171\u6709\u30ea\u30bd\u30fc\u30b9\u3092\u30ed\u30c3\u30af\u3057\u305f\u308a\u30ce\u30fc\u30c9\u9593\u306e\u6d3b\u52d5\u3092\u8abf\u6574\u3059\u308b\u6a5f\u69cb\u3068\u3057\u3066\"\u30ea\u30fc\u30b9\"\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002 Kubernetes\u3067\u306f\u3001\"\u30ea\u30fc\u30b9\"\u306e\u30b3\u30f3\u30bb\u30d7\u30c8\u306f`coordination.k8s.io`API\u30b0\u30eb\u30fc\u30d7\u306e`Lease`\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u8868\u3055\u308c\u3066\u3044\u3066\u3001\u30ce\u30fc\u30c9\u306e\u30cf\u30fc\u30c8\u30d3\u30fc\u30c8\u3084\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30ec\u30d9\u30eb\u306e\u30ea\u30fc\u30c0\u30fc\u9078\u51fa\u3068\u3044\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u306b\u3068\u3063\u3066\u91cd\u8981\u306a\u6a5f\u80fd\u306b\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 ## \u30ce\u30fc\u30c9\u30cf\u30fc\u30c8\u30d3\u30fc\u30c8 Kubernetes\u3067\u306f\u3001kubelet\u306e\u30ce\u30fc\u30c9\u30cf\u30fc\u30c8\u30d3\u30fc\u30c8\u3092Kubernetes API\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3059\u308b\u306e\u306bLease API\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002 \u5404`Node`\u3054\u3068\u306b\u3001`kube-node-lease`\u540d\u524d\u7a7a\u9593\u306b\u30ce\u30fc\u30c9\u3068\u30de\u30c3\u30c1\u3059\u308b\u540d\u524d\u306e`Lease`\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5b58\u5728\u3057\u307e\u3059\u3002 \u5185\u90e8\u7684\u306b\u306f\u3001kubelet\u306e\u30cf\u30fc\u30c8\u30d3\u30fc\u30c8\u306f\u3053\u306e`Lease`\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3059\u308bUPDATE\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u3042\u308a\u3001Lease\u306e`spec.renewTime`\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059\u3002 Kubernetes\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u306f\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u898b\u3066\u3001`Node`\u304c\u5229\u7528\u53ef\u80fd\u304b\u3092\u5224\u65ad\u3057\u3066\u3044\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f[Node Lease\u30aa\u30d6\u30b8\u30a7\u30af\u30c8](/ja/docs/concepts/architecture/nodes/#heartbeats)\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 ## \u30ea\u30fc\u30c0\u30fc\u9078\u51fa Kubernetes\u3067\u306f\u3001\u3042\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u5e38\u306b\u4e00\u3064\u3060\u3051\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306b\u3082\u30ea\u30fc\u30b9\u304c\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306f`kube-controller-manager`\u3084`kube-scheduler`\u3068\u3044\u3063\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u3001\u4e00\u3064\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u307f\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u5b9f\u884c\u3055\u308c\u3001\u305d\u306e\u4ed6\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30b9\u30bf\u30f3\u30d0\u30a4\u72b6\u614b\u3068\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u306a\u5197\u9577\u69cb\u6210\u3092\u7d44\u3080\u305f\u3081\u306b\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 ## API\u30b5\u30fc\u30d0\u30fc\u306e\u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\u30fc {{< feature-state for_k8s_version=\"v1.26\" state=\"beta\" >}} Kubernetes v1.26\u304b\u3089\u3001\u5404`kube-apiserver`\u306fLease API\u3092\u5229\u7528\u3057\u3066\u81ea\u8eab\u306e\u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\u30fc\u3092\u305d\u306e\u4ed6\u306e\u30b7\u30b9\u30c6\u30e0\u306b\u5411\u3051\u3066\u516c\u958b\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u305d\u308c\u81ea\u4f53\u306f\u7279\u306b\u6709\u7528\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u4f55\u53f0\u306e`kube-apiserver`\u304cKubernetes\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u3092\u7a3c\u50cd\u3055\u305b\u3066\u3044\u308b\u306e\u304b\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u77e5\u308b\u305f\u3081\u306e\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 kube-apiserver\u30ea\u30fc\u30b9\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u3067\u3001\u5404kube-apiserver\u9593\u306e\u8abf\u6574\u304c\u5fc5\u8981\u3068\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u5c06\u6765\u306e\u6a5f\u80fd\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 `kube-system`\u540d\u524d\u7a7a\u9593\u306e`kube-apiserver-`\u3068\u3044\u3046\u540d\u524d\u306e\u30ea\u30fc\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3067\u3001\u5404kube-apiserver\u304c\u6240\u6709\u3057\u3066\u3044\u308bLease\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u307e\u305f\u3001`k8s.io/component=kube-apiserver`\u30e9\u30d9\u30eb\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 ```shell $ kubectl -n kube-system get lease -l k8s.io/component=kube-apiserver NAME HOLDER AGE kube-apiserver-c4vwjftbvpc5os2vvzle4qg27a kube-apiserver-c4vwjftbvpc5os2vvzle4qg27a_9cbf54e5-1136-44bd-8f9a-1dcd15c346b4 5m33s kube-apiserver-dz2dqprdpsgnm756t5rnov7yka kube-apiserver-dz2dqprdpsgnm756t5rnov7yka_84f2a85d-37c1-4b14-b6b9-603e62e4896f 4m23s kube-apiserver-fyloo45sdenffw2ugwaz3likua kube-apiserver-fyloo45sdenffw2ugwaz3likua_c5ffa286-8a9a-45d4-91e7-61118ed58d2e 4m43s ``` \u30ea\u30fc\u30b9\u306e\u540d\u524d\u306b\u4f7f\u308f\u308c\u3066\u3044\u308bSHA256\u30cf\u30c3\u30b7\u30e5\u306fkube-apiserver\u306eOS\u30db\u30b9\u30c8\u540d\u306b\u57fa\u3065\u3044\u3066\u3044\u307e\u3059\u3002\u5404kube-apiserver\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u3067\u4e00\u610f\u306a\u30db\u30b9\u30c8\u540d\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u69cb\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u540c\u3058\u30db\u30b9\u30c8\u540d\u3092\u5229\u7528\u3059\u308b\u65b0\u3057\u3044kube-apiserver\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u3001\u65b0\u3057\u3044\u30ea\u30fc\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u305b\u305a\u306b\u3001\u65e2\u5b58\u306eLease\u3092\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\u30fc\u3092\u5229\u7528\u3057\u3066\u5f15\u304d\u7d99\u304e\u307e\u3059\u3002 kube-apiserver\u304c\u4f7f\u7528\u3059\u308b\u30db\u30b9\u30c8\u540d\u306f`kubernetes.io/hostname`\u30e9\u30d9\u30eb\u306e\u5024\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002 ```shell $ kubectl -n kube-system get lease kube-apiserver-c4vwjftbvpc5os2vvzle4qg27a -o yaml ``` ```yaml apiVersion: coordination.k8s.io/v1 kind: Lease metadata: creationTimestamp: \"2022-11-30T15:37:15Z\" labels: k8s.io/component: kube-apiserver kubernetes.io/hostname: kind-control-plane name: kube-apiserver-c4vwjftbvpc5os2vvzle4qg27a namespace: kube-system resourceVersion: \"18171\" uid: d6c68901-4ec5-4385-b1ef-2d783738da6c spec: holderIdentity: kube-apiserver-c4vwjftbvpc5os2vvzle4qg27a_9cbf54e5-1136-44bd-8f9a-1dcd15c346b4 leaseDurationSeconds: 3600 renewTime: \"2022-11-30T18:04:27.912073Z\" ``` \u3059\u3067\u306b\u5b58\u5728\u3057\u306a\u304f\u306a\u3063\u305fkube-apiserver\u306e\u671f\u9650\u5207\u308c\u30ea\u30fc\u30b9\u306f\u30011\u6642\u9593\u5f8c\u306b\u65b0\u3057\u3044kube-apiserver\u306b\u3088\u3063\u3066\u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3055\u308c\u307e\u3059\u3002 ", "positive_passages": [{"docid": "doc-en-website-543dce49c6cc8577a079b662afca34ab8deb7b8443227c66d6a4c8ffc4bbe640", "text": "This is a Feature Request **\u4f5c\u8005**\uff1aBob Killen (Google)\u3001Davanum Srinivas (AWS)\u3001Chris Short (AWS)\u3001Frederico Mu\u00f1oz (SAS Institute)\u3001Tim Bannister (The Scale Factory)\u3001Ricky Sadowski (AWS)\u3001Grace Nguyen (Expo)\u3001Mahamed Ali (Rackspace Technology)\u3001Mars Toktonaliev\uff08\u72ec\u7acb\u4e2a\u4eba\uff09\u3001Laura Santamaria (Dell)\u3001Kat Cosgrove (Dell) **\u8bd1\u8005**\uff1aMichael Yao (DaoCloud) 3 \u6708 20 \u65e5\u661f\u671f\u4e00\uff0ck8s.gcr.io \u4ed3\u5e93[\u88ab\u91cd\u5b9a\u5411\u5230\u4e86\u793e\u533a\u62e5\u6709\u7684\u4ed3\u5e93](https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/)\uff1a **registry.k8s.io** \u3002 ## \u957f\u8bdd\u77ed\u8bf4\uff1a\u672c\u6b21\u53d8\u66f4\u987b\u77e5 {#you-need-to-know} - 3 \u6708 20 \u65e5\u661f\u671f\u4e00\uff0c\u6765\u81ea k8s.gcr.io \u65e7\u4ed3\u5e93\u7684\u6d41\u91cf\u88ab\u91cd\u5b9a\u5411\u5230\u4e86 registry.k8s.io\uff0c \u6700\u7ec8\u76ee\u6807\u662f\u9010\u6b65\u6dd8\u6c70 k8s.gcr.io\u3002 - \u5982\u679c\u4f60\u5728\u53d7\u9650\u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u4e14\u4f60\u4e3a k8s.gcr.io \u9650\u5b9a\u91c7\u7528\u4e86\u4e25\u683c\u7684\u57df\u540d\u6216 IP \u5730\u5740\u8bbf\u95ee\u7b56\u7565\uff0c \u90a3\u4e48 k8s.gcr.io \u5f00\u59cb\u91cd\u5b9a\u5411\u5230\u65b0\u4ed3\u5e93\u4e4b\u540e\u955c\u50cf\u62c9\u53d6\u64cd\u4f5c\u5c06\u4e0d\u8d77\u4f5c\u7528\u3002 - \u5c11\u91cf\u975e\u6807\u51c6\u7684\u5ba2\u6237\u7aef\u4e0d\u4f1a\u5904\u7406\u955c\u50cf\u4ed3\u5e93\u7684 HTTP \u91cd\u5b9a\u5411\uff0c\u5c06\u9700\u8981\u76f4\u63a5\u6307\u5411 registry.k8s.io\u3002 - \u672c\u6b21\u91cd\u5b9a\u5411\u53ea\u662f\u4e00\u4e2a\u534f\u52a9\u7528\u6237\u8fdb\u884c\u5207\u6362\u7684\u6743\u5b9c\u4e4b\u8ba1\u3002\u5f03\u7528\u7684 k8s.gcr.io \u4ed3\u5e93\u5c06\u5728\u67d0\u4e2a\u65f6\u95f4\u70b9\u88ab\u6dd8\u6c70\u3002 **\u8bf7\u5c3d\u5feb\u66f4\u65b0\u4f60\u7684\u6e05\u5355\uff0c\u5c3d\u5feb\u6307\u5411 registry.k8s.io\u3002** - \u5982\u679c\u4f60\u6258\u7ba1\u81ea\u5df1\u7684\u955c\u50cf\u4ed3\u5e93\uff0c\u4f60\u53ef\u4ee5\u5c06\u9700\u8981\u7684\u955c\u50cf\u62f7\u8d1d\u5230\u81ea\u5df1\u7684\u4ed3\u5e93\uff0c\u8fd9\u6837\u4e5f\u80fd\u51cf\u5c11\u5230\u793e\u533a\u6240\u62e5\u6709\u4ed3\u5e93\u7684\u6d41\u91cf\u538b\u529b\u3002 \u5982\u679c\u4f60\u8ba4\u4e3a\u81ea\u5df1\u53ef\u80fd\u53d7\u5230\u4e86\u5f71\u54cd\uff0c\u6216\u5982\u679c\u4f60\u60f3\u77e5\u9053\u672c\u6b21\u53d8\u66f4\u7684\u66f4\u591a\u76f8\u5173\u4fe1\u606f\uff0c\u8bf7\u7ee7\u7eed\u9605\u8bfb\u4e0b\u6587\u3002 ## \u82e5\u6211\u53d7\u5230\u5f71\u54cd\u8be5\u600e\u6837\u68c0\u67e5\uff1f {#how-can-i-check} \u82e5\u8981\u6d4b\u8bd5\u5230 registry.k8s.io \u7684\u8fde\u901a\u6027\uff0c\u6d4b\u8bd5\u662f\u5426\u80fd\u591f\u4ece registry.k8s.io \u62c9\u53d6\u955c\u50cf\uff0c \u53ef\u4ee5\u5728\u4f60\u6240\u9009\u7684\u547d\u540d\u7a7a\u95f4\u4e2d\u6267\u884c\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u547d\u4ee4\uff1a ```shell kubectl run hello-world -ti --rm --image=registry.k8s.io/busybox:latest --restart=Never -- date ``` \u5f53\u4f60\u6267\u884c\u4e0a\u4e00\u6761\u547d\u4ee4\u65f6\uff0c\u82e5\u4e00\u5207\u5de5\u4f5c\u6b63\u5e38\uff0c\u9884\u671f\u7684\u8f93\u51fa\u5982\u4e0b\uff1a ```none $ kubectl run hello-world -ti --rm --image=registry.k8s.io/busybox:latest --restart=Never -- date Fri Feb 31 07:07:07 UTC 2023 pod \"hello-world\" deleted ``` ## \u82e5\u6211\u53d7\u5230\u5f71\u54cd\u4f1a\u770b\u5230\u54ea\u79cd\u9519\u8bef\uff1f {#what-kind-of-errors} \u51fa\u73b0\u7684\u9519\u8bef\u53ef\u80fd\u53d6\u51b3\u4e8e\u4f60\u6b63\u4f7f\u7528\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\u7c7b\u522b\u4ee5\u53ca\u4f60\u88ab\u8def\u7531\u5230\u7684\u7aef\u70b9\uff0c \u901a\u5e38\u4f1a\u51fa\u73b0 `ErrImagePull`\u3001`ImagePullBackOff` \u8fd9\u7c7b\u9519\u8bef\uff0c \u4e5f\u53ef\u80fd\u5bb9\u5668\u521b\u5efa\u5931\u8d25\u65f6\u4f34\u968f\u7740\u8b66\u544a `FailedCreatePodSandBox`\u3002 \u4ee5\u4e0b\u4e3e\u4f8b\u7684\u9519\u8bef\u6d88\u606f\u663e\u793a\u4e86\u7531\u4e8e\u672a\u77e5\u7684\u8bc1\u4e66\u4f7f\u5f97\u4ee3\u7406\u540e\u7684\u90e8\u7f72\u62c9\u53d6\u5931\u8d25\uff1a ```none FailedCreatePodSandBox: Failed to create pod sandbox: rpc error: code = Unknown desc = Error response from daemon: Head \u201chttps://us-west1-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.8\u201d: x509: certificate signed by unknown authority ``` ## \u54ea\u4e9b\u955c\u50cf\u4f1a\u53d7\u5f71\u54cd\uff1f {#what-images-be-impacted} k8s.gcr.io \u4e0a\u7684 **\u6240\u6709** \u955c\u50cf\u90fd\u4f1a\u53d7\u5230\u672c\u6b21\u53d8\u66f4\u7684\u5f71\u54cd\u3002 k8s.gcr.io \u9664\u4e86 Kubernetes \u5404\u4e2a\u7248\u672c\u5916\u8fd8\u6258\u7ba1\u4e86\u8bb8\u591a\u955c\u50cf\u3002 \u5927\u91cf Kubernetes \u5b50\u9879\u76ee\u4e5f\u5728\u5176\u4e0a\u6258\u7ba1\u4e86\u81ea\u5df1\u7684\u955c\u50cf\u3002 \u4f8b\u5982 `dns/k8s-dns-node-cache`\u3001`ingress-nginx/controller` \u548c `node-problem-detector/node-problem-detector` \u8fd9\u4e9b\u955c\u50cf\u3002 ## \u6211\u53d7\u5f71\u54cd\u4e86\u3002\u6211\u8be5\u600e\u4e48\u529e\uff1f {#what-should-i-do} \u82e5\u53d7\u5f71\u54cd\u7684\u7528\u6237\u5728\u53d7\u9650\u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u6700\u597d\u7684\u529e\u6cd5\u662f\u5c06\u5fc5\u9700\u7684\u955c\u50cf\u62f7\u8d1d\u5230\u79c1\u6709\u4ed3\u5e93\uff0c\u6216\u5728\u81ea\u5df1\u7684\u4ed3\u5e93\u4e2d\u914d\u7f6e\u4e00\u4e2a\u76f4\u901a\u7f13\u5b58\u3002 \u5728\u4ed3\u5e93\u4e4b\u95f4\u62f7\u8d1d\u955c\u50cf\u53ef\u4f7f\u7528\u82e5\u5e72\u5de5\u5177\uff1a [crane](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_copy.md) \u5c31\u662f\u5176\u4e2d\u4e00\u79cd\u5de5\u5177\uff0c\u901a\u8fc7\u4f7f\u7528 `crane copy SRC DST` \u53ef\u4ee5\u5c06\u955c\u50cf\u62f7\u8d1d\u5230\u79c1\u6709\u4ed3\u5e93\u3002\u8fd8\u6709\u4e00\u4e9b\u4f9b\u5e94\u5546\u7279\u5b9a\u7684\u5de5\u5177\uff0c\u4f8b\u5982 Google \u7684 [gcrane](https://cloud.google.com/container-registry/docs/migrate-external-containers#copy)\uff0c \u8fd9\u4e2a\u5de5\u5177\u5b9e\u73b0\u4e86\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u4f46\u9488\u5bf9\u5176\u5e73\u53f0\u81ea\u8eab\u505a\u4e86\u4e00\u4e9b\u7cbe\u7b80\u3002 ## \u6211\u600e\u6837\u624d\u80fd\u627e\u5230\u54ea\u4e9b\u955c\u50cf\u6b63\u4f7f\u7528\u65e7\u4ed3\u5e93\uff0c\u5982\u4f55\u4fee\u590d\uff1f {#how-can-i-find-and-fix} **\u65b9\u6848 1**\uff1a \u8bd5\u8bd5[\u4e0a\u4e00\u7bc7\u535a\u6587](https://kubernetes.io/blog/2023/02/06/k8s-gcr-io-freeze-announcement/#what-s-next)\u4e2d\u6240\u8ff0\u7684\u4e00\u6761 kubectl \u547d\u4ee4\uff1a ```shell kubectl get pods --all-namespaces -o jsonpath=\"{.items[*].spec.containers[*].image}\" | tr -s '[[:space:]]' 'n' | sort | uniq -c ``` **\u65b9\u6848 2**\uff1a`kubectl` [krew](https://krew.sigs.k8s.io/) \u7684\u4e00\u4e2a\u63d2\u4ef6\u5df2\u88ab\u5f00\u53d1\u5b8c\u6210\uff0c\u540d\u4e3a [`community-images`](https://github.com/kubernetes-sigs/community-images#kubectl-community-images)\uff0c \u5b83\u80fd\u591f\u4f7f\u7528 k8s.gcr.io \u7aef\u70b9\u626b\u63cf\u548c\u62a5\u544a\u6240\u6709\u6b63\u4f7f\u7528 k8s.gcr.io \u7684\u955c\u50cf\u3002 \u5982\u679c\u4f60\u5b89\u88c5\u4e86 krew\uff0c\u4f60\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a ```shell kubectl krew install community-images ``` \u5e76\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u4e00\u4e2a\u62a5\u544a\uff1a ```shell kubectl community-images ``` \u5bf9\u4e8e\u5b89\u88c5\u548c\u793a\u4f8b\u8f93\u51fa\u7684\u5176\u4ed6\u65b9\u6cd5\uff0c\u53ef\u4ee5\u67e5\u9605\u4ee3\u7801\u4ed3\u5e93\uff1a [kubernetes-sigs/community-images](https://github.com/kubernetes-sigs/community-images)\u3002 **\u65b9\u6848 3**\uff1a\u5982\u679c\u4f60\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee\u96c6\u7fa4\uff0c\u6216\u5982\u679c\u4f60\u7ba1\u7406\u4e86\u8bb8\u591a\u96c6\u7fa4\uff0c\u6700\u597d\u7684\u65b9\u5f0f\u662f\u5728\u6e05\u5355\uff08manifest\uff09\u548c Chart \u4e2d\u641c\u7d22 **\"k8s.gcr.io\"**\u3002 **\u65b9\u6848 4**\uff1a\u5982\u679c\u4f60\u60f3\u9884\u9632\u57fa\u4e8e k8s.gcr.io \u7684\u955c\u50cf\u5728\u4f60\u7684\u96c6\u7fa4\u4e2d\u8fd0\u884c\uff0c\u53ef\u4ee5\u5728 [AWS EKS \u6700\u4f73\u5b9e\u8df5\u4ee3\u7801\u4ed3\u5e93](https://github.com/aws/aws-eks-best-practices/tree/master/policies/k8s-registry-deprecation)\u4e2d\u627e\u5230\u9488\u5bf9 [Gatekeeper](https://open-policy-agent.github.io/gatekeeper-library/website/) \u548c [Kyverno](https://kyverno.io/) \u7684\u793a\u4f8b\u7b56\u7565\uff0c\u8fd9\u4e9b\u7b56\u7565\u53ef\u4ee5\u963b\u6b62\u955c\u50cf\u88ab\u62c9\u53d6\u3002 \u4f60\u53ef\u4ee5\u5728\u4efb\u4f55 Kubernetes \u96c6\u7fa4\u4e2d\u4f7f\u7528\u8fd9\u4e9b\u7b2c\u4e09\u65b9\u7b56\u7565\u3002 **\u65b9\u6848 5**\uff1a\u4f5c\u4e3a **\u6700\u540e\u4e00\u4e2a** \u5907\u9009\u65b9\u6848\uff0c \u4f60\u53ef\u4ee5\u4f7f\u7528[\u4fee\u6539\u6027\u8d28\u7684\u51c6\u5165 Webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks) \u6765\u52a8\u6001\u66f4\u6539\u955c\u50cf\u5730\u5740\u3002\u5728\u66f4\u65b0\u4f60\u7684\u6e05\u5355\u4e4b\u524d\u8fd9\u53ea\u5e94\u89c6\u4e3a\u4e00\u4e2a\u6743\u5b9c\u4e4b\u8ba1\u3002\u4f60\u53ef\u4ee5\u5728 [k8s-gcr-quickfix](https://github.com/abstractinfrastructure/k8s-gcr-quickfix) \u4e2d\u627e\u5230\uff08\u7b2c\u4e09\u65b9\uff09\u53ef\u53d8\u6027\u8d28\u7684 Webhook \u548c Kyverno \u7b56\u7565\u3002 ## \u4e3a\u4ec0\u4e48 Kubernetes \u8981\u6362\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u955c\u50cf\u4ed3\u5e93\uff1f {#why-did-k8s-change-registry} k8s.gcr.io \u6258\u7ba1\u5728\u4e00\u4e2a [Google Container Registry (GCR)](https://cloud.google.com/container-registry) \u81ea\u5b9a\u4e49\u7684\u57df\u4e2d\uff0c\u8fd9\u662f\u4e13\u4e3a Kubernetes \u9879\u76ee\u642d\u5efa\u7684\u57df\u3002\u81ea Kubernetes \u9879\u76ee\u542f\u52a8\u4ee5\u6765\uff0c \u8fd9\u4e2a\u4ed3\u5e93\u4e00\u76f4\u8fd0\u4f5c\u826f\u597d\uff0c\u6211\u4eec\u611f\u8c22 Google \u63d0\u4f9b\u8fd9\u4e9b\u8d44\u6e90\uff0c\u7136\u800c\u5982\u4eca\u8fd8\u6709\u5176\u4ed6\u4e91\u63d0\u4f9b\u5546\u548c\u4f9b\u5e94\u5546\u5e0c\u671b\u6258\u7ba1\u8fd9\u4e9b\u955c\u50cf\uff0c \u4ee5\u4fbf\u4e3a\u4ed6\u4eec\u81ea\u5df1\u4e91\u5e73\u53f0\u4e0a\u7684\u7528\u6237\u63d0\u4f9b\u66f4\u597d\u7684\u4f53\u9a8c\u3002\u9664\u4e86\u53bb\u5e74 Google [\u6350\u8d60 300 \u4e07\u7f8e\u91d1\u7684\u7eed\u5ef6\u627f\u8bfa](https://www.cncf.io/google-cloud-recommits-3m-to-kubernetes/)\u6765\u652f\u6301\u672c\u9879\u76ee\u7684\u57fa\u7840\u8bbe\u65bd\u5916\uff0c Amazon Web Services (AWS) \u4e5f\u5728[\u5e95\u7279\u5f8b\u53ec\u5f00\u7684 Kubecon NA 2022 \u4e0a\u53d1\u8a00](https://youtu.be/PPdimejomWo?t=236)\u516c\u5e03\u4e86\u76f8\u5f53\u7684\u6350\u8d60\u91d1\u989d\u3002 AWS \u80fd\u4e3a\u7528\u6237\u63d0\u4f9b\u66f4\u597d\u7684\u4f53\u9a8c\uff08\u8ddd\u79bb\u7528\u6237\u66f4\u8fd1\u7684\u670d\u52a1\u5668 = \u66f4\u5feb\u7684\u4e0b\u8f7d\u901f\u5ea6\uff09\uff0c\u540c\u65f6\u8fd8\u80fd\u51cf\u8f7b GCR \u7684\u51fa\u7ad9\u5e26\u5bbd\u548c\u6210\u672c\u3002 \u6709\u5173\u6b64\u6b21\u53d8\u66f4\u7684\u66f4\u591a\u8be6\u60c5\uff0c\u8bf7\u67e5\u9605 [registry.k8s.io\uff1a\u66f4\u5feb\u3001\u6210\u672c\u66f4\u4f4e\u4e14\u6b63\u5f0f\u53d1\u5e03 (GA)](/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/)\u3002 ## \u4e3a\u4ec0\u4e48\u8981\u8bbe\u7f6e\u91cd\u5b9a\u5411\uff1f {#why-is-a-redirect} \u672c\u9879\u76ee\u5728[\u53bb\u5e74\u53d1\u5e03 1.25 \u65f6\u5207\u6362\u81f3 registry.k8s.io](/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/)\uff1b \u7136\u800c\uff0c\u5927\u591a\u6570\u955c\u50cf\u62c9\u53d6\u6d41\u91cf\u4ecd\u88ab\u91cd\u5b9a\u5411\u5230\u65e7\u7aef\u70b9 k8s.gcr.io\u3002 \u4ece\u9879\u76ee\u89d2\u5ea6\u770b\uff0c\u8fd9\u5bf9\u6211\u4eec\u6765\u8bf4\u662f\u4e0d\u53ef\u6301\u7eed\u7684\uff0c\u56e0\u4e3a\u8fd9\u6837\u65e2\u6ca1\u6709\u5b8c\u5168\u5229\u7528\u5176\u4ed6\u4f9b\u5e94\u5546\u6350\u8d60\u7ed9\u672c\u9879\u76ee\u7684\u8d44\u6e90\uff0c \u4e5f\u7531\u4e8e\u6d41\u91cf\u670d\u52a1\u6210\u672c\u800c\u4f7f\u6211\u4eec\u9762\u4e34\u8d44\u91d1\u8017\u5c3d\u7684\u5371\u9669\u3002 \u91cd\u5b9a\u5411\u5c06\u4f7f\u672c\u9879\u76ee\u80fd\u591f\u5229\u7528\u8fd9\u4e9b\u65b0\u8d44\u6e90\u7684\u4f18\u52bf\uff0c\u4ece\u800c\u663e\u8457\u964d\u4f4e\u6211\u4eec\u7684\u51fa\u7ad9\u5e26\u5bbd\u6210\u672c\u3002 \u6211\u4eec\u9884\u8ba1\u6b64\u6b21\u66f4\u6539\u53ea\u4f1a\u5f71\u54cd\u4e00\u5c0f\u90e8\u5206\u7528\u6237\uff0c\u4ed6\u4eec\u53ef\u80fd\u5728\u53d7\u9650\u73af\u5883\u4e2d\u8fd0\u884c Kubernetes\uff0c \u6216\u4f7f\u7528\u4e86\u8001\u65e7\u5230\u65e0\u6cd5\u5904\u7406\u91cd\u5b9a\u5411\u884c\u4e3a\u7684\u5ba2\u6237\u7aef\u3002 ## k8s.gcr.io \u5c06\u4f1a\u600e\u6837\uff1f {#what-will-happen-to-k8s-gcr-io} \u9664\u4e86\u91cd\u5b9a\u5411\u4e4b\u5916\uff0ck8s.gcr.io \u5c06\u88ab\u51bb\u7ed3\uff0c [\u4e14\u5728 2023 \u5e74 4 \u6708 3 \u65e5\u4e4b\u540e\u5c06\u4e0d\u4f1a\u968f\u7740\u65b0\u7684\u955c\u50cf\u800c\u66f4\u65b0](/zh-cn/blog/2023/02/06/k8s-gcr-io-freeze-announcement/)\u3002 `k8s.gcr.io` \u5c06\u4e0d\u518d\u83b7\u53d6\u4efb\u4f55\u65b0\u7684\u7248\u672c\u3001\u8865\u4e01\u6216\u5b89\u5168\u66f4\u65b0\u3002 \u8fd9\u4e2a\u65e7\u4ed3\u5e93\u5c06\u7ee7\u7eed\u4fdd\u6301\u53ef\u7528\uff0c\u4ee5\u5e2e\u52a9\u4eba\u4eec\u8fc1\u79fb\uff0c\u4f46\u5728\u4ee5\u540e\u5c06\u4f1a\u88ab\u5f7b\u5e95\u6dd8\u6c70\u3002 ## \u6211\u4ecd\u6709\u7591\u95ee\uff0c\u6211\u8be5\u53bb\u54ea\u513f\u8be2\u95ee\uff1f {#what-should-i-go} \u6709\u5173 registry.k8s.io \u53ca\u5176\u4e3a\u4f55\u5f00\u53d1\u8fd9\u4e2a\u65b0\u4ed3\u5e93\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 [registry.k8s.io\uff1a\u66f4\u5feb\u3001\u6210\u672c\u66f4\u4f4e\u4e14\u6b63\u5f0f\u53d1\u5e03](/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/)\u3002 \u5982\u679c\u4f60\u60f3\u4e86\u89e3\u955c\u50cf\u51bb\u7ed3\u4ee5\u53ca\u6700\u540e\u4e00\u7248\u53ef\u7528\u955c\u50cf\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u535a\u6587\uff1a [k8s.gcr.io \u955c\u50cf\u4ed3\u5e93\u5c06\u4ece 2023 \u5e74 4 \u6708 3 \u65e5\u8d77\u88ab\u51bb\u7ed3](/zh-cn/blog/2023/02/06/k8s-gcr-io-freeze-announcement/)\u3002 \u6709\u5173 registry.k8s.io \u67b6\u6784\u53ca\u5176[\u8bf7\u6c42\u5904\u7406\u51b3\u7b56\u6811](https://github.com/kubernetes/registry.k8s.io/blob/8408d0501a88b3d2531ff54b14eeb0e3c900a4f3/cmd/archeio/docs/request-handling.md)\u7684\u4fe1\u606f\uff0c \u8bf7\u67e5\u9605 [kubernetes/registry.k8s.io \u4ee3\u7801\u4ed3\u5e93](https://github.com/kubernetes/registry.k8s.io)\u3002 \u82e5\u4f60\u8ba4\u4e3a\u81ea\u5df1\u5728\u4f7f\u7528\u65b0\u4ed3\u5e93\u548c\u91cd\u5b9a\u5411\u65f6\u9047\u5230 bug\uff0c\u8bf7\u5728 [kubernetes/registry.k8s.io \u4ee3\u7801\u4ed3\u5e93](https://github.com/kubernetes/registry.k8s.io/issues/new/choose)\u4e2d\u63d0\u51fa Issue\u3002 **\u8bf7\u5148\u68c0\u67e5\u662f\u5426\u6709\u4eba\u63d0\u51fa\u4e86\u7c7b\u4f3c\u7684 Issue\uff0c\u518d\u884c\u521b\u5efa\u65b0 Issue\u3002** ", "positive_passages": [{"docid": "doc-en-website-bf7923b5c22d4a3745aa368a1c99ab1f3817339fe0b7743c2f0ea88d156993cb", "text": "I will localize this blog in days. To avoid possible conflicts with other contributors, this issue is opened. /assign /language zh /area blog\n/triage accepted thanks.", "commid": "website_issue_40202", "tokennum": 37}], "negative_passages": []} {"query_id": "q-en-website-315f26ef8256663f7b7b36471fa1f45f99d51eb83daf75670f2c5d6ba8794ebf", "query": "``` {{% note %}} \u30da\u30fc\u30b8\u306eweight\u306b\u3064\u3044\u3066\u306f\u30011\u30012\u30013\u2026\u306a\u3069\u306e\u5024\u3092\u4f7f\u7528\u305b\u305a\u300110\u300120\u300130\u2026\u306e\u3088\u3046\u306b\u4e00\u5b9a\u306e\u9593\u9694\u3092\u7a7a\u3051\u305f\u65b9\u304c\u8ce2\u660e\u3067\u3059\u3002\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u3001\u5f8c\u3067\u5225\u306e\u30da\u30fc\u30b8\u3092\u9593\u306b\u633f\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u30da\u30fc\u30b8\u306eweight\u306b\u3064\u3044\u3066\u306f\u30011\u30012\u30013\u2026\u306a\u3069\u306e\u5024\u3092\u4f7f\u7528\u305b\u305a\u300110\u300120\u300130\u2026\u306e\u3088\u3046\u306b\u4e00\u5b9a\u306e\u9593\u9694\u3092\u7a7a\u3051\u305f\u65b9\u304c\u8ce2\u660e\u3067\u3059\u3002\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u3001\u5f8c\u3067\u5225\u306e\u30da\u30fc\u30b8\u3092\u9593\u306b\u633f\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u540c\u3058\u30c7\u30a3\u30ec\u30af\u30c8\u30ea(\u30bb\u30af\u30b7\u30e7\u30f3)\u5185\u306e\u5404\u30da\u30fc\u30b8\u306eweight\u306f\u3001\u91cd\u8907\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7279\u306b\u30ed\u30fc\u30ab\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u306f\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u5e38\u306b\u6b63\u3057\u304f\u6574\u5217\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 {{% /note %}} ### \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc", "positive_passages": [{"docid": "doc-en-website-52ef25d99be0be715700ba7d7c06cd2fab825bd4620f9ea337758ad1de7bbda9", "text": "This is a Feature Request What would you like to be We need to update /content/ja/docs/contribute/style/content- according to the English text, because it is outdated. Why is this needed /content/ja/docs/contribute/style/content- is outdated. In the English page, a note for localication was in . It needs to be to the Japanese page. Comments /language ja /assign\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. * etcd is a leader-based distributed system. Ensure that the leader periodically send heartbeats on time to all followers to keep the cluster stable. * etcd is a leader-based distributed system. Ensure that the leader periodically send heartbeats on time to all followers to keep the cluster stable. * Ensure that no resource starvation occurs. Performance and stability of the cluster is sensitive to network and disk IO. Any resource starvation can lead to heartbeat timeout, causing instability of the cluster. An unstable etcd indicates that no leader is elected. Under such circumstances, a cluster cannot make any changes to its current state, which implies no new pods can be scheduled. Performance and stability of the cluster is sensitive to network and disk I/O. Any resource starvation can lead to heartbeat timeout, causing instability of the cluster. An unstable etcd indicates that no leader is elected. Under such circumstances, a cluster cannot make any changes to its current state, which implies no new pods can be scheduled. * Keeping stable etcd clusters is critical to the stability of Kubernetes clusters. Therefore, run etcd clusters on dedicated machines or isolated environments for [guaranteed resource requirements](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/hardware.md#hardware-recommendations). * Keeping etcd clusters stable is critical to the stability of Kubernetes clusters. Therefore, run etcd clusters on dedicated machines or isolated environments for [guaranteed resource requirements](https://etcd.io/docs/current/op-guide/hardware/). * The minimum recommended version of etcd to run in production is `3.2.10+`. -->", "positive_passages": [{"docid": "doc-en-website-e137b3467942095722d53969564746ac8d1e05b2a4541b803909ce4bfa1bd149", "text": "\" etcd \"client.cert \" etcd etcd \" \" etcd client.key etcd \"\n~ GitHub is not the right place for support requests.~ ~If you're looking for help, oyu could ask on .~ ~You can also post your question on the or the forum. There are other support venues with contributions from the wider community of Kubernetes users.~\n/triage accepted /kind bug\n/remove-kind support\nThanks\n/language zh\n/priority backlog", "commid": "website_issue_27444", "tokennum": 106}], "negative_passages": []} {"query_id": "q-en-website-33bd69b4df54b230f0994b1d91a0767f79725ed37ec885611474f037c72c4388", "query": "/api-ref/ https://github.com/kubernetes/kubernetes/milestones/ 301 /concepts/containers/container-lifecycle-hooks/ /docs/concepts/containers/container-lifecycle-hooks/ 301 /docs/ /docs/home/ 301 /docs/abstractions/controllers/petset/ /docs/concepts/workloads/controllers/statefulset/ 301 /docs/admin/ /docs/concepts/cluster-administration/cluster-administration-overview/ 301 /docs/admin/add-ons/ /docs/concepts/cluster-administration/addons/ 301", "positive_passages": [{"docid": "doc-en-website-8e046a5d937126ddf480ab6e6d32184fa95324a9857dc9ef5c2c2ff614ee417b", "text": "This is a... [ ] Feature Request [x] Bug Report Problem: There is a link missing that was supposed to be in section Differences between alpha PetSets and beta StatefulSets under it in the second point StatefulSet guards against split brain which ends with following text TODO: Link to doc about fencing. Change it and add the link that is required. Proposed Solution: Add link which is missing Page to Update:\nPetSet has long been replaced by StatefuSet and StatefulSet has been GA'ed in 1.9. So we are going to remove this page to avoid further confusion.", "commid": "website_issue_6484", "tokennum": 126}], "negative_passages": []} {"query_id": "q-en-website-33f65eeabba4ef58d2236965aa17a6ab9bd25330ccf2588938977a20d30f1b7f", "query": "# i18n strings for the Chinese version of the site (https://kubernetes.io/zh-cn/) # \u6ce8\u610f\uff1a\u4fee\u6539\u6b64\u6587\u4ef6\u65f6\u8bf7\u7ef4\u6301\u5b57\u7b26\u4e32\u540d\u79f0\u7684\u5b57\u6bcd\u987a\u5e8f\u5e76\u4e0e\u82f1\u6587\u7248\u4fdd\u6301\u4e00\u81f4 # Avoid using conjunction_1. # Must match the context in layouts/shortcodes/release-data.html # Appears on https://kubernetes.io/releases/ # For example the \"and\" in \"Complete 1.25 Schedule and Changelog\" [conjunction_1] other = \"\u548c\" [caution] other = \"\u6ce8\u610f\uff1a\"", "positive_passages": [{"docid": "doc-en-website-ba038e9157e4feaa45266711cf3eedabe8e5585b425fd2c2da31bff0a034219d", "text": "What would you like to be This issue is a follow-up task from displays some English text: ! To replace this text with localized strings, you can update with from . Specifically, these:\n/language zh-cn\nThe label(s) cannot be applied, because the repository doesn't have them. ```sh # \u4f7f\u7528\u4f60\u7684\u4e3b\u673a IP \u66f4\u65b0 HOST0\u3001HOST1 \u548c HOST2 \u7684 IP \u5730\u5740 export HOST0=10.0.0.6", "positive_passages": [{"docid": "doc-en-website-9e9528247a4cdb81221b07c692cc414cd6fcc82432285f6c65747ee18510dc26", "text": "apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow\nUse kubeadm to create a highly available etcd cluster apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow There is a problem here, there is no indentation Normal should be apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow\nprovide more details of the issue as it's difficult to address your issue with the information that you have provided. Atleast mention the page you are referring to. /triage needs-information\nPage related to the issue :\n/language zh\n/retitle The YAML format may be not correct in setup-ha-etcd-with-kubeadm\n/triage accepted /assign", "commid": "website_issue_45033", "tokennum": 241}], "negative_passages": []} {"query_id": "q-en-website-35011cdb33f9025f0f9353b2dd166b32654f8230e54d5cbcbcfd4e14161fec82", "query": "2. Download the Google Cloud public signing key: ```shell sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg ``` 3. Add the Kubernetes `apt` repository: ```shell echo \"deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list ``` 4. Update `apt` package index with the new repository and install kubectl:", "positive_passages": [{"docid": "doc-en-website-873cbf18fce6f0ac711241a92dc449cff928b241c8763a1f00e7ded30fa9a883", "text": "This is a Bug Report {{< feature-state for_k8s_version=\"v1.21\" state=\"stable\" >}} La API _EndpointSlice_ de Kubernetes proporciona una forma de rastrear los endpoints de red dentro de un cl\u00faster Kubernetes. EndpointSlices ofrece una alternativa m\u00e1s escalable y extensible a [Endpoints].(/docs/concepts/services-networking/service/#endpoints). ## EndpointSlice API {#recurso-endpointslice} En Kubernetes, un EndpointSlice contiene referencias a un conjunto de endpoints de red. El plano de control crea autom\u00e1ticamente EndpointSlices para cualquier Servicio de Kubernetes que tenga especificado un {{< glossary_tooltip text=\"selector\" term_id=\"selector\" >}}. Estos EndpointSlices incluyen referencias a todos los Pods que coinciden con el selector de Servicio. Los EndpointSlices agrupan los endpoints de la red mediante combinaciones \u00fanicas de protocolo, n\u00famero de puerto y nombre de Servicio. El nombre de un objeto EndpointSlice debe ser un [nombre de subdominio DNS](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names) v\u00e1lido. A modo de ejemplo, a continuaci\u00f3n se muestra un objeto EndpointSlice de ejemplo, propiedad del servicio `example` Servicio Kubernetes. ```yaml apiVersion: discovery.k8s.io/v1 kind: EndpointSlice metadata: name: example-abc labels: kubernetes.io/service-name: example addressType: IPv4 ports: - name: http protocol: TCP port: 80 endpoints: - addresses: - \"10.1.2.3\" conditions: ready: true hostname: pod-1 nodeName: node-1 zone: us-west2-a ``` Por defecto, el plano de control crea y gestiona EndpointSlices para que no tengan m\u00e1s de 100 endpoints cada una. Puedes configurar esto con la bandera de funcionalidad `--max-endpoints-per-slice` {{< glossary_tooltip text=\"kube-controller-manager\" term_id=\"kube-controller-manager\" >}} hasta un m\u00e1ximo de 1000. EndpointSlices puede actuar como la fuente de verdad {{< glossary_tooltip term_id=\"kube-proxy\" text=\"kube-proxy\" >}} sobre c\u00f3mo enrutar el tr\u00e1fico interno. ### Tipos de direcci\u00f3n EndpointSlices admite tres tipos de direcciones: * IPv4 * IPv6 * FQDN (Fully Qualified Domain Name) Cada objeto `EndpointSlice` representa un tipo de direcci\u00f3n IP espec\u00edfico. Si tienes un servicio disponible a trav\u00e9s de IPv4 e IPv6, habr\u00e1 al menos dos objetos `EndpointSlice` (uno para IPv4 y otro para IPv6). ### Condiciones La API EndpointSlice almacena condiciones sobre los endpoints que pueden ser \u00fatiles para los consumidores. Las tres condiciones son `ready`, `serving` y `terminating`. #### Ready `ready` es una condici\u00f3n que corresponde a la condici\u00f3n `Ready` de un Pod. Un Pod en ejecuci\u00f3n con la condici\u00f3n `Ready` establecida a `True` deber\u00eda tener esta condici\u00f3n EndpointSlice tambi\u00e9n establecida a `true`. Por razones de compatibilidad, `ready` NUNCA es `true` cuando un Pod est\u00e1 terminando. Los consumidores deben referirse a la condici\u00f3n `serving` para inspeccionar la disponibilidad de los Pods que est\u00e1n terminando. La \u00fanica excepci\u00f3n a esta regla son los servicios con `spec.publishNotReadyAddresses` a `true`. Los endpoints de estos servicios siempre tendr\u00e1n la condici\u00f3n `ready` a `true`. #### Serving {{< feature-state for_k8s_version=\"v1.26\" state=\"stable\" >}} La condici\u00f3n `serving` es casi id\u00e9ntica a la condici\u00f3n `ready`. La diferencia es que los consumidores de la API EndpointSlice deben comprobar la condici\u00f3n `serving` si se preocupan por la disponibilidad del pod mientras el pod tambi\u00e9n est\u00e1 terminando. {{< note >}} Aunque `serving` es casi id\u00e9ntico a `ready`, se a\u00f1adi\u00f3 para evitar romper el significado existente de `ready`. Podr\u00eda ser inesperado para los clientes existentes si `ready` pudiera ser `true` para los endpoints de terminaci\u00f3n, ya que hist\u00f3ricamente los endpoints de terminaci\u00f3n nunca se incluyeron en la API Endpoints o EndpointSlice para empezar. Por esta raz\u00f3n, `ready` es _siempre_ `false` para los puntos finales que terminan, y se ha a\u00f1adido una nueva condici\u00f3n `serving` en la v1.20 para que los clientes puedan realizar un seguimiento de la disponibilidad de los pods que terminan independientemente de la sem\u00e1ntica existente para `ready`. {{< /note >}} #### Terminating {{< feature-state for_k8s_version=\"v1.22\" state=\"beta\" >}} `Terminating` es una condici\u00f3n que indica si un endpoint est\u00e1 terminando. En el caso de los pods, se trata de cualquier pod que tenga establecida una marca de tiempo de borrado. ### Informaci\u00f3n sobre topolog\u00eda {#topology} Cada endpoint dentro de un EndpointSlice puede contener informaci\u00f3n topol\u00f3gica relevante. La informaci\u00f3n de topolog\u00eda incluye la ubicaci\u00f3n del endpoint e informaci\u00f3n sobre el Nodo y la zona correspondientes. Estos est\u00e1n disponibles en los siguientes campos por endpoint en EndpointSlices: * `nodeName` - El nombre del Nodo en el que se encuentra este endpoint. * `zone` - La zona en la que se encuentra este punto final. {{< note >}} En la API v1, el endpoint `topology` se elimin\u00f3 en favor de los campos dedicados `nodeName` y `zone`. La configuraci\u00f3n de campos de topolog\u00eda arbitrarios en el campo `endpoint` de un recurso `EndpointSlice` ha quedado obsoleta y no se admite en la API v1. En su lugar, la API v1 permite establecer campos individuales `nodeName` y `zone`. Estos campos se traducen autom\u00e1ticamente entre versiones de la API. Por ejemplo, el valor de la clave \"topology.kubernetes.io/zone\" en el campo `topology` de la API v1beta1 es accesible como campo `zone` en la API v1. {{< /note >}} ### Administraci\u00f3n En la mayor\u00eda de los casos, el plano de control (concretamente, el endpoint slice {{< glossary_tooltip text=\"controller\" term_id=\"controller\" >}}) crea y gestiona objetos EndpointSlice. Existe una variedad de otros casos de uso para EndpointSlices, como implementaciones de servicios Mesh, que podr\u00edan dar lugar a que otras entidades o controladores gestionen conjuntos adicionales de EndpointSlices. Para garantizar que varias entidades puedan gestionar EndpointSlices sin interferir unas con otras, Kubernetes define el par\u00e1metro {{< glossary_tooltip term_id=\"label\" text=\"label\" >}} `endpointslice.kubernetes.io/managed-by`, que indica la entidad que gestiona un EndpointSlice. El controlador de endpoint slice establece `endpointslice-controller.k8s.io` como valor para esta etiqueta en todos los EndpointSlices que gestiona. Otras entidades que gestionen EndpointSlices tambi\u00e9n deben establecer un valor \u00fanico para esta etiqueta. ### Propiedad En la mayor\u00eda de los casos de uso, los EndpointSlices son propiedad del Servicio para el que el objeto EndpointSlices rastrea los endpoints. Esta propiedad se indica mediante una referencia de propietario en cada EndpointSlice, as\u00ed como una etiqueta `kubernetes.io/service-name` que permite b\u00fasquedas sencillas de todos los EndpointSlices que pertenecen a un Servicio. ### Replicaci\u00f3n de EndpointSlice En algunos casos, las aplicaciones crean recursos Endpoints personalizados. Para garantizar que estas aplicaciones no tengan que escribir simult\u00e1neamente en recursos Endpoints y EndpointSlice, el plano de control del cl\u00faster refleja la mayor\u00eda de los recursos Endpoints en los EndpointSlices correspondientes. The control plane mirrors Endpoints resources unless: El plano de control refleja los recursos de los Endpoints a menos que: * El recurso Endpoints tenga una etiqueta `endpointslice.kubernetes.io/skip-mirror` con el valor en `true`. * El recurso Endpoints tenga una anotaci\u00f3n `control-plane.alpha.kubernetes.io/leader`. * El recurso de servicio correspondiente no existe. * El recurso Service correspondiente tiene un selector no nulo. Los recursos Endpoints individuales pueden traducirse en m\u00faltiples EndpointSlices. Esto ocurrir\u00e1 si un recurso Endpoints tiene m\u00faltiples subconjuntos o incluye endpoints con m\u00faltiples familias IP (IPv4 e IPv6). Se reflejar\u00e1 un m\u00e1ximo de 1000 direcciones por subconjunto en EndpointSlices. ### Distribuci\u00f3n de EndpointSlices Cada EndpointSlice tiene un conjunto de puertos que se aplica a todos los endpoints dentro del recurso. Cuando se utilizan puertos con nombre para un Servicio, los Pods pueden terminar con diferentes n\u00fameros de puerto de destino para el mismo puerto con nombre, requiriendo diferentes EndpointSlices. Esto es similar a la l\u00f3gica detr\u00e1s de c\u00f3mo se agrupan los subconjuntos con Endpoints. El plano de control intenta llenar los EndpointSlices tanto como sea posible, pero no los reequilibra activamente. La l\u00f3gica es bastante sencilla: 1. Iterar a trav\u00e9s de los EndpointSlices existentes, eliminar los endpoints que ya no se deseen y actualizar los endpoints coincidentes que hayan cambiado. 2. Recorrer los EndpointSlices que han sido modificados en el primer paso y rellenarlos con los nuevos endpoints necesarios. 3. Si a\u00fan quedan nuevos endpoints por a\u00f1adir, intente encajarlos en un slice que no se haya modificado previamente y/o cree otros nuevos. Es importante destacar que el tercer paso prioriza limitar las actualizaciones de EndpointSlice sobre una distribuci\u00f3n perfectamente completa de EndpointSlices. Por ejemplo, si hay 10 nuevos endpoints que a\u00f1adir y 2 EndpointSlices con espacio para 5 endpoints m\u00e1s cada uno, este enfoque crear\u00e1 un nuevo EndpointSlice en lugar de llenar los 2 EndpointSlices existentes. En otras palabras, es preferible una \u00fanica creaci\u00f3n de EndpointSlice que m\u00faltiples actualizaciones de EndpointSlice. Con kube-proxy ejecut\u00e1ndose en cada Nodo y vigilando los EndpointSlices, cada cambio en un EndpointSlice se vuelve relativamente caro ya que ser\u00e1 transmitido a cada Nodo del cluster. Este enfoque pretende limitar el n\u00famero de cambios que necesitan ser enviados a cada Nodo, incluso si puede resultar con m\u00faltiples EndpointSlices que no est\u00e1n llenos. En la pr\u00e1ctica, esta distribuci\u00f3n menos que ideal deber\u00eda ser poco frecuente. La mayor\u00eda de los cambios procesados por el controlador EndpointSlice ser\u00e1n lo suficientemente peque\u00f1os como para caber en un EndpointSlice existente, y si no, es probable que pronto sea necesario un nuevo EndpointSlice de todos modos. Las actualizaciones continuas de los Despliegues tambi\u00e9n proporcionan un reempaquetado natural de los EndpointSlices con todos los Pods y sus correspondientes endpoints siendo reemplazados. ### Endpoints duplicados Debido a la naturaleza de los cambios de EndpointSlice, los endpoints pueden estar representados en m\u00e1s de un EndpointSlice al mismo tiempo. Esto ocurre de forma natural, ya que los cambios en diferentes objetos EndpointSlice pueden llegar a la vigilancia / cach\u00e9 del cliente de Kubernetes en diferentes momentos. {{< note >}} Los clientes de la API EndpointSlice deben iterar a trav\u00e9s de todos los EndpointSlices existentes asociados a un Servicio y construir una lista completa de endpoints de red \u00fanicos. Es importante mencionar que los endpoints pueden estar duplicados en diferentes EndpointSlices. Puede encontrar una implementaci\u00f3n de referencia sobre c\u00f3mo realizar esta agregaci\u00f3n y deduplicaci\u00f3n de endpoints como parte del c\u00f3digo `EndpointSliceCache` dentro de `kube-proxy`. {{< /note >}} ## Comparaci\u00f3n con endpoints {#motivaci\u00f3n} La API Endpoints original proporcionaba una forma simple y directa de rastrear los puntos finales de red en Kubernetes. A medida que los cl\u00fasteres de Kubernetes y los {{< glossary_tooltip text=\"Services\" term_id=\"service\" >}} crec\u00edan para manejar m\u00e1s tr\u00e1fico y enviar m\u00e1s tr\u00e1fico a m\u00e1s Pods backend, las limitaciones de la API original se hicieron m\u00e1s visibles. M\u00e1s notablemente, estos incluyen desaf\u00edos con la ampliaci\u00f3n a un mayor n\u00famero de endpoints de red. Dado que todos los puntos finales de red para un Servicio se almacenaban en un \u00fanico objeto Endpoints, esos objetos Endpoints pod\u00edan llegar a ser bastante grandes. Para los servicios que permanec\u00edan estables (el mismo conjunto de puntos finales durante un largo per\u00edodo de tiempo), el impacto era menos notable; incluso entonces, algunos casos de uso de Kubernetes no estaban bien servidos. Cuando un servicio ten\u00eda muchos puntos finales de backend y la carga de trabajo se escalaba con frecuencia o se introduc\u00edan nuevos cambios con frecuencia, cada actualizaci\u00f3n del objeto Endpoints para ese servicio supon\u00eda mucho tr\u00e1fico entre los componentes del cl\u00faster de Kubernetes (dentro del plano de control y tambi\u00e9n entre los nodos y el servidor de API). Este tr\u00e1fico adicional tambi\u00e9n ten\u00eda un coste en t\u00e9rminos de uso de la CPU. Con EndpointSlices, la adici\u00f3n o eliminaci\u00f3n de un \u00fanico Pod desencadena el mismo _n\u00famero_ de actualizaciones a los clientes que est\u00e1n pendientes de los cambios, pero el tama\u00f1o de esos mensajes de actualizaci\u00f3n es mucho menor a gran escala. EndpointSlices tambi\u00e9n ha permitido innovar en torno a nuevas funciones, como las redes de doble pila y el enrutamiento con conocimiento de la topolog\u00eda. ## {{% heading \"whatsnext\" %}} * Sigue las instrucciones del tutorial [Conexi\u00f3n de aplicaciones con servicios](/docs/tutorials/services/connect-applications-service/) * Lee la [Referencia API](/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/) para la API EndpointSlice * Lee la [Referencia API](/docs/reference/kubernetes-api/service-resources/endpoints-v1/) para la API Endpoints ", "positive_passages": [{"docid": "doc-en-website-a3dd176f2ceffcd2f2094240c62f79dcb79daee83cfa3ef428c60ae93fd99272", "text": "This is a Feature Request What would you like to be Localize to Spanish Why is this needed There is no Spanish localization for this file. Comments /triage accepted /kind feature /language es /sig docs /area localization\n/assign", "commid": "website_issue_45441", "tokennum": 51}], "negative_passages": []} {"query_id": "q-en-website-39421cef70378c68b6b99bfb568d3ecd8df83a3bd919d119cff8b1fd44f1ecdf", "query": "2. Download the Google Cloud public signing key: ```shell sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg ``` 3. Add the Kubernetes `apt` repository: ```shell echo \"deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list ``` 4. Update `apt` package index, install kubelet, kubeadm and kubectl, and pin their version:", "positive_passages": [{"docid": "doc-en-website-873cbf18fce6f0ac711241a92dc449cff928b241c8763a1f00e7ded30fa9a883", "text": "This is a Bug Report ## \u8d44\u6e90\u8981\u6c42 \u4f7f\u7528\u6709\u9650\u7684\u8d44\u6e90\u8fd0\u884c etcd \u53ea\u9002\u5408\u6d4b\u8bd5\u76ee\u7684\u3002\u4e3a\u4e86\u5728\u751f\u4ea7\u4e2d\u90e8\u7f72\uff0c\u9700\u8981\u5148\u8fdb\u7684\u786c\u4ef6\u914d\u7f6e\u3002\u5728\u751f\u4ea7\u4e2d\u90e8\u7f72 etcd \u4e4b\u524d\uff0c\u8bf7\u67e5\u770b[\u6240\u9700\u8d44\u6e90\u53c2\u8003\u6587\u6863](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/hardware.md#example-hardware-configurations)\u3002 \u4f7f\u7528\u6709\u9650\u7684\u8d44\u6e90\u8fd0\u884c etcd \u53ea\u9002\u5408\u6d4b\u8bd5\u76ee\u7684\u3002\u4e3a\u4e86\u5728\u751f\u4ea7\u4e2d\u90e8\u7f72\uff0c\u9700\u8981\u5148\u8fdb\u7684\u786c\u4ef6\u914d\u7f6e\u3002 \u5728\u751f\u4ea7\u4e2d\u90e8\u7f72 etcd \u4e4b\u524d\uff0c\u8bf7\u67e5\u770b [\u6240\u9700\u8d44\u6e90\u53c2\u8003\u6587\u6863](https://etcd.io/docs/current/op-guide/hardware/#example-hardware-configurations)\u3002 ## \u542f\u52a8 etcd \u96c6\u7fa4", "positive_passages": [{"docid": "doc-en-website-e137b3467942095722d53969564746ac8d1e05b2a4541b803909ce4bfa1bd149", "text": "\" etcd \"client.cert \" etcd etcd \" \" etcd client.key etcd \"\n~ GitHub is not the right place for support requests.~ ~If you're looking for help, oyu could ask on .~ ~You can also post your question on the or the forum. There are other support venues with contributions from the wider community of Kubernetes users.~\n/triage accepted /kind bug\n/remove-kind support\nThanks\n/language zh\n/priority backlog", "commid": "website_issue_27444", "tokennum": 106}], "negative_passages": []} {"query_id": "q-en-website-3de6b906061edde18e657751bd0e4b44d113c0911f33c833315edaadffe5051d", "query": " --- title: \"Kubernetes\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7ba1\u7406\" description: Kubernetes API\u3068\u5bfe\u8a71\u3059\u308b\u305f\u3081\u306e\u5ba3\u8a00\u578b\u304a\u3088\u3073\u547d\u4ee4\u578b\u306e\u30d1\u30e9\u30c0\u30a4\u30e0\u3002 weight: 25 --- ", "positive_passages": [{"docid": "doc-en-website-1929a9d1e69e84954e6108acbd3cdaaae8b37d3d7ab3ccb234964071476346b8", "text": "This is a Feature Request What would you like to be Translate into Japanese. Why is this needed This page has not been translated. Comments /language ja /assign\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. as are any environment variables specified statically in the Docker image. as are any environment variables specified statically in the container image. ### Cluster information A list of all services that were running when a Container was created is available to that Container as environment variables. This list is limited to services within the same namespace as the new Container's Pod and Kubernetes control plane services. Those environment variables match the syntax of Docker links. For a service named *foo* that maps to a Container named *bar*, the following variables are defined:", "positive_passages": [{"docid": "doc-en-website-61ab1a83c47aa3d17cd7ab97b629d6c8bd3b657be571ef7a687aa70db7cc9faf", "text": "Ref: The page is centered around Docker examples and needs a rewrite in light of the Dockershim removal. /triage accepted /milestone 1.24\n/sig node\nHi, I would like to work on this but I may need a little help. When we say \"rewrite in light of the Dockershim removal\", does it just means removing the Docker references on the page ( i.e removing \"\" on this page) or something more is expected.\nThanks for taking this on. In my opinion, there are two issues to deal with here. The first is easy. Change \"Docker image\" to \"container image\". I believe the second instance refers to a legacy Docker feature called . I think it is safe to just remove that sentence.\nThankyou :) I'll make a PR by tomorrow /assign", "commid": "website_issue_30952", "tokennum": 174}], "negative_passages": []} {"query_id": "q-en-website-3f9d45485ef224d91d1e40d14103378a891eaa5edb56e9ae7b411fa5061cf320", "query": "kubectl label nodes --all node.kubernetes.io/exclude-from-external-load-balancers- ``` ### Joining your nodes {#join-nodes} The nodes are where your workloads (containers and Pods, etc) run. To add new nodes to your cluster do the following for each machine: * SSH to the machine * Become root (e.g. `sudo su -`) * [Install a runtime](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime) if needed * Run the command that was output by `kubeadm init`. For example: ```bash kubeadm join --token : --discovery-token-ca-cert-hash sha256: ``` If you do not have the token, you can get it by running the following command on the control-plane node: ```bash kubeadm token list ``` The output is similar to this: ```console TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS 8ewj1p.9r9hcjoqgajrj4gi 23h 2018-06-12T02:51:28Z authentication, The default bootstrap system: signing token generated by bootstrappers: 'kubeadm init'. kubeadm: default-node-token ``` By default, tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired, you can create a new token by running the following command on the control-plane node: ```bash kubeadm token create ``` The output is similar to this: ### Adding more control plane nodes ```console 5didvk.d09sbcov8ph2amjw ``` If you don't have the value of `--discovery-token-ca-cert-hash`, you can get it by running the following command chain on the control-plane node: ```bash openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' ``` The output is similar to: ```console 8cb2de97839780a412b93877f8507ad6c94f73add17d5d7058e91741c9d5ec78 ``` {{< note >}} To specify an IPv6 tuple for `:`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`. {{< /note >}} See [Creating Highly Available Clusters with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/) for steps on creating a high availability kubeadm cluster by adding more control plane nodes. The output should look something like: ### Adding worker nodes {#join-nodes} ``` [preflight] Running pre-flight checks The worker nodes are where your workloads run. ... (log output of join workflow) ... The following pages show how to add Linux and Windows worker nodes to the cluster by using the `kubeadm join` command: Node join complete: * Certificate signing request sent to control-plane and response received. * Kubelet informed of new secure connection details. Run 'kubectl get nodes' on control-plane to see this machine join. ``` A few seconds later, you should notice this node in the output from `kubectl get nodes` when run on the control-plane node. {{< note >}} As the cluster nodes are usually initialized sequentially, the CoreDNS Pods are likely to all run on the first control-plane node. To provide higher availability, please rebalance the CoreDNS Pods with `kubectl -n kube-system rollout restart deployment coredns` after at least one new node is joined. {{< /note >}} * [Adding Linux worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-linux-nodes/) * [Adding Windows worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/) ### (Optional) Controlling your cluster from machines other than the control-plane node", "positive_passages": [{"docid": "doc-en-website-bca665cc91ed1b12403f93d72c6bbae28e3192881674361221537e3c7066e4f0", "text": "Please note: This issue is not suitable for new contributors since you need some familiarity with how Kubernetes works. The Kubernetes website currently lacks a guide on creating Windows/Linux nodes. See for more details. SIG Windows opted to remove the guide that did exist for creating Windows nodes, in PR Write a new task page about creating nodes for all operating systems. This could, potentially, be in a tabbed format as mentions in the issue referenced above. We would also need the entry reflected on the creates the Linux task page by moving / refactoring the existing \"join node\" contents from the \"create a cluster\" page: creates the Windows task page by taking the content from at the end of the Windows page we add note/disclaimer whatever that says that CNI on Windows needs special handling and we link to the various CNI choices at: adds tabs in the to choose between OS for joining nodes. /priority backlog /help\nThis request has been marked as needing help from a contributor. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. ### Joining your nodes {#join-nodes} The nodes are where your workloads (containers and Pods, etc) run. To add new nodes to your cluster do the following for each machine: * SSH to the machine * Become root (e.g. `sudo su -`) * [Install a runtime](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime) if needed * Run the command that was output by `kubeadm init`. For example: ```bash kubeadm join --token : --discovery-token-ca-cert-hash sha256: ``` If you do not have the token, you can get it by running the following command on the control-plane node: ```bash kubeadm token list ``` The output is similar to this: ```console TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS 8ewj1p.9r9hcjoqgajrj4gi 23h 2018-06-12T02:51:28Z authentication, The default bootstrap system: signing token generated by bootstrappers: 'kubeadm init'. kubeadm: default-node-token ``` By default, tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired, you can create a new token by running the following command on the control-plane node: ```bash kubeadm token create ``` The output is similar to this: ### Adding more control plane nodes ```console 5didvk.d09sbcov8ph2amjw ``` If you don't have the value of `--discovery-token-ca-cert-hash`, you can get it by running the following command chain on the control-plane node: ```bash openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' ``` The output is similar to: ```console 8cb2de97839780a412b93877f8507ad6c94f73add17d5d7058e91741c9d5ec78 ``` {{< note >}} To specify an IPv6 tuple for `:`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`. {{< /note >}} See [Creating Highly Available Clusters with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/) for steps on creating a high availability kubeadm cluster by adding more control plane nodes. The output should look something like: ### Adding worker nodes {#join-nodes} ``` [preflight] Running pre-flight checks The worker nodes are where your workloads run. ... (log output of join workflow) ... The following pages show how to add Linux and Windows worker nodes to the cluster by using the `kubeadm join` command: Node join complete: * Certificate signing request sent to control-plane and response received. * Kubelet informed of new secure connection details. Run 'kubectl get nodes' on control-plane to see this machine join. ``` A few seconds later, you should notice this node in the output from `kubectl get nodes` when run on the control-plane node. {{< note >}} As the cluster nodes are usually initialized sequentially, the CoreDNS Pods are likely to all run on the first control-plane node. To provide higher availability, please rebalance the CoreDNS Pods with `kubectl -n kube-system rollout restart deployment coredns` after at least one new node is joined. {{< /note >}} * [Adding Linux worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-linux-nodes/) * [Adding Windows worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/) ### (Optional) Controlling your cluster from machines other than the control-plane node", "positive_passages": [{"docid": "doc-en-website-fde2c72d16cfae65992cfbd2a03512aefb2c38b934ae131fe128b569bc67ad68", "text": "/priority important-longterm\nRelevant to\n/retitle Write new task pages about creating Kubernetes nodes\n/cc\nDone in PR /close\nClosing this issue. Create a TLS secret from the given public/private key pair.

The public/private key pair must exist beforehand. The public key certificate must be .PEM encoded and match the given private key.

Usage

$ kubectl create tls NAME --cert=path/to/cert/file --key=path/to/key/file [--dry-run=server|client|none]

$ kubectl create secret tls NAME --cert=path/to/cert/file --key=path/to/key/file [--dry-run=server|client|none]

Flags

", "positive_passages": [{"docid": "doc-en-website-e010b0cd3dd69589f271d04d91a5f5a919058409194ce79b025b8056d76f33c3", "text": "Hello team. Recently I noticed that this page: shows wrong command. Instead of it should be I believe the fix should go into this file Please review. Thank you\n/assign\n- -- -- -- -- -- -- -Also see this:\nshould this issue and its corresponding PR be closed?\nclosed his prior PR, and opened . IMO it would be good to keep this issue open until the error in K8s Docs has been resolved. /kind bug\nOkay\n/triage accepted\nThe Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue or PR as fresh with Mark this issue or PR as rotten with Close this issue or PR with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /lifecycle stale [1]:\nShould the PR be opened in Kuberenetes/website?\n/remove-lifecycle stale", "commid": "website_issue_35577", "tokennum": 252}], "negative_passages": []} {"query_id": "q-en-website-414e0cc924f609a7ad189f20c06598bfb8361894034b43934a250e947d35ecb3", "query": "### CRI\u306e\u8a2d\u5b9a {#cri-configuration} CRI\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u95a2\u3059\u308b\u3055\u3089\u306a\u308b\u8a73\u7d30\u306f\u3001[CRI\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb](/docs/setup/cri/)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CRI\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u95a2\u3059\u308b\u3055\u3089\u306a\u308b\u8a73\u7d30\u306f\u3001[\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0](/ja/docs/setup/production-environment/container-runtimes/)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 #### {{< glossary_tooltip term_id=\"containerd\" >}}", "positive_passages": [{"docid": "doc-en-website-ce76db007c0a91a66f52e17aec135a19b1fc010ece3748a48d11e33013c9a8b5", "text": "This is a Feature Request ### \u5185\u7f6e\u5feb\u7167 etcd \u652f\u6301\u5185\u7f6e\u5feb\u7167\uff0c\u56e0\u6b64\u5907\u4efd etcd \u96c6\u7fa4\u5f88\u5bb9\u6613\u3002\u5feb\u7167\u53ef\u4ee5\u4ece\u4f7f\u7528 `etcdctl snapshot save` \u547d\u4ee4\u7684\u6d3b\u52a8\u6210\u5458\u4e2d\u83b7\u53d6\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ece etcd [\u6570\u636e\u76ee\u5f55](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/configuration.md#--data-dir)\u590d\u5236 `member/snap/db` \u6587\u4ef6\uff0c\u8be5 etcd \u6570\u636e\u76ee\u5f55\u76ee\u524d\u6ca1\u6709\u88ab etcd \u8fdb\u7a0b\u4f7f\u7528\u3002\u83b7\u53d6\u5feb\u7167\u901a\u5e38\u4e0d\u4f1a\u5f71\u54cd\u6210\u5458\u7684\u6027\u80fd\u3002 etcd \u652f\u6301\u5185\u7f6e\u5feb\u7167\u3002\u5feb\u7167\u53ef\u4ee5\u4ece\u4f7f\u7528 `etcdctl snapshot save` \u547d\u4ee4\u7684\u6d3b\u52a8\u6210\u5458\u4e2d\u83b7\u53d6\uff0c \u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ece etcd [\u6570\u636e\u76ee\u5f55](https://etcd.io/docs/current/op-guide/configuration/#--data-dir) \u590d\u5236 `member/snap/db` \u6587\u4ef6\uff0c\u8be5 etcd \u6570\u636e\u76ee\u5f55\u76ee\u524d\u6ca1\u6709\u88ab etcd \u8fdb\u7a0b\u4f7f\u7528\u3002\u83b7\u53d6\u5feb\u7167\u4e0d\u4f1a\u5f71\u54cd\u6210\u5458\u7684\u6027\u80fd\u3002 \u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u7528\u4e8e\u83b7\u53d6 `$ENDPOINT` \u6240\u63d0\u4f9b\u7684\u952e\u7a7a\u95f4\u7684\u5feb\u7167\u5230\u6587\u4ef6 `snapshotdb`\uff1a ```sh ```shell ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb # exit 0 ``` # verify the snapshot \u9a8c\u8bc1\u5feb\u7167: ```shell ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshotdb ``` ```console +----------+----------+------------+------------+ | HASH | REVISION | TOTAL KEYS | TOTAL SIZE | +----------+----------+------------+------------+", "positive_passages": [{"docid": "doc-en-website-e137b3467942095722d53969564746ac8d1e05b2a4541b803909ce4bfa1bd149", "text": "\" etcd \"client.cert \" etcd etcd \" \" etcd client.key etcd \"\n~ GitHub is not the right place for support requests.~ ~If you're looking for help, oyu could ask on .~ ~You can also post your question on the or the forum. There are other support venues with contributions from the wider community of Kubernetes users.~\n/triage accepted /kind bug\n/remove-kind support\nThanks\n/language zh\n/priority backlog", "commid": "website_issue_27444", "tokennum": 106}], "negative_passages": []} {"query_id": "q-en-website-55dfa405bbebed525fd40b156d11d8e94935d2d5924b7c7e32734da1558e8fb1", "query": "/docs/user-guide/persistent-volumes/index /docs/concepts/storage/persistent-volumes/ 301 /docs/user-guide/persistent-volumes/index.md /docs/concepts/storage/persistent-volumes/ 301 /docs/user-guide/persistent-volumes/walkthrough/ /docs/tasks/configure-pod-container/configure-persistent-volume-storage/ 301 /docs/user-guide/petset/ /docs/concepts/workloads/controllers/statefulset/ 301 /docs/user-guide/petset/bootstrapping/ /docs/concepts/workloads/controllers/statefulset/ 301 /docs/user-guide/pod-preset/ /docs/tasks/inject-data-application/podpreset/ 301 /docs/user-guide/pod-security-policy/ /docs/concepts/policy/pod-security-policy/ 301 /docs/user-guide/pod-states/ /docs/concepts/workloads/pods/pod-lifecycle/ 301", "positive_passages": [{"docid": "doc-en-website-8e046a5d937126ddf480ab6e6d32184fa95324a9857dc9ef5c2c2ff614ee417b", "text": "This is a... [ ] Feature Request [x] Bug Report Problem: There is a link missing that was supposed to be in section Differences between alpha PetSets and beta StatefulSets under it in the second point StatefulSet guards against split brain which ends with following text TODO: Link to doc about fencing. Change it and add the link that is required. Proposed Solution: Add link which is missing Page to Update:\nPetSet has long been replaced by StatefuSet and StatefulSet has been GA'ed in 1.9. So we are going to remove this page to avoid further confusion.", "commid": "website_issue_6484", "tokennum": 126}], "negative_passages": []} {"query_id": "q-en-website-56cbfdf8db340b82476138aca403be0cb890e2107ddb7592d0a775bdfaa4e9e4", "query": "# Install Docker CE apt-get update && apt-get install -y containerd.io=1.2.13-2 docker-ce=5:19.03.11~3-0~~ubuntu-$(lsb_release -cs) docker-ce-cli=5:19.03.11~3-0~~ubuntu-$(lsb_release -cs) docker-ce=5:19.03.11~3-0~ubuntu-$(lsb_release -cs) docker-ce-cli=5:19.03.11~3-0~ubuntu-$(lsb_release -cs) ``` ```shell", "positive_passages": [{"docid": "doc-en-website-52935f1fcecb5aa3943464fec8bd039a70dc18dee5acf0b72d3c9ea2b6e1c16b", "text": "This is a Bug Report Job\u306f1\u3064\u4ee5\u4e0a\u306ePod\u3092\u4f5c\u6210\u3057\u3001\u6307\u5b9a\u3055\u308c\u305f\u6570\u306ePod\u304c\u6b63\u5e38\u306b\u7d42\u4e86\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 Job\u306fPod\u306e\u6b63\u5e38\u7d42\u4e86\u3092\u8ffd\u8de1\u3057\u307e\u3059\u3002\u6b63\u5e38\u7d42\u4e86\u304c\u6307\u5b9a\u3055\u308c\u305f\u56de\u6570\u306b\u9054\u3059\u308b\u3068\u3001\u305d\u306e\u30bf\u30b9\u30af(\u3064\u307e\u308aJob)\u306f\u5b8c\u4e86\u3057\u307e\u3059\u3002Job\u3092\u524a\u9664\u3059\u308b\u3068\u3001\u305d\u306eJob\u304c\u4f5c\u6210\u3057\u305fPod\u304c\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3055\u308c\u307e\u3059\u3002 \u7c21\u5358\u306a\u4f8b\u3068\u3057\u3066\u306f\u30011\u3064\u306ePod\u3092\u78ba\u5b9f\u306b\u5b9f\u884c\u3057\u3066\u5b8c\u4e86\u3055\u305b\u308b\u305f\u3081\u306b\u30011\u3064\u306eJob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u30ce\u30fc\u30c9\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u969c\u5bb3\u3084\u30ce\u30fc\u30c9\u306e\u518d\u8d77\u52d5\u306a\u3069\u306b\u3088\u308a\u6700\u521d\u306ePod\u304c\u5931\u6557\u3057\u305f\u308a\u524a\u9664\u3055\u308c\u305f\u308a\u3057\u305f\u5834\u5408\u3001Job\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u65b0\u305f\u306aPod\u3092\u7acb\u3061\u4e0a\u3052\u307e\u3059\u3002 \u307e\u305f\u3001Job\u3092\u4f7f\u7528\u3057\u3066\u8907\u6570\u306ePod\u3092\u4e26\u884c\u3057\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 ## Job\u306e\u5b9f\u884c\u4f8b \u3053\u3053\u3067\u306f\u3001Job\u306e\u8a2d\u5b9a\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002\u03c0\u306e\u5024\u30922000\u6841\u76ee\u307e\u3067\u8a08\u7b97\u3057\u3066\u51fa\u529b\u3057\u307e\u3059\u3002 \u5b8c\u4e86\u307e\u3067\u306b10\u79d2\u7a0b\u5ea6\u304b\u304b\u308a\u307e\u3059\u3002 {{< codenew file=\"controllers/job.yaml\" >}} \u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067\u4f8b\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002 ```shell kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml ``` ``` job.batch/pi created ``` Job\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u306f\u3001`kubectl`\u3092\u7528\u3044\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002 ```shell kubectl describe jobs/pi ``` ``` Name: pi Namespace: default Selector: controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c Labels: controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c job-name=pi Annotations: kubectl.kubernetes.io/last-applied-configuration: {\"apiVersion\":\"batch/v1\",\"kind\":\"Job\",\"metadata\":{\"annotations\":{},\"name\":\"pi\",\"namespace\":\"default\"},\"spec\":{\"backoffLimit\":4,\"template\":... Parallelism: 1 Completions: 1 Start Time: Mon, 02 Dec 2019 15:20:11 +0200 Completed At: Mon, 02 Dec 2019 15:21:16 +0200 Duration: 65s Pods Statuses: 0 Running / 1 Succeeded / 0 Failed Pod Template: Labels: controller-uid=c9948307-e56d-4b5d-8302-ae2d7b7da67c job-name=pi Containers: pi: Image: perl Port: Host Port: Command: perl -Mbignum=bpi -wle print bpi(2000) Environment: Mounts: Volumes: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 14m job-controller Created pod: pi-5rwd7 ``` Job\u306e\u5b8c\u4e86\u3057\u305fPod\u3092\u8868\u793a\u3059\u308b\u306b\u306f\u3001`kubectl get pods`\u3092\u4f7f\u3044\u307e\u3059\u3002 \u3042\u308bJob\u306b\u5c5e\u3059\u308b\u3059\u3079\u3066\u306ePod\u306e\u4e00\u89a7\u3092\u6a5f\u68b0\u53ef\u8aad\u306a\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell pods=$(kubectl get pods --selector=job-name=pi --output=jsonpath='{.items[*].metadata.name}') echo $pods ``` ``` pi-5rwd7 ``` \u3053\u3053\u3067\u306e\u30bb\u30ec\u30af\u30bf\u30fc\u306f\u3001Job\u306e\u30bb\u30ec\u30af\u30bf\u30fc\u3068\u540c\u3058\u3067\u3059\u3002`--output = jsonpath`\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u8fd4\u3055\u308c\u305f\u30ea\u30b9\u30c8\u306e\u5404Pod\u304b\u3089\u540d\u524d\u3060\u3051\u3092\u53d6\u5f97\u3059\u308b\u5f0f\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3044\u305a\u308c\u304b\u306ePod\u306e\u6a19\u6e96\u51fa\u529b\u3092\u8868\u793a\u3057\u307e\u3059\u3002 ```shell kubectl logs $pods ``` \u51fa\u529b\u4f8b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 ```shell 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275901 ``` ## Job\u306e\u4ed5\u69d8\u306e\u4f5c\u6210 \u4ed6\u306e\u3059\u3079\u3066\u306eKubernetes\u306e\u8a2d\u5b9a\u3068\u540c\u69d8\u306b\u3001Job\u306b\u306f`apiVersion`\u3001` kind`\u3001\u304a\u3088\u3073`metadata`\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002 \u305d\u306e\u540d\u524d\u306f\u6709\u52b9\u306a[DNS\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u540d](/ja/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Job\u306b\u306f[`.spec`\u30bb\u30af\u30b7\u30e7\u30f3](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)\u3082\u5fc5\u8981\u3067\u3059\u3002 ### Pod\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 `.spec.template`\u306f\u3001`.spec`\u306e\u552f\u4e00\u306e\u5fc5\u9808\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002 `.spec.template`\u306f[Pod\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8](/ja/docs/concepts/workloads/pods/#pod-templates)\u3067\u3059\u3002 \u30cd\u30b9\u30c8\u3055\u308c\u3066\u304a\u308a\u3001`apiVersion`\u3084`kind`\u306a\u3044\u3053\u3068\u3092\u9664\u3051\u3070\u3001{{< glossary_tooltip text=\"Pod\" term_id=\"pod\" >}}\u3068\u307e\u3063\u305f\u304f\u540c\u3058\u30b9\u30ad\u30fc\u30de\u3092\u6301\u3061\u307e\u3059\u3002 Pod\u306e\u5fc5\u9808\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u52a0\u3048\u3066\u3001Job\u306ePod\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u306f\u3001\u9069\u5207\u306a\u30e9\u30d9\u30eb([Pod\u30bb\u30ec\u30af\u30bf\u30fc](#pod-selector)\u53c2\u7167)\u3068\u9069\u5207\u306a\u518d\u8d77\u52d5\u30dd\u30ea\u30b7\u30fc\u3092\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 `Never`\u307e\u305f\u306f`OnFailure`\u3068\u7b49\u3057\u3044[`RestartPolicy`](/ja/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)\u306e\u307f\u304c\u8a31\u53ef\u3055\u308c\u307e\u3059\u3002 ### Pod\u30bb\u30ec\u30af\u30bf\u30fc {#pod-selector} `.spec.selector`\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u6307\u5b9a\u3059\u3079\u304d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30bb\u30af\u30b7\u30e7\u30f3\u300c[\u72ec\u81ea\u306ePod\u30bb\u30ec\u30af\u30bf\u30fc\u306e\u6307\u5b9a](#specifying-your-own-pod-selector)\u300d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ### Job\u306e\u4e26\u5217\u5b9f\u884c {#parallel-jobs} Job\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u306e\u306b\u9069\u3057\u305f\u30bf\u30b9\u30af\u306f\u3001\u5927\u304d\u304f\u5206\u3051\u30663\u3064\u3042\u308a\u307e\u3059\u3002 1. \u975e\u4e26\u5217Job - \u901a\u5e38\u306f\u3001Pod\u304c\u5931\u6557\u3057\u306a\u3044\u9650\u308a\u30011\u3064\u306ePod\u306e\u307f\u304c\u8d77\u52d5\u3055\u308c\u307e\u3059\u3002 - \u305d\u306ePod\u304c\u6b63\u5e38\u306b\u7d42\u4e86\u3059\u308b\u3068\u3059\u3050\u306bJob\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002 2. *\u56fa\u5b9a\u306e\u5b8c\u4e86\u6570*\u3092\u6301\u3064\u4e26\u5217Job - `.spec.completions`\u306b\u30010\u4ee5\u5916\u306e\u6b63\u306e\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 - Job\u306f\u30bf\u30b9\u30af\u5168\u4f53\u3092\u8868\u3057\u30011\u304b\u3089`.spec.completions`\u306e\u7bc4\u56f2\u5185\u306e\u5404\u5024\u306b\u5bfe\u3057\u3066\u30011\u3064\u306e\u6210\u529f\u3057\u305fPod\u304c\u3042\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002 - **\u307e\u3060\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093**\u304c\u3001\u5404Pod\u306b\u306f\u30011\u304b\u3089`.spec.completions`\u306e\u7bc4\u56f2\u5185\u3067\u7570\u306a\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u6e21\u3055\u308c\u307e\u3059\u3002 3. *\u30ef\u30fc\u30af\u30ad\u30e5\u30fc*\u3092\u6301\u3064\u4e26\u5217Job - `.spec.completions`\u306f\u6307\u5b9a\u3057\u307e\u305b\u3093\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306f`.spec.parallelism`\u3067\u3059\u3002 - Pod\u306f\u3001\u305d\u308c\u305e\u308c\u304c\u4f55\u3092\u51e6\u7406\u3059\u308b\u304b\u6c7a\u5b9a\u3059\u308b\u305f\u3081\u306b\u3001 Pod\u9593\u307e\u305f\u306f\u5916\u90e8\u30b5\u30fc\u30d3\u30b9\u9593\u3067\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u3042\u308bPod\u306f\u30ef\u30fc\u30af\u30ad\u30e5\u30fc\u304b\u3089\u6700\u5927N\u500b\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u30d0\u30c3\u30c1\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 - \u5404Pod\u306f\u3059\u3079\u3066\u306e\u30d4\u30a2\u304c\u5b8c\u4e86\u3057\u305f\u304b\u3069\u3046\u304b\u3001\u3064\u307e\u308aJob\u5168\u4f53\u304c\u5b8c\u4e86\u3057\u305f\u304b\u3069\u3046\u304b\u3092\u3001\u72ec\u7acb\u3057\u3066\u5224\u65ad\u3067\u304d\u307e\u3059\u3002 - Job\u306e _\u4efb\u610f\u306e_ Pod\u304c\u6b63\u5e38\u7d42\u4e86\u3059\u308b\u3068\u3001\u65b0\u3057\u3044Pod\u306f\u4f5c\u6210\u3055\u308c\u307e\u305b\u3093\u3002 - \u5c11\u306a\u304f\u3068\u30821\u3064\u306ePod\u304c\u6b63\u5e38\u7d42\u4e86\u3057\u3001\u3059\u3079\u3066\u306ePod\u304c\u7d42\u4e86\u3059\u308b\u3068\u3001Job\u306f\u6b63\u5e38\u306b\u5b8c\u4e86\u3057\u307e\u3059\u3002 - Pod\u304c\u6b63\u5e38\u7d42\u4e86\u3057\u305f\u5f8c\u306f\u3001\u4ed6\u306ePod\u304c\u3053\u306e\u30bf\u30b9\u30af\u306e\u51e6\u7406\u3092\u884c\u3063\u305f\u308a\u3001\u51fa\u529b\u3092\u66f8\u304d\u8fbc\u3093\u3060\u308a\u3057\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3002\u305d\u308c\u3089\u306f\u3059\u3079\u3066\u7d42\u4e86\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 _\u975e\u4e26\u5217_ Job\u306e\u5834\u5408\u3001`.spec.completions`\u3068`.spec.parallelism`\u306e\u4e21\u65b9\u3092\u672a\u8a2d\u5b9a\u306e\u307e\u307e\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4e21\u65b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u3069\u3061\u3089\u3082\u30c7\u30d5\u30a9\u30eb\u30c8\u30671\u306b\u306a\u308a\u307e\u3059\u3002 _\u30ef\u30fc\u30af\u30ad\u30e5\u30fc_ \u3092\u6301\u3064Job\u306e\u5834\u5408\u3001`.spec.completions`\u3092\u672a\u8a2d\u5b9a\u306e\u307e\u307e\u306b\u3057\u3001`.spec.parallelism`\u3092\u975e\u8ca0\u6574\u6570\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u69d8\u3005\u306a\u7a2e\u985e\u306eJob\u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u30bb\u30af\u30b7\u30e7\u30f3\u300c[Job\u306e\u30d1\u30bf\u30fc\u30f3](#job-patterns)\u300d\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 #### \u4e26\u5217\u51e6\u7406\u306e\u5236\u5fa1 \u4e26\u5217\u51e6\u7406\u6570(`.spec.parallelism`)\u306b\u3064\u3044\u3066\u306f\u3001\u4efb\u610f\u306e\u975e\u8ca0\u6574\u6570\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002 \u6307\u5b9a\u3057\u306a\u3044\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u30671\u306b\u306a\u308a\u307e\u3059\u3002 0\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001\u4e26\u5217\u51e6\u7406\u6570\u304c\u5897\u3048\u308b\u307e\u3067\u3001Job\u306f\u5b9f\u8cea\u7684\u306b\u4e00\u6642\u505c\u6b62\u3055\u308c\u307e\u3059\u3002 \u4ee5\u4e0b\u306b\u6319\u3052\u308b\u69d8\u3005\u306a\u7406\u7531\u304b\u3089\u3001\u5b9f\u969b\u306e\u4e26\u5217\u51e6\u7406\u6570(\u4efb\u610f\u306e\u6642\u70b9\u3067\u5b9f\u884c\u3055\u308c\u308bPod\u306e\u6570)\u304c\u3001\u8981\u6c42\u3055\u308c\u305f\u6570\u3088\u308a\u591a\u3044\u5834\u5408\u3068\u5c11\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 - _\u56fa\u5b9a\u5b8c\u4e86\u6570_ \u3092\u6301\u3064Job\u306e\u5834\u5408\u3001\u4e26\u884c\u3057\u3066\u5b9f\u884c\u3055\u308c\u308bPod\u306e\u5b9f\u969b\u306e\u6570\u306f\u3001\u6b8b\u308a\u306e\u5b8c\u4e86\u6570\u3092\u8d85\u3048\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002`.spec.parallelism`\u306e\u5927\u304d\u3044\u5024\u306f\u4e8b\u5b9f\u4e0a\u7121\u8996\u3055\u308c\u307e\u3059\u3002 - _\u30ef\u30fc\u30af\u30ad\u30e5\u30fc_ \u3092\u6301\u3064Job\u306e\u5834\u5408\u3001Pod\u304c\u6210\u529f\u3057\u3066\u3082\u65b0\u3057\u3044Pod\u306f\u958b\u59cb\u3055\u308c\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u6b8b\u308a\u306ePod\u306f\u5b8c\u4e86\u3067\u304d\u307e\u3059\u3002 - Job\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc({{< glossary_tooltip term_id=\"controller\" >}})\u304c\u53cd\u5fdc\u3059\u308b\u6642\u9593\u304c\u306a\u3044\u5834\u5408\u3082\u8003\u3048\u3089\u308c\u307e\u3059\u3002 - Job\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304c\u4f55\u3089\u304b\u306e\u7406\u7531(`ResourceQuota`\u304c\u306a\u3044\u3001\u6a29\u9650\u304c\u306a\u3044\u306a\u3069)\u3067Pod\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u305f\u5834\u5408\u3001\u8981\u6c42\u3055\u308c\u305f\u6570\u3088\u308a\u3082\u5c11\u306a\u3044Pod\u6570\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 - Job\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u3001\u540c\u3058Job\u5185\u3067\u4ee5\u524d\u306ePod\u304c\u904e\u5270\u306b\u5931\u6557\u3057\u305f\u305f\u3081\u306b\u3001\u65b0\u3057\u3044Pod\u306e\u4f5c\u6210\u3092\u8abf\u6574\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 - Pod\u3092\u30b0\u30ec\u30fc\u30b9\u30d5\u30eb\u306b\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3057\u305f\u5834\u5408\u3001\u505c\u6b62\u307e\u3067\u306b\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002 ## Pod\u304a\u3088\u3073\u30b3\u30f3\u30c6\u30ca\u306e\u969c\u5bb3\u306e\u51e6\u7406 Pod\u5185\u306e\u30b3\u30f3\u30c6\u30ca\u306f\u3001\u305d\u306e\u4e2d\u306e\u30d7\u30ed\u30bb\u30b9\u304c0\u4ee5\u5916\u306e\u7d42\u4e86\u30b3\u30fc\u30c9\u3067\u7d42\u4e86\u3057\u305f\u3001\u307e\u305f\u306f\u30e1\u30e2\u30ea\u30fc\u5236\u9650\u3092\u8d85\u3048\u305f\u305f\u3081\u306b\u30b3\u30f3\u30c6\u30ca\u304c\u5f37\u5236\u7d42\u4e86\u3055\u308c\u305f\u306a\u3069\u3001\u3055\u307e\u3056\u307e\u306a\u7406\u7531\u3067\u5931\u6557\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u304c\u767a\u751f\u3057\u3001`.spec.template.spec.restartPolicy = \"OnFailure\"`\u3067\u3042\u5834\u5408\u3001Pod\u306f\u30ce\u30fc\u30c9\u306b\u6b8b\u308a\u307e\u3059\u304c\u3001\u30b3\u30f3\u30c6\u30ca\u306f\u518d\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30ed\u30fc\u30ab\u30eb\u3067\u518d\u8d77\u52d5\u3059\u308b\u30b1\u30fc\u30b9\u3092\u51e6\u7406\u3059\u308b\u304b\u3001`.spec.template.spec.restartPolicy = \"Never\"`\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 `restartPolicy`\u306e\u8a73\u7d30\u306a\u60c5\u5831\u306f\u3001[Pod\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb](/ja/docs/concepts/workloads/pods/pod-lifecycle/#example-states)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3055\u307e\u3056\u307e\u306a\u7406\u7531\u3067\u3001Pod\u5168\u4f53\u304c\u5931\u6557\u3059\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Pod\u304c(\u30ce\u30fc\u30c9\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3001\u518d\u8d77\u52d5\u3001\u524a\u9664\u306a\u3069\u306b\u3088\u308a)\u30ce\u30fc\u30c9\u304b\u3089\u5207\u308a\u96e2\u3055\u308c\u305f\u5834\u5408\u3084\u3001Pod\u306e\u30b3\u30f3\u30c6\u30ca\u304c\u5931\u6557\u3057\u3066`.spec.template.spec.restartPolicy = \"Never\"`\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306a\u3069\u3067\u3059\u3002Pod\u304c\u5931\u6557\u3057\u305f\u5834\u5408\u3001Job\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u65b0\u3057\u3044Pod\u3092\u958b\u59cb\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u65b0\u3057\u3044Pod\u3067\u518d\u8d77\u52d5\u3055\u308c\u305f\u30b1\u30fc\u30b9\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u306b\u3001\u524d\u306e\u5b9f\u884c\u306b\u3088\u3063\u3066\u767a\u751f\u3057\u305f\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u3001\u30ed\u30c3\u30af\u3001\u4e0d\u5b8c\u5168\u306a\u51fa\u529b\u306a\u3069\u306b\u5bfe\u3059\u308b\u51e6\u7406\u304c\u5fc5\u8981\u3067\u3059\u3002 \u305f\u3068\u3048`.spec.parallelism = 1`\u3001`.spec.completions = 1`\u3001`.spec.template.spec.restartPolicy = \"Never\"`\u3092\u6307\u5b9a\u3057\u3066\u3082\u3001\u540c\u3058\u30d7\u30ed\u30b0\u30e9\u30e0\u304c2\u56de\u8d77\u52d5\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 `.spec.parallelism`\u3068`.spec.completions`\u306e\u4e21\u65b9\u30921\u3088\u308a\u5927\u304d\u3044\u5024\u306b\u6307\u5b9a\u3057\u305f\u5834\u5408\u306f\u3001\u8907\u6570\u306ePod\u304c\u540c\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001Pod\u306f\u540c\u6642\u5b9f\u884c\u6027\u306b\u3082\u5bfe\u5fdc\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 ### Pod Backoff Failure Policy \u69cb\u6210\u306e\u8ad6\u7406\u30a8\u30e9\u30fc\u306a\u3069\u304c\u539f\u56e0\u3067\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u518d\u8a66\u884c\u5f8c\u306bJob\u3092\u5931\u6557\u3055\u305b\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u306b\u306f\u3001`.spec.backoffLimit`\u3092\u8a2d\u5b9a\u3057\u3066\u3001Job\u304c\u5931\u6557\u3057\u305f\u3068\u898b\u306a\u3059\u307e\u3067\u306e\u518d\u8a66\u884c\u56de\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f6\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u5931\u6557\u3057\u305fPod\u306f\u30016\u5206\u3092\u4e0a\u9650\u3068\u3059\u308b\u6307\u6570\u30d0\u30c3\u30af\u30aa\u30d5\u9045\u5ef6(10\u79d2\u300120\u79d2\u300140\u79d2...)\u306b\u5f93\u3063\u3066\u3001Job\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u3088\u308a\u518d\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002 Job\u306ePod\u304c\u524a\u9664\u3055\u308c\u308b\u304b\u3001Job\u306e\u4ed6\u306ePod\u304c\u305d\u306e\u6642\u9593\u306b\u5931\u6557\u3059\u308b\u3053\u3068\u306a\u304f\u6210\u529f\u3059\u308b\u3068\u3001\u30d0\u30c3\u30af\u30aa\u30d5\u30ab\u30a6\u30f3\u30c8\u304c\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u307e\u3059\u3002 {{< note >}} Job\u306b`restartPolicy = \"OnFailure\"`\u304c\u3042\u308b\u5834\u5408\u3001Job\u306e\u30d0\u30c3\u30af\u30aa\u30d5\u5236\u9650\u306b\u9054\u3059\u308b\u3068\u3001Job\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u304c\u7d42\u4e86\u3059\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a\u3001Job\u306e\u5b9f\u884c\u53ef\u80fd\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30d0\u30c3\u30b0\u304c\u3088\u308a\u56f0\u96e3\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002Job\u306e\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u307e\u305f\u306f\u30ed\u30ae\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001`restartPolicy = \"Never\"`\u3092\u8a2d\u5b9a\u3057\u3066\u3001\u5931\u6557\u3057\u305fJob\u304b\u3089\u306e\u51fa\u529b\u304c\u8aa4\u3063\u3066\u5931\u308f\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 {{< /note >}} ## Job\u306e\u7d42\u4e86\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7 Job\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001Pod\u306f\u4f5c\u6210\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u304c\u3001Pod\u306e\u524a\u9664\u3082\u884c\u308f\u308c\u307e\u305b\u3093\u3002\u305d\u308c\u3089\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u3068\u3001\u5b8c\u4e86\u3057\u305fPod\u306e\u30ed\u30b0\u3092\u8868\u793a\u3057\u3066\u3001\u30a8\u30e9\u30fc\u3001\u8b66\u544a\u3001\u307e\u305f\u306f\u305d\u306e\u4ed6\u306e\u8a3a\u65ad\u306e\u51fa\u529b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002 Job\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u5b8c\u4e86\u5f8c\u3082\u6b8b\u308b\u305f\u3081\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a\u3067\u304d\u307e\u3059\u3002\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u78ba\u8a8d\u3057\u305f\u5f8c\u3001\u53e4\u3044Job\u3092\u524a\u9664\u3059\u308b\u306e\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u8cac\u4efb\u3067\u3059\u3002`kubectl`(\u4f8b\u3048\u3070`kubectl delete jobs/pi`\u3084`kubectl delete -f ./job.yaml`)\u3092\u7528\u3044\u3066Job\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002`kubectl`\u3067Job\u3092\u524a\u9664\u3059\u308b\u3068\u3001Job\u304c\u4f5c\u6210\u3057\u305f\u3059\u3079\u3066\u306ePod\u3082\u524a\u9664\u3055\u308c\u307e\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001Pod\u304c\u5931\u6557\u3059\u308b(`restartPolicy=Never`)\u304b\u30b3\u30f3\u30c6\u30ca\u304c\u30a8\u30e9\u30fc\u3067\u7d42\u4e86\u3059\u308b(`restartPolicy=OnFailure`)\u5834\u5408\u3092\u9664\u304d\u3001Job\u306f\u4e2d\u65ad\u3055\u308c\u305a\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u6642\u70b9\u3067Job\u306f\u4e0a\u8a18\u306e`.spec.backoffLimit`\u306b\u5f93\u3044\u307e\u3059\u3002`.spec.backoffLimit`\u306b\u9054\u3059\u308b\u3068\u3001Job\u306f\u5931\u6557\u3068\u3057\u3066\u30de\u30fc\u30af\u3055\u308c\u3001\u5b9f\u884c\u4e2d\u306ePod\u306f\u3059\u3079\u3066\u7d42\u4e86\u3055\u308c\u307e\u3059\u3002 Job\u3092\u7d42\u4e86\u3059\u308b\u5225\u306e\u65b9\u6cd5\u306f\u3001\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u671f\u9650\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001Job\u306e`.spec.activeDeadlineSeconds`\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u79d2\u6570\u306b\u8a2d\u5b9a\u3057\u307e\u3059 `activeDeadlineSeconds`\u306f\u3001\u4f5c\u6210\u3055\u308c\u305fPod\u306e\u6570\u306b\u95a2\u4fc2\u306a\u304f\u3001Job\u306e\u671f\u9593\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002 Job\u304c`activeDeadlineSeconds`\u306b\u5230\u9054\u3059\u308b\u3068\u3001\u5b9f\u884c\u4e2d\u306e\u3059\u3079\u3066\u306ePod\u304c\u7d42\u4e86\u3057\u3001Job\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u306f`type: Failed`\u304a\u3088\u3073`reason: DeadlineExceeded`\u3068\u306a\u308a\u307e\u3059\u3002 Job\u306e`.spec.activeDeadlineSeconds`\u306f\u3001`.spec.backoffLimit`\u3088\u308a\u3082\u512a\u5148\u3055\u308c\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3057\u305f\u304c\u3063\u3066\u30011\u3064\u4ee5\u4e0a\u306e\u5931\u6557\u3057\u305fPod\u3092\u518d\u8a66\u884c\u3057\u3066\u3044\u308bJob\u306f\u3001`backoffLimit`\u306b\u307e\u3060\u9054\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3067\u3082\u3001`activeDeadlineSeconds`\u3067\u6307\u5b9a\u3055\u308c\u305f\u5236\u9650\u6642\u9593\u306b\u9054\u3059\u308b\u3068\u3001\u8ffd\u52a0\u306ePod\u3092\u30c7\u30d7\u30ed\u30a4\u3057\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306b\u4f8b\u3092\u6319\u3052\u307e\u3059\u3002 ```yaml apiVersion: batch/v1 kind: Job metadata: name: pi-with-timeout spec: backoffLimit: 5 activeDeadlineSeconds: 100 template: spec: containers: - name: pi image: perl command: [\"perl\", \"-Mbignum=bpi\", \"-wle\", \"print bpi(2000)\"] restartPolicy: Never ``` Job\u5185\u306eJob\u306e\u4ed5\u69d8\u3068[Pod\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u4ed5\u69d8](/ja/docs/concepts/workloads/pods/init-containers/#detailed-behavior)\u306e\u4e21\u65b9\u306b`activeDeadlineSeconds`\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u9069\u5207\u306a\u30ec\u30d9\u30eb\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 `restartPolicy`\u306fPod\u306b\u9069\u7528\u3055\u308c\u3001Job\u81ea\u4f53\u306b\u306f\u9069\u7528\u3055\u308c\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002Job\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u304c`type: Failed`\u306b\u306a\u308b\u3068\u3001Job\u306e\u81ea\u52d5\u518d\u8d77\u52d5\u306f\u884c\u308f\u308c\u307e\u305b\u3093\u3002 \u3064\u307e\u308a\u3001 `.spec.activeDeadlineSeconds`\u3068`.spec.backoffLimit`\u3067\u30a2\u30af\u30c6\u30a3\u30d6\u5316\u3055\u308c\u308bJob\u7d42\u4e86\u306e\u30e1\u30ab\u30cb\u30ba\u30e0\u306f\u3001\u624b\u4f5c\u696d\u3067\u306e\u4ecb\u5165\u304c\u5fc5\u8981\u306b\u306a\u308b\u3088\u3046\u306a\u6c38\u7d9a\u7684\u306aJob\u306e\u5931\u6557\u3092\u5f15\u304d\u8d77\u3053\u3057\u307e\u3059\u3002 ## \u7d42\u4e86\u3057\u305fJob\u306e\u81ea\u52d5\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7 \u7d42\u4e86\u3057\u305fJob\u306f\u3001\u901a\u5e38\u3001\u3082\u3046\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u308c\u3089\u3092\u30b7\u30b9\u30c6\u30e0\u5185\u306b\u4fdd\u6301\u3059\u308b\u3068\u3001API\u30b5\u30fc\u30d0\u30fc\u306b\u8ca0\u62c5\u304c\u304b\u304b\u308a\u307e\u3059\u3002[CronJobs](/ja/docs/concepts/workloads/controllers/cron-jobs/)\u306a\u3069\u306e\u4e0a\u4f4d\u30ec\u30d9\u30eb\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u3088\u3063\u3066Job\u304c\u76f4\u63a5\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u6307\u5b9a\u3055\u308c\u305f\u5bb9\u91cf\u30d9\u30fc\u30b9\u306e\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u30dd\u30ea\u30b7\u30fc\u306b\u57fa\u3065\u3044\u3066\u3001Job\u3092CronJobs\u3067\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3067\u304d\u307e\u3059\u3002 ### \u7d42\u4e86\u3057\u305fJob\u306eTTL\u30e1\u30ab\u30cb\u30ba\u30e0 {{< feature-state for_k8s_version=\"v1.12\" state=\"alpha\" >}} \u5b8c\u4e86\u3057\u305fJob(`Complete`\u307e\u305f\u306f`Failed`)\u3092\u81ea\u52d5\u7684\u306b\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3059\u308b\u5225\u306e\u65b9\u6cd5\u306f\u3001[TTL\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc](/ja/docs/concepts/workloads/controllers/ttlafterfinished/)\u304c\u63d0\u4f9b\u3059\u308bTTL\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u4f7f\u7528\u3057\u3066\u3001\u5b8c\u4e86\u3057\u305f\u30ea\u30bd\u30fc\u30b9\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3059\u3002Job\u306e`.spec.ttlSecondsAfterFinished`\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 TTL\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304cJob\u3092\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3059\u308b\u3068\u3001Job\u304c\u9023\u9396\u7684\u306b\u524a\u9664\u3055\u308c\u307e\u3059\u3002\u3064\u307e\u308a\u3001Pod\u306a\u3069\u306e\u4f9d\u5b58\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304cJob\u3068\u3068\u3082\u306b\u524a\u9664\u3055\u308c\u307e\u3059\u3002Job\u304c\u524a\u9664\u3055\u308c\u308b\u3068\u304d\u3001\u30d5\u30a1\u30a4\u30ca\u30e9\u30a4\u30b6\u30fc\u306a\u3069\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u4fdd\u8a3c\u304c\u512a\u5148\u3055\u308c\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4f8b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 ```yaml apiVersion: batch/v1 kind: Job metadata: name: pi-with-ttl spec: ttlSecondsAfterFinished: 100 template: spec: containers: - name: pi image: perl command: [\"perl\", \"-Mbignum=bpi\", \"-wle\", \"print bpi(2000)\"] restartPolicy: Never ``` Job`pi-with-ttl`\u306f\u3001Job\u304c\u7d42\u4e86\u3057\u3066\u304b\u3089`100`\u79d2\u5f8c\u306b\u81ea\u52d5\u7684\u306b\u524a\u9664\u3055\u308c\u308b\u3002 \u30d5\u30a3\u30fc\u30eb\u30c9\u304c`0`\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001Job\u306f\u7d42\u4e86\u5f8c\u3059\u3050\u306b\u81ea\u52d5\u7684\u306b\u524a\u9664\u3055\u308c\u307e\u3059\u3002\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u3053\u306eJob\u306f\u7d42\u4e86\u5f8c\u306bTTL\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u3088\u3063\u3066\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3055\u308c\u307e\u305b\u3093\u3002 \u3053\u306eTTL\u30e1\u30ab\u30cb\u30ba\u30e0\u306f\u30a2\u30eb\u30d5\u30a1\u7248\u3067\u3042\u308a\u3001`TTLAfterFinished`\u30d5\u30a3\u30fc\u30c1\u30e3\u30fc\u30b2\u30fc\u30c8\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8a73\u7d30\u306f[TTL\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc](/ja/docs/concepts/workloads/controllers/ttlafterfinished/)\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ## Job\u306e\u30d1\u30bf\u30fc\u30f3 {#job-patterns} Job\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001Pod\u306e\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u4e26\u5217\u5b9f\u884c\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002Job\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001\u79d1\u5b66\u7684\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3067\u4e00\u822c\u7684\u306b\u898b\u3089\u308c\u308b\u3088\u3046\u306a\u3001\u5bc6\u63a5\u306b\u901a\u4fe1\u3059\u308b\u4e26\u5217\u30d7\u30ed\u30bb\u30b9\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306f\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u72ec\u7acb\u3057\u3066\u3044\u308b\u304c\u95a2\u9023\u6027\u306e\u3042\u308b*\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0*\u306e\u96c6\u5408\u306e\u4e26\u5217\u51e6\u7406\u306f\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u9001\u4fe1\u3059\u308b\u96fb\u5b50\u30e1\u30fc\u30eb\u3001\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u30d5\u30ec\u30fc\u30e0\u3001\u30c8\u30e9\u30f3\u30b9\u30b3\u30fc\u30c9\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3001\u30b9\u30ad\u30e3\u30f3\u3059\u308bNoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30ad\u30fc\u306e\u7bc4\u56f2\u306a\u3069\u3067\u3059\u3002 \u8907\u96d1\u306a\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u8907\u6570\u306e\u7570\u306a\u308b\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u96c6\u5408\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3053\u3053\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u307e\u3068\u3081\u3066\u7ba1\u7406\u3057\u305f\u3044\u4f5c\u696d\u9805\u76ee\u306e1\u3064\u306e\u96c6\u5408(\u30d0\u30c3\u30c1Job)\u3092\u8003\u3048\u3066\u3044\u307e\u3059\u3002 \u4e26\u5217\u8a08\u7b97\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u30d1\u30bf\u30fc\u30f3\u304c\u3042\u308a\u3001\u305d\u308c\u305e\u308c\u9577\u6240\u3068\u77ed\u6240\u304c\u3042\u308a\u307e\u3059\u3002 \u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 - \u5404\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u306b1\u3064\u306eJob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3068\u3001\u3059\u3079\u3066\u306e\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u306b1\u3064\u306eJob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3092\u6bd4\u8f03\u3059\u308b\u3068\u3001\u5f8c\u8005\u306e\u65b9\u304c\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u6570\u304c\u591a\u3044\u5834\u5408\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u524d\u8005\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u3068\u30b7\u30b9\u30c6\u30e0\u304c\u5927\u91cf\u306eJob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u767a\u751f\u3057\u307e\u3059\u3002 - \u4f5c\u6210\u3055\u308c\u305fPod\u306e\u6570\u304c\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u6570\u306b\u7b49\u3057\u3044\u5834\u5408\u3068\u3001\u5404Pod\u304c\u8907\u6570\u306e\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u3092\u6bd4\u8f03\u3059\u308b\u3068\u3001\u524d\u8005\u306e\u65b9\u304c\u4e00\u822c\u7684\u306b\u65e2\u5b58\u306e\u30b3\u30fc\u30c9\u3084\u30b3\u30f3\u30c6\u30ca\u3078\u306e\u5909\u66f4\u304c\u5c11\u306a\u3044\u3067\u3059\u3002\u5f8c\u8005\u306f\u4e0a\u8a18\u306e\u9805\u76ee\u3068\u540c\u69d8\u306e\u7406\u7531\u3067\u3001\u5927\u91cf\u306e\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u3092\u51e6\u7406\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002 - \u3044\u304f\u3064\u304b\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u306f\u3001\u30ef\u30fc\u30af\u30ad\u30e5\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30ad\u30e5\u30fc\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u65e2\u5b58\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3084\u30b3\u30f3\u30c6\u30ca\u3092\u5909\u66f4\u3057\u3066\u30ef\u30fc\u30af\u30ad\u30e5\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4ed6\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306f\u3001\u65e2\u5b58\u306e\u30b3\u30f3\u30c6\u30ca\u5316\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u9069\u5fdc\u3059\u308b\u306e\u304c\u3055\u3089\u306b\u5bb9\u6613\u3067\u3059\u3002 \u3053\u3053\u3067\u306f\u3001\u4e0a\u8a18\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u306b\u5bfe\u5fdc\u3059\u308b\u3082\u306e\u3092\u30012\u304b\u30894\u5217\u76ee\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002 \u30d1\u30bf\u30fc\u30f3\u540d\u306f\u3001\u4f8b\u3068\u3088\u308a\u8a73\u7d30\u306a\u8aac\u660e\u3078\u306e\u30ea\u30f3\u30af\u3067\u3082\u3042\u308a\u307e\u3059\u3002 | \u30d1\u30bf\u30fc\u30f3\u540d | \u5358\u4e00\u306eJob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 | \u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u3088\u308aPod\u304c\u5c11\u306a\u3044\u304b\uff1f | \u30a2\u30d7\u30ea\u3092\u305d\u306e\u307e\u307e\u4f7f\u7528\u3059\u308b\u304b\uff1f | Kube 1.1\u3067\u52d5\u4f5c\u3059\u308b\u304b\uff1f | | ----------------------------------------------------------------------------------------------- |:-----------------:|:---------------------------:|:-------------------:|:-------------------:| | [Job\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u62e1\u5f35\u3059\u308b](/ja/docs/tasks/job/parallel-processing-expansion/) | | | \u2713 | \u2713 | | [\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u3054\u3068\u306bPod\u3067\u30ad\u30e5\u30fc\u3092\u4f5c\u6210\u3059\u308b](/ja/docs/tasks/job/coarse-parallel-processing-work-queue/) | \u2713 | | \u5834\u5408\u306b\u3088\u308b | \u2713 | | [Pod\u6570\u304c\u53ef\u5909\u3067\u3042\u308b\u30ad\u30e5\u30fc\u3092\u4f5c\u6210\u3059\u308b](/ja/docs/tasks/job/fine-parallel-processing-work-queue/) | \u2713 | \u2713 | | \u2713 | | \u5358\u4e00\u306eJob\u9759\u7684\u306a\u51e6\u7406\u3092\u5272\u308a\u5f53\u3066\u308b | \u2713 | | \u2713 | | \u5b8c\u4e86\u6570\u3092`.spec.completions`\u3067\u6307\u5b9a\u3059\u308b\u3068\u3001Job\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304c\u4f5c\u6210\u3057\u305f\u5404Pod\u306f\u540c\u3058[`spec`](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)\u3092\u6301\u3061\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u3042\u308b\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u3059\u3079\u3066\u306ePod\u306f\u3001\u540c\u3058\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3068\u540c\u3058\u30a4\u30e1\u30fc\u30b8\u3001\u540c\u3058\u30dc\u30ea\u30e5\u30fc\u30e0\u3001\u305d\u3057\u3066(\u307b\u307c)\u540c\u3058\u74b0\u5883\u5909\u6570\u3092\u6301\u3061\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30d1\u30bf\u30fc\u30f3\u306f\u3001Pod\u304c\u7570\u306a\u308b\u51e6\u7406\u3092\u884c\u3046\u3088\u3046\u306b\u914d\u7f6e\u3059\u308b\u305f\u3081\u306e\u69d8\u3005\u306a\u65b9\u6cd5\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u8868\u3067\u306f\u3001\u30d1\u30bf\u30fc\u30f3\u3054\u3068\u306b\u5fc5\u8981\u306a`.spec.parallelism`\u3068`.spec.completions`\u306e\u8a2d\u5b9a\u3092\u793a\u3057\u307e\u3059\u3002 \u3053\u3053\u3067\u3001`W`\u306f\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u6570\u3068\u3057\u307e\u3059\u3002 | \u30d1\u30bf\u30fc\u30f3\u540d | `.spec.completions` | `.spec.parallelism` | | ----------------------------------------------------------------------------------------------- |:-------------------:|:--------------------:| | [Job\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u62e1\u5f35\u3059\u308b](/ja/docs/tasks/job/parallel-processing-expansion/) | 1 | 1\u3068\u3059\u308b\u5fc5\u8981\u3042\u308a | | [\u30ef\u30fc\u30af\u30a2\u30a4\u30c6\u30e0\u3054\u3068\u306bPod\u3067\u30ad\u30e5\u30fc\u3092\u4f5c\u6210\u3059\u308b](/ja/docs/tasks/job/coarse-parallel-processing-work-queue/) | W | \u4efb\u610f | | [Pod\u6570\u304c\u53ef\u5909\u3067\u3042\u308b\u30ad\u30e5\u30fc\u3092\u4f5c\u6210\u3059\u308b](/ja/docs/tasks/job/fine-parallel-processing-work-queue/) | 1 | \u4efb\u610f | | \u5358\u4e00\u306eJob\u9759\u7684\u306a\u51e6\u7406\u3092\u5272\u308a\u5f53\u3066\u308b | W | \u4efb\u610f | ## \u9ad8\u5ea6\u306a\u4f7f\u7528\u65b9\u6cd5 ### \u72ec\u81ea\u306ePod\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u6307\u5b9a\u3059\u308b {#specifying-your-own-pod-selector} \u901a\u5e38\u3001Job\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u969b\u306b\u306f`.spec.selector`\u3092\u6307\u5b9a\u3057\u307e\u305b\u3093\u3002 \u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ed\u30b8\u30c3\u30af\u3067\u3001Job\u306e\u4f5c\u6210\u6642\u306b\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u30bb\u30ec\u30af\u30bf\u30fc\u306e\u5024\u306f\u3001\u4ed6\u306eJob\u3068\u91cd\u8907\u3057\u306a\u3044\u3088\u3046\u306b\u9078\u629e\u3055\u308c\u307e\u3059\u3002 \u3057\u304b\u3057\u3001\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u3001\u3053\u306e\u81ea\u52d5\u7684\u306b\u8a2d\u5b9a\u3055\u308c\u308b\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u4e0a\u66f8\u304d\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001Job\u306e`.spec.selector`\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u308c\u3092\u884c\u3046\u969b\u306b\u306f\u5341\u5206\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u3082\u3057\u6307\u5b9a\u3057\u305f\u30e9\u30d9\u30eb\u30bb\u30ec\u30af\u30bf\u30fc\u304c\u3001\u305d\u306eJob\u306ePod\u306b\u5bfe\u3057\u3066\u56fa\u6709\u3067\u306a\u304f\u3001\u7121\u95a2\u4fc2\u306aPod\u306b\u30de\u30c3\u30c1\u3059\u308b\u5834\u5408\u3001\u7121\u95a2\u4fc2\u306aJob\u306ePod\u304c\u524a\u9664\u3055\u308c\u305f\u308a\u3001\u3053\u306eJob\u304c\u4ed6\u306ePod\u3092\u5b8c\u4e86\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u30ab\u30a6\u30f3\u30c8\u3057\u305f\u308a\u3001\u4e00\u65b9\u307e\u305f\u306f\u4e21\u65b9\u306eJob\u304cPod\u306e\u4f5c\u6210\u3084\u5b8c\u4e86\u307e\u3067\u5b9f\u884c\u3092\u62d2\u5426\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u3082\u3057\u56fa\u6709\u3067\u306a\u3044\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u306f\u3001\u4ed6\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc(\u4f8b\u3048\u3070\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306a\u3069)\u3084\u305d\u306ePod\u3082\u4e88\u6e2c\u4e0d\u80fd\u306a\u52d5\u4f5c\u3092\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002Kubernetes\u306f`.spec.selector`\u3092\u6307\u5b9a\u3059\u308b\u969b\u306e\u30df\u30b9\u3092\u9632\u3050\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002 \u3053\u3053\u3067\u306f\u3001\u3053\u306e\u6a5f\u80fd\u3092\u4f7f\u3044\u305f\u304f\u306a\u308b\u3088\u3046\u306a\u30b1\u30fc\u30b9\u306e\u4f8b\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002 `old`\u3068\u3044\u3046Job\u304c\u3059\u3067\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002\u65e2\u5b58\u306ePod\u3092\u5b9f\u884c\u3057\u7d9a\u3051\u305f\u3044\u304c\u3001\u4f5c\u6210\u3057\u305f\u6b8b\u308a\u306ePod\u306b\u306f\u5225\u306ePod\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3001Job\u306b\u306f\u65b0\u3057\u3044\u540d\u524d\u3092\u4ed8\u3051\u305f\u3044\u3068\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u66f4\u65b0\u304c\u4e0d\u53ef\u80fd\u3067\u3042\u308b\u305f\u3081\u3001Job\u3092\u66f4\u65b0\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002 \u305d\u306e\u305f\u3081\u3001`kubectl delete jobs/old --cascade=false`\u3092\u4f7f\u3063\u3066\u3001`old`\u3068\u3044\u3046Job\u3092\u524a\u9664\u3057\u3001\u4e00\u65b9\u3067 _\u305d\u306ePod\u306f\u5b9f\u884c\u3057\u305f\u307e\u307e_ \u306b\u3057\u307e\u3059\u3002 \u524a\u9664\u3059\u308b\u524d\u306b\u3001\u3069\u306e\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u4f7f\u3063\u3066\u3044\u308b\u304b\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059\u3002 ``` kubectl get job old -o yaml ``` ``` kind: Job metadata: name: old ... spec: selector: matchLabels: controller-uid: a8f3d00d-c6d2-11e5-9f87-42010af00002 ... ``` \u6b21\u306b`new`\u3068\u3044\u3046\u540d\u524d\u306e\u65b0\u3057\u3044Job\u3092\u4f5c\u6210\u3057\u3001\u540c\u3058\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u660e\u793a\u7684\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 \u65e2\u5b58\u306ePod\u306b\u306f`controller-uid=a8f3d00d-c6d2-11e5-9f87-42010af00002`\u3068\u3044\u3046\u30e9\u30d9\u30eb\u304c\u4ed8\u3044\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u3089\u3082\u540c\u69d8\u306bJob`new`\u3067\u5236\u5fa1\u3055\u308c\u307e\u3059\u3002 \u30b7\u30b9\u30c6\u30e0\u304c\u81ea\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u65b0\u3057\u3044Job\u3067\u306f`manualSelector: true`\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 ``` kind: Job metadata: name: new ... spec: manualSelector: true selector: matchLabels: controller-uid: a8f3d00d-c6d2-11e5-9f87-42010af00002 ... ``` \u65b0\u3057\u3044Job\u81ea\u4f53\u306f`a8f3d00d-c6d2-11e5-9f87-42010af00002`\u3068\u306f\u7570\u306a\u308buid\u3092\u6301\u3064\u3067\u3057\u3087\u3046\u3002 `manualSelector: true`\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u3042\u306a\u305f\u304c\u4f55\u3092\u3057\u3066\u3044\u308b\u304b\u3092\u77e5\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u30b7\u30b9\u30c6\u30e0\u306b\u4f1d\u3048\u3001\u3053\u306e\u4e0d\u4e00\u81f4\u3092\u8a31\u5bb9\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002 ## \u4ee3\u66ff\u6848 ### \u30d9\u30a2Pod Pod\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u30ce\u30fc\u30c9\u304c\u518d\u8d77\u52d5\u3057\u305f\u308a\u969c\u5bb3\u304c\u767a\u751f\u3057\u305f\u308a\u3059\u308b\u3068\u3001Pod\u306f\u7d42\u4e86\u3057\u3001\u518d\u8d77\u52d5\u3055\u308c\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001Job\u306f\u7d42\u4e86\u3057\u305fPod\u3092\u7f6e\u304d\u63db\u3048\u308b\u305f\u3081\u306b\u65b0\u3057\u3044Pod\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u306e\u305f\u3081\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u5358\u4e00\u306ePod\u3057\u304b\u5fc5\u8981\u3068\u3057\u306a\u3044\u5834\u5408\u3067\u3082\u3001\u30d9\u30a2Pod\u3067\u306f\u306a\u304fJob\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 ### \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc Job\u306f[\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc](/ja/docs/user-guide/replication-controller)\u3092\u88dc\u5b8c\u3059\u308b\u3082\u306e\u3067\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u7d42\u4e86\u304c\u4e88\u60f3\u3055\u308c\u306a\u3044Pod(\u4f8b\u3048\u3070Web\u30b5\u30fc\u30d0\u30fc)\u3092\u7ba1\u7406\u3057\u3001Job\u306f\u7d42\u4e86\u304c\u4e88\u60f3\u3055\u308c\u308bPod(\u4f8b\u3048\u3070\u30d0\u30c3\u30c1\u30bf\u30b9\u30af)\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002 [Pod\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb](/ja/docs/concepts/workloads/pods/pod-lifecycle/)\u3067\u8aac\u660e\u3057\u305f\u3088\u3046\u306b\u3001`Job`\u306f`RestartPolicy`\u304c`OnFailure`\u307e\u305f\u306f`Never`\u3068\u7b49\u3057\u3044Pod\u306b\u5bfe\u3057\u3066*\u306e\u307f*\u9069\u5207\u3067\u3059\u3002 (\u6ce8\u610f: `RestartPolicy`\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f`Always`\u3067\u3059\u3002) ### \u5358\u4e00\u306eJob\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fcPod\u3092\u8d77\u52d5 \u3082\u3046\u4e00\u3064\u306e\u30d1\u30bf\u30fc\u30f3\u306f\u3001\u5358\u4e00\u306eJob\u3067Pod\u3092\u4f5c\u6210\u3057\u3001\u305d\u306ePod\u304c\u4ed6\u306ePod\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3089\u306ePod\u306b\u5bfe\u3059\u308b\u30ab\u30b9\u30bf\u30e0\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002\u3053\u308c\u306f\u6700\u3082\u67d4\u8edf\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u59cb\u3081\u308b\u306e\u304c\u3084\u3084\u8907\u96d1\u3067\u3001Kubernetes\u3068\u306e\u7d71\u5408\u6027\u304c\u4f4e\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u3053\u306e\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u3068\u3057\u3066\u3001Pod\u3092\u8d77\u52d5\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308bJob\u304cSpark\u30de\u30b9\u30bf\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc([Spark\u306e\u4f8b](https://github.com/kubernetes/examples/tree/{{< param \"githubbranch\" >}}/staging/spark/README.md)\u3092\u53c2\u7167)\u3092\u8d77\u52d5\u3057\u3001Spark\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u5b9f\u884c\u3057\u3066\u304b\u3089\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306e\u5229\u70b9\u306f\u3001\u5168\u4f53\u7684\u306a\u30d7\u30ed\u30bb\u30b9\u304cJob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5b8c\u4e86\u3059\u308b\u4fdd\u8a3c\u3092\u5f97\u306a\u304c\u3089\u3082\u3001\u3069\u306e\u3088\u3046\u306aPod\u304c\u4f5c\u6210\u3055\u308c\u3001\u3069\u306e\u3088\u3046\u306b\u4f5c\u696d\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u304b\u3092\u5b8c\u5168\u306b\u5236\u5fa1\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002 ## Cron Job {#cron-jobs} Unix\u306e\u30c4\u30fc\u30eb\u3067\u3042\u308b`cron`\u3068\u540c\u69d8\u306b\u3001\u6307\u5b9a\u3057\u305f\u65e5\u6642\u306b\u5b9f\u884c\u3055\u308c\u308bJob\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3001[`CronJob`](/ja/docs/concepts/workloads/controllers/cron-jobs/)\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 ", "positive_passages": [{"docid": "doc-en-website-1309f0fae404066cffc8f0a8c3bb5e33b429d62a46f011daeae544de5059fa0b", "text": "This is a Feature Request **\u4f5c\u8005**\uff1aFrederico Mu\u00f1oz (SAS) \u81ea Kubernetes \u8bde\u751f\u4e4b\u521d\uff0c\u6301\u4e45\u6570\u636e\u4ee5\u53ca\u5982\u4f55\u89e3\u51b3\u6709\u72b6\u6001\u5e94\u7528\u7a0b\u5e8f\u7684\u9700\u6c42\u4e00\u76f4\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u8bdd\u9898\u3002 \u5bf9\u65e0\u72b6\u6001\u90e8\u7f72\u7684\u652f\u6301\u662f\u5f88\u81ea\u7136\u7684\u3001\u4ece\u4e00\u5f00\u59cb\u5c31\u5b58\u5728\u7684\uff0c\u5e76\u5f15\u8d77\u4e86\u4eba\u4eec\u7684\u5173\u6ce8\uff0c\u53d8\u5f97\u4f17\u6240\u5468\u77e5\u3002 \u4ece\u65e9\u671f\u5f00\u59cb\uff0c\u6211\u4eec\u4e5f\u81f4\u529b\u4e8e\u66f4\u597d\u5730\u652f\u6301\u6709\u72b6\u6001\u5e94\u7528\u7a0b\u5e8f\uff0c\u6bcf\u4e2a\u7248\u672c\u90fd\u589e\u52a0\u4e86\u53ef\u4ee5\u5728 Kubernetes \u4e0a\u8fd0\u884c\u7684\u8303\u56f4\u3002 \u6d88\u606f\u961f\u5217\u3001\u6570\u636e\u5e93\u3001\u96c6\u7fa4\u6587\u4ef6\u7cfb\u7edf\uff1a\u8fd9\u4e9b\u662f\u5177\u6709\u4e0d\u540c\u5b58\u50a8\u8981\u6c42\u7684\u89e3\u51b3\u65b9\u6848\u7684\u4e00\u4e9b\u793a\u4f8b\uff0c \u5982\u4eca\u8fd9\u4e9b\u89e3\u51b3\u65b9\u6848\u8d8a\u6765\u8d8a\u591a\u5730\u90e8\u7f72\u5728 Kubernetes \u4e2d\u3002 \u5904\u7406\u6765\u81ea\u8bb8\u591a\u4e0d\u540c\u4f9b\u5e94\u5546\u7684\u4e34\u65f6\u548c\u6301\u4e45\u5b58\u50a8\uff08\u672c\u5730\u6216\u8fdc\u7a0b\u3001\u6587\u4ef6\u6216\u5757\uff09\uff0c\u540c\u65f6\u8003\u8651\u5982\u4f55\u63d0\u4f9b\u7528\u6237\u671f\u671b\u7684\u6240\u9700\u5f39\u6027\u548c\u6570\u636e\u4e00\u81f4\u6027\uff0c \u6240\u6709\u8fd9\u4e9b\u90fd\u5728 SIG Storage \u7684\u6574\u4f53\u8d1f\u8d23\u8303\u56f4\u4e4b\u5185\u3002 \u5728\u8fd9\u6b21 SIG Storage \u91c7\u8bbf\u62a5\u9053\u4e2d\uff0c[Frederico Mu\u00f1oz](https://twitter.com/fredericomunoz) \uff08SAS \u7684\u4e91\u548c\u67b6\u6784\u8d1f\u8d23\u4eba\uff09\u4e0e VMware \u6280\u672f\u8d1f\u8d23\u4eba\u517c SIG Storage \u8054\u5408\u4e3b\u5e2d [Xing Yang](https://twitter.com/2000xyang)\uff0c\u8ba8\u8bba\u4e86 SIG \u7684\u7ec4\u7ec7\u65b9\u5f0f\u3001\u5f53\u524d\u7684\u6311\u6218\u662f\u4ec0\u4e48\u4ee5\u53ca\u5982\u4f55\u8fdb\u884c\u53c2\u4e0e\u548c\u8d21\u732e\u3002 ## \u5173\u4e8e SIG Storage **Frederico (FSM)**\uff1a\u4f60\u597d\uff0c\u611f\u8c22\u4f60\u7ed9\u6211\u8fd9\u4e2a\u673a\u4f1a\u4e86\u89e3\u66f4\u591a\u5173\u4e8e SIG Storage \u7684\u60c5\u51b5\u3002 \u4f60\u80fd\u5426\u4ecb\u7ecd\u4e00\u4e0b\u4f60\u81ea\u5df1\u3001\u4f60\u7684\u89d2\u8272\u4ee5\u53ca\u4f60\u662f\u5982\u4f55\u53c2\u4e0e SIG Storage \u7684\u3002 **Xing Yang (XY)**\uff1a\u6211\u662f VMware \u7684\u6280\u672f\u4e3b\u7ba1\uff0c\u4ece\u4e8b\u4e91\u539f\u751f\u5b58\u50a8\u65b9\u9762\u7684\u5de5\u4f5c\u3002\u6211\u4e5f\u662f SIG Storage \u7684\u8054\u5408\u4e3b\u5e2d\u3002 \u6211\u4ece 2017 \u5e74\u5e95\u5f00\u59cb\u53c2\u4e0e K8s SIG Storage\uff0c\u5f00\u59cb\u4e3a [VolumeSnapshot](https://kubernetes.io/zh-cn/docs/concepts/storage/volume-snapshots/) \u9879\u76ee\u505a\u8d21\u732e\u3002 \u90a3\u65f6\uff0cVolumeSnapshot \u9879\u76ee\u4ecd\u5904\u4e8e\u5b9e\u9a8c\u6027\u7684 pre-alpha \u9636\u6bb5\u3002\u5b83\u9700\u8981\u8d21\u732e\u8005\u3002\u6240\u4ee5\u6211\u81ea\u613f\u63d0\u4f9b\u5e2e\u52a9\u3002 \u7136\u540e\u6211\u4e0e\u5176\u4ed6\u793e\u533a\u6210\u5458\u5408\u4f5c\uff0c\u5728 2018 \u5e74\u7684 K8s 1.12 \u7248\u672c\u4e2d\u5c06 VolumeSnapshot \u5e26\u5165 Alpha\uff0c 2019 \u5e74\u5728 K8s 1.17 \u7248\u672c\u4e2d\u5e26\u5165 Beta\uff0c\u5e76\u6700\u7ec8\u5728 2020 \u5e74\u5728 1.20 \u7248\u672c\u4e2d\u5e26\u5165 GA\u3002 **FSM**\uff1a\u4ec5\u4ec5\u9605\u8bfb [SIG Storage \u7ae0\u7a0b](https://github.com/kubernetes/community/blob/master/sig-storage/charter.md) \u5c31\u53ef\u4ee5\u770b\u51fa\uff0cSIG Storage \u6db5\u76d6\u4e86\u5f88\u591a\u9886\u57df\uff0c\u4f60\u80fd\u63cf\u8ff0\u4e00\u4e0b SIG \u7684\u7ec4\u7ec7\u65b9\u5f0f\u5417\uff1f **XY**\uff1a\u5728 SIG Storage \u4e2d\uff0c\u6709\u4e24\u4f4d\u8054\u5408\u4e3b\u5e2d\u548c\u4e24\u4f4d\u6280\u672f\u4e3b\u7ba1\u3002\u6765\u81ea Google \u7684 Saad Ali \u548c\u6211\u662f\u8054\u5408\u4e3b\u5e2d\u3002 \u6765\u81ea Google \u7684 Michelle Au \u548c\u6765\u81ea Red Hat \u7684 Jan \u0160afr\u00e1nek \u662f\u6280\u672f\u4e3b\u7ba1\u3002 \u6211\u4eec\u6bcf\u4e24\u5468\u53ec\u5f00\u4e00\u6b21\u4f1a\u8bae\uff0c\u8ba8\u8bba\u6211\u4eec\u6b63\u5728\u4e3a\u6bcf\u4e2a\u7279\u5b9a\u7248\u672c\u5f00\u53d1\u7684\u529f\u80fd\uff0c\u83b7\u53d6\u72b6\u6001\uff0c\u786e\u4fdd\u6bcf\u4e2a\u529f\u80fd\u90fd\u6709\u5f00\u53d1\u4eba\u5458\u548c\u5ba1\u9605\u4eba\u5458\u5728\u5904\u7406\u5b83\uff0c \u5e76\u63d0\u9192\u4eba\u4eec\u53d1\u5e03\u622a\u6b62\u65e5\u671f\u7b49\u3002\u6709\u5173 SIG \u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u67e5\u9605[\u793e\u533a\u9875\u9762](https://github.com/kubernetes/community/tree/master/sig-storage)\u3002 \u4eba\u4eec\u8fd8\u53ef\u4ee5\u5c06\u9700\u8981\u5173\u6ce8\u7684 PR\u3001\u9700\u8981\u8ba8\u8bba\u7684\u8bbe\u8ba1\u63d0\u6848\u548c\u5176\u4ed6\u8bae\u9898\u6dfb\u52a0\u5230\u4f1a\u8bae\u8bae\u7a0b\u6587\u6863\u4e2d\u3002 \u6211\u4eec\u5c06\u5728\u9879\u76ee\u8ddf\u8e2a\u5b8c\u6210\u540e\u5bf9\u5176\u8fdb\u884c\u5ba1\u67e5\u3002 \u6211\u4eec\u8fd8\u4e3e\u884c\u5176\u4ed6\u7684\u5b9a\u671f\u4f1a\u8bae\uff0c\u5982 CSI \u5b9e\u65bd\u4f1a\u8bae\uff0cObject Bucket API \u8bbe\u8ba1\u4f1a\u8bae\uff0c\u4ee5\u53ca\u5728\u9700\u8981\u65f6\u9488\u5bf9\u7279\u5b9a\u8bae\u9898\u7684\u4e00\u6b21\u6027\u4f1a\u8bae\u3002 \u8fd8\u6709\u4e00\u4e2a\u7531 SIG Storage \u548c SIG Apps \u8d5e\u52a9\u7684 [K8s \u6570\u636e\u4fdd\u62a4\u5de5\u4f5c\u7ec4](https://github.com/kubernetes/community/blob/master/wg-data-protection/README.md)\u3002 SIG Storage \u62e5\u6709\u6216\u5171\u540c\u62e5\u6709\u6570\u636e\u4fdd\u62a4\u5de5\u4f5c\u7ec4\u6b63\u5728\u8ba8\u8bba\u7684\u529f\u80fd\u7279\u6027\u3002 ## \u5b58\u50a8\u548c Kubernetes **FSM**\uff1a\u5b58\u50a8\u662f\u5f88\u591a\u6a21\u5757\u7684\u57fa\u7840\u7ec4\u4ef6\uff0c\u5c24\u5176\u662f Kubernetes\uff1a\u4f60\u8ba4\u4e3a Kubernetes \u5728\u5b58\u50a8\u7ba1\u7406\u65b9\u9762\u7684\u5177\u4f53\u6311\u6218\u662f\u4ec0\u4e48? **XY**\uff1a\u5728 Kubernetes \u4e2d\uff0c\u5377\u64cd\u4f5c\u6d89\u53ca\u591a\u4e2a\u7ec4\u4ef6\u3002\u4f8b\u5982\uff0c\u521b\u5efa\u4e00\u4e2a\u4f7f\u7528 PVC \u7684 Pod \u6d89\u53ca\u591a\u4e2a\u7ec4\u4ef6\u3002 \u6709 Attach Detach Controller \u548c external-attacher \u8d1f\u8d23\u5c06 PVC \u8fde\u63a5\u5230 Pod\u3002 \u8fd8\u6709 Kubelet \u53ef\u4ee5\u5c06 PVC \u6302\u8f7d\u5230 Pod \u4e0a\u3002\u5f53\u7136\uff0cCSI \u9a71\u52a8\u7a0b\u5e8f\u4e5f\u53c2\u4e0e\u5176\u4e2d\u3002 \u5728\u591a\u4e2a\u7ec4\u4ef6\u4e4b\u95f4\u8fdb\u884c\u534f\u8c03\u65f6\uff0c\u6709\u65f6\u53ef\u80fd\u4f1a\u51fa\u73b0\u7ade\u4e89\u72b6\u51b5\u3002 \u53e6\u4e00\u4e2a\u6311\u6218\u662f\u5173\u4e8e\u6838\u5fc3\u4e0e [Custom Resource Definitions](https://kubernetes.io/zh-cn/docs/concepts/extend-kubernetes/api-extension/custom-resources/)\uff08CRD\uff09\uff0c \u8fd9\u5e76\u4e0d\u662f\u7279\u5b9a\u4e8e\u5b58\u50a8\u7684\u3002CRD \u662f\u4e00\u79cd\u6269\u5c55 Kubernetes \u529f\u80fd\u7684\u597d\u65b9\u6cd5\uff0c\u540c\u65f6\u53c8\u4e0d\u4f1a\u5411 Kubernetes \u6838\u5fc3\u672c\u8eab\u6dfb\u52a0\u592a\u591a\u4ee3\u7801\u3002 \u7136\u800c\uff0c\u8fd9\u4e5f\u610f\u5473\u7740\u8fd0\u884c Kubernetes \u96c6\u7fa4\u65f6\u9700\u8981\u8bb8\u591a\u5916\u90e8\u7ec4\u4ef6\u3002 \u5728 SIG Storage \u65b9\u9762\uff0c\u4e00\u4e2a\u6700\u597d\u7684\u4f8b\u5b50\u662f\u5377\u5feb\u7167\u3002\u5377\u5feb\u7167 API \u88ab\u5b9a\u4e49\u4e3a CRD\u3002 API \u5b9a\u4e49\u548c\u63a7\u5236\u5668\u662f out-of-tree\u3002\u6709\u4e00\u4e2a\u901a\u7528\u7684\u5feb\u7167\u63a7\u5236\u5668\u548c\u4e00\u4e2a\u5feb\u7167\u9a8c\u8bc1 Webhook \u5e94\u8be5\u90e8\u7f72\u5728\u63a7\u5236\u5e73\u9762\u4e0a\uff0c\u7c7b\u4f3c\u4e8e kube-controller-manager \u7684\u90e8\u7f72\u65b9\u5f0f\u3002 \u867d\u7136 Volume Snapshot \u662f\u4e00\u4e2a CRD\uff0c\u4f46\u5b83\u662f SIG Storage \u7684\u6838\u5fc3\u7279\u6027\u3002 \u5efa\u8bae K8s \u96c6\u7fa4\u53d1\u884c\u7248\u90e8\u7f72\u5377\u5feb\u7167 CRD\u3001\u5feb\u7167\u63a7\u5236\u5668\u548c\u5feb\u7167\u9a8c\u8bc1 Webhook\uff0c\u7136\u800c\uff0c\u5927\u591a\u6570\u65f6\u5019\u6211\u4eec\u6ca1\u6709\u770b\u5230\u53d1\u884c\u7248\u90e8\u7f72\u5b83\u4eec\u3002 \u56e0\u6b64\uff0c\u8fd9\u5bf9\u5b58\u50a8\u4f9b\u5e94\u5546\u6765\u8bf4\u5c31\u6210\u4e86\u4e00\u4e2a\u95ee\u9898\uff1a\u73b0\u5728\u90e8\u7f72\u8fd9\u4e9b\u975e\u9a71\u52a8\u7a0b\u5e8f\u7279\u5b9a\u7684\u901a\u7528\u7ec4\u4ef6\u6210\u4e3a\u4ed6\u4eec\u7684\u8d23\u4efb\u3002 \u5982\u679c\u5ba2\u6237\u9700\u8981\u4f7f\u7528\u591a\u4e2a\u5b58\u50a8\u7cfb\u7edf\uff0c\u4e14\u90e8\u7f72\u591a\u4e2a CSI \u9a71\u52a8\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u51b2\u7a81\u3002 **FSM**\uff1a\u4e0d\u4ec5\u8981\u8003\u8651\u5355\u4e2a\u5b58\u50a8\u7cfb\u7edf\u7684\u590d\u6742\u6027\uff0c\u8fd8\u8981\u8003\u8651\u5b83\u4eec\u5728 Kubernetes \u4e2d\u5982\u4f55\u4e00\u8d77\u4f7f\u7528\uff1f **XY**\uff1a\u662f\u7684\uff0c\u6709\u8bb8\u591a\u4e0d\u540c\u7684\u5b58\u50a8\u7cfb\u7edf\u53ef\u4ee5\u4e3a Kubernetes \u4e2d\u7684\u5bb9\u5668\u63d0\u4f9b\u5b58\u50a8\u3002\u5b83\u4eec\u7684\u5de5\u4f5c\u65b9\u5f0f\u4e0d\u540c\u3002\u627e\u5230\u9002\u5408\u6240\u6709\u4eba\u7684\u89e3\u51b3\u65b9\u6848\u662f\u5177\u6709\u6311\u6218\u6027\u7684\u3002 **FSM**\uff1aKubernetes \u4e2d\u7684\u5b58\u50a8\u8fd8\u6d89\u53ca\u4e0e\u5916\u90e8\u89e3\u51b3\u65b9\u6848\u7684\u4ea4\u4e92\uff0c\u53ef\u80fd\u6bd4 Kubernetes \u7684\u5176\u4ed6\u90e8\u5206\u66f4\u591a\u3002 \u8fd9\u79cd\u4e0e\u4f9b\u5e94\u5546\u548c\u5916\u90e8\u4f9b\u5e94\u5546\u7684\u4e92\u52a8\u662f\u5426\u5177\u6709\u6311\u6218\u6027\uff1f\u5b83\u662f\u5426\u4ee5\u4efb\u4f55\u65b9\u5f0f\u968f\u7740\u65f6\u95f4\u800c\u6f14\u53d8\uff1f **XY**\uff1a\u662f\u7684\uff0c\u8fd9\u7edd\u5bf9\u662f\u5177\u6709\u6311\u6218\u6027\u7684\u3002\u6700\u521d Kubernetes \u5b58\u50a8\u5177\u6709 in-tree \u5377\u63d2\u4ef6\u63a5\u53e3\u3002 \u591a\u5bb6\u5b58\u50a8\u4f9b\u5e94\u5546\u5b9e\u73b0\u4e86 in-tree \u63a5\u53e3\uff0c\u5e76\u5728 Kubernetes \u6838\u5fc3\u4ee3\u7801\u5e93\u4e2d\u62e5\u6709\u5377\u63d2\u4ef6\u3002\u8fd9\u5f15\u8d77\u4e86\u5f88\u591a\u95ee\u9898\u3002 \u5982\u679c\u5377\u63d2\u4ef6\u4e2d\u5b58\u5728\u9519\u8bef\uff0c\u5b83\u4f1a\u5f71\u54cd\u6574\u4e2a Kubernetes \u4ee3\u7801\u5e93\u3002\u6240\u6709\u5377\u63d2\u4ef6\u5fc5\u987b\u4e0e Kubernetes \u4e00\u8d77\u53d1\u5e03\u3002 \u5982\u679c\u5b58\u50a8\u4f9b\u5e94\u5546\u9700\u8981\u4fee\u590d\u5176\u63d2\u4ef6\u4e2d\u7684\u9519\u8bef\u6216\u5e0c\u671b\u4e0e\u4ed6\u4eec\u81ea\u5df1\u7684\u4ea7\u54c1\u7248\u672c\u4fdd\u6301\u4e00\u81f4\uff0c\u8fd9\u662f\u4e0d\u7075\u6d3b\u7684\u3002 **FSM**\uff1a\u8fd9\u5c31\u662f CSI \u52a0\u5165\u7684\u539f\u56e0\uff1f **XY**\uff1a\u6ca1\u9519\uff0c\u63a5\u4e0b\u6765\u5c31\u662f[\u5bb9\u5668\u5b58\u50a8\u63a5\u53e3](https://kubernetes-csi.github.io/docs/)\uff08CSI\uff09\u3002 \u8fd9\u662f\u4e00\u4e2a\u8bd5\u56fe\u8bbe\u8ba1\u901a\u7528\u5b58\u50a8\u63a5\u53e3\u7684\u884c\u4e1a\u6807\u51c6\uff0c\u4ee5\u4fbf\u5b58\u50a8\u4f9b\u5e94\u5546\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2a\u63d2\u4ef6\u5e76\u8ba9\u5b83\u5728\u4e00\u7cfb\u5217\u5bb9\u5668\u7f16\u6392\u7cfb\u7edf\uff08CO\uff09\u4e2d\u5de5\u4f5c\u3002 \u73b0\u5728 Kubernetes \u662f\u4e3b\u8981\u7684 CO\uff0c\u4f46\u662f\u5728 CSI \u521a\u5f00\u59cb\u7684\u65f6\u5019\uff0c\u9664\u4e86 Kubernetes \u4e4b\u5916\uff0c\u8fd8\u6709 Docker\u3001Mesos\u3001Cloud Foundry\u3002 CSI \u9a71\u52a8\u7a0b\u5e8f\u662f out-of-tree \u7684\uff0c\u56e0\u6b64\u53ef\u4ee5\u6309\u7167\u81ea\u5df1\u7684\u8282\u594f\u8fdb\u884c\u9519\u8bef\u4fee\u590d\u548c\u53d1\u5e03\u3002 \u4e0e in-tree \u5377\u63d2\u4ef6\u76f8\u6bd4\uff0cCSI \u7edd\u5bf9\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u6539\u8fdb\u3002CSI \u7684 Kubernetes \u5b9e\u73b0[\u81ea 1.13 \u7248\u672c\u4ee5\u6765](https://kubernetes.io/blog/2019/01/15/container-storage-interface-ga/)\u5c31\u8fbe\u5230 GA\u3002 \u5b83\u5df2\u7ecf\u53d1\u5c55\u4e86\u5f88\u957f\u65f6\u95f4\u3002SIG Storage \u4e00\u76f4\u81f4\u529b\u4e8e\u5c06 in-tree \u5377\u63d2\u4ef6\u8fc1\u79fb\u5230 out-of-tree \u7684 CSI \u9a71\u52a8\uff0c\u5df2\u7ecf\u6709\u51e0\u4e2a\u7248\u672c\u4e86\u3002 **FSM**\uff1a\u5c06\u9a71\u52a8\u7a0b\u5e8f\u4ece Kubernetes \u4e3b\u4ed3\u79fb\u5230 CSI \u4e2d\u662f\u4e00\u9879\u91cd\u8981\u7684\u6539\u8fdb\u3002 **XY**\uff1a CSI \u63a5\u53e3\u662f\u5bf9 in-tree \u5377\u63d2\u4ef6\u63a5\u53e3\u7684\u6539\u8fdb\uff0c\u4f46\u662f\u4ecd\u7136\u5b58\u5728\u6311\u6218\u3002\u6709\u5f88\u591a\u5b58\u50a8\u7cfb\u7edf\u3002 \u76ee\u524d\u5728 [CSI \u9a71\u52a8\u7a0b\u5e8f\u6587\u6863\u4e2d\u5217\u51fa\u4e86 100 \u591a\u4e2a CSI \u9a71\u52a8\u7a0b\u5e8f](https://kubernetes-csi.github.io/docs/drivers.html)\u3002 \u8fd9\u4e9b\u5b58\u50a8\u7cfb\u7edf\u4e5f\u975e\u5e38\u591a\u6837\u5316\u3002\u56e0\u6b64\uff0c\u5f88\u96be\u8bbe\u8ba1\u4e00\u4e2a\u9002\u7528\u4e8e\u6240\u6709\u4eba\u7684\u901a\u7528 API\u3002 \u6211\u4eec\u5728 CSI \u9a71\u52a8\u5c42\u9762\u5f15\u5165\u4e86\u529f\u80fd\uff0c\u4f46\u5f53\u540c\u4e00\u9a71\u52a8\u914d\u7f6e\u7684\u5377\u5177\u6709\u4e0d\u540c\u7684\u884c\u4e3a\u65f6\uff0c\u6211\u4eec\u4e5f\u4f1a\u9762\u4e34\u6311\u6218\u3002 \u524d\u51e0\u5929\u6211\u4eec\u521a\u521a\u5f00\u4f1a\u8ba8\u8bba\u6bcf\u79cd\u5377 CSI \u9a71\u52a8\u7a0b\u5e8f\u529f\u80fd\u3002 \u5f53\u540c\u4e00\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u540c\u65f6\u652f\u6301\u5757\u5377\u548c\u6587\u4ef6\u5377\u65f6\uff0c\u6211\u4eec\u5728\u533a\u5206\u67d0\u4e9b CSI \u9a71\u52a8\u7a0b\u5e8f\u529f\u80fd\u65f6\u9047\u5230\u4e86\u95ee\u9898\u3002 \u6211\u4eec\u5c06\u53ec\u5f00\u540e\u7eed\u4f1a\u8bae\u6765\u8ba8\u8bba\u8fd9\u4e2a\u95ee\u9898\u3002 ## \u6301\u7eed\u7684\u6311\u6218 **FSM**\uff1a\u5177\u4f53\u6765\u8bf4\uff0c\u5bf9\u4e8e [1.25 \u7248\u672c](https://github.com/kubernetes/sig-release/tree/master/releases/release-1.25) \u4eec\u53ef\u4ee5\u770b\u5230\u7ba1\u9053\u4e2d\u6709\u4e00\u4e9b\u4e0e\u5b58\u50a8\u76f8\u5173\u7684 [KEPs](https://bit.ly/k8s125-enhancements)\u3002 \u4f60\u662f\u5426\u8ba4\u4e3a\u8fd9\u4e2a\u7248\u672c\u5bf9 SIG \u7279\u522b\u91cd\u8981\uff1f **XY**\uff1a\u6211\u4e0d\u4f1a\u8bf4\u4e00\u4e2a\u7248\u672c\u6bd4\u5176\u4ed6\u7248\u672c\u66f4\u91cd\u8981\u3002\u5728\u4efb\u4f55\u7ed9\u5b9a\u7684\u7248\u672c\u4e2d\uff0c\u6211\u4eec\u90fd\u5728\u505a\u4e00\u4e9b\u975e\u5e38\u91cd\u8981\u7684\u4e8b\u60c5\u3002 **FSM**\uff1a\u786e\u5b9e\u5982\u6b64\uff0c\u4f46\u4f60\u662f\u5426\u60f3\u6307\u51fa 1.25 \u7248\u672c\u7684\u7279\u5b9a\u7279\u6027\u548c\u4eae\u70b9\u5462\uff1f **XY**\uff1a\u597d\u7684\u3002\u5bf9\u4e8e 1.25 \u7248\u672c\uff0c\u6211\u60f3\u5f3a\u8c03\u4ee5\u4e0b\u51e0\u70b9\uff1a * [CSI \u8fc1\u79fb](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/625-csi-migration) \u662f\u4e00\u9879\u6301\u7eed\u7684\u5de5\u4f5c\uff0cSIG Storage \u5df2\u7ecf\u5de5\u4f5c\u4e86\u51e0\u4e2a\u7248\u672c\u4e86\u3002\u76ee\u6807\u662f\u5c06 in-tree \u5377\u63d2\u4ef6\u79fb\u52a8\u5230 out-of-tree \u7684 CSI \u9a71\u52a8\u7a0b\u5e8f\uff0c\u5e76\u6700\u7ec8\u5220\u9664 in-tree \u5377\u63d2\u4ef6\u3002\u5728 1.25 \u7248\u672c\u4e2d\uff0c\u6709 7 \u4e2a KEP \u4e0e CSI \u8fc1\u79fb\u6709\u5173\u3002 \u6709\u4e00\u4e2a\u6838\u5fc3 KEP \u7528\u4e8e\u901a\u7528\u7684 CSI \u8fc1\u79fb\u529f\u80fd\u3002\u5b83\u7684\u76ee\u6807\u662f\u5728 1.25 \u7248\u672c\u4e2d\u8fbe\u5230 GA\u3002 GCE PD \u548c AWS EBS \u7684 CSI \u8fc1\u79fb\u4ee5 GA \u4e3a\u76ee\u6807\u3002vSphere \u7684 CSI \u8fc1\u79fb\u7684\u76ee\u6807\u662f\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u542f\u7528\u7279\u6027\u95e8\u63a7\uff0c \u5728 1.25 \u7248\u672c\u4e2d\u8fbe\u5230 Beta\u3002Ceph RBD \u548c PortWorx \u7684\u76ee\u6807\u662f\u8fbe\u5230 Beta\uff0c\u9ed8\u8ba4\u5173\u95ed\u7279\u6027\u95e8\u63a7\u3002 Ceph FS \u7684\u76ee\u6807\u662f\u8fbe\u5230 Alpha\u3002 * \u6211\u8981\u5f3a\u8c03\u7684\u7b2c\u4e8c\u4e2a\u662f [COSI\uff0c\u5bb9\u5668\u5bf9\u8c61\u5b58\u50a8\u63a5\u53e3](https://github.com/kubernetes-sigs/container-object-storage-interface-spec)\u3002 \u8fd9\u662f SIG Storage \u4e0b\u7684\u4e00\u4e2a\u5b50\u9879\u76ee\u3002COSI \u63d0\u51fa\u5bf9\u8c61\u5b58\u50a8 Kubernetes API \u6765\u652f\u6301 Kubernetes \u5de5\u4f5c\u8d1f\u8f7d\u7684\u5bf9\u8c61\u5b58\u50a8\u64cd\u4f5c\u7684\u7f16\u6392\u3002 \u5b83\u8fd8\u4e3a\u5bf9\u8c61\u5b58\u50a8\u63d0\u4f9b\u5546\u5f15\u5165\u4e86 gRPC \u63a5\u53e3\uff0c\u4ee5\u7f16\u5199\u9a71\u52a8\u7a0b\u5e8f\u6765\u914d\u7f6e\u5b58\u50a8\u6876\u3002COSI \u56e2\u961f\u5df2\u7ecf\u5728\u8fd9\u4e2a\u9879\u76ee\u4e0a\u5de5\u4f5c\u4e24\u5e74\u591a\u4e86\u3002 COSI \u529f\u80fd\u7684\u76ee\u6807\u662f 1.25 \u7248\u672c\u4e2d\u8fbe\u5230 Alpha\u3002KEP \u521a\u521a\u5408\u5165\u3002COSI \u56e2\u961f\u6b63\u5728\u6839\u636e\u66f4\u65b0\u540e\u7684 KEP \u66f4\u65b0\u5b9e\u73b0\u3002 * \u6211\u8981\u63d0\u5230\u7684\u53e6\u4e00\u4e2a\u529f\u80fd\u662f [CSI \u4e34\u65f6\u5377](https://github.com/kubernetes/enhancements/issues/596)\u652f\u6301\u3002 \u6b64\u529f\u80fd\u5141\u8bb8\u5728\u4e34\u65f6\u7528\u4f8b\u7684 Pod \u89c4\u7ea6\u4e2d\u76f4\u63a5\u6307\u5b9a CSI \u5377\u3002\u5b83\u4eec\u53ef\u7528\u4e8e\u4f7f\u7528\u5df2\u5b89\u88c5\u7684\u5377\u76f4\u63a5\u5728 Pod \u5185\u6ce8\u5165\u4efb\u610f\u72b6\u6001\uff0c \u4f8b\u5982\u914d\u7f6e\u3001Secrets\u3001\u8eab\u4efd\u3001\u53d8\u91cf\u6216\u7c7b\u4f3c\u4fe1\u606f\u3002\u8fd9\u6700\u521d\u662f\u5728 1.15 \u7248\u672c\u4e2d\u4f5c\u4e3a\u4e00\u4e2a Alpha \u529f\u80fd\u5f15\u5165\u7684\uff0c\u73b0\u5728\u5b83\u7684\u76ee\u6807\u662f\u5728 1.25 \u7248\u672c\u4e2d\u8fbe\u5230 GA\u3002 **FSM**\uff1a\u5982\u679c\u4f60\u5fc5\u987b\u5355\u72ec\u5217\u51fa\u4e00\u4e9b\u5185\u5bb9\uff0c\u90a3\u4e48 SIG \u6b63\u5728\u7814\u7a76\u7684\u6700\u7d27\u8feb\u7684\u9886\u57df\u662f\u4ec0\u4e48? **XY**\uff1aCSI \u8fc1\u79fb\u7edd\u5bf9\u662f SIG \u6295\u5165\u5927\u91cf\u7cbe\u529b\u7684\u9886\u57df\u4e4b\u4e00\uff0c\u5e76\u4e14\u73b0\u5728\u5df2\u7ecf\u8fdb\u884c\u4e86\u591a\u4e2a\u7248\u672c\u3002\u5b83\u8fd8\u6d89\u53ca\u6765\u81ea\u591a\u4e2a\u4e91\u63d0\u4f9b\u5546\u548c\u5b58\u50a8\u4f9b\u5e94\u5546\u7684\u5de5\u4f5c\u3002 ## \u793e\u533a\u53c2\u4e0e **FSM**\uff1aKubernetes \u662f\u4e00\u4e2a\u793e\u533a\u9a71\u52a8\u7684\u9879\u76ee\u3002\u5bf9\u4efb\u4f55\u5e0c\u671b\u53c2\u4e0e SIG Storage \u5de5\u4f5c\u7684\u4eba\u6709\u4ec0\u4e48\u5efa\u8bae\u5417\uff1f\u4ed6\u4eec\u5e94\u8be5\u4ece\u54ea\u91cc\u5f00\u59cb\uff1f **XY**\uff1a\u67e5\u770b [SIG Storage \u793e\u533a\u9875\u9762](https://github.com/kubernetes/community/tree/master/sig-storage)\uff0c \u5b83\u6709\u5f88\u591a\u5173\u4e8e\u5982\u4f55\u5f00\u59cb\u7684\u4fe1\u606f\u3002[SIG \u5e74\u5ea6\u62a5\u544a](https://github.com/kubernetes/community/blob/master/sig-storage/annual-report-2021.md)\u544a\u8bc9\u4f60\u6211\u4eec\u6bcf\u5e74\u505a\u4e86\u4ec0\u4e48\u3002 \u67e5\u770b\u8d21\u732e\u6307\u5357\u3002\u5b83\u6709\u4e00\u4e9b\u6f14\u793a\u7684\u94fe\u63a5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u719f\u6089 Kubernetes \u5b58\u50a8\u6982\u5ff5\u3002 \u53c2\u52a0\u6211\u4eec[\u5728\u661f\u671f\u56db\u4e3e\u884c\u7684\u53cc\u5468\u4f1a\u8bae](https://github.com/kubernetes/community/tree/master/sig-storage#meetings)\u3002 \u4e86\u89e3 SIG \u7684\u8fd0\u4f5c\u65b9\u5f0f\u4ee5\u53ca\u6211\u4eec\u4e3a\u6bcf\u4e2a\u7248\u672c\u6240\u505a\u7684\u5de5\u4f5c\u3002\u627e\u5230\u4f60\u611f\u5174\u8da3\u7684\u9879\u76ee\u5e76\u63d0\u4f9b\u8d21\u732e\u3002 \u6b63\u5982\u6211\u4e4b\u524d\u63d0\u5230\u7684\uff0c\u6211\u901a\u8fc7\u53c2\u4e0e Volume Snapshot \u9879\u76ee\u5f00\u59cb\u4e86 SIG Storage\u3002 **FSM**\uff1a\u4f60\u6709\u4ec0\u4e48\u8981\u8865\u5145\u7684\u7ed3\u675f\u8bed\u5417\uff1f **XY**\uff1aSIG Storage \u603b\u662f\u6b22\u8fce\u65b0\u7684\u8d21\u732e\u8005\u3002 \u6211\u4eec\u9700\u8981\u8d21\u732e\u8005\u6765\u5e2e\u52a9\u6784\u5efa\u65b0\u529f\u80fd\u3001\u4fee\u590d\u9519\u8bef\u3001\u8fdb\u884c\u4ee3\u7801\u5ba1\u67e5\u3001\u7f16\u5199\u6d4b\u8bd5\u3001\u76d1\u63a7\u6d4b\u8bd5\u7f51\u683c\u7684\u5065\u5eb7\u72b6\u51b5\u4ee5\u53ca\u6539\u8fdb\u6587\u6863\u7b49\u3002 **FSM**\uff1a\u975e\u5e38\u611f\u8c22\u4f60\u62bd\u51fa\u5b9d\u8d35\u65f6\u95f4\u8ba9\u6211\u4eec\u6df1\u5165\u4e86\u89e3 SIG Storage\uff01 No newline at end of file", "positive_passages": [{"docid": "doc-en-website-bb9f2481f4e2128ee614bb281299877d3f1fb60413fe51e09c77cc6ce4cab7f7", "text": "This is a Feature Request This page blog/2022/08/22/sig-storage- has no Chinese version What would you like to be Translate Chinese version for blog/2022/08/22/sig-storage-spotlight/ Comments /language zh /assign\n/triage accepted", "commid": "website_issue_36180", "tokennum": 62}], "negative_passages": []} {"query_id": "q-en-website-5bebe9579bf0c71c787b146ec149a32a748d4959b6fb92b7bbb7e81569449fd2", "query": "\u9ed8\u8ba4\u8c03\u5ea6\u5668\u63a5\u4e0b\u6765\u5c06 Pod \u7ed1\u5b9a\u5230\u76ee\u6807\u4e3b\u673a\u3002 \u5982\u679c DaemonSet Pod \u7684\u8282\u70b9\u4eb2\u548c\u6027\u914d\u7f6e\u5df2\u5b58\u5728\uff0c\u5219\u88ab\u66ff\u6362\u3002 DaemonSet \u63a7\u5236\u5668\u4ec5\u5728\u521b\u5efa\u6216\u4fee\u6539 DaemonSet Pod \u65f6\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\uff0c \u5e76\u4e14\u4e0d\u56de\u66f4\u6539 DaemonSet \u7684 `spec.template`\u3002 \u5e76\u4e14\u4e0d\u4f1a\u66f4\u6539 DaemonSet \u7684 `spec.template`\u3002 ```yaml nodeAffinity:", "positive_passages": [{"docid": "doc-en-website-d25aca5c0dd975395d85285d7b9db9400d31923767ef7054fe5fbc0fca345fce", "text": "\u201c DaemonSet spec.template.\u201c \u201c\u201d\u201c\u201d\nMind propose a fix?\n/triage accepted\n/language zh (I presume)\nThe label(s) cannot be applied, because the repository doesn't have them ```sh ./etcd --listen-client-urls=http://$PRIVATE_IP:2379 --advertise-client-urls=http://$PRIVATE_IP:2379 ``` ```sh etcd --listen-client-urls=http://$PRIVATE_IP:2379 --advertise-client-urls=http://$PRIVATE_IP:2379 ``` 2. Start Kubernetes API server with the flag `--etcd-servers=$PRIVATE_IP:2379`. 2. Start the Kubernetes API server with the flag `--etcd-servers=$PRIVATE_IP:2379`. Replace `PRIVATE_IP` with your etcd client IP. Make sure `PRIVATE_IP` is set to your etcd client IP. --> ### \u5355\u8282\u70b9 etcd \u96c6\u7fa4", "positive_passages": [{"docid": "doc-en-website-e137b3467942095722d53969564746ac8d1e05b2a4541b803909ce4bfa1bd149", "text": "\" etcd \"client.cert \" etcd etcd \" \" etcd client.key etcd \"\n~ GitHub is not the right place for support requests.~ ~If you're looking for help, oyu could ask on .~ ~You can also post your question on the or the forum. There are other support venues with contributions from the wider community of Kubernetes users.~\n/triage accepted /kind bug\n/remove-kind support\nThanks\n/language zh\n/priority backlog", "commid": "website_issue_27444", "tokennum": 106}], "negative_passages": []} {"query_id": "q-en-website-5c451910f8e78ac45de972273513f704966eaaeae4f20a5c656b5c2d167dd580", "query": "- Keep the blog content the same. If there are changes, they should be made to the original article first, and then to the mirrored article. - The mirrored blog should have a `canonicalUrl`, that is, essentially the url of the original blog after it has been published. - [Kubernetes contributor blogs](https://kubernetes.dev/blog) have their authors mentioned in the YAML header, while the Kubernetes blog posts mention authors in the blog content itself. This should be changed when mirroring the content. - Same as [Kubernetes contributor blogs](https://kubernetes.dev/blog), Kubernetes blog posts also mention authors in the YAML header as per the new guidelines. This should be ensured. - Publication dates stay the same as the original blog. All of the other guidelines and expectations detailed above apply as well.", "positive_passages": [{"docid": "doc-en-website-d4fe701f4dba532aeeb3d806c7157cab718e70ea21b79afac6939020e66f1b85", "text": "This is a Feature Request Este documento destaca y consolida las pr\u00e1cticas recomendadas de configuraci\u00f3n que se presentan a lo largo de la gu\u00eda del usuario, la documentaci\u00f3n de Introducci\u00f3n y los ejemplos. Este es un documento vivo. Si se te ocurre algo que no est\u00e1 en esta lista pero que puede ser \u00fatil a otros, no dudes en crear un _issue_ o enviar un PR. ## Consejos Generales de Configuraci\u00f3n - Al definir configuraciones, especifica la \u00faltima versi\u00f3n estable de la API. - Los archivos de configuraci\u00f3n deben almacenarse en el control de versiones antes de enviarse al cl\u00faster. Este le permite revertir r\u00e1pidamente un cambio de configuraci\u00f3n si es necesario. Tambi\u00e9n ayuda a la recreaci\u00f3n y restauraci\u00f3n del cl\u00faster. - Escribe tus archivos de configuraci\u00f3n usando YAML en lugar de JSON. Aunque estos formatos se pueden utilizarse indistintamente en casi todos los escenarios, YAML tiende a ser m\u00e1s amigable con el usuario. - Agrupa los objetos relacionados en un solo archivo siempre que tenga sentido. Un archivo suele ser m\u00e1s f\u00e1cil de administrar que varios. Ver el archivo [guestbook-all-in-one.yaml](https://github.com/kubernetes/examples/tree/master/guestbook/all-in-one/guestbook-all-in-one.yaml) como un ejemplo de esta sintaxis. - Ten en cuenta tambi\u00e9n que se pueden llamar muchos comandos `kubectl` en un directorio. Por ejemplo, puedes llamar `kubectl apply` en un directorio de archivos de configuraci\u00f3n. - No especifiques valores predeterminados innecesariamente: una configuraci\u00f3n simple y m\u00ednima har\u00e1 que los errores sean menos probables. - Coloca descripciones de objetos en anotaciones, para permitir una mejor introspecci\u00f3n. ## \"Naked\" Pods vs ReplicaSets, Deployments y Jobs {#naked-pods-vs-replicasets-deployments-and-jobs} - No usar \"Naked\" Pods (es decir, Pods no vinculados a un [ReplicaSet](/docs/concepts/workloads/controllers/replicaset/) o a un [Deployment](/docs/concepts/workloads/controllers/deployment/)) si puedes evitarlo. Los Naked Pods no se reprogramar\u00e1 en caso de falla de un nodo. Un Deployment, que crea un ReplicaSet para garantizar que se alcance la cantidad deseada de Pods est\u00e1 siempre disponible y especifica una estrategia para reemplazar los Pods (como [RollingUpdate](/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment)), es casi siempre preferible a crear Pods directamente, excepto por algunos expl\u00edcitos [`restartPolicy: Never`](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) escenarios. Un [Job](/docs/concepts/workloads/controllers/job/) tambi\u00e9n puede ser apropiado. ## Servicios - Crea un [Service](/docs/concepts/services-networking/service/) antes de tus cargas de trabajo de backend correspondientes (Deployments o ReplicaSets) y antes de cualquier carga de trabajo que necesite acceder a \u00e9l. Cuando Kubernetes inicia un contenedor, proporciona variables de entorno que apuntan a todos los _Services_ que se estaban ejecutando cuando se inici\u00f3 el contenedor. Por ejemplo, si existe un _Service_ llamado `foo`, todos los contenedores obtendr\u00e1n las siguientes variables en su entorno inicial: ```shell FOO_SERVICE_HOST= FOO_SERVICE_PORT= ``` * Esto implica un requisito de ordenamiento - cualquier `Service` al que un `Pod` quiera acceder debe ser creado antes del `Pod` en s\u00ed mismo, de lo contrario, las variables de entorno no se completar\u00e1n. El DNS no tiene esta restricci\u00f3n. - Un [cluster add-on](/docs/concepts/cluster-administration/addons/) opcional (aunque muy recomendable) es un servidor DNS. El servidor DNS observa la API de Kubernetes en busca de nuevos `Servicios` y crea un conjunto de registros DNS para cada uno. Si el DNS se ha habilitado en todo el cl\u00faster, todos los `Pods` deben ser capaces de hacer la resoluci\u00f3n de nombres de `Services` autom\u00e1ticamente. - No especifiques un `hostPort` para un Pod a menos que sea absolutamente necesario. Cuando vinculas un Pod a un `hostPort`, limita la cantidad de lugares en los que se puede agendar el Pod, porque cada combinaci\u00f3n <`hostIP`, `hostPort`, `protocol`> debe ser \u00fanica. Si no especificas el `hostIP` y `protocol` expl\u00edcitamente, Kubernetes usar\u00e1 `0.0.0.0` como el `hostIP` predeterminado y `TCP` como el `protocol` por defecto. Si solo necesitas acceder al puerto con fines de depuraci\u00f3n, puedes utilizar el [apiserver proxy](/docs/tasks/access-application-cluster/access-cluster/#manually-constructing-apiserver-proxy-urls) o [`kubectl port-forward`](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/). Si necesitas exponer expl\u00edcitamente el puerto de un Pod en el nodo, considera usar un [NodePort](/docs/concepts/services-networking/service/#type-nodeport) Service antes de recurrir a `hostPort`. - Evita usar `hostNetwork`, por las mismas razones que `hostPort`. - Usa [headless Services](/docs/concepts/services-networking/service/#headless-services) (que tiene un `ClusterIP` de `None`) para el descubrimiento de servicios cuando no necesites balanceo de carga `kube-proxy`. ## Usando Labels - Define y usa [labels](/docs/concepts/overview/working-with-objects/labels/) que identifiquen __atributos sem\u00e1nticos__ de tu aplicaci\u00f3n o Deployment, como `{ app.kubernetes.io/name: MyApp, tier: frontend, phase: test, deployment: v3 }`. Puedes utilizar estas labels para seleccionar los Pods apropiados para otros recursos; por ejemplo, un Service que selecciona todo los Pods `tier: frontend`, o todos los componentes `phase: test` de `app.kubernetes.io/name: MyApp`. Revisa el [libro de visitas](https://github.com/kubernetes/examples/tree/master/guestbook/) para ver ejemplos de este enfoque. Un Service puede hacer que abarque m\u00faltiples Deployments omitiendo las labels espec\u00edficas de la versi\u00f3n de su selector. Cuando necesites actualizar un servicio en ejecuci\u00f3n sin downtime, usa un [Deployment](/docs/concepts/workloads/controllers/deployment/). Un estado deseado de un objeto se describe mediante una implementaci\u00f3n, y si los cambios a esa especificaci\u00f3n son _aplicados_, el controlador de implementaci\u00f3n cambia el estado actual al estado deseado en un ritmo controlado. - Use las [labels comunes de Kubernetes](/docs/concepts/overview/working-with-objects/common-labels/) para casos de uso com\u00fan. Estas labels estandarizadas enriquecen los metadatos de una manera que permite que las herramientas, incluyendo `kubectl` y el [dashboard](/docs/tasks/access-application-cluster/web-ui-dashboard), trabajen de forma interoperable. - Puedes manipular las labels para la depuraci\u00f3n. Debido a que los controladores de Kubernetes (como ReplicaSet) y los Services coinciden con los Pods usando labels de selector, se detendr\u00e1 la eliminaci\u00f3n de las labels relevantes de un Pod que sea considerado por un controlador o que un Service sirva tr\u00e1fico. si quitas las labels de un Pod existente, su controlador crear\u00e1 un nuevo Pod para ocupar su lugar. Esto es un forma \u00fatil de depurar un Pod previamente \"vivo\" en un entorno de \"cuarentena\". Para eliminar interactivamente o agregar labels, usa [`kubectl label`](/docs/reference/generated/kubectl/kubectl-commands#label). ## Usando kubectl - Usa `kubectl apply -f `. Esto busca la configuraci\u00f3n de Kubernetes en todos los `.yaml`, `.yml`, y `.json` en `` y lo pasa a `apply`. - Usa selectores de labels para las operaciones `get` y `delete` en lugar de nombres de objetos espec\u00edficos. Ve las secciones en [selectores de labels](/docs/concepts/overview/working-with-objects/labels/#label-selectors) y [usar labels de forma eficaz](/docs/concepts/cluster-administration/manage-deployment/#using-labels-effectively). - Usa `kubectl create deployment` y `kubectl expose` para crear r\u00e1pidamente un contenedor \u00fanico Deployments y Services. Consulta [Usar un Service para Acceder a una Aplicaci\u00f3n en un Cl\u00faster](/docs/tasks/access-application-cluster/service-access-application-cluster/) para un ejemplo. ", "positive_passages": [{"docid": "doc-en-website-0a806a15d038626401f262fe9716c9a66ffee5620e904178add902358f3c84d2", "text": "This is a Feature Request What would you like to be Localize to Spanish Why is this needed Comments\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. sitemap: priority: 0.9 --- ", "positive_passages": [{"docid": "doc-en-website-94aaf3dbfbc9855c72851da10ab4bb3ddd20fc3abec0826da275f5ae7812772c", "text": "This is a Feature Request \u3053\u306e\u4f8b\u3067\u306f\u3001\u8907\u6570\u306e\u4e26\u5217\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u3092\u4f7f\u7528\u3059\u308bKubernetes\u306eJob\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u5404\u30ef\u30fc\u30ab\u30fc\u306f\u3001\u305d\u308c\u305e\u308c\u304c\u81ea\u5206\u306ePod\u5185\u3067\u5b9f\u884c\u3055\u308c\u308b\u7570\u306a\u308b\u30b3\u30f3\u30c6\u30ca\u3067\u3059\u3002Pod\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u304c\u81ea\u52d5\u7684\u306b\u8a2d\u5b9a\u3059\u308b*\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5024*\u3092\u6301\u3061\u3001\u3053\u306e\u5024\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5404Pod\u306f\u51e6\u7406\u3059\u308b\u30bf\u30b9\u30af\u5168\u4f53\u306e\u3069\u306e\u90e8\u5206\u3092\u51e6\u7406\u3059\u308b\u306e\u304b\u3092\u7279\u5b9a\u3067\u304d\u307e\u3059\u3002 Pod\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001{{< glossary_tooltip text=\"\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\" term_id=\"annotation\" >}}\u5185\u306e`batch.kubernetes.io/job-completion-index`\u3092\u6574\u6570\u5024\u306e\u6587\u5b57\u5217\u8868\u73fe\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30ca\u5316\u3055\u308c\u305f\u30bf\u30b9\u30af\u30d7\u30ed\u30bb\u30b9\u304c\u3053\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u3053\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u5024\u306f[downward API](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#the-downward-api)\u306e\u4ed5\u7d44\u307f\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u516c\u958b\u3067\u304d\u307e\u3059\u3002\u5229\u4fbf\u6027\u306e\u305f\u3081\u306b\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u306f\u81ea\u52d5\u7684\u306bdownward API\u3092\u8a2d\u5b9a\u3057\u3066\u3001`JOB_COMPLETION_INDEX`\u74b0\u5883\u5909\u6570\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u516c\u958b\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306b\u3001\u3053\u306e\u4f8b\u3067\u5b9f\u884c\u3059\u308b\u30b9\u30c6\u30c3\u30d7\u306e\u6982\u8981\u3092\u793a\u3057\u307e\u3059\u3002 1. **completion\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066Job\u306e\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u5b9a\u7fa9\u3059\u308b**\u3002downward API\u306fPod\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u74b0\u5883\u5909\u6570\u307e\u305f\u306f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30b3\u30f3\u30c6\u30ca\u306b\u6e21\u3057\u3066\u304f\u308c\u307e\u3059\u3002 2. **\u305d\u306e\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306b\u57fa\u3065\u3044\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u304d(Indexed)\u306eJob\u3092\u958b\u59cb\u3059\u308b**\u3002 ## {{% heading \"prerequisites\" %}} \u3042\u3089\u304b\u3058\u3081\u57fa\u672c\u7684\u306a\u975e\u4e26\u5217\u306e[Job](/docs/concepts/workloads/controllers/job/)\u306e\u4f7f\u7528\u306b\u6163\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 {{< include \"task-tutorial-prereqs.md\" >}} {{< version-check >}} \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u304dJob\u3092\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001[API\u30b5\u30fc\u30d0\u30fc](/docs/reference/command-line-tools-reference/kube-apiserver/)\u3068[\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30de\u30cd\u30fc\u30b8\u30e3\u30fc](/docs/reference/command-line-tools-reference/kube-controller-manager/)\u4e0a\u3067`IndexedJob`[\u30d5\u30a3\u30fc\u30c1\u30e3\u30fc\u30b2\u30fc\u30c8](/ja/docs/reference/command-line-tools-reference/feature-gates/)\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ## \u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u9078\u629e\u3059\u308b \u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u51e6\u7406\u30a2\u30a4\u30c6\u30e0\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u9078\u629e\u80a2\u304c\u3042\u308a\u307e\u3059\u3002 1. `JOB_COMPLETION_INDEX`\u74b0\u5883\u5909\u6570\u3092\u8aad\u307f\u8fbc\u3080\u3002Job{{< glossary_tooltip text=\"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\" term_id=\"controller\" >}}\u306f\u3001\u3053\u306e\u5909\u6570\u3092completion index\u3092\u542b\u3080\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306b\u81ea\u52d5\u7684\u306b\u30ea\u30f3\u30af\u3057\u307e\u3059\u3002 1. completion index\u3092\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u3002 1. \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4fee\u6b63\u3067\u304d\u306a\u3044\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u30e9\u30c3\u30d7\u3057\u3001\u4e0a\u306e\u3044\u305a\u308c\u304b\u306e\u65b9\u6cd5\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8aad\u307f\u53d6\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5165\u529b\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u308b\u3082\u306e\u306b\u5909\u63db\u3059\u308b\u3002 \u3053\u306e\u4f8b\u3067\u306f\u30013\u756a\u76ee\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u80a2\u3057\u3066\u3001[rev](https://man7.org/linux/man-pages/man1/rev.1.html)\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3092\u5b9f\u884c\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u308b\u3068\u3057\u307e\u3057\u3087\u3046\u3002\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30d5\u30a1\u30a4\u30eb\u3092\u5f15\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u308a\u3001\u5185\u5bb9\u3092\u9006\u3055\u307e\u306b\u8868\u793a\u3057\u307e\u3059\u3002 ```shell rev data.txt ``` `rev`\u30c4\u30fc\u30eb\u306f[`busybox`](https://hub.docker.com/_/busybox)\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u5229\u7528\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306f\u5358\u306a\u308b\u4f8b\u3067\u3042\u308b\u305f\u3081\u3001\u5404Pod\u306f\u3054\u304f\u7c21\u5358\u306a\u51e6\u7406(\u77ed\u3044\u6587\u5b57\u5217\u3092\u9006\u306b\u3059\u308b)\u3092\u3059\u308b\u3060\u3051\u3067\u3059\u3002\u73fe\u5b9f\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u306f\u3001\u305f\u3068\u3048\u3070\u3001\u30b7\u30fc\u30f3\u30c7\u30fc\u30bf\u3092\u3082\u3068\u306b60\u79d2\u306e\u52d5\u753b\u3092\u751f\u6210\u3059\u308b\u3068\u3044\u3046\u3088\u3046\u306a\u30bf\u30b9\u30af\u3092\u8a18\u8ff0\u3057\u305fJob\u3092\u4f5c\u6210\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u30d3\u30c7\u30aa\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0Job\u306e\u5404\u51e6\u7406\u30a2\u30a4\u30c6\u30e0\u306f\u3001\u30d3\u30c7\u30aa\u30af\u30ea\u30c3\u30d7\u306e\u7279\u5b9a\u306e\u30d5\u30ec\u30fc\u30e0\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3092\u884c\u3046\u3082\u306e\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002\u305d\u306e\u5834\u5408\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u304d\u306e\u5b8c\u4e86\u304c\u610f\u5473\u3059\u308b\u306e\u306f\u3001\u30af\u30ea\u30c3\u30d7\u306e\u6700\u521d\u304b\u3089\u30d5\u30ec\u30fc\u30e0\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u3053\u3068\u3067\u3001Job\u5185\u306e\u5404Pod\u304c\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3068\u516c\u958b\u3092\u3059\u308b\u306e\u304c\u3069\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u3042\u308b\u304b\u304c\u308f\u304b\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002 ## \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u304dJob\u3092\u5b9a\u7fa9\u3059\u308b \u4ee5\u4e0b\u306f\u3001completion mode\u3068\u3057\u3066`Indexed`\u3092\u4f7f\u7528\u3059\u308bJob\u306e\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306e\u4f8b\u3067\u3059\u3002 {{< codenew language=\"yaml\" file=\"application/job/indexed-job.yaml\" >}} \u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001Job\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304c\u3059\u3079\u3066\u306e\u30b3\u30f3\u30c6\u30ca\u306b\u8a2d\u5b9a\u3059\u308b\u7d44\u307f\u8fbc\u307f\u306e`JOB_COMPLETION_INDEX`\u74b0\u5883\u5909\u6570\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002[init\u30b3\u30f3\u30c6\u30ca](/ja/docs/concepts/workloads/pods/init-containers/)\u304c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u9759\u7684\u306a\u5024\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3001\u305d\u306e\u5024\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb\u3092[emptyDir volume](/docs/concepts/storage/volumes/#emptydir)\u3092\u4ecb\u3057\u3066\u30ef\u30fc\u30ab\u30fc\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u3068\u5171\u6709\u3057\u307e\u3059\u3002\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u30b3\u30f3\u30c6\u30ca\u306b\u516c\u958b\u3059\u308b\u305f\u3081\u306b[downward API\u3092\u4f7f\u7528\u3057\u3066\u72ec\u81ea\u306e\u74b0\u5883\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b](/ja/docs/tasks/inject-data-application/environment-variable-expose-pod-information/)\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002[\u74b0\u5883\u5909\u6570\u3084\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u305fConfigMap](/ja/docs/tasks/configure-pod-container/configure-pod-configmap/)\u304b\u3089\u5024\u306e\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u3068\u3044\u3046\u9078\u629e\u80a2\u3082\u3042\u308a\u307e\u3059\u3002 \u4ed6\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u4f8b\u306e\u3088\u3046\u306b\u3001\u76f4\u63a5[downward API\u3092\u4f7f\u7528\u3057\u3066\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u5024\u3092\u30dc\u30ea\u30e5\u30fc\u30e0\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u6e21\u3059](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#store-pod-fields)\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 {{< codenew language=\"yaml\" file=\"application/job/indexed-job-vol.yaml\" >}} ## Job\u3092\u5b9f\u884c\u3059\u308b \u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067Job\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell # \u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067\u306f1\u756a\u76ee\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059 ($JOB_COMPLETION_INDEX \u306b\u4f9d\u5b58\u3057\u3066\u3044\u307e\u3059) kubectl apply -f https://kubernetes.io/examples/application/job/indexed-job.yaml ``` \u3053\u306eJob\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u306f\u6307\u5b9a\u3057\u305f\u5404\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3054\u3068\u306b\u4e00\u9023\u306ePod\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002`.spec.parallelism`\u306e\u5024\u304c\u540c\u6642\u306b\u5b9f\u884c\u3067\u304d\u308bPod\u306e\u6570\u3092\u6c7a\u5b9a\u3057\u3001`.spec.completions`\u306e\u5024\u304cJob\u304c\u4f5c\u6210\u3059\u308bPod\u306e\u5408\u8a08\u6570\u3092\u6c7a\u5b9a\u3057\u307e\u3059\u3002 `.spec.parallelism`\u306f`.spec.completions`\u3088\u308a\u5c0f\u3055\u3044\u305f\u3081\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u306f\u5225\u306ePod\u3092\u958b\u59cb\u3059\u308b\u524d\u306b\u6700\u521d\u306ePod\u306e\u4e00\u90e8\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3057\u307e\u3059\u3002 Job\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001\u5c11\u3057\u5f85\u3063\u3066\u304b\u3089\u9032\u884c\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 ```shell kubectl describe jobs/indexed-job ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ``` Name: indexed-job Namespace: default Selector: controller-uid=bf865e04-0b67-483b-9a90-74cfc4c3e756 Labels: controller-uid=bf865e04-0b67-483b-9a90-74cfc4c3e756 job-name=indexed-job Annotations: Parallelism: 3 Completions: 5 Start Time: Thu, 11 Mar 2021 15:47:34 +0000 Pods Statuses: 2 Running / 3 Succeeded / 0 Failed Completed Indexes: 0-2 Pod Template: Labels: controller-uid=bf865e04-0b67-483b-9a90-74cfc4c3e756 job-name=indexed-job Init Containers: input: Image: docker.io/library/bash Port: Host Port: Command: bash -c items=(foo bar baz qux xyz) echo ${items[$JOB_COMPLETION_INDEX]} > /input/data.txt Environment: Mounts: /input from input (rw) Containers: worker: Image: docker.io/library/busybox Port: Host Port: Command: rev /input/data.txt Environment: Mounts: /input from input (rw) Volumes: input: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 4s job-controller Created pod: indexed-job-njkjj Normal SuccessfulCreate 4s job-controller Created pod: indexed-job-9kd4h Normal SuccessfulCreate 4s job-controller Created pod: indexed-job-qjwsz Normal SuccessfulCreate 1s job-controller Created pod: indexed-job-fdhq5 Normal SuccessfulCreate 1s job-controller Created pod: indexed-job-ncslj ``` \u3053\u306e\u4f8b\u3067\u306f\u3001\u5404\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3054\u3068\u306b\u30ab\u30b9\u30bf\u30e0\u306e\u5024\u3092\u4f7f\u7528\u3057\u3066Job\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067Pod\u306e1\u3064\u306e\u51fa\u529b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002 ```shell kubectl logs indexed-job-fdhq5 # \u3053\u308c\u3092\u5bfe\u8c61\u306eJob\u306ePod\u306e\u540d\u524d\u306b\u4e00\u81f4\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ``` xuq ``` ", "positive_passages": [{"docid": "doc-en-website-e91d11da95df52011868da5aaa31c0e31d0261d47435499f2e463b20d815cf55", "text": "This is a Feature Request What would you like to be Translate into Japanese. Why is this needed This page has not been translated. Comments /language ja /assign\n/triage accepted", "commid": "website_issue_27700", "tokennum": 36}], "negative_passages": []} {"query_id": "q-en-website-622d32a14188264933fa6dd26c55df36b09105259bb93f54a40bace9d002ce3b", "query": "Kubernetes\u306f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306a\u306e\u3067\u3001\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u3084\u30d1\u30d6\u30ea\u30c3\u30af\u30af\u30e9\u30a6\u30c9\u3001\u305d\u308c\u3089\u306e\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u306a\u3069\u306e\u5229\u70b9\u3092\u81ea\u7531\u306b\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7c21\u5358\u306b\u79fb\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 Kubernetes\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u306b\u306f\u3001[\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9](/releases/download/)\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u8a2a\u308c\u3066\u304f\u3060\u3055\u3044\u3002 {{% /blocks/feature %}} {{< /blocks/section >}}", "positive_passages": [{"docid": "doc-en-website-74f6221952092dbc4416e8ce292a5d837a6a656d695b7a16cdac6d0a0bc91226", "text": "This is a Feature Request ## Metrics (auto-generated 2022 Nov 01) This page details the metrics that different Kubernetes components export. You can query the metrics endpoint for these components using an HTTP scrape, and fetch the current metrics data in Prometheus format.", "positive_passages": [{"docid": "doc-en-website-b1ea532711c3074cf1ae265c435c0b6a95ebcd3f2607b5c7873412e1dda826c4", "text": "This is a Bug Report ## \u5347\u7ea7\u548c\u56de\u6eda etcd \u96c6\u7fa4 \u4ece Kubernetes v1.13.0 \u5f00\u59cb\uff0c\u4e0d\u5728\u652f\u6301 etcd2 \u4f5c\u4e3a\u65b0\u7684\u6216\u73b0\u6709 Kubernetes \u96c6\u7fa4\u7684\u540e\u7aef\u3002Kubernetes \u652f\u6301 etcd2 \u548c etcd3 \u7684\u65f6\u95f4\u8868\u5982\u4e0b\uff1a - Kubernetes v1.0: \u4ec5\u9650 etcd2 - Kubernetes v1.5.1: \u6dfb\u52a0\u4e86 etcd3 \u652f\u6301\uff0c\u65b0\u7684\u96c6\u7fa4\u4ecd\u9ed8\u8ba4\u4e3a etcd2 - Kubernetes v1.6.0: \u4f7f\u7528 `kube-up.sh` \u521b\u5efa\u7684\u65b0\u96c6\u7fa4\u9ed8\u8ba4\u4e3a etcd3\uff0c\u800c `kube-apiserver` \u9ed8\u8ba4\u4e3a etcd3 - Kubernetes v1.9.0: \u5ba3\u5e03\u5f03\u7528 etcd2 \u5b58\u50a8\u540e\u7aef - Kubernetes v1.13.0: \u5220\u9664\u4e86 etcd2 \u5b58\u50a8\u540e\u7aef\uff0c`kube-apiserver` \u5c06\u62d2\u7edd\u4ee5 `--storage-backend = etcd2` \u5f00\u5934\uff0c\u6d88\u606f `etcd2 \u4e0d\u518d\u662f\u652f\u6301\u7684\u5b58\u50a8\u540e\u7aef` \u5728\u4f7f\u7528 `--storage-backend = etcd2` \u5347\u7ea7 v1.12.x kube-apiserver \u5230 v1.13.x \u4e4b\u524d\uff0cetcd v2 \u6570\u636e\u5fc5\u987b\u8fc1\u79fb\u5230 v3 \u5b58\u50a8\u540e\u7aef\uff0c\u5e76\u4e14 kube-apiserver \u8c03\u7528\u6539\u4e3a\u4f7f\u7528 `--storage-backend=etcd3`\u3002 \u4ece etcd2 \u8fc1\u79fb\u5230 etcd3 \u7684\u8fc7\u7a0b\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u53d6\u51b3\u4e8e\u90e8\u7f72\u548c\u914d\u7f6e etcd \u96c6\u7fa4\u7684\u65b9\u5f0f\uff0c\u4ee5\u53ca\u5982\u4f55\u90e8\u7f72\u548c\u914d\u7f6e Kubernetes \u96c6\u7fa4\u3002 \u6211\u4eec\u5efa\u8bae\u60a8\u67e5\u9605\u96c6\u7fa4\u63d0\u4f9b\u5546\u7684\u6587\u6863\uff0c\u4ee5\u4e86\u89e3\u662f\u5426\u5b58\u5728\u9884\u5b9a\u4e49\u7684\u89e3\u51b3\u65b9\u6848\u3002 \u5982\u679c\u60a8\u7684\u96c6\u7fa4\u662f\u901a\u8fc7 `kube-up.sh` \u521b\u5efa\u7684\u5e76\u4e14\u4ecd\u7136\u4f7f\u7528 etcd2 \u4f5c\u4e3a\u5176\u5b58\u50a8\u540e\u7aef\uff0c\u8bf7\u53c2\u9605 [Kubernetes v1.12 etcd \u96c6\u7fa4\u5347\u7ea7\u6587\u6863](https://v1-12.docs.kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/#upgrading-and-rolling-back-etcd-clusters) ## \u5df2\u77e5\u95ee\u9898\uff1a\u5177\u6709\u5b89\u5168\u7aef\u70b9\u7684 etcd \u5ba2\u6237\u7aef\u5747\u8861\u5668 \u5728 etcd v3.3.13 \u6216\u66f4\u65e9\u7248\u672c\u7684 etcd v3 \u5ba2\u6237\u7aef\u6709\u4e00\u4e2a[\u4e25\u91cd\u7684\u9519\u8bef](https://github.com/kubernetes/kubernetes/issues/72102)\uff0c\u4f1a\u5f71\u54cd kube-apiserver \u548c HA \u90e8\u7f72\u3002etcd \u5ba2\u6237\u7aef\u5e73\u8861\u5668\u6545\u969c\u8f6c\u79fb\u4e0d\u9002\u7528\u4e8e\u5b89\u5168\u7aef\u70b9\u3002\u7ed3\u679c\u662f\uff0cetcd \u670d\u52a1\u5668\u53ef\u80fd\u4f1a\u5931\u8d25\u6216\u77ed\u6682\u5730\u4e0e kube-apiserver \u65ad\u5f00\u8fde\u63a5\u3002\u8fd9\u4f1a\u5f71\u54cd kube-apiserver HA \u7684\u90e8\u7f72\u3002 \u8be5\u4fee\u590d\u7a0b\u5e8f\u662f\u5728 [etcd v3.4](https://github.com/etcd-io/etcd/pull/10911) \u4e2d\u8fdb\u884c\u7684\uff08\u5e76\u53cd\u5411\u79fb\u690d\u5230 v3.3.14 \u6216\u66f4\u9ad8\u7248\u672c\uff09\uff1a\u73b0\u5728\uff0c\u65b0\u5ba2\u6237\u7aef\u5c06\u521b\u5efa\u81ea\u5df1\u7684\u51ed\u8bc1\u6346\u7ed1\u5305\uff0c\u4ee5\u5728\u62e8\u53f7\u529f\u80fd\u4e2d\u6b63\u786e\u8bbe\u7f6e\u6388\u6743\u76ee\u6807\u3002 \u56e0\u4e3a\u6b64\u4fee\u590d\u7a0b\u5e8f\u8981\u6c42\u5c06 gRPC \u4f9d\u8d56\u5347\u7ea7\uff08\u5230 v1.23.0 \uff09\uff0c\u56e0\u6b64\uff0c\u4e0b\u6e38 Kubernetes [\u672a\u53cd\u5411\u79fb\u690d etcd \u5347\u7ea7](https://github.com/kubernetes/kubernetes/issues/72102#issuecomment-526645978)\u3002\u8fd9\u610f\u5473\u7740\u53ea\u80fd\u4ece Kubernetes 1.16 \u83b7\u5f97 [kube-apiserver \u4e2d\u7684 etcd \u4fee\u590d](https://github.com/etcd-io/etcd/pull/10911/commits/db61ee106ca9363ba3f188ecf27d1a8843da33ab)\u3002 \u8981\u7d27\u6025\u4fee\u590d Kubernetes 1.15 \u6216\u66f4\u65e9\u7248\u672c\u7684\u6b64\u9519\u8bef\uff0c\u8bf7\u6784\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684 kube-apiserver \u3002 \u60a8\u53ef\u4ee5\u4f7f\u7528[`vendor/google.golang.org/grpc/credentials/credentials.go`](https://github.com/kubernetes/kubernetes/blob/7b85be021cd2943167cd3d6b7020f44735d9d90b/vendor/google.golang.org/grpc/credentials/credentials.go#L135) \u548c [etcd@db61ee106](https://github.com/etcd-io/etcd/pull/10911/commits/db61ee106ca9363ba3f188ecf27d1a8843da33ab) \u6765\u8fdb\u884c\u672c\u5730\u66f4\u6539\u3002 \u8bf7\u770b [\"kube-apiserver 1.13.x refuses to work when first etcd-server is not available\"](https://github.com/kubernetes/kubernetes/issues/72102). {{< note >}} No newline at end of file", "positive_passages": [{"docid": "doc-en-website-e137b3467942095722d53969564746ac8d1e05b2a4541b803909ce4bfa1bd149", "text": "\" etcd \"client.cert \" etcd etcd \" \" etcd client.key etcd \"\n~ GitHub is not the right place for support requests.~ ~If you're looking for help, oyu could ask on .~ ~You can also post your question on the or the forum. There are other support venues with contributions from the wider community of Kubernetes users.~\n/triage accepted /kind bug\n/remove-kind support\nThanks\n/language zh\n/priority backlog", "commid": "website_issue_27444", "tokennum": 106}], "negative_passages": []} {"query_id": "q-en-website-645f679209a33029a5335b6b0ecc25efef5316b3942ca30c21864e817fcb0849", "query": "### Linux {{< note >}} Dieses Dokument zeigt Ihnen, wie Sie Minikube mit einer statischen Bin\u00e4rdatei unter Linux installieren. F\u00fcr alternative Linux-Installationsmethoden siehe [Andere Installationsmethoden](https://github.com/kubernetes/minikube#other-ways-to-install) im offiziellen Minikube-GitHub-Repository. Dieses Dokument zeigt Ihnen, wie Sie Minikube mit einer statischen Bin\u00e4rdatei unter Linux installieren. F\u00fcr alternative Linux-Installationsmethoden siehe [Andere Installationsmethoden](https://minikube.sigs.k8s.io/docs/start/) im offiziellen Minikube-GitHub-Repository. {{< /note >}} Sie k\u00f6nnen Minikube unter Linux installieren, indem Sie eine statische Bin\u00e4rdatei herunterladen:", "positive_passages": [{"docid": "doc-en-website-1295d136bd8ec3161f41985e9313a52f6c3fbf5336bda1cb167de4efe98fa28e", "text": "\"Ander Installationsmethoden\" here should not be a link to github but to this link:\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. DNS \uc11c\ube44\uc2a4\uc758 IP\ub97c \uc0ac\uc6a9\ud558\ub3c4\ub85d kubelets\ub97c \uad6c\uc131\ud55c\ub2e4. DNS \uc11c\ube44\uc2a4\uc758 IP\ub97c \uc0ac\uc6a9\ud558\ub3c4\ub85d kubelet\uc744 \uad6c\uc131\ud55c\ub2e4. \ud074\ub7ec\uc2a4\ud130 \ub0b4\uc758 \ubaa8\ub4e0 \uc11c\ube44\uc2a4(DNS \uc11c\ubc84 \uc790\uc2e0\ub3c4 \ud3ec\ud568\ud558\uc5ec)\uc5d0\ub294 DNS \ub124\uc784\uc774 \ud560\ub2f9\ub41c\ub2e4. \uae30\ubcf8\uc801\uc73c\ub85c \ud074\ub77c\uc774\uc5b8\ud2b8 \ud30c\ub4dc\uc758 DNS \uac80\uc0c9 \ub9ac\uc2a4\ud2b8\ub294 \ud30c\ub4dc \uc790\uccb4\uc758 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uc640", "positive_passages": [{"docid": "doc-en-website-e289f12cb15adfa0293a068568f23c493a89351509b05ae38d842a04488feb5c", "text": "This is a Feature Request Korean Localization for branch. What would you like to be Any localization contributions for Korean. Comments This issue is to notify the schedule of Korean localization to contributors. is the current work branch for Korean localization. Important dates A Korean localization work branch is merged to branch after we complete around 3~4 weeks job. PR Freeze: 01/16 (PR opened after freeze will be requested to rebase to next work branch) Branch Merge: 01/19 (merge to main branch) 2~3 , main . PR : 01/16 ( PR , PR ) : 01/19 (main , k8s.io ) /language ko /help\nThis request has been marked as needing help from a contributor. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. width: 100vw; width: 100%; } body.cid-community .community-section.community-frame .twittercol1 {", "positive_passages": [{"docid": "doc-en-website-f2118c1b83bf7a78c158c67a3165acd3c2452aea2a25fcfac2be591e279e9c49", "text": "This is a Bug Report ", "positive_passages": [{"docid": "doc-en-website-52ef25d99be0be715700ba7d7c06cd2fab825bd4620f9ea337758ad1de7bbda9", "text": "This is a Feature Request What would you like to be We need to update /content/ja/docs/contribute/style/content- according to the English text, because it is outdated. Why is this needed /content/ja/docs/contribute/style/content- is outdated. In the English page, a note for localication was in . It needs to be to the Japanese page. Comments /language ja /assign\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. creates a new RESTful resource path for each version you specify. The CRD can be either namespaced or cluster-scoped, as specified in the CRD's `scope` field. As with existing built-in objects, deleting a namespace deletes all custom objects in that namespace. CustomResourceDefinitions themselves are non-namespaced and are available to all namespaces. creates a new RESTful resource path for each version you specify. The custom resource created from a CRD object can be either namespaced or cluster-scoped, as specified in the CRD's `spec.scope` field. As with existing built-in objects, deleting a namespace deletes all custom objects in that namespace. CustomResourceDefinitions themselves are non-namespaced and are available to all namespaces. For example, if you save the following CustomResourceDefinition to `resourcedefinition.yaml`:", "positive_passages": [{"docid": "doc-en-website-89873c124323d0191b53e1c4c33b01cd8b3b0672b50709a80a3bdd2ffd9c227a", "text": "In section it is said: The CRD can be either namespaced or cluster-scoped, as specified in the CRD's That text is wrong (a CRD object and the custom resource created from that CRD object are not the same). It should better say: The custom resource created from a CRD object can be either namespaced or cluster-scoped, as specified in the CRD's field\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. creates a new RESTful resource path for each version you specify. The CRD can be either namespaced or cluster-scoped, as specified in the CRD's `scope` field. As with existing built-in objects, deleting a namespace deletes all custom objects in that namespace. CustomResourceDefinitions themselves are non-namespaced and are available to all namespaces. creates a new RESTful resource path for each version you specify. The custom resource created from a CRD object can be either namespaced or cluster-scoped, as specified in the CRD's `spec.scope` field. As with existing built-in objects, deleting a namespace deletes all custom objects in that namespace. CustomResourceDefinitions themselves are non-namespaced and are available to all namespaces. For example, if you save the following CustomResourceDefinition to `resourcedefinition.yaml`:", "positive_passages": [{"docid": "doc-en-website-894a3acc96d9edaedf1d9c033e3de05db54d43f333e8cab4c9aaf66da2652bca", "text": "For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: access-nginx spec: podSelector: matchLabels: app: nginx ingress: - from: - podSelector: matchLabels: access: \"true\" ", "positive_passages": [{"docid": "doc-en-website-b5afe9625acd835bfb356724335541400d355ff53ffcc31c220548c4d068d851", "text": "This is a Feature Request What would you like to be Translate into Japanese. Why is this needed This page has not been translated. Comments /language ja /assign", "commid": "website_issue_23010", "tokennum": 32}], "negative_passages": []} {"query_id": "q-en-website-68967c6187c8a036527af090dd7b9ece155e5b6e91721b729690c9e342d8bc34", "query": "[thirdparty_message] other = \"\"\"Ta sekcja przekierowuje do projekt\u00f3w os\u00f3b trzecich, kt\u00f3re udost\u0119pniaj\u0105 funkcjonalno\u015b\u0107 wymagan\u0105 przez Kubernetesa. Autory projektu Kubernetes nie s\u0105 odpowiedzialni za te projekty. Ta strona pod\u0105\u017ca za wytycznymi CNCF dla stron internetowych aby pokaza\u0107 projekty w kolejno\u015bci alfabetycznej. Aby doda\u0107 projekt na t\u0119 list\u0119 przeczytaj wytyczne dla zawarto\u015bci przed wysy\u0142aniem zmian.\"\"\" [thirdparty_message_edit_disclaimer] other=\"\"\"Zastrze\u017cenie dotycz\u0105ce zawarto\u015bci zewn\u0119trznej\"\"\" [thirdparty_message_single_item] other = \"\"\"🛇 Ta pozycja przekierowuje do projektu lub produktu os\u00f3b trzecich, b\u0119d\u0105cych poza projektem Kubernetes. Wi\u0119cej informacji\"\"\" [thirdparty_message_disclaimer] other = \"\"\"

Niekt\u00f3re elementy na tej stronie odnosz\u0105 si\u0119 do zewn\u0119trznych produkt\u00f3w lub projekt\u00f3w, kt\u00f3re dostarczaj\u0105 funkcjonalno\u015bci wymagane przez Kubernetesa. Autorzy projektu Kubernetes nie ponosz\u0105 odpowiedzialno\u015bci za te produkty oraz projekty. Zajrzyj na stron\u0119 CNCF website guidelines po wi\u0119cej informacji.

Zapoznaj si\u0119 tak\u017ce z content guide zanim zaproponujesz zmian\u0119 dodaj\u0105c\u0105 odno\u015bnik do zewn\u0119trznej strony.

\"\"\"
[ui_search_placeholder] other = \"Szukaj\"", "positive_passages": [{"docid": "doc-en-website-516b27d4334505acafad63912c2292699a6dd2cf94c51042b28b88a309ded93a", "text": "What would you like to be This issue is a follow-up task from displays some English text: ! To replace this text with localized strings, you can update with from . Specifically, these:\n/language pl\n/sig docs\n/triage accepted", "commid": "website_issue_36761", "tokennum": 51}], "negative_passages": []} {"query_id": "q-en-website-690fb8285765ea3b031a4767f55a86bf991c0354744369b48eb7b9309cc8dc27", "query": " --- title: Adding Windows worker nodes content_type: task weight: 50 --- This page explains how to add Windows worker nodes to a kubeadm cluster. ## {{% heading \"prerequisites\" %}} * A running [Windows Server 2022](https://www.microsoft.com/cloud-platform/windows-server-pricing) (or higher) instance with administrative access. * A running kubeadm cluster created by `kubeadm init` and following the steps in the document [Creating a cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). ## Adding Windows worker nodes {{< note >}} To facilitate the addition of Windows worker nodes to a cluster, PowerShell scripts from the repository https://sigs.k8s.io/sig-windows-tools are used. {{< /note >}} Do the following for each machine: 1. Open a PowerShell session on the machine. 1. Make sure you are Administrator or a privileged user. Then proceed with the steps outlined below. ### Install containerd {{% thirdparty-content %}} To install containerd, first run the following command: ```PowerShell curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/hostprocess/Install-Containerd.ps1 `````` Then run the following command, but first replace `CONTAINERD_VERSION` with a recent release from the [containerd repository](https://github.com/containerd/containerd/releases). The version must not have a `v` prefix. For example, use `1.7.22` instead of `v1.7.22`: ```PowerShell .Install-Containerd.ps1 -ContainerDVersion CONTAINERD_VERSION ``` * Adjust any other parameters for `Install-Containerd.ps1` such as `netAdapterName` as you need them. * Set `skipHypervisorSupportCheck` if your machine does not support Hyper-V and cannot host Hyper-V isolated containers. * If you change the `Install-Containerd.ps1` optional parameters `CNIBinPath` and/or `CNIConfigPath` you will need to configure the installed Windows CNI plugin with matching values. ### Install kubeadm and kubelet Run the following commands to install kubeadm and the kubelet: ```PowerShell curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/hostprocess/PrepareNode.ps1 .PrepareNode.ps1 -KubernetesVersion v{{< skew currentVersion >}} ``` * Adjust the parameter `KubernetesVersion` of `PrepareNode.ps1` if needed. ### Run `kubeadm join` Run the command that was output by `kubeadm init`. For example: ```bash kubeadm join --token : --discovery-token-ca-cert-hash sha256: ``` #### Additional information about kubeadm join {{< note >}} To specify an IPv6 tuple for `:`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`. {{< /note >}} If you do not have the token, you can get it by running the following command on the control plane node: ```bash kubeadm token list ``` The output is similar to this: ```console TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS 8ewj1p.9r9hcjoqgajrj4gi 23h 2018-06-12T02:51:28Z authentication, The default bootstrap system: signing token generated by bootstrappers: 'kubeadm init'. kubeadm: default-node-token ``` By default, node join tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired, you can create a new token by running the following command on the control plane node: ```bash kubeadm token create ``` The output is similar to this: ```console 5didvk.d09sbcov8ph2amjw ``` If you don't have the value of `--discovery-token-ca-cert-hash`, you can get it by running the following commands on the control plane node: ```bash sudo cat /etc/kubernetes/pki/ca.crt | openssl x509 -pubkey | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' ``` The output is similar to: ```console 8cb2de97839780a412b93877f8507ad6c94f73add17d5d7058e91741c9d5ec78 ``` The output of the `kubeadm join` command should look something like: ``` [preflight] Running pre-flight checks ... (log output of join workflow) ... Node join complete: * Certificate signing request sent to control-plane and response received. * Kubelet informed of new secure connection details. Run 'kubectl get nodes' on control-plane to see this machine join. ``` A few seconds later, you should notice this node in the output from `kubectl get nodes`. (for example, run `kubectl` on a control plane node). ### Network configuration CNI setup on clusters mixed with Linux and Windows nodes requires more steps than just running `kubectl apply` on a manifest file. Additionally, the CNI plugin running on control plane nodes must be prepared to support the CNI plugin running on Windows worker nodes. {{% thirdparty-content %}} Only a few CNI plugins currently support Windows. Below you can find individual setup instructions for them: * [Flannel](https://sigs.k8s.io/sig-windows-tools/guides/flannel.md) * [Calico](https://docs.tigera.io/calico/latest/getting-started/kubernetes/windows-calico/) ### Install kubectl for Windows (optional) {#install-kubectl} See [Install and Set Up kubectl on Windows](/docs/tasks/tools/install-kubectl-windows/). ## {{% heading \"whatsnext\" %}} * See how to [add Linux worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-linux-nodes/). ", "positive_passages": [{"docid": "doc-en-website-bca665cc91ed1b12403f93d72c6bbae28e3192881674361221537e3c7066e4f0", "text": "Please note: This issue is not suitable for new contributors since you need some familiarity with how Kubernetes works. The Kubernetes website currently lacks a guide on creating Windows/Linux nodes. See for more details. SIG Windows opted to remove the guide that did exist for creating Windows nodes, in PR Write a new task page about creating nodes for all operating systems. This could, potentially, be in a tabbed format as mentions in the issue referenced above. We would also need the entry reflected on the creates the Linux task page by moving / refactoring the existing \"join node\" contents from the \"create a cluster\" page: creates the Windows task page by taking the content from at the end of the Windows page we add note/disclaimer whatever that says that CNI on Windows needs special handling and we link to the various CNI choices at: adds tabs in the to choose between OS for joining nodes. /priority backlog /help\nThis request has been marked as needing help from a contributor. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. --- title: Adding Windows worker nodes content_type: task weight: 50 --- This page explains how to add Windows worker nodes to a kubeadm cluster. ## {{% heading \"prerequisites\" %}} * A running [Windows Server 2022](https://www.microsoft.com/cloud-platform/windows-server-pricing) (or higher) instance with administrative access. * A running kubeadm cluster created by `kubeadm init` and following the steps in the document [Creating a cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). ## Adding Windows worker nodes {{< note >}} To facilitate the addition of Windows worker nodes to a cluster, PowerShell scripts from the repository https://sigs.k8s.io/sig-windows-tools are used. {{< /note >}} Do the following for each machine: 1. Open a PowerShell session on the machine. 1. Make sure you are Administrator or a privileged user. Then proceed with the steps outlined below. ### Install containerd {{% thirdparty-content %}} To install containerd, first run the following command: ```PowerShell curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/hostprocess/Install-Containerd.ps1 `````` Then run the following command, but first replace `CONTAINERD_VERSION` with a recent release from the [containerd repository](https://github.com/containerd/containerd/releases). The version must not have a `v` prefix. For example, use `1.7.22` instead of `v1.7.22`: ```PowerShell .Install-Containerd.ps1 -ContainerDVersion CONTAINERD_VERSION ``` * Adjust any other parameters for `Install-Containerd.ps1` such as `netAdapterName` as you need them. * Set `skipHypervisorSupportCheck` if your machine does not support Hyper-V and cannot host Hyper-V isolated containers. * If you change the `Install-Containerd.ps1` optional parameters `CNIBinPath` and/or `CNIConfigPath` you will need to configure the installed Windows CNI plugin with matching values. ### Install kubeadm and kubelet Run the following commands to install kubeadm and the kubelet: ```PowerShell curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/hostprocess/PrepareNode.ps1 .PrepareNode.ps1 -KubernetesVersion v{{< skew currentVersion >}} ``` * Adjust the parameter `KubernetesVersion` of `PrepareNode.ps1` if needed. ### Run `kubeadm join` Run the command that was output by `kubeadm init`. For example: ```bash kubeadm join --token : --discovery-token-ca-cert-hash sha256: ``` #### Additional information about kubeadm join {{< note >}} To specify an IPv6 tuple for `:`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`. {{< /note >}} If you do not have the token, you can get it by running the following command on the control plane node: ```bash kubeadm token list ``` The output is similar to this: ```console TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS 8ewj1p.9r9hcjoqgajrj4gi 23h 2018-06-12T02:51:28Z authentication, The default bootstrap system: signing token generated by bootstrappers: 'kubeadm init'. kubeadm: default-node-token ``` By default, node join tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired, you can create a new token by running the following command on the control plane node: ```bash kubeadm token create ``` The output is similar to this: ```console 5didvk.d09sbcov8ph2amjw ``` If you don't have the value of `--discovery-token-ca-cert-hash`, you can get it by running the following commands on the control plane node: ```bash sudo cat /etc/kubernetes/pki/ca.crt | openssl x509 -pubkey | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' ``` The output is similar to: ```console 8cb2de97839780a412b93877f8507ad6c94f73add17d5d7058e91741c9d5ec78 ``` The output of the `kubeadm join` command should look something like: ``` [preflight] Running pre-flight checks ... (log output of join workflow) ... Node join complete: * Certificate signing request sent to control-plane and response received. * Kubelet informed of new secure connection details. Run 'kubectl get nodes' on control-plane to see this machine join. ``` A few seconds later, you should notice this node in the output from `kubectl get nodes`. (for example, run `kubectl` on a control plane node). ### Network configuration CNI setup on clusters mixed with Linux and Windows nodes requires more steps than just running `kubectl apply` on a manifest file. Additionally, the CNI plugin running on control plane nodes must be prepared to support the CNI plugin running on Windows worker nodes. {{% thirdparty-content %}} Only a few CNI plugins currently support Windows. Below you can find individual setup instructions for them: * [Flannel](https://sigs.k8s.io/sig-windows-tools/guides/flannel.md) * [Calico](https://docs.tigera.io/calico/latest/getting-started/kubernetes/windows-calico/) ### Install kubectl for Windows (optional) {#install-kubectl} See [Install and Set Up kubectl on Windows](/docs/tasks/tools/install-kubectl-windows/). ## {{% heading \"whatsnext\" %}} * See how to [add Linux worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-linux-nodes/). ", "positive_passages": [{"docid": "doc-en-website-fde2c72d16cfae65992cfbd2a03512aefb2c38b934ae131fe128b569bc67ad68", "text": "/priority important-longterm\nRelevant to\n/retitle Write new task pages about creating Kubernetes nodes\n/cc\nDone in PR /close\nClosing this issue. } @media only screen and (max-width: 767px) { body.cid-community .community-section h2:before, body.cid-community .community-section h2:after { display: none; } } No newline at end of file", "positive_passages": [{"docid": "doc-en-website-f2118c1b83bf7a78c158c67a3165acd3c2452aea2a25fcfac2be591e279e9c49", "text": "This is a Bug Report Backend Pod 1 Backend Pod 2 Backend Pod 3 Client kube-proxy apiserver ServiceIP (Virtual Server) Node (Real Server) ", "positive_passages": [{"docid": "doc-en-website-eaa8bf0bfeed07bdd2b4831affb0ead19d8d687ec85a495f603a2d26df3db476", "text": " This page explains how to add Linux worker nodes to a kubeadm cluster. ## {{% heading \"prerequisites\" %}} * Each joining worker node has installed the required components from [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/), such as, kubeadm, the kubelet and a {{< glossary_tooltip term_id=\"container-runtime\" text=\"container runtime\" >}}. * A running kubeadm cluster created by `kubeadm init` and following the steps in the document [Creating a cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). * You need superuser access to the node. ## Adding Linux worker nodes To add new Linux worker nodes to your cluster do the following for each machine: 1. Connect to the machine by using SSH or another method. 1. Run the command that was output by `kubeadm init`. For example: ```bash sudo kubeadm join --token : --discovery-token-ca-cert-hash sha256: ``` ### Additional information for kubeadm join {{< note >}} To specify an IPv6 tuple for `:`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`. {{< /note >}} If you do not have the token, you can get it by running the following command on the control plane node: ```bash sudo kubeadm token list ``` The output is similar to this: ```console TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS 8ewj1p.9r9hcjoqgajrj4gi 23h 2018-06-12T02:51:28Z authentication, The default bootstrap system: signing token generated by bootstrappers: 'kubeadm init'. kubeadm: default-node-token ``` By default, node join tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired, you can create a new token by running the following command on the control plane node: ```bash sudo kubeadm token create ``` The output is similar to this: ```console 5didvk.d09sbcov8ph2amjw ``` If you don't have the value of `--discovery-token-ca-cert-hash`, you can get it by running the following commands on the control plane node: ```bash sudo cat /etc/kubernetes/pki/ca.crt | openssl x509 -pubkey | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' ``` The output is similar to: ```console 8cb2de97839780a412b93877f8507ad6c94f73add17d5d7058e91741c9d5ec78 ``` The output of the `kubeadm join` command should look something like: ``` [preflight] Running pre-flight checks ... (log output of join workflow) ... Node join complete: * Certificate signing request sent to control-plane and response received. * Kubelet informed of new secure connection details. Run 'kubectl get nodes' on control-plane to see this machine join. ``` A few seconds later, you should notice this node in the output from `kubectl get nodes`. (for example, run `kubectl` on a control plane node). {{< note >}} As the cluster nodes are usually initialized sequentially, the CoreDNS Pods are likely to all run on the first control plane node. To provide higher availability, please rebalance the CoreDNS Pods with `kubectl -n kube-system rollout restart deployment coredns` after at least one new node is joined. {{< /note >}} ## {{% heading \"whatsnext\" %}} * See how to [add Windows worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/). ", "positive_passages": [{"docid": "doc-en-website-bca665cc91ed1b12403f93d72c6bbae28e3192881674361221537e3c7066e4f0", "text": "Please note: This issue is not suitable for new contributors since you need some familiarity with how Kubernetes works. The Kubernetes website currently lacks a guide on creating Windows/Linux nodes. See for more details. SIG Windows opted to remove the guide that did exist for creating Windows nodes, in PR Write a new task page about creating nodes for all operating systems. This could, potentially, be in a tabbed format as mentions in the issue referenced above. We would also need the entry reflected on the creates the Linux task page by moving / refactoring the existing \"join node\" contents from the \"create a cluster\" page: creates the Windows task page by taking the content from at the end of the Windows page we add note/disclaimer whatever that says that CNI on Windows needs special handling and we link to the various CNI choices at: adds tabs in the to choose between OS for joining nodes. /priority backlog /help\nThis request has been marked as needing help from a contributor. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. --- title: Adding Linux worker nodes content_type: task weight: 50 --- This page explains how to add Linux worker nodes to a kubeadm cluster. ## {{% heading \"prerequisites\" %}} * Each joining worker node has installed the required components from [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/), such as, kubeadm, the kubelet and a {{< glossary_tooltip term_id=\"container-runtime\" text=\"container runtime\" >}}. * A running kubeadm cluster created by `kubeadm init` and following the steps in the document [Creating a cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). * You need superuser access to the node. ## Adding Linux worker nodes To add new Linux worker nodes to your cluster do the following for each machine: 1. Connect to the machine by using SSH or another method. 1. Run the command that was output by `kubeadm init`. For example: ```bash sudo kubeadm join --token : --discovery-token-ca-cert-hash sha256: ``` ### Additional information for kubeadm join {{< note >}} To specify an IPv6 tuple for `:`, IPv6 address must be enclosed in square brackets, for example: `[2001:db8::101]:2073`. {{< /note >}} If you do not have the token, you can get it by running the following command on the control plane node: ```bash sudo kubeadm token list ``` The output is similar to this: ```console TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS 8ewj1p.9r9hcjoqgajrj4gi 23h 2018-06-12T02:51:28Z authentication, The default bootstrap system: signing token generated by bootstrappers: 'kubeadm init'. kubeadm: default-node-token ``` By default, node join tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired, you can create a new token by running the following command on the control plane node: ```bash sudo kubeadm token create ``` The output is similar to this: ```console 5didvk.d09sbcov8ph2amjw ``` If you don't have the value of `--discovery-token-ca-cert-hash`, you can get it by running the following commands on the control plane node: ```bash sudo cat /etc/kubernetes/pki/ca.crt | openssl x509 -pubkey | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' ``` The output is similar to: ```console 8cb2de97839780a412b93877f8507ad6c94f73add17d5d7058e91741c9d5ec78 ``` The output of the `kubeadm join` command should look something like: ``` [preflight] Running pre-flight checks ... (log output of join workflow) ... Node join complete: * Certificate signing request sent to control-plane and response received. * Kubelet informed of new secure connection details. Run 'kubectl get nodes' on control-plane to see this machine join. ``` A few seconds later, you should notice this node in the output from `kubectl get nodes`. (for example, run `kubectl` on a control plane node). {{< note >}} As the cluster nodes are usually initialized sequentially, the CoreDNS Pods are likely to all run on the first control plane node. To provide higher availability, please rebalance the CoreDNS Pods with `kubectl -n kube-system rollout restart deployment coredns` after at least one new node is joined. {{< /note >}} ## {{% heading \"whatsnext\" %}} * See how to [add Windows worker nodes](/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/). ", "positive_passages": [{"docid": "doc-en-website-fde2c72d16cfae65992cfbd2a03512aefb2c38b934ae131fe128b569bc67ad68", "text": "/priority important-longterm\nRelevant to\n/retitle Write new task pages about creating Kubernetes nodes\n/cc\nDone in PR /close\nClosing this issue. | `node.kubernetes.io/disk-pressure` | NoSchedule | 1.8+ | | | `node.kubernetes.io/memory-pressure` | NoSchedule | 1.8+ | | | `node.kubernetes.io/disk-pressure` | NoSchedule | 1.8+ | DaemonSet pods tolerate disk-pressure attributes by default scheduler. | | `node.kubernetes.io/memory-pressure` | NoSchedule | 1.8+ | DaemonSet pods tolerate memory-pressure attributes by default scheduler. | | `node.kubernetes.io/unschedulable` | NoSchedule | 1.12+ | DaemonSet pods tolerate unschedulable attributes by default scheduler. | | `node.kubernetes.io/network-unavailable` | NoSchedule | 1.12+ | DaemonSet pods, who uses host network, tolerate network-unavailable attributes by default scheduler. |", "positive_passages": [{"docid": "doc-en-website-7c3c0fe8d3e20b3d4d603fc9260bf1af9682a2d1815ce891dd7df62ac627d96e", "text": "In the table of of there are two descriptions missing of two tolerations kyes, one is another one is , their descriptions are missing.\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. Counter
Counter of OpenAPI v2 spec regeneration count broken down by causing APIService name and reason.
apiservice
reason
None
aggregator_openapi_v2_regeneration_duration ALPHA Gauge Gauge of OpenAPI v2 spec regeneration duration in seconds.
reason
None
aggregator_unavailable_apiservice ALPHA Custom Gauge of APIServices which are marked as unavailable broken down by APIService name.
name
None
aggregator_unavailable_apiservice_total ALPHA Counter Counter of APIServices which are marked as unavailable broken down by APIService name and reason.
name
reason
None
apiextensions_openapi_v2_regeneration_count ALPHA Counter Counter of OpenAPI v2 spec regeneration count broken down by causing CRD name and reason.
crd
reason
None
apiextensions_openapi_v3_regeneration_count ALPHA Counter Counter of OpenAPI v3 spec regeneration count broken down by group, version, causing CRD and reason.
crd
group
reason
version
None
apiserver_admission_step_admission_duration_seconds_summary ALPHA Summary Admission sub-step latency summary in seconds, broken out for each operation and API resource and step type (validate or admit).
operation
rejected
type
None
apiserver_admission_webhook_fail_open_count ALPHA Counter Admission webhook fail open count, identified by name and broken out for each admission type (validating or mutating).
name
type
None
apiserver_admission_webhook_rejection_count ALPHA Counter Admission webhook rejection count, identified by name and broken out for each admission type (validating or admit) and operation. Additional labels specify an error type (calling_webhook_error or apiserver_internal_error if an error occurred; no_error otherwise) and optionally a non-zero rejection code if the webhook rejects the request with an HTTP status code (honored by the apiserver when the code is greater or equal to 400). Codes greater than 600 are truncated to 600, to keep the metrics cardinality bounded.
error_type
name
operation
rejection_code
type
None
apiserver_admission_webhook_request_total ALPHA Counter Admission webhook request total, identified by name and broken out for each admission type (validating or mutating) and operation. Additional labels specify whether the request was rejected or not and an HTTP status code. Codes greater than 600 are truncated to 600, to keep the metrics cardinality bounded.
code
name
operation
rejected
type
None
apiserver_audit_error_total ALPHA Counter Counter of audit events that failed to be audited properly. Plugin identifies the plugin affected by the error.
plugin
None
apiserver_audit_event_total ALPHA Counter Counter of audit events generated and sent to the audit backend.
None None
apiserver_audit_level_total ALPHA Counter Counter of policy levels for audit events (1 per request).
level
None
apiserver_audit_requests_rejected_total ALPHA Counter Counter of apiserver requests rejected due to an error in audit logging backend.
None None
apiserver_cache_list_fetched_objects_total ALPHA Counter Number of objects read from watch cache in the course of serving a LIST request
index
resource_prefix
None
apiserver_cache_list_returned_objects_total ALPHA Counter Number of objects returned for a LIST request from watch cache
resource_prefix
None
apiserver_cache_list_total ALPHA Counter Number of LIST requests served from watch cache
index
resource_prefix
None
apiserver_cel_compilation_duration_seconds ALPHA Histogram
None None
apiserver_cel_evaluation_duration_seconds ALPHA Histogram
None None
apiserver_certificates_registry_csr_honored_duration_total ALPHA Counter Total number of issued CSRs with a requested duration that was honored, sliced by signer (only kubernetes.io signer names are specifically identified)
signerName
None
apiserver_certificates_registry_csr_requested_duration_total ALPHA Counter Total number of issued CSRs with a requested duration, sliced by signer (only kubernetes.io signer names are specifically identified)
signerName
None
apiserver_client_certificate_expiration_seconds ALPHA Histogram Distribution of the remaining lifetime on the certificate used to authenticate a request.
None None
apiserver_crd_webhook_conversion_duration_seconds ALPHA Histogram CRD webhook conversion duration in seconds
crd_name
from_version
succeeded
to_version
None
apiserver_current_inqueue_requests ALPHA Gauge Maximal number of queued requests in this apiserver per request kind in last second.
request_kind
None
apiserver_delegated_authn_request_duration_seconds ALPHA Histogram Request latency in seconds. Broken down by status code.
code
None
apiserver_delegated_authn_request_total ALPHA Counter Number of HTTP requests partitioned by status code.
code
None
apiserver_delegated_authz_request_duration_seconds ALPHA Histogram Request latency in seconds. Broken down by status code.
code
None
apiserver_delegated_authz_request_total ALPHA Counter Number of HTTP requests partitioned by status code.
code
None
apiserver_egress_dialer_dial_duration_seconds ALPHA Histogram Dial latency histogram in seconds, labeled by the protocol (http-connect or grpc), transport (tcp or uds)
protocol
transport
None
apiserver_egress_dialer_dial_failure_count ALPHA Counter Dial failure count, labeled by the protocol (http-connect or grpc), transport (tcp or uds), and stage (connect or proxy). The stage indicates at which stage the dial failed
protocol
stage
transport
apiserver_egress_dialer_dial_start_total ALPHA Counter Dial starts, labeled by the protocol (http-connect or grpc) and transport (tcp or uds).
protocol
transport
None
apiserver_envelope_encryption_dek_cache_fill_percent ALPHA Gauge Percent of the cache slots currently occupied by cached DEKs.
None None
apiserver_envelope_encryption_dek_cache_inter_arrival_time_seconds ALPHA Histogram Time (in seconds) of inter arrival of transformation requests.
transformation_type
None
apiserver_flowcontrol_current_executing_requests ALPHA Gauge Number of requests in initial (for a WATCH) or any (for a non-WATCH) execution stage in the API Priority and Fairness subsystem
flow_schema
priority_level
None
apiserver_flowcontrol_current_inqueue_requests ALPHA Gauge Number of requests currently pending in queues of the API Priority and Fairness subsystem
flow_schema
priority_level
apiserver_flowcontrol_current_limit_seats ALPHA Gauge current derived number of execution seats available to each priority level
priority_level
None
apiserver_flowcontrol_current_r ALPHA Gauge R(time of last change)
priority_level
apiserver_flowcontrol_demand_seats ALPHA TimingRatioHistogram Observations, at the end of every nanosecond, of (the number of seats each priority level could use) / (nominal number of seats for that level)
priority_level
apiserver_flowcontrol_demand_seats_average ALPHA Gauge Time-weighted average, over last adjustment period, of demand_seats
priority_level
apiserver_flowcontrol_demand_seats_high_watermark ALPHA Gauge High watermark, over last adjustment period, of demand_seats
priority_level
apiserver_flowcontrol_demand_seats_smoothed ALPHA Gauge Smoothed seat demands
priority_level
apiserver_flowcontrol_demand_seats_stdev ALPHA Gauge Time-weighted standard deviation, over last adjustment period, of demand_seats
priority_level
None
apiserver_flowcontrol_dispatch_r ALPHA Gauge R(time of last dispatch)
priority_level
None
apiserver_flowcontrol_dispatched_requests_total ALPHA Counter Number of requests executed by API Priority and Fairness subsystem
flow_schema
priority_level
None
apiserver_flowcontrol_epoch_advance_total ALPHA Counter Number of times the queueset's progress meter jumped backward
priority_level
success
None
apiserver_flowcontrol_latest_s ALPHA Gauge S(most recently dispatched request)
priority_level
apiserver_flowcontrol_lower_limit_seats ALPHA Gauge Configured lower bound on number of execution seats available to each priority level
priority_level
None
apiserver_flowcontrol_next_discounted_s_bounds ALPHA Gauge min and max, over queues, of S(oldest waiting request in queue) - estimated work in progress
bound
priority_level
None
apiserver_flowcontrol_next_s_bounds ALPHA Gauge min and max, over queues, of S(oldest waiting request in queue)
bound
priority_level
apiserver_flowcontrol_nominal_limit_seats ALPHA Gauge Nominal number of execution seats configured for each priority level
priority_level
None
apiserver_flowcontrol_priority_level_request_utilization ALPHA TimingRatioHistogram Observations, at the end of every nanosecond, of number of requests (as a fraction of the relevant limit) waiting or in any stage of execution (but only initial stage for WATCHes)
phase
priority_level
None
apiserver_flowcontrol_priority_level_seat_utilization ALPHA TimingRatioHistogram Observations, at the end of every nanosecond, of utilization of seats for any stage of execution (but only initial stage for WATCHes)
priority_level
phase:executing
map[phase:executing]
apiserver_flowcontrol_read_vs_write_current_requests ALPHA TimingRatioHistogram Observations, at the end of every nanosecond, of the number of requests (as a fraction of the relevant limit) waiting or in regular stage of execution
phase
request_kind
None
apiserver_flowcontrol_rejected_requests_total ALPHA Counter Number of requests rejected by API Priority and Fairness subsystem
flow_schema
priority_level
reason
None
apiserver_flowcontrol_request_concurrency_in_use ALPHA Gauge Concurrency (number of seats) occupied by the currently executing (initial stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness subsystem
flow_schema
priority_level
None
apiserver_flowcontrol_request_concurrency_limit ALPHA Gauge Shared concurrency limit in the API Priority and Fairness subsystem
priority_level
None
apiserver_flowcontrol_request_dispatch_no_accommodation_total ALPHA Counter Number of times a dispatch attempt resulted in a non accommodation due to lack of available seats
flow_schema
priority_level
None
apiserver_flowcontrol_request_execution_seconds ALPHA Histogram Duration of initial stage (for a WATCH) or any (for a non-WATCH) stage of request execution in the API Priority and Fairness subsystem
flow_schema
priority_level
type
None
apiserver_flowcontrol_request_queue_length_after_enqueue ALPHA Histogram Length of queue in the API Priority and Fairness subsystem, as seen by each request after it is enqueued
flow_schema
priority_level
None
apiserver_flowcontrol_request_wait_duration_seconds ALPHA Histogram Length of time a request spent waiting in its queue
execute
flow_schema
priority_level
apiserver_flowcontrol_seat_fair_frac ALPHA Gauge Fair fraction of server's concurrency to allocate to each priority level that can use it
apiserver_flowcontrol_target_seats ALPHA Gauge Seat allocation targets
priority_level
apiserver_flowcontrol_upper_limit_seats ALPHA Gauge Configured upper bound on number of execution seats available to each priority level
priority_level
None
apiserver_flowcontrol_watch_count_samples ALPHA Histogram count of watchers for mutating requests in API Priority and Fairness
flow_schema
priority_level
None
apiserver_flowcontrol_work_estimated_seats ALPHA Histogram Number of estimated seats (maximum of initial and final seats) associated with requests in API Priority and Fairness
flow_schema
priority_level
None
apiserver_init_events_total ALPHA Counter Counter of init events processed in watch cache broken by resource type.
resource
None
apiserver_kube_aggregator_x509_insecure_sha1_total ALPHA Counter Counts the number of requests to servers with insecure SHA1 signatures in their serving certificate OR the number of connection failures due to the insecure SHA1 signatures (either/or, based on the runtime environment)
None None
apiserver_kube_aggregator_x509_missing_san_total ALPHA Counter Counts the number of requests to servers missing SAN extension in their serving certificate OR the number of connection failures due to the lack of x509 certificate SAN extension missing (either/or, based on the runtime environment)
None None
apiserver_request_aborts_total ALPHA Counter Number of requests which apiserver aborted possibly due to a timeout, for each group, version, verb, resource, subresource and scope
group
resource
scope
subresource
verb
version
None
apiserver_request_body_sizes ALPHA Histogram Apiserver request body sizes broken out by size.
resource
verb
None
apiserver_request_filter_duration_seconds ALPHA Histogram Request filter latency distribution in seconds, for each filter type
filter
None
apiserver_request_post_timeout_total ALPHA Counter Tracks the activity of the request handlers after the associated requests have been timed out by the apiserver
source
status
apiserver_request_sli_duration_seconds ALPHA Histogram Response latency distribution (not counting webhook duration) in seconds for each verb, group, version, resource, subresource, scope and component.
component
group
resource
scope
subresource
verb
version
None
apiserver_request_slo_duration_seconds ALPHA Histogram Response latency distribution (not counting webhook duration) in seconds for each verb, group, version, resource, subresource, scope and component.
component
group
resource
scope
subresource
verb
version
1.27.0
None
apiserver_request_terminations_total ALPHA Counter Number of requests which apiserver terminated in self-defense.
code
component
group
resource
scope
subresource
verb
version
None
apiserver_request_timestamp_comparison_time ALPHA Histogram Time taken for comparison of old vs new objects in UPDATE or PATCH requests
code_path
None
apiserver_selfrequest_total ALPHA Counter Counter of apiserver self-requests broken out for each verb, API resource and subresource.
resource
subresource
verb
None
apiserver_storage_data_key_generation_duration_seconds ALPHA Histogram Latencies in seconds of data encryption key(DEK) generation operations.
None None
apiserver_storage_data_key_generation_failures_total ALPHA Counter Total number of failed data encryption key(DEK) generation operations.
None None
apiserver_storage_db_total_size_in_bytes ALPHA Gauge Total size of the storage database file physically allocated in bytes.
endpoint
None
apiserver_storage_envelope_transformation_cache_misses_total ALPHA Counter Total number of cache misses while accessing key decryption key(KEK).
None None
apiserver_storage_list_evaluated_objects_total ALPHA Counter Number of objects tested in the course of serving a LIST request from storage
resource
None
apiserver_storage_list_fetched_objects_total ALPHA Counter Number of objects read from storage in the course of serving a LIST request
resource
None
apiserver_storage_list_returned_objects_total ALPHA Counter Number of objects returned for a LIST request from storage
resource
None
apiserver_storage_list_total ALPHA Counter Number of LIST requests served from storage
resource
None
apiserver_storage_transformation_duration_seconds ALPHA Histogram Latencies in seconds of value transformation operations.
transformation_type
None
apiserver_storage_transformation_operations_total ALPHA Counter Total number of transformations.
status
transformation_type
transformer_prefix
None
apiserver_terminated_watchers_total ALPHA Counter Counter of watchers closed due to unresponsiveness broken by resource type.
resource
None
apiserver_tls_handshake_errors_total ALPHA Counter Number of requests dropped with 'TLS handshake error from' error
None None
apiserver_validating_admission_policy_check_duration_seconds ALPHA Histogram Validation admission latency for individual validation expressions in seconds, labeled by policy and further including binding, state and enforcement action taken.
enforcement_action
policy
policy_binding
state
Validation admission latency for individual validation expressions in seconds, labeled by policy and param resource, further including binding, state and enforcement action taken.
enforcement_action
params
policy
policy_binding
state
validation_expression
None
apiserver_validating_admission_policy_check_total ALPHA Counter Validation admission policy check total, labeled by policy and further identified by binding, enforcement action taken, and state.
enforcement_action
policy
policy_binding
state
Validation admission policy check total, labeled by policy and param resource, and further identified by binding, validation expression, enforcement action taken, and state.
enforcement_action
params
policy
policy_binding
state
validation_expression
None
apiserver_validating_admission_policy_definition_total ALPHA Counter Validation admission policy count total, labeled by state and enforcement action.
enforcement_action
state
None
apiserver_watch_cache_events_dispatched_total ALPHA Counter Counter of events dispatched in watch cache broken by resource type.
resource
None
apiserver_watch_cache_initializations_total ALPHA Counter Counter of watch cache initializations broken by resource type.
resource
None
apiserver_watch_events_sizes ALPHA Histogram Watch event size distribution in bytes
group
kind
version
None
apiserver_watch_events_total ALPHA Counter Number of events sent in watch clients
group
kind
version
None
apiserver_webhooks_x509_insecure_sha1_total ALPHA Counter Counts the number of requests to servers with insecure SHA1 signatures in their serving certificate OR the number of connection failures due to the insecure SHA1 signatures (either/or, based on the runtime environment)
None None
apiserver_webhooks_x509_missing_san_total ALPHA Counter Counts the number of requests to servers missing SAN extension in their serving certificate OR the number of connection failures due to the lack of x509 certificate SAN extension missing (either/or, based on the runtime environment)
None None
attachdetach_controller_forced_detaches ALPHA Counter Number of times the A/D Controller performed a forced detach
None None
attachdetach_controller_total_volumes ALPHA Custom Number of volumes in A/D Controller
plugin_name
state
None
authenticated_user_requests ALPHA Counter Counter of authenticated requests broken out by username.
username
None
authentication_attempts ALPHA Counter Counter of authenticated attempts.
result
None
authentication_duration_seconds ALPHA Histogram Authentication duration in seconds broken out by result.
result
None
authentication_token_cache_active_fetch_count ALPHA Gauge
status
None
authentication_token_cache_fetch_total ALPHA Counter
status
None
authentication_token_cache_request_duration_seconds ALPHA Histogram
status
None
authentication_token_cache_request_total ALPHA Counter
status
None
cloudprovider_aws_api_request_duration_seconds ALPHA Histogram Latency of AWS API calls
request
None
cloudprovider_aws_api_request_errors ALPHA Counter AWS API errors
request
None
cloudprovider_aws_api_throttled_requests_total ALPHA Counter AWS API throttled requests
operation_name
None
cloudprovider_azure_api_request_duration_seconds ALPHA Histogram Latency of an Azure API call
request
resource_group
source
subscription_id
None
cloudprovider_azure_api_request_errors ALPHA Counter Number of errors for an Azure API call
request
resource_group
source
subscription_id
None
cloudprovider_azure_api_request_ratelimited_count ALPHA Counter Number of rate limited Azure API calls
request
resource_group
source
subscription_id
None
cloudprovider_azure_api_request_throttled_count ALPHA Counter Number of throttled Azure API calls
request
resource_group
source
subscription_id
None
cloudprovider_azure_op_duration_seconds ALPHA Histogram Latency of an Azure service operation
request
resource_group
source
subscription_id
None
cloudprovider_azure_op_failure_count ALPHA Counter Number of failed Azure service operations
request
resource_group
source
subscription_id
None
cloudprovider_gce_api_request_duration_seconds ALPHA Histogram Latency of a GCE API call
region
request
version
zone
None
cloudprovider_gce_api_request_errors ALPHA Counter Number of errors for an API call
region
request
version
zone
None
cloudprovider_vsphere_api_request_duration_seconds ALPHA Histogram Latency of vsphere api call
request
None
cloudprovider_vsphere_api_request_errors ALPHA Counter vsphere Api errors
request
None
cloudprovider_vsphere_operation_duration_seconds ALPHA Histogram Latency of vsphere operation call
operation
None
cloudprovider_vsphere_operation_errors ALPHA Counter vsphere operation errors
operation
None
cloudprovider_vsphere_vcenter_versions ALPHA Custom Versions for connected vSphere vCenters
hostname
version
build
None
container_cpu_usage_seconds_total ALPHA Custom Cumulative cpu time consumed by the container in core-seconds
container
pod
namespace
None
container_memory_working_set_bytes ALPHA Custom Current working set of the container in bytes
container
pod
namespace
None
container_start_time_seconds ALPHA Custom Start time of the container since unix epoch in seconds
container
pod
namespace
None
cronjob_controller_cronjob_job_creation_skew_duration_seconds ALPHA Histogram Time between when a cronjob is scheduled to be run, and when the corresponding job is created None None
csi_operations_seconds ALPHA Histogram Container Storage Interface operation duration with gRPC error code status total
driver_name
grpc_status_code
method_name
migrated
None
endpoint_slice_controller_changes ALPHA Counter Number of EndpointSlice changes
operation
None
endpoint_slice_controller_desired_endpoint_slices ALPHA Gauge Number of EndpointSlices that would exist with perfect endpoint allocation
None None
endpoint_slice_controller_endpoints_added_per_sync ALPHA Histogram Number of endpoints added on each Service sync
None None
endpoint_slice_controller_endpoints_desired ALPHA Gauge Number of endpoints desired
None None
endpoint_slice_controller_endpoints_removed_per_sync ALPHA Histogram Number of endpoints removed on each Service sync
None None
endpoint_slice_controller_endpointslices_changed_per_sync ALPHA Histogram Number of EndpointSlices changed on each Service sync
topology
None
endpoint_slice_controller_num_endpoint_slices ALPHA Gauge Number of EndpointSlices
None None
endpoint_slice_controller_syncs ALPHA Counter Number of EndpointSlice syncs
result
None
endpoint_slice_mirroring_controller_addresses_skipped_per_sync ALPHA Histogram Number of addresses skipped on each Endpoints sync due to being invalid or exceeding MaxEndpointsPerSubset
None None
endpoint_slice_mirroring_controller_changes ALPHA Counter Number of EndpointSlice changes
operation
None
endpoint_slice_mirroring_controller_desired_endpoint_slices ALPHA Gauge Number of EndpointSlices that would exist with perfect endpoint allocation
None None
endpoint_slice_mirroring_controller_endpoints_added_per_sync ALPHA Histogram Number of endpoints added on each Endpoints sync
None None
endpoint_slice_mirroring_controller_endpoints_desired ALPHA Gauge Number of endpoints desired
None None
endpoint_slice_mirroring_controller_endpoints_removed_per_sync ALPHA Histogram Number of endpoints removed on each Endpoints sync
None None
endpoint_slice_mirroring_controller_endpoints_sync_duration ALPHA Histogram Duration of syncEndpoints() in seconds
None None
endpoint_slice_mirroring_controller_endpoints_updated_per_sync ALPHA Histogram Number of endpoints updated on each Endpoints sync
None None
endpoint_slice_mirroring_controller_num_endpoint_slices ALPHA Gauge Number of EndpointSlices
None None
ephemeral_volume_controller_create_failures_total ALPHA Counter Number of PersistenVolumeClaims creation requests
None None
ephemeral_volume_controller_create_total ALPHA Counter Number of PersistenVolumeClaims creation requests
None None
etcd_bookmark_counts ALPHA Gauge Number of etcd bookmarks (progress notify events) split by kind.
resource
None
etcd_lease_object_counts ALPHA Histogram Number of objects attached to a single etcd lease.
None None
etcd_request_duration_seconds ALPHA Histogram Etcd request latency in seconds for each operation and object type.
operation
type
None
etcd_version_info ALPHA Gauge Etcd server's binary version
binary_version
None
field_validation_request_duration_seconds ALPHA Histogram Response latency distribution in seconds for each field validation value and whether field validation is enabled or not
enabled
field_validation
None
garbagecollector_controller_resources_sync_error_total ALPHA Counter Number of garbage collector resources sync errors
None None
get_token_count ALPHA Counter Counter of total Token() requests to the alternate token source
None None
get_token_fail_count ALPHA Counter Counter of failed Token() requests to the alternate token source
None None
job_controller_job_finished_total ALPHA Counter The number of finished job
completion_mode
reason
result
None
job_controller_job_pods_finished_total ALPHA Counter The number of finished Pods that are fully tracked
completion_mode
result
None
job_controller_job_sync_duration_seconds ALPHA Histogram The time it took to sync a job
action
completion_mode
result
None
job_controller_job_sync_total ALPHA Counter The number of job syncs
action
completion_mode
result
None
job_controller_pod_failures_handled_by_failure_policy_total ALPHA Counter `The number of failed Pods handled by failure policy with, \t\t\trespect to the failure policy action applied based on the matched, \t\t\trule. Possible values of the action label correspond to the, \t\t\tpossible values for the failure policy rule action, which are:, \t\t\t\"FailJob\", \"Ignore\" and \"Count\".`
action
None
job_controller_terminated_pods_tracking_finalizer_total ALPHA Counter `The number of terminated pods (phase=Failed|Succeeded), that have the finalizer batch.kubernetes.io/job-tracking, The event label can be \"add\" or \"delete\".`
event
None
kube_apiserver_clusterip_allocator_allocated_ips ALPHA Gauge Gauge measuring the number of allocated IPs for Services
cidr
None
kube_apiserver_clusterip_allocator_allocation_errors_total ALPHA Counter Number of errors trying to allocate Cluster IPs
cidr
scope
None
kube_apiserver_clusterip_allocator_allocation_total ALPHA Counter Number of Cluster IPs allocations
cidr
scope
None
kube_apiserver_clusterip_allocator_available_ips ALPHA Gauge Gauge measuring the number of available IPs for Services
cidr
None
kube_apiserver_pod_logs_pods_logs_backend_tls_failure_total ALPHA Counter Total number of requests for pods/logs that failed due to kubelet server TLS verification
None None
kube_apiserver_pod_logs_pods_logs_insecure_backend_total ALPHA Counter Total number of requests for pods/logs sliced by usage type: enforce_tls, skip_tls_allowed, skip_tls_denied
usage
None
kube_pod_resource_limit ALPHA Custom Resources limit for workloads on the cluster, broken down by pod. This shows the resource usage the scheduler and kubelet expect per pod for resources along with the unit for the resource if any.
namespace
pod
node
scheduler
priority
resource
unit
None
kube_pod_resource_request ALPHA Custom Resources requested by workloads on the cluster, broken down by pod. This shows the resource usage the scheduler and kubelet expect per pod for resources along with the unit for the resource if any.
namespace
pod
node
scheduler
priority
resource
unit
None
kubelet_certificate_manager_client_expiration_renew_errors ALPHA Counter Counter of certificate renewal errors.
None None
kubelet_certificate_manager_client_ttl_seconds ALPHA Gauge Gauge of the TTL (time-to-live) of the Kubelet's client certificate. The value is in seconds until certificate expiry (negative if already expired). If client certificate is invalid or unused, the value will be +INF.
None None
kubelet_certificate_manager_server_rotation_seconds ALPHA Histogram Histogram of the number of seconds the previous certificate lived before being rotated.
None None
kubelet_certificate_manager_server_ttl_seconds ALPHA Gauge Gauge of the shortest TTL (time-to-live) of the Kubelet's serving certificate. The value is in seconds until certificate expiry (negative if already expired). If serving certificate is invalid or unused, the value will be +INF.
None None
kubelet_cgroup_manager_duration_seconds ALPHA Histogram Duration in seconds for cgroup manager operations. Broken down by method.
operation_type
None
kubelet_container_log_filesystem_used_bytes ALPHA Custom Bytes used by the container's logs on the filesystem.
uid
namespace
pod
container
None
kubelet_containers_per_pod_count ALPHA Histogram The number of containers per pod.
None None
kubelet_cpu_manager_pinning_errors_total ALPHA Counter The number of cpu core allocations which required pinning failed.
None None
kubelet_cpu_manager_pinning_requests_total ALPHA Counter The number of cpu core allocations which required pinning.
kubelet_credential_provider_plugin_duration ALPHA Histogram Duration of execution in seconds for credential provider plugin
plugin_name
kubelet_credential_provider_plugin_errors ALPHA Counter Number of errors from credential provider plugin
plugin_name
None None
kubelet_device_plugin_alloc_duration_seconds ALPHA Histogram Duration in seconds to serve a device plugin Allocation request. Broken down by resource name.
resource_name
None
kubelet_device_plugin_registration_total ALPHA Counter Cumulative number of device plugin registrations. Broken down by resource name.
resource_name
None
kubelet_eviction_stats_age_seconds ALPHA Histogram Time between when stats are collected, and when pod is evicted based on those stats by eviction signal
eviction_signal
None
kubelet_evictions ALPHA Counter Cumulative number of pod evictions by eviction signal
eviction_signal
None
kubelet_graceful_shutdown_end_time_seconds ALPHA Gauge Last graceful shutdown start time since unix epoch in seconds
None None
kubelet_graceful_shutdown_start_time_seconds ALPHA Gauge Last graceful shutdown start time since unix epoch in seconds
None None
kubelet_http_inflight_requests ALPHA Gauge Number of the inflight http requests
long_running
method
path
server_type
None
kubelet_http_requests_duration_seconds ALPHA Histogram Duration in seconds to serve http requests
long_running
method
path
server_type
None
kubelet_http_requests_total ALPHA Counter Number of the http requests received since the server started
long_running
method
path
server_type
None
kubelet_kubelet_credential_provider_plugin_duration ALPHA Histogram Duration of execution in seconds for credential provider plugin
plugin_name
None
kubelet_kubelet_credential_provider_plugin_errors ALPHA Counter Number of errors from credential provider plugin
plugin_name
None
kubelet_lifecycle_handler_http_fallbacks_total ALPHA Counter The number of times lifecycle handlers successfully fell back to http from https.
None None
kubelet_managed_ephemeral_containers ALPHA Gauge Current number of ephemeral containers in pods managed by this kubelet. Ephemeral containers will be ignored if disabled by the EphemeralContainers feature gate, and this number will be 0.
None None
kubelet_node_name ALPHA Gauge The node's name. The count is always 1.
node
None
kubelet_pleg_discard_events ALPHA Counter The number of discard events in PLEG.
None None
kubelet_pleg_last_seen_seconds ALPHA Gauge Timestamp in seconds when PLEG was last seen active.
None None
kubelet_pleg_relist_duration_seconds ALPHA Histogram Duration in seconds for relisting pods in PLEG.
None None
kubelet_pleg_relist_interval_seconds ALPHA Histogram Interval in seconds between relisting in PLEG.
None None
kubelet_pod_resources_endpoint_errors_get_allocatable ALPHA Counter Number of requests to the PodResource GetAllocatableResources endpoint which returned error. Broken down by server api version.
server_api_version
None
kubelet_pod_resources_endpoint_errors_list ALPHA Counter Number of requests to the PodResource List endpoint which returned error. Broken down by server api version.
server_api_version
None
kubelet_pod_resources_endpoint_requests_get_allocatable ALPHA Counter Number of requests to the PodResource GetAllocatableResources endpoint. Broken down by server api version.
server_api_version
None
kubelet_pod_resources_endpoint_requests_list ALPHA Counter Number of requests to the PodResource List endpoint. Broken down by server api version.
server_api_version
None
kubelet_pod_resources_endpoint_requests_total ALPHA Counter Cumulative number of requests to the PodResource endpoint. Broken down by server api version.
server_api_version
None
kubelet_pod_start_duration_seconds ALPHA Histogram Duration in seconds from kubelet seeing a pod for the first time to the pod starting to run
kubelet_pod_start_sli_duration_seconds ALPHA Histogram Duration in seconds to start a pod, excluding time to pull images and run init containers, measured from pod creation timestamp to when all its containers are reported as started and observed via watch
None None
kubelet_pod_status_sync_duration_seconds ALPHA Histogram Duration in seconds to sync a pod status update. Measures time from detection of a change to pod status until the API is successfully updated for that pod, even if multiple intevening changes to pod status occur.
None None
kubelet_pod_worker_duration_seconds ALPHA Histogram Duration in seconds to sync a single pod. Broken down by operation type: create, update, or sync
operation_type
None
kubelet_pod_worker_start_duration_seconds ALPHA Histogram Duration in seconds from kubelet seeing a pod to starting a worker.
None None
kubelet_preemptions ALPHA Counter Cumulative number of pod preemptions by preemption resource
preemption_signal
None
kubelet_run_podsandbox_duration_seconds ALPHA Histogram Duration in seconds of the run_podsandbox operations. Broken down by RuntimeClass.Handler.
runtime_handler
None
kubelet_run_podsandbox_errors_total ALPHA Counter Cumulative number of the run_podsandbox operation errors by RuntimeClass.Handler.
runtime_handler
None
kubelet_running_containers ALPHA Gauge Number of containers currently running
container_state
None
kubelet_running_pods ALPHA Gauge Number of pods that have a running pod sandbox
None None
kubelet_runtime_operations_duration_seconds ALPHA Histogram Duration in seconds of runtime operations. Broken down by operation type.
operation_type
None
kubelet_runtime_operations_errors_total ALPHA Counter Cumulative number of runtime operation errors by operation type.
operation_type
None
kubelet_runtime_operations_total ALPHA Counter Cumulative number of runtime operations by operation type.
operation_type
None
kubelet_server_expiration_renew_errors ALPHA Counter Counter of certificate renewal errors.
None None
kubelet_started_containers_errors_total ALPHA Counter Cumulative number of errors when starting containers
code
container_type
None
kubelet_started_containers_total ALPHA Counter Cumulative number of containers started
container_type
None
kubelet_started_host_process_containers_errors_total ALPHA Counter Cumulative number of errors when starting hostprocess containers. This metric will only be collected on Windows and requires WindowsHostProcessContainers feature gate to be enabled.
code
container_type
None
kubelet_started_host_process_containers_total ALPHA Counter Cumulative number of hostprocess containers started. This metric will only be collected on Windows and requires WindowsHostProcessContainers feature gate to be enabled.
container_type
None
kubelet_started_pods_errors_total ALPHA Counter Cumulative number of errors when starting pods
None None
kubelet_started_pods_total ALPHA Counter Cumulative number of pods started
None None
kubelet_volume_metric_collection_duration_seconds ALPHA Histogram Duration in seconds to calculate volume stats
metric_source
None
kubelet_volume_stats_available_bytes ALPHA Custom Number of available bytes in the volume
namespace
persistentvolumeclaim
None
kubelet_volume_stats_capacity_bytes ALPHA Custom Capacity in bytes of the volume
namespace
persistentvolumeclaim
None
kubelet_volume_stats_health_status_abnormal ALPHA Custom Abnormal volume health status. The count is either 1 or 0. 1 indicates the volume is unhealthy, 0 indicates volume is healthy
namespace
persistentvolumeclaim
None
kubelet_volume_stats_inodes ALPHA Custom Maximum number of inodes in the volume
namespace
persistentvolumeclaim
None
kubelet_volume_stats_inodes_free ALPHA Custom Number of free inodes in the volume
namespace
persistentvolumeclaim
None
kubelet_volume_stats_inodes_used ALPHA Custom Number of used inodes in the volume
namespace
persistentvolumeclaim
None
kubelet_volume_stats_used_bytes ALPHA Custom Number of used bytes in the volume
namespace
persistentvolumeclaim
None
kubeproxy_network_programming_duration_seconds ALPHA Histogram In Cluster Network Programming Latency in seconds
None None
kubeproxy_sync_proxy_rules_duration_seconds ALPHA Histogram SyncProxyRules latency in seconds
None None
kubeproxy_sync_proxy_rules_endpoint_changes_pending ALPHA Gauge Pending proxy rules Endpoint changes
None None
kubeproxy_sync_proxy_rules_endpoint_changes_total ALPHA Counter Cumulative proxy rules Endpoint changes
kubeproxy_sync_proxy_rules_iptables_partial_restore_failures_total ALPHA Counter Cumulative proxy iptables partial restore failures
None None
kubeproxy_sync_proxy_rules_iptables_restore_failures_total ALPHA Counter Cumulative proxy iptables restore failures
None None
kubeproxy_sync_proxy_rules_iptables_total ALPHA Gauge Number of proxy iptables rules programmed
table
None
kubeproxy_sync_proxy_rules_last_queued_timestamp_seconds ALPHA Gauge The last time a sync of proxy rules was queued
None None
kubeproxy_sync_proxy_rules_last_timestamp_seconds ALPHA Gauge The last time proxy rules were successfully synced
None None
kubeproxy_sync_proxy_rules_no_local_endpoints_total ALPHA Gauge Number of services with a Local traffic policy and no endpoints
traffic_policy
None
kubeproxy_sync_proxy_rules_service_changes_pending ALPHA Gauge Pending proxy rules Service changes
None None
kubeproxy_sync_proxy_rules_service_changes_total ALPHA Counter Cumulative proxy rules Service changes
None None
kubernetes_build_info ALPHA Gauge A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.
build_date
compiler
git_commit
git_tree_state
git_version
go_version
major
minor
platform
None
kubernetes_feature_enabled ALPHA Gauge This metric records the data about the stage and enablement of a k8s feature.
name
stage
None
kubernetes_healthcheck ALPHA Gauge This metric records the result of a single healthcheck.
name
type
None
kubernetes_healthchecks_total ALPHA Counter This metric records the results of all healthcheck.
name
status
type
None
leader_election_master_status ALPHA Gauge Gauge of if the reporting system is master of the relevant lease, 0 indicates backup, 1 indicates master. 'name' is the string used to identify the lease. Please make sure to group by name.
name
None
node_authorizer_graph_actions_duration_seconds ALPHA Histogram Histogram of duration of graph actions in node authorizer.
operation
None
node_collector_evictions_number ALPHA Counter Number of Node evictions that happened since current instance of NodeController started, This metric is replaced by node_collector_evictions_total.
zone
1.24.0
None
node_collector_unhealthy_nodes_in_zone ALPHA Gauge Gauge measuring number of not Ready Nodes per zones.
zone
None
node_collector_zone_health ALPHA Gauge Gauge measuring percentage of healthy nodes per zone.
zone
None
node_collector_zone_size ALPHA Gauge Gauge measuring number of registered Nodes per zones.
zone
None
node_cpu_usage_seconds_total ALPHA Custom Cumulative cpu time consumed by the node in core-seconds
None None
node_ipam_controller_cidrset_allocation_tries_per_request ALPHA Histogram Number of endpoints added on each Service sync
clusterCIDR
None
node_ipam_controller_cidrset_cidrs_allocations_total ALPHA Counter Counter measuring total number of CIDR allocations.
clusterCIDR
None
node_ipam_controller_cidrset_cidrs_releases_total ALPHA Counter Counter measuring total number of CIDR releases.
clusterCIDR
None
node_ipam_controller_cidrset_usage_cidrs ALPHA Gauge Gauge measuring percentage of allocated CIDRs.
clusterCIDR
None
node_ipam_controller_multicidrset_allocation_tries_per_request ALPHA Histogram Histogram measuring CIDR allocation tries per request.
clusterCIDR
None
node_ipam_controller_multicidrset_cidrs_allocations_total ALPHA Counter Counter measuring total number of CIDR allocations.
clusterCIDR
None
node_ipam_controller_multicidrset_cidrs_releases_total ALPHA Counter Counter measuring total number of CIDR releases.
clusterCIDR
None
node_ipam_controller_multicidrset_usage_cidrs ALPHA Gauge Gauge measuring percentage of allocated CIDRs.
clusterCIDR
None
node_memory_working_set_bytes ALPHA Custom Current working set of the node in bytes
None None
number_of_l4_ilbs ALPHA Gauge Number of L4 ILBs
feature
None
plugin_manager_total_plugins ALPHA Custom Number of plugins in Plugin Manager
socket_path
state
None
pod_cpu_usage_seconds_total ALPHA Custom Cumulative cpu time consumed by the pod in core-seconds
pod
namespace
pod_gc_collector_force_delete_pod_errors_total ALPHA Counter Number of errors encountered when forcefully deleting the pods since the Pod GC Controller started.
pod_gc_collector_force_delete_pods_total ALPHA Counter Number of pods that are being forcefully deleted since the Pod GC Controller started.
None
pod_memory_working_set_bytes ALPHA Custom Current working set of the pod in bytes
pod
namespace
None
pod_security_errors_total ALPHA Counter Number of errors preventing normal evaluation. Non-fatal errors may result in the latest restricted profile being used for evaluation.
fatal
request_operation
resource
subresource
None
pod_security_evaluations_total ALPHA Counter Number of policy evaluations that occurred, not counting ignored or exempt requests.
decision
mode
policy_level
policy_version
request_operation
resource
subresource
None
pod_security_exemptions_total ALPHA Counter Number of exempt requests, not counting ignored or out of scope requests.
request_operation
resource
subresource
None
prober_probe_duration_seconds ALPHA Histogram Duration in seconds for a probe response.
container
namespace
pod
probe_type
None
prober_probe_total ALPHA Counter Cumulative number of a liveness, readiness or startup probe for a container by result.
container
namespace
pod
pod_uid
probe_type
result
None
pv_collector_bound_pv_count ALPHA Custom Gauge measuring number of persistent volume currently bound
storage_class
None
pv_collector_bound_pvc_count ALPHA Custom Gauge measuring number of persistent volume claim currently bound
namespace
None
pv_collector_total_pv_count ALPHA Custom Gauge measuring total number of persistent volumes
plugin_name
volume_mode
None
pv_collector_unbound_pv_count ALPHA Custom Gauge measuring number of persistent volume currently unbound
storage_class
None
pv_collector_unbound_pvc_count ALPHA Custom Gauge measuring number of persistent volume claim currently unbound
namespace
None
replicaset_controller_sorting_deletion_age_ratio ALPHA Histogram The ratio of chosen deleted pod's ages to the current youngest pod's age (at the time). Should be <2.The intent of this metric is to measure the rough efficacy of the LogarithmicScaleDown feature gate's effect onthe sorting (and deletion) of pods when a replicaset scales down. This only considers Ready pods when calculating and reporting.
None None
rest_client_exec_plugin_call_total ALPHA Counter Number of calls to an exec plugin, partitioned by the type of event encountered (no_error, plugin_execution_error, plugin_not_found_error, client_internal_error) and an optional exit code. The exit code will be set to 0 if and only if the plugin call was successful.
call_status
code
None
rest_client_exec_plugin_certificate_rotation_age ALPHA Histogram Histogram of the number of seconds the last auth exec plugin client certificate lived before being rotated. If auth exec plugin client certificates are unused, histogram will contain no data.
None None
rest_client_exec_plugin_ttl_seconds ALPHA Gauge Gauge of the shortest TTL (time-to-live) of the client certificate(s) managed by the auth exec plugin. The value is in seconds until certificate expiry (negative if already expired). If auth exec plugins are unused or manage no TLS certificates, the value will be +INF.
None None
rest_client_rate_limiter_duration_seconds ALPHA Histogram Client side rate limiter latency in seconds. Broken down by verb, and host.
host
verb
None
rest_client_request_duration_seconds ALPHA Histogram Request latency in seconds. Broken down by verb, and host.
host
verb
None
rest_client_request_size_bytes ALPHA Histogram Request size in bytes. Broken down by verb and host.
host
verb
None
rest_client_requests_total ALPHA Counter Number of HTTP requests, partitioned by status code, method, and host.
code
host
method
None
rest_client_response_size_bytes ALPHA Histogram Response size in bytes. Broken down by verb and host.
host
verb
None
retroactive_storageclass_errors_total ALPHA Counter Total number of failed retroactive StorageClass assignments to persistent volume claim
None None
retroactive_storageclass_total ALPHA Counter Total number of retroactive StorageClass assignments to persistent volume claim
None None
root_ca_cert_publisher_sync_duration_seconds ALPHA Histogram Number of namespace syncs happened in root ca cert publisher.
code
None
root_ca_cert_publisher_sync_total ALPHA Counter Number of namespace syncs happened in root ca cert publisher.
code
None
running_managed_controllers ALPHA Gauge Indicates where instances of a controller are currently running
manager
name
None
scheduler_e2e_scheduling_duration_seconds ALPHA Histogram E2e scheduling latency in seconds (scheduling algorithm + binding). This metric is replaced by scheduling_attempt_duration_seconds.
profile
result
1.23.0
None
scheduler_goroutines ALPHA Gauge Number of running goroutines split by the work they do such as binding.
operation
None
scheduler_permit_wait_duration_seconds ALPHA Histogram Duration of waiting on permit.
result
None
scheduler_plugin_execution_duration_seconds ALPHA Histogram Duration for running a plugin at a specific extension point.
extension_point
plugin
status
None
scheduler_scheduler_cache_size ALPHA Gauge Number of nodes, pods, and assumed (bound) pods in the scheduler cache.
type
None
scheduler_scheduler_goroutines ALPHA Gauge Number of running goroutines split by the work they do such as binding. This metric is replaced by the \"goroutines\" metric.
work
1.26.0
None
scheduler_scheduling_algorithm_duration_seconds ALPHA Histogram Scheduling algorithm latency in seconds
None None
scheduler_unschedulable_pods ALPHA Gauge The number of unschedulable pods broken down by plugin name. A pod will increment the gauge for all plugins that caused it to not schedule and so this metric have meaning only when broken down by plugin.
plugin
profile
None
scheduler_volume_binder_cache_requests_total ALPHA Counter Total number for request volume binding cache
operation
None
scheduler_volume_scheduling_stage_error_total ALPHA Counter Volume scheduling stage error count
operation
None
scrape_error ALPHA Custom 1 if there was an error while getting container metrics, 0 otherwise
None None
service_controller_nodesync_latency_seconds ALPHA Histogram A metric measuring the latency for nodesync which updates loadbalancer hosts on cluster node updates.
None None
service_controller_update_loadbalancer_host_latency_seconds ALPHA Histogram A metric measuring the latency for updating each load balancer hosts.
None None
serviceaccount_legacy_tokens_total ALPHA Counter Cumulative legacy service account tokens used
None None
serviceaccount_stale_tokens_total ALPHA Counter Cumulative stale projected service account tokens used
None None
serviceaccount_valid_tokens_total ALPHA Counter Cumulative valid projected service account tokens used
None None
storage_count_attachable_volumes_in_use ALPHA Custom Measure number of volumes in use
node
volume_plugin
None
storage_operation_duration_seconds ALPHA Histogram Storage operation duration
migrated
operation_name
status
volume_plugin
None
ttl_after_finished_controller_job_deletion_duration_seconds ALPHA Histogram The time it took to delete the job since it became eligible for deletion
None None
volume_manager_selinux_container_errors_total ALPHA Gauge Number of errors when kubelet cannot compute SELinux context for a container. Kubelet can't start such a Pod then and it will retry, therefore value of this metric may not represent the actual nr. of containers.
None None
volume_manager_selinux_container_warnings_total ALPHA Gauge Number of errors when kubelet cannot compute SELinux context for a container that are ignored. They will become real errors when SELinuxMountReadWriteOncePod feature is expanded to all volume access modes.
None None
volume_manager_selinux_pod_context_mismatch_errors_total ALPHA Gauge Number of errors when a Pod defines different SELinux contexts for its containers that use the same volume. Kubelet can't start such a Pod then and it will retry, therefore value of this metric may not represent the actual nr. of Pods.
None None
volume_manager_selinux_pod_context_mismatch_warnings_total ALPHA Gauge Number of errors when a Pod defines different SELinux contexts for its containers that use the same volume. They are not errors yet, but they will become real errors when SELinuxMountReadWriteOncePod feature is expanded to all volume access modes.
None None
volume_manager_selinux_volume_context_mismatch_errors_total ALPHA Gauge Number of errors when a Pod uses a volume that is already mounted with a different SELinux context than the Pod needs. Kubelet can't start such a Pod then and it will retry, therefore value of this metric may not represent the actual nr. of Pods.
None None
volume_manager_selinux_volume_context_mismatch_warnings_total ALPHA Gauge Number of errors when a Pod uses a volume that is already mounted with a different SELinux context than the Pod needs. They are not errors yet, but they will become real errors when SELinuxMountReadWriteOncePod feature is expanded to all volume access modes.
None None
volume_manager_selinux_volumes_admitted_total ALPHA Gauge Number of volumes whose SELinux context was fine and will be mounted with mount -o context option.
None None
volume_manager_total_volumes ALPHA Custom Number of volumes in Volume Manager
plugin_name
state
None
volume_operation_total_errors ALPHA Counter Total volume operation errors
operation_name
plugin_name
None
volume_operation_total_seconds ALPHA Histogram Storage operation end to end duration in seconds
operation_name
plugin_name
None
watch_cache_capacity ALPHA Gauge Total capacity of watch cache broken by resource type.
resource
None
watch_cache_capacity_decrease_total ALPHA Counter Total number of watch cache capacity decrease events broken by resource type.
resource
None
watch_cache_capacity_increase_total ALPHA Counter Total number of watch cache capacity increase events broken by resource type.
resource
None
workqueue_adds_total ALPHA Counter Total number of adds handled by workqueue
name
None
workqueue_depth ALPHA Gauge Current depth of workqueue
name
None
workqueue_longest_running_processor_seconds ALPHA Gauge How many seconds has the longest running processor for workqueue been running.
name
None
workqueue_queue_duration_seconds ALPHA Histogram How long in seconds an item stays in workqueue before being requested.
name
None
workqueue_retries_total ALPHA Counter Total number of retries handled by workqueue
name
None
workqueue_unfinished_work_seconds ALPHA Gauge How many seconds of work has done that is in progress and hasn't been observed by work_duration. Large values indicate stuck threads. One can deduce the number of stuck threads by observing the rate at which this increases.
name
None
workqueue_work_duration_seconds ALPHA Histogram How long in seconds processing an item from workqueue takes.
name
None
", "positive_passages": [{"docid": "doc-en-website-b1ea532711c3074cf1ae265c435c0b6a95ebcd3f2607b5c7873412e1dda826c4", "text": "This is a Bug Report ## \u5982\u4f55\u8c03\u5ea6 Daemon Pods ## Daemon Pods \u662f\u5982\u4f55\u88ab\u8c03\u5ea6\u7684 ### \u901a\u8fc7\u9ed8\u8ba4\u8c03\u5ea6\u5668\u8c03\u5ea6", "positive_passages": [{"docid": "doc-en-website-d25aca5c0dd975395d85285d7b9db9400d31923767ef7054fe5fbc0fca345fce", "text": "\u201c DaemonSet spec.template.\u201c \u201c\u201d\u201c\u201d\nMind propose a fix?\n/triage accepted\n/language zh (I presume)\nThe label(s) cannot be applied, because the repository doesn't have them >\" [layouts_case_studies_list_tell] other = \"\u5206\u4eab\u60a8\u7684\u6545\u4e8b\" other = \"\u5206\u4eab\u4f60\u7684\u6545\u4e8b\" [layouts_docs_glossary_aka] other = \"\u4ea6\u79f0\u4f5c\"", "positive_passages": [{"docid": "doc-en-website-ba038e9157e4feaa45266711cf3eedabe8e5585b425fd2c2da31bff0a034219d", "text": "What would you like to be This issue is a follow-up task from displays some English text: ! To replace this text with localized strings, you can update with from . Specifically, these:\n/language zh-cn\nThe label(s) cannot be applied, because the repository doesn't have them. [src]: https://git.k8s.io/community/committee-product-security/README.md [src]: https://git.k8s.io/community/committee-security-response/README.md [release-team]: https://git.k8s.io/sig-release/release-team/README.md [security-release-process]: https://git.k8s.io/security/security-release-process.md", "positive_passages": [{"docid": "doc-en-website-8802ae96e2cad79e52a8c75260b3d7d20252cb0887c3668ec431075b9a6e3415", "text": "This is a Bug Report ", "positive_passages": [{"docid": "doc-en-website-b804243c060bd9734aa406a0e8d5a6e234ffd0b109546eb2a41c5ee081867cf8", "text": "This is a Bug Report ## \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u8a2d\u5b9a [Container runtimes](/docs/setup/production-environment/container-runtimes)\u30da\u30fc\u30b8\u3067\u306f\u3001kubeadm\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u306f`cgroupfs`\u30c9\u30e9\u30a4\u30d0\u30fc\u3067\u306f\u306a\u304f\u3001`systemd`\u30c9\u30e9\u30a4\u30d0\u30fc\u304c\u63a8\u5968\u3055\u308c\u308b\u3068\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002 [\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0](/ja/docs/setup/production-environment/container-runtimes)\u30da\u30fc\u30b8\u3067\u306f\u3001kubeadm\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u306f`cgroupfs`\u30c9\u30e9\u30a4\u30d0\u30fc\u3067\u306f\u306a\u304f\u3001`systemd`\u30c9\u30e9\u30a4\u30d0\u30fc\u304c\u63a8\u5968\u3055\u308c\u308b\u3068\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e`systemd`\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u591a\u304f\u306e\u7570\u306a\u308b\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u3082\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002 ## kubelet cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u8a2d\u5b9a ## kubelet cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u8a2d\u5b9a {#configuring-the-kubelet-cgroup-driver} kubeadm\u3067\u306f\u3001`kubeadm init`\u306e\u969b\u306b`KubeletConfiguration`\u69cb\u9020\u4f53\u3092\u6e21\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002", "positive_passages": [{"docid": "doc-en-website-ce76db007c0a91a66f52e17aec135a19b1fc010ece3748a48d11e33013c9a8b5", "text": "This is a Feature Request **\u4f5c\u8005\uff1a** Abdullah Gharaibeh\uff08\u8c37\u6b4c\uff09\uff0cAldo Culquicondor\uff08\u8c37\u6b4c\uff09 \u65e0\u8bba\u662f\u5728\u672c\u5730\u8fd8\u662f\u5728\u4e91\u7aef\uff0c\u96c6\u7fa4\u90fd\u9762\u4e34\u7740\u8d44\u6e90\u4f7f\u7528\u3001\u914d\u989d\u548c\u6210\u672c\u7ba1\u7406\u65b9\u9762\u7684\u5b9e\u9645\u9650\u5236\u3002 \u65e0\u8bba\u81ea\u52a8\u6269\u7f29\u5bb9\u80fd\u529b\u5982\u4f55\uff0c\u96c6\u7fa4\u7684\u5bb9\u91cf\u90fd\u662f\u6709\u9650\u7684\u3002 \u56e0\u6b64\uff0c\u7528\u6237\u9700\u8981\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u6cd5\u6765\u516c\u5e73\u6709\u6548\u5730\u5171\u4eab\u8d44\u6e90\u3002 \u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86 [Kueue](https://github.com/kubernetes-sigs/kueue/tree/main/docs#readme)\uff0c \u8fd9\u662f\u4e00\u4e2a\u5f00\u6e90\u4f5c\u4e1a\u961f\u5217\u63a7\u5236\u5668\uff0c\u65e8\u5728\u5c06\u6279\u5904\u7406\u4f5c\u4e1a\u4f5c\u4e3a\u4e00\u4e2a\u5355\u5143\u8fdb\u884c\u7ba1\u7406\u3002 Kueue \u5c06 Pod \u7ea7\u7f16\u6392\u7559\u7ed9 Kubernetes \u73b0\u6709\u7684\u7a33\u5b9a\u7ec4\u4ef6\u3002 Kueue \u539f\u751f\u652f\u6301 Kubernetes [Job](/zh-cn/docs/concepts/workloads/controllers/job/) API\uff0c \u5e76\u63d0\u4f9b\u7528\u4e8e\u96c6\u6210\u5176\u4ed6\u5b9a\u5236 API \u4ee5\u8fdb\u884c\u6279\u5904\u7406\u4f5c\u4e1a\u7684\u94a9\u5b50\u3002 ## \u4e3a\u4ec0\u4e48\u662f Kueue? \u4f5c\u4e1a\u961f\u5217\u662f\u5728\u672c\u5730\u548c\u4e91\u73af\u5883\u4e2d\u5927\u89c4\u6a21\u8fd0\u884c\u6279\u5904\u7406\u5de5\u4f5c\u8d1f\u8f7d\u7684\u5173\u952e\u529f\u80fd\u3002 \u4f5c\u4e1a\u961f\u5217\u7684\u4e3b\u8981\u76ee\u6807\u662f\u7ba1\u7406\u5bf9\u591a\u4e2a\u79df\u6237\u5171\u4eab\u7684\u6709\u9650\u8d44\u6e90\u6c60\u7684\u8bbf\u95ee\u3002 \u4f5c\u4e1a\u6392\u961f\u51b3\u5b9a\u4e86\u54ea\u4e9b\u4f5c\u4e1a\u5e94\u8be5\u7b49\u5f85\uff0c\u54ea\u4e9b\u53ef\u4ee5\u7acb\u5373\u542f\u52a8\uff0c\u4ee5\u53ca\u5b83\u4eec\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u8d44\u6e90\u3002 \u4e00\u4e9b\u6700\u9700\u8981\u7684\u4f5c\u4e1a\u961f\u5217\u8981\u6c42\u5305\u62ec\uff1a - \u7528\u914d\u989d\u548c\u9884\u7b97\u6765\u63a7\u5236\u8c01\u53ef\u4ee5\u4f7f\u7528\u4ec0\u4e48\u4ee5\u53ca\u8fbe\u5230\u4ec0\u4e48\u9650\u5236\u3002 \u8fd9\u4e0d\u4ec5\u5728\u5177\u6709\u9759\u6001\u8d44\u6e90\uff08\u5982\u672c\u5730\uff09\u7684\u96c6\u7fa4\u4e2d\u9700\u8981\uff0c\u800c\u4e14\u5728\u4e91\u73af\u5883\u4e2d\u4e5f\u9700\u8981\u63a7\u5236\u7a00\u7f3a\u8d44\u6e90\u7684\u652f\u51fa\u6216\u7528\u91cf\u3002 - \u79df\u6237\u4e4b\u95f4\u516c\u5e73\u5171\u4eab\u8d44\u6e90\u3002 \u4e3a\u4e86\u6700\u5927\u9650\u5ea6\u5730\u5229\u7528\u53ef\u7528\u8d44\u6e90\uff0c\u5e94\u5141\u8bb8\u6d3b\u52a8\u79df\u6237\u516c\u5e73\u5171\u4eab\u90a3\u4e9b\u5206\u914d\u7ed9\u975e\u6d3b\u52a8\u79df\u6237\u7684\u672a\u4f7f\u7528\u914d\u989d\u3002 - \u6839\u636e\u53ef\u7528\u6027\uff0c\u5728\u4e0d\u540c\u8d44\u6e90\u7c7b\u578b\u4e4b\u95f4\u7075\u6d3b\u653e\u7f6e\u4f5c\u4e1a\u3002 \u8fd9\u5728\u5177\u6709\u5f02\u6784\u8d44\u6e90\u7684\u4e91\u73af\u5883\u4e2d\u5f88\u91cd\u8981\uff0c\u4f8b\u5982\u4e0d\u540c\u7684\u67b6\u6784\uff08GPU \u6216 CPU \u6a21\u578b\uff09\u548c\u4e0d\u540c\u7684\u4f9b\u5e94\u6a21\u5f0f\uff08\u5373\u7528\u4e0e\u6309\u9700\uff09\u3002 - \u652f\u6301\u53ef\u6309\u9700\u914d\u7f6e\u8d44\u6e90\u7684\u81ea\u52a8\u6269\u7f29\u5bb9\u73af\u5883\u3002 \u666e\u901a\u7684 Kubernetes \u4e0d\u80fd\u6ee1\u8db3\u4e0a\u8ff0\u8981\u6c42\u3002 \u5728\u6b63\u5e38\u60c5\u51b5\u4e0b\uff0c\u4e00\u65e6\u521b\u5efa\u4e86 Job\uff0cJob \u63a7\u5236\u5668\u4f1a\u7acb\u5373\u521b\u5efa Pod\uff0c\u5e76\u4e14 kube-scheduler \u4f1a\u4e0d\u65ad\u5c1d\u8bd5\u5c06 Pod \u5206\u914d\u7ed9\u8282\u70b9\u3002 \u5927\u89c4\u6a21\u4f7f\u7528\u65f6\uff0c\u8fd9\u79cd\u60c5\u51b5\u53ef\u80fd\u4f1a\u4f7f\u63a7\u5236\u5e73\u9762\u6b7b\u673a\u3002 \u76ee\u524d\u4e5f\u6ca1\u6709\u597d\u7684\u529e\u6cd5\u5728 Job \u5c42\u9762\u63a7\u5236\u54ea\u4e9b Job \u5e94\u8be5\u5148\u83b7\u5f97\u54ea\u4e9b\u8d44\u6e90\uff0c\u4e5f\u6ca1\u6709\u529e\u6cd5\u6807\u660e\u987a\u5e8f\u6216\u516c\u5e73\u5171\u4eab\u3002 \u5f53\u524d\u7684 ResourceQuota \u6a21\u578b\u4e0d\u592a\u9002\u5408\u8fd9\u4e9b\u9700\u6c42\uff0c\u56e0\u4e3a\u914d\u989d\u662f\u5728\u8d44\u6e90\u521b\u5efa\u65f6\u5f3a\u5236\u6267\u884c\u7684\uff0c\u5e76\u4e14\u6ca1\u6709\u8bf7\u6c42\u6392\u961f\u3002 ResourceQuotas \u7684\u76ee\u7684\u662f\u63d0\u4f9b\u4e00\u79cd\u5185\u7f6e\u7684\u53ef\u9760\u6027\u673a\u5236\uff0c\u5176\u4e2d\u5305\u542b\u7ba1\u7406\u5458\u6240\u9700\u7684\u7b56\u7565\uff0c\u4ee5\u9632\u6b62\u96c6\u7fa4\u53d1\u751f\u6545\u969c\u8f6c\u79fb\u3002 \u5728 Kubernetes \u751f\u6001\u7cfb\u7edf\u4e2d\uff0cJob \u8c03\u5ea6\u6709\u591a\u79cd\u89e3\u51b3\u65b9\u6848\u3002\u4f46\u662f\uff0c\u6211\u4eec\u53d1\u73b0\u8fd9\u4e9b\u66ff\u4ee3\u65b9\u6848\u5b58\u5728\u4ee5\u4e0b\u4e00\u4e2a\u6216\u591a\u4e2a\u95ee\u9898\uff1a - \u5b83\u4eec\u53d6\u4ee3\u4e86 Kubernetes \u7684\u73b0\u6709\u7a33\u5b9a\u7ec4\u4ef6\uff0c\u4f8b\u5982 kube-scheduler \u6216 Job \u63a7\u5236\u5668\u3002 \u8fd9\u4e0d\u4ec5\u4ece\u64cd\u4f5c\u7684\u89d2\u5ea6\u770b\u662f\u6709\u95ee\u9898\u7684\uff0c\u800c\u4e14\u91cd\u590d\u7684 Job API \u4e5f\u4f1a\u5bfc\u81f4\u751f\u6001\u7cfb\u7edf\u7684\u788e\u7247\u5316\u5e76\u964d\u4f4e\u53ef\u79fb\u690d\u6027\u3002 - \u5b83\u4eec\u6ca1\u6709\u96c6\u6210\u81ea\u52a8\u6269\u7f29\u5bb9\uff0c\u6216\u8005 - \u5b83\u4eec\u7f3a\u4e4f\u5bf9\u8d44\u6e90\u7075\u6d3b\u6027\u7684\u652f\u6301\u3002 ## Kueue \u7684\u5de5\u4f5c\u539f\u7406 {#overview} \u501f\u52a9 Kueue\uff0c\u6211\u4eec\u51b3\u5b9a\u91c7\u7528\u4e0d\u540c\u7684\u65b9\u6cd5\u5728 Kubernetes \u4e0a\u8fdb\u884c Job \u6392\u961f\uff0c\u8be5\u65b9\u6cd5\u57fa\u4e8e\u4ee5\u4e0b\u65b9\u9762\uff1a - \u4e0d\u590d\u5236\u5df2\u5efa\u7acb\u7684 Kubernetes \u7ec4\u4ef6\u63d0\u4f9b\u7684\u7528\u4e8e Pod \u8c03\u5ea6\u3001\u81ea\u52a8\u6269\u7f29\u5bb9\u548c Job \u751f\u547d\u5468\u671f\u7ba1\u7406\u7684\u73b0\u6709\u529f\u80fd\u3002 - \u5c06\u7f3a\u5c11\u7684\u5173\u952e\u7279\u6027\u6dfb\u52a0\u5230\u73b0\u6709\u7ec4\u4ef6\u4e2d\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u6295\u8d44\u4e86 Job API \u4ee5\u6db5\u76d6\u66f4\u591a\u7528\u4f8b\uff0c\u50cf [IndexedJob](/blog/2021/04/19/introducing-indexed-jobs)\uff0c \u5e76[\u4fee\u590d\u4e86\u4e0e Pod \u8ddf\u8e2a\u76f8\u5173\u7684\u957f\u671f\u5b58\u5728\u7684\u95ee\u9898](/zh-cn/docs/concepts/workloads/controllers/job/#job-tracking-with-finalizers)\u3002 \u867d\u7136\u79bb\u7279\u6027\u843d\u5730\u8fd8\u6709\u5f88\u957f\u4e00\u6bb5\u8def\uff0c\u4f46\u6211\u4eec\u76f8\u4fe1\u8fd9\u662f\u53ef\u6301\u7eed\u7684\u957f\u671f\u89e3\u51b3\u65b9\u6848\u3002 - \u786e\u4fdd\u4e0e\u5177\u6709\u5f39\u6027\u548c\u5f02\u6784\u6027\u7684\u8ba1\u7b97\u8d44\u6e90\u4e91\u73af\u5883\u517c\u5bb9\u3002 \u4e3a\u4e86\u4f7f\u8fd9\u79cd\u65b9\u6cd5\u53ef\u884c\uff0cKueue \u9700\u8981\u65cb\u94ae\u6765\u5f71\u54cd\u90a3\u4e9b\u5df2\u5efa\u7acb\u7ec4\u4ef6\u7684\u884c\u4e3a\uff0c\u4ee5\u4fbf\u5b83\u53ef\u4ee5\u6709\u6548\u5730\u7ba1\u7406\u4f55\u65f6\u4f55\u5730\u542f\u52a8\u4e00\u4e2a Job\u3002 \u6211\u4eec\u4ee5\u4e24\u4e2a\u7279\u6027\u7684\u65b9\u5f0f\u5c06\u8fd9\u4e9b\u65cb\u94ae\u6dfb\u52a0\u5230 Job API\uff1a - [Suspend \u5b57\u6bb5](/zh-cn/docs/concepts/workloads/controllers/job/#suspending-a-job)\uff0c \u5b83\u5141\u8bb8\u5728 Job \u542f\u52a8\u6216\u505c\u6b62\u65f6\uff0cKueue \u5411 Job \u63a7\u5236\u5668\u53d1\u51fa\u4fe1\u53f7\u3002 - [\u53ef\u53d8\u8c03\u5ea6\u6307\u4ee4](/zh-cn/docs/concepts/workloads/controllers/job/#mutable-scheduling-directives)\uff0c \u5141\u8bb8\u5728\u542f\u52a8 Job \u4e4b\u524d\u66f4\u65b0 Job \u7684 `.spec.template.spec.nodeSelector`\u3002 \u8fd9\u6837\uff0cKueue \u53ef\u4ee5\u63a7\u5236 Pod \u653e\u7f6e\uff0c\u540c\u65f6\u4ecd\u5c06 Pod \u5230\u8282\u70b9\u7684\u5b9e\u9645\u8c03\u5ea6\u59d4\u6258\u7ed9 kube-scheduler\u3002 \u8bf7\u6ce8\u610f\uff0c\u4efb\u4f55\u81ea\u5b9a\u4e49\u7684 Job API \u90fd\u53ef\u4ee5\u7531 Kueue \u7ba1\u7406\uff0c\u53ea\u8981\u8be5 API \u63d0\u4f9b\u4e0a\u8ff0\u4e24\u79cd\u80fd\u529b\u3002 ### \u8d44\u6e90\u6a21\u578b Kueue \u5b9a\u4e49\u4e86\u65b0\u7684 API \u6765\u89e3\u51b3\u672c\u6587\u5f00\u5934\u63d0\u5230\u7684\u9700\u6c42\u3002\u4e09\u4e2a\u4e3b\u8981\u7684 API \u662f\uff1a - ResourceFlavor\uff1a\u4e00\u4e2a\u96c6\u7fa4\u8303\u56f4\u7684 API\uff0c\u7528\u4e8e\u5b9a\u4e49\u53ef\u4f9b\u6d88\u8d39\u7684\u8d44\u6e90\u6a21\u677f\uff0c\u5982 GPU \u6a21\u578b\u3002 ResourceFlavor \u7684\u6838\u5fc3\u662f\u4e00\u7ec4\u6807\u7b7e\uff0c\u8fd9\u4e9b\u6807\u7b7e\u53cd\u6620\u4e86\u63d0\u4f9b\u8fd9\u4e9b\u8d44\u6e90\u7684\u8282\u70b9\u4e0a\u7684\u6807\u7b7e\u3002 - ClusterQueue: \u4e00\u79cd\u96c6\u7fa4\u8303\u56f4\u7684 API\uff0c\u901a\u8fc7\u4e3a\u4e00\u4e2a\u6216\u591a\u4e2a ResourceFlavor \u8bbe\u7f6e\u914d\u989d\u6765\u5b9a\u4e49\u8d44\u6e90\u6c60\u3002 - LocalQueue: \u7528\u4e8e\u5206\u7ec4\u548c\u7ba1\u7406\u5355\u79df\u6237 Jobs \u7684\u547d\u540d\u7a7a\u95f4 API\u3002 \u5728\u6700\u7b80\u5355\u7684\u5f62\u5f0f\u4e2d\uff0cLocalQueue \u662f\u6307\u5411\u96c6\u7fa4\u961f\u5217\u7684\u6307\u9488\uff0c\u79df\u6237\uff08\u5efa\u6a21\u4e3a\u547d\u540d\u7a7a\u95f4\uff09\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u542f\u52a8\u4ed6\u4eec\u7684 Jobs\u3002 \u6709\u5173\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u67e5\u770b [API \u6982\u5ff5\u6587\u6863](https://sigs.k8s.io/kueue/docs/concepts)\u3002 \u867d\u7136\u8fd9\u4e09\u4e2a API \u770b\u8d77\u6765\u65e0\u6cd5\u6297\u62d2\uff0c\u4f46 Kueue \u7684\u5927\u90e8\u5206\u64cd\u4f5c\u90fd\u4ee5 ClusterQueue \u4e3a\u4e2d\u5fc3\uff1b ResourceFlavor \u548c LocalQueue API \u4e3b\u8981\u662f\u7ec4\u7ec7\u5305\u88c5\u5668\u3002 ### \u7528\u4f8b\u6837\u4f8b \u60f3\u8c61\u4e00\u4e0b\u5728\u4e91\u4e0a\u7684 Kubernetes \u96c6\u7fa4\u4e0a\u8fd0\u884c\u6279\u5904\u7406\u5de5\u4f5c\u8d1f\u8f7d\u7684\u4ee5\u4e0b\u8bbe\u7f6e\uff1a - \u4f60\u5728\u96c6\u7fa4\u4e2d\u5b89\u88c5\u4e86 [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) \u4ee5\u81ea\u52a8\u8c03\u6574\u96c6\u7fa4\u7684\u5927\u5c0f\u3002 - \u6709\u4e24\u79cd\u7c7b\u578b\u7684\u81ea\u52a8\u7f29\u653e\u8282\u70b9\u7ec4\uff0c\u5b83\u4eec\u7684\u4f9b\u5e94\u7b56\u7565\u4e0d\u540c\uff1a\u5373\u7528\u548c\u6309\u9700\u3002 \u5206\u522b\u5bf9\u5e94\u6807\u7b7e\uff1a`instance-type=spot` \u6216\u8005 `instance-type=ondemand`\u3002 \u6b64\u5916\uff0c\u5e76\u975e\u6240\u6709\u4f5c\u4e1a\u90fd\u53ef\u4ee5\u5bb9\u5fcd\u5728\u5373\u7528\u8282\u70b9\u4e0a\u8fd0\u884c\uff0c\u8282\u70b9\u53ef\u4ee5\u7528 `spot=true:NoSchedule` \u6c61\u67d3\u3002 - \u4e3a\u4e86\u5728\u6210\u672c\u548c\u8d44\u6e90\u53ef\u7528\u6027\u4e4b\u95f4\u53d6\u5f97\u5e73\u8861\uff0c\u5047\u8bbe\u4f60\u5e0c\u671b Jobs \u4f7f\u7528\u6700\u591a 1000 \u4e2a\u6838\u5fc3\u6309\u9700\u8282\u70b9\uff0c\u6700\u591a 2000 \u4e2a\u6838\u5fc3\u5373\u7528\u8282\u70b9\u3002 \u4f5c\u4e3a\u6279\u5904\u7406\u7cfb\u7edf\u7684\u7ba1\u7406\u5458\uff0c\u4f60\u5b9a\u4e49\u4e86\u4e24\u4e2a ResourceFlavor\uff0c\u5b83\u4eec\u4ee3\u8868\u4e24\u79cd\u7c7b\u578b\u7684\u8282\u70b9\uff1a ```yaml --- apiVersion: kueue.x-k8s.io/v1alpha2 kind: ResourceFlavor metadata: name: ondemand labels: instance-type: ondemand --- apiVersion: kueue.x-k8s.io/v1alpha2 kind: ResourceFlavor metadata: name: spot labels: instance-type: spot taints: - effect: NoSchedule key: spot value: \"true\" ``` \u7136\u540e\u901a\u8fc7\u521b\u5efa ClusterQueue \u6765\u5b9a\u4e49\u914d\u989d\uff0c\u5982\u4e0b\u6240\u793a\uff1a ```yaml apiVersion: kueue.x-k8s.io/v1alpha2 kind: ClusterQueue metadata: name: research-pool spec: namespaceSelector: {} resources: - name: \"cpu\" flavors: - name: ondemand quota: min: 1000 - name: spot quota: min: 2000 ``` \u6ce8\u610f ClusterQueue \u8d44\u6e90\u4e2d\u7684\u6a21\u677f\u987a\u5e8f\u5f88\u91cd\u8981\uff1aKueue \u5c06\u5c1d\u8bd5\u6839\u636e\u8be5\u987a\u5e8f\u4e3a Job \u5206\u914d\u53ef\u7528\u914d\u989d\uff0c\u9664\u975e\u8fd9\u4e9b Job \u4e0e\u7279\u5b9a\u6a21\u677f\u6709\u660e\u786e\u7684\u5173\u8054\u3002 \u5bf9\u4e8e\u6bcf\u4e2a\u547d\u540d\u7a7a\u95f4\uff0c\u5b9a\u4e49\u4e00\u4e2a\u6307\u5411\u4e0a\u8ff0 ClusterQueue \u7684 LocalQueue\uff1a ```yaml apiVersion: kueue.x-k8s.io/v1alpha2 kind: LocalQueue metadata: name: training namespace: team-ml spec: clusterQueue: research-pool ``` \u7ba1\u7406\u5458\u521b\u5efa\u4e00\u6b21\u4e0a\u8ff0\u914d\u7f6e\u3002\u6279\u5904\u7406\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5728\u4ed6\u4eec\u7684\u547d\u540d\u7a7a\u95f4\u4e2d\u5217\u51fa LocalQueues \u6765\u627e\u5230\u4ed6\u4eec\u88ab\u5141\u8bb8\u63d0\u4ea4\u7684\u961f\u5217\u3002 \u8be5\u547d\u4ee4\u7c7b\u4f3c\u4e8e\uff1a`kubectl get -n my-namespace localqueues` \u8981\u63d0\u4ea4\u4f5c\u4e1a\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a Job \u5e76\u8bbe\u7f6e `kueue.x-k8s.io/queue-name` \u6ce8\u89e3\uff0c\u5982\u4e0b\u6240\u793a\uff1a ```yaml apiVersion: batch/v1 kind: Job metadata: generateName: sample-job- annotations: kueue.x-k8s.io/queue-name: training spec: parallelism: 3 completions: 3 template: spec: tolerations: - key: spot operator: \"Exists\" effect: \"NoSchedule\" containers: - name: example-batch-workload image: registry.example/batch/calculate-pi:3.14 args: [\"30s\"] resources: requests: cpu: 1 restartPolicy: Never ``` Kueue \u5728\u521b\u5efa Job \u540e\u7acb\u5373\u8fdb\u884c\u5e72\u9884\u4ee5\u6682\u505c Job\u3002 \u4e00\u65e6 Job \u4f4d\u4e8e ClusterQueue \u7684\u5934\u90e8\uff0cKueue \u5c31\u4f1a\u901a\u8fc7\u68c0\u67e5 Job \u8bf7\u6c42\u7684\u8d44\u6e90\u662f\u5426\u7b26\u5408\u53ef\u7528\u914d\u989d\u6765\u8bc4\u4f30\u5b83\u662f\u5426\u53ef\u4ee5\u542f\u52a8\u3002 \u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0cJob \u5bb9\u5fcd\u4e86 Spot \u8d44\u6e90\u3002\u5982\u679c\u4e4b\u524d\u627f\u8ba4\u7684 Job \u6d88\u8017\u4e86\u6240\u6709\u73b0\u6709\u7684\u6309\u9700\u914d\u989d\uff0c \u4f46\u4e0d\u662f\u6240\u6709 Spot \u914d\u989d\uff0c\u5219 Kueue \u627f\u8ba4\u4f7f\u7528 Spot \u914d\u989d\u7684 Job\u3002Kueue \u901a\u8fc7\u5411 Job \u5bf9\u8c61\u53d1\u51fa\u5355\u4e2a\u66f4\u65b0\u6765\u505a\u5230\u8fd9\u4e00\u70b9\uff1a - \u66f4\u6539 `.spec.suspend` \u6807\u5fd7\u4f4d\u4e3a false - \u5c06 `instance-type: spot` \u6dfb\u52a0\u5230 Job \u7684 `.spec.template.spec.nodeSelector` \u4e2d\uff0c \u4ee5\u4fbf\u5728 Job \u63a7\u5236\u5668\u521b\u5efa Pod \u65f6\uff0c\u8fd9\u4e9b Pod \u53ea\u80fd\u8c03\u5ea6\u5230 Spot \u8282\u70b9\u4e0a\u3002 \u6700\u540e\uff0c\u5982\u679c\u6709\u53ef\u7528\u7684\u7a7a\u8282\u70b9\u4e0e\u8282\u70b9\u9009\u62e9\u5668\u6761\u4ef6\u5339\u914d\uff0c\u90a3\u4e48 kube-scheduler \u5c06\u76f4\u63a5\u8c03\u5ea6 Pod\u3002 \u5982\u679c\u4e0d\u662f\uff0c\u90a3\u4e48 kube-scheduler \u5c06 pod \u521d\u59cb\u5316\u6807\u8bb0\u4e3a\u4e0d\u53ef\u8c03\u5ea6\uff0c\u8fd9\u5c06\u89e6\u53d1 cluster-autoscaler \u914d\u7f6e\u65b0\u8282\u70b9\u3002 ## \u672a\u6765\u5de5\u4f5c\u4ee5\u53ca\u53c2\u4e0e\u65b9\u5f0f \u4e0a\u9762\u7684\u793a\u4f8b\u63d0\u4f9b\u4e86 Kueue \u7684\u4e00\u4e9b\u529f\u80fd\u7b80\u4ecb\uff0c\u5305\u62ec\u652f\u6301\u914d\u989d\u3001\u8d44\u6e90\u7075\u6d3b\u6027\u4ee5\u53ca\u4e0e\u96c6\u7fa4\u81ea\u52a8\u7f29\u653e\u5668\u7684\u96c6\u6210\u3002 Kueue \u8fd8\u652f\u6301\u516c\u5e73\u5171\u4eab\u3001Job \u4f18\u5148\u7ea7\u548c\u4e0d\u540c\u7684\u6392\u961f\u7b56\u7565\u3002 \u67e5\u770b [Kueue \u6587\u6863](https://github.com/kubernetes-sigs/kueue/tree/main/docs)\u4ee5\u4e86\u89e3\u8fd9\u4e9b\u7279\u6027\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528 Kueue \u7684\u66f4\u591a\u4fe1\u606f\u3002 \u6211\u4eec\u8ba1\u5212\u5c06\u8bb8\u591a\u7279\u6027\u6dfb\u52a0\u5230 Kueue \u4e2d\uff0c\u4f8b\u5982\u5206\u5c42\u914d\u989d\u3001\u9884\u7b97\u548c\u5bf9\u52a8\u6001\u5927\u5c0f Job \u7684\u652f\u6301\u3002 \u5728\u4e0d\u4e45\u7684\u5c06\u6765\uff0c\u6211\u4eec\u5c06\u4e13\u6ce8\u4e8e\u589e\u52a0\u5bf9 Job \u62a2\u5360\u7684\u652f\u6301\u3002 \u6700\u65b0\u7684 [Kueue \u7248\u672c](https://github.com/kubernetes-sigs/kueue/releases)\u5728 Github \u4e0a\u53ef\u7528\uff1b \u5982\u679c\u4f60\u5728 Kubernetes \u4e0a\u8fd0\u884c\u6279\u5904\u7406\u5de5\u4f5c\u8d1f\u8f7d\uff08\u9700\u8981 v1.22 \u6216\u66f4\u9ad8\u7248\u672c\uff09\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4e00\u4e0b\u3002 \u8fd9\u4e2a\u9879\u76ee\u8fd8\u5904\u4e8e\u65e9\u671f\u9636\u6bb5\uff0c\u6211\u4eec\u6b63\u5728\u641c\u96c6\u5927\u5927\u5c0f\u5c0f\u5404\u4e2a\u65b9\u9762\u7684\u53cd\u9988\uff0c\u8bf7\u4e0d\u8981\u72b9\u8c6b\uff0c\u5feb\u6765\u8054\u7cfb\u6211\u4eec\u5427\uff01 \u65e0\u8bba\u662f\u4fee\u590d\u6216\u62a5\u544a\u9519\u8bef\uff0c\u8fd8\u662f\u5e2e\u52a9\u6dfb\u52a0\u65b0\u7279\u6027\u6216\u7f16\u5199\u6587\u6863\uff0c\u6211\u4eec\u6b22\u8fce\u4e00\u5207\u5f62\u5f0f\u7684\u8d21\u732e\u8005\u3002 \u4f60\u53ef\u4ee5\u901a\u8fc7\u6211\u4eec\u7684[\u4ed3\u5e93](http://sigs.k8s.io/kueue)\u3001[\u90ae\u4ef6\u5217\u8868](https://groups.google.com/a/kubernetes.io/g/wg-batch)\u6216\u8005 [Slack](https://kubernetes.slack.com/messages/wg-batch) \u4e0e\u6211\u4eec\u8054\u7cfb\u3002 \u6700\u540e\u662f\u5f88\u91cd\u8981\u7684\u4e00\u70b9\uff0c\u611f\u8c22\u6240\u6709\u4fc3\u4f7f\u8fd9\u4e2a\u9879\u76ee\u6210\u4e3a\u53ef\u80fd\u7684[\u8d21\u732e\u8005\u4eec](https://github.com/kubernetes-sigs/kueue/graphs/contributors)\uff01 ", "positive_passages": [{"docid": "doc-en-website-3e311064a44ce9903865d9a6738f3b4320f40603b8a865930254cf5d330d3d43", "text": "Problem: do not have chinese docs: Proposed Solution: add chinese docs in website Comments /language zh /assign\n/triage accepted", "commid": "website_issue_37502", "tokennum": 29}], "negative_passages": []} {"query_id": "q-en-website-9ddb684e33e6deb96047ed154b8e42b13bbb92264cc0f1585e2cf74ec987dad2", "query": "## \u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8 [\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8](/docs/concepts/containers/images/)\u306f\u3059\u3050\u306b\u5b9f\u884c\u53ef\u80fd\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5b9f\u884c\u306b\u5fc5\u8981\u306a\u3082\u306e\u3092\u3059\u3079\u3066\u542b\u3093\u3066\u3044\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3068\u5fc5\u8981\u306a\u30e9\u30f3\u30bf\u30a4\u30e0\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u30b7\u30b9\u30c6\u30e0\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3001\u305d\u3057\u3066\u5fc5\u9808\u306a\u8a2d\u5b9a\u9805\u76ee\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u542b\u307f\u307e\u3059\u3002 \u8a2d\u8a08\u4e0a\u3001\u30b3\u30f3\u30c6\u30ca\u306f\u4e0d\u5909\u3067\u3001\u65e2\u306b\u5b9f\u884c\u4e2d\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u30b3\u30f3\u30c6\u30ca\u5316\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308a\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u5909\u66f4\u3092\u542b\u3093\u3060\u65b0\u3057\u3044\u30b3\u30f3\u30c6\u30ca\u3092\u30d3\u30eb\u30c9\u3057\u3001\u30b3\u30f3\u30c6\u30ca\u3092\u518d\u4f5c\u6210\u3057\u3066\u3001\u66f4\u65b0\u3055\u308c\u305f\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u8a2d\u8a08\u4e0a\u3001\u30b3\u30f3\u30c6\u30ca\u306f\u4e0d\u5909\u3067\u3001\u65e2\u306b\u5b9f\u884c\u4e2d\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u30b3\u30f3\u30c6\u30ca\u5316\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308a\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u5909\u66f4\u3092\u542b\u3093\u3060\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u3001\u30b3\u30f3\u30c6\u30ca\u3092\u518d\u4f5c\u6210\u3057\u3066\u3001\u66f4\u65b0\u3055\u308c\u305f\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 ## \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0", "positive_passages": [{"docid": "doc-en-website-c7057cde22f529a250aa4f00d0c1cfba0fa386a60fc44fb356256daf9634d170", "text": "This is a Feature Request [Instalar complementos](/es/docs/concepts/cluster-administration/addons/) explica m\u00e1s sobre el uso de complementos con tu cl\u00faster y lista algunos complementos populares. ", "positive_passages": [{"docid": "doc-en-website-a7d669695782b48e9880ca785375bff6d82509fd22b4de93798454f13ffb3d20", "text": "This is a Feature Request What would you like to be Localize to Spanish Why is this needed There is no Spanish localization for this file. Comments /triage accepted /kind feature /language es /sig docs\n/assign\nGitHub didn't allow me to assign the following users: nilofe. Note that only with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see Namespaces are easy to create and use but it\u2019s also easy to deploy code inadvertently into the wrong namespace. Good DevOps hygiene suggests documenting and automating processes where possible and this will help. The other way to avoid using the wrong namespace is to set a [kubectl context](/docs/user-guide/kubectl/kubectl_config_set-context/).  Namespaces are easy to create and use but it\u2019s also easy to deploy code inadvertently into the wrong namespace. Good DevOps hygiene suggests documenting and automating processes where possible and this will help. The other way to avoid using the wrong namespace is to set a [kubectl context](/docs/reference/generated/kubectl/kubectl-commands#-em-set-context-em-).  ", "positive_passages": [{"docid": "doc-en-website-7343cdc2dd805643c6047bb91f9d63cc5034f7944c9d961ba86d4b29bc3f0778", "text": "This is a Bug Report ### \u5377\u5feb\u7167 \u5982\u679c etcd \u8fd0\u884c\u5728\u652f\u6301\u5907\u4efd\u7684\u5b58\u50a8\u5377\uff08\u5982 Amazon Elastic Block \u5b58\u50a8\uff09\u4e0a\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7\u83b7\u53d6\u5b58\u50a8\u5377\u7684\u5feb\u7167\u6765\u5907\u4efd etcd \u6570\u636e\u3002 ### \u4f7f\u7528 etcdctl \u9009\u9879\u7684\u5feb\u7167 \u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528 etcdctl \u63d0\u4f9b\u7684\u5404\u79cd\u9009\u9879\u6765\u62cd\u6444\u5feb\u7167\u3002\u4f8b\u5982\uff1a ```shell ETCDCTL_API=3 etcdctl -h ``` \u5217\u51fa etcdctl \u53ef\u7528\u7684\u5404\u79cd\u9009\u9879\u3002\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u7aef\u70b9\uff0c\u8bc1\u4e66\u7b49\u6765\u62cd\u6444\u5feb\u7167\uff0c\u5982\u4e0b\u6240\u793a\uff1a ```shell ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 --cacert= --cert= --key= snapshot save ``` \u53ef\u4ee5\u4ece etcd Pod \u7684\u63cf\u8ff0\u4e2d\u83b7\u5f97 `trusted-ca-file`, `cert-file` \u548c `key-file` \u3002 ## \u6269\u5c55 etcd \u96c6\u7fa4 \u901a\u8fc7\u4ea4\u6362\u6027\u80fd\uff0c\u6269\u5c55 etcd \u96c6\u7fa4\u53ef\u4ee5\u63d0\u9ad8\u53ef\u7528\u6027\u3002\u7f29\u653e\u4e0d\u4f1a\u63d0\u9ad8\u96c6\u7fa4\u6027\u80fd\u548c\u80fd\u529b\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\u4e0d\u8981\u6269\u5927\u6216\u7f29\u5c0f etcd \u96c6\u7fa4\u7684\u96c6\u5408\u3002\u4e0d\u8981\u4e3a etcd \u96c6\u7fa4\u914d\u7f6e\u4efb\u4f55\u81ea\u52a8\u7f29\u653e\u7ec4\u3002\u5f3a\u70c8\u5efa\u8bae\u59cb\u7ec8\u5728\u4efb\u4f55\u5b98\u65b9\u652f\u6301\u7684\u89c4\u6a21\u4e0a\u8fd0\u884c\u751f\u4ea7 Kubernetes \u96c6\u7fa4\u65f6\u4f7f\u7528\u9759\u6001\u7684\u4e94\u6210\u5458 etcd \u96c6\u7fa4\u3002 \u901a\u8fc7\u4ea4\u6362\u6027\u80fd\uff0c\u6269\u5c55 etcd \u96c6\u7fa4\u53ef\u4ee5\u63d0\u9ad8\u53ef\u7528\u6027\u3002\u7f29\u653e\u4e0d\u4f1a\u63d0\u9ad8\u96c6\u7fa4\u6027\u80fd\u548c\u80fd\u529b\u3002 \u4e00\u822c\u60c5\u51b5\u4e0b\u4e0d\u8981\u6269\u5927\u6216\u7f29\u5c0f etcd \u96c6\u7fa4\u7684\u96c6\u5408\u3002\u4e0d\u8981\u4e3a etcd \u96c6\u7fa4\u914d\u7f6e\u4efb\u4f55\u81ea\u52a8\u7f29\u653e\u7ec4\u3002 \u5f3a\u70c8\u5efa\u8bae\u59cb\u7ec8\u5728\u4efb\u4f55\u5b98\u65b9\u652f\u6301\u7684\u89c4\u6a21\u4e0a\u8fd0\u884c\u751f\u4ea7 Kubernetes \u96c6\u7fa4\u65f6\u4f7f\u7528\u9759\u6001\u7684\u4e94\u6210\u5458 etcd \u96c6\u7fa4\u3002 \u5408\u7406\u7684\u6269\u5c55\u662f\u5728\u9700\u8981\u66f4\u9ad8\u53ef\u9760\u6027\u7684\u60c5\u51b5\u4e0b\uff0c\u5c06\u4e09\u6210\u5458\u96c6\u7fa4\u5347\u7ea7\u4e3a\u4e94\u6210\u5458\u96c6\u7fa4\u3002\u8bf7\u53c2\u9605 [etcd \u91cd\u65b0\u914d\u7f6e\u6587\u6863](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/runtime-configuration.md#remove-a-member)\u4ee5\u4e86\u89e3\u5982\u4f55\u5c06\u6210\u5458\u6dfb\u52a0\u5230\u73b0\u6709\u96c6\u7fa4\u4e2d\u7684\u4fe1\u606f\u3002 \u5408\u7406\u7684\u6269\u5c55\u662f\u5728\u9700\u8981\u66f4\u9ad8\u53ef\u9760\u6027\u7684\u60c5\u51b5\u4e0b\uff0c\u5c06\u4e09\u6210\u5458\u96c6\u7fa4\u5347\u7ea7\u4e3a\u4e94\u6210\u5458\u96c6\u7fa4\u3002 \u8bf7\u53c2\u9605 [etcd \u91cd\u65b0\u914d\u7f6e\u6587\u6863](https://etcd.io/docs/current/op-guide/runtime-configuration/#remove-a-member) \u4ee5\u4e86\u89e3\u5982\u4f55\u5c06\u6210\u5458\u6dfb\u52a0\u5230\u73b0\u6709\u96c6\u7fa4\u4e2d\u7684\u4fe1\u606f\u3002 ## \u6062\u590d etcd \u96c6\u7fa4 etcd \u652f\u6301\u4ece [major.minor](http://semver.org/) \u6216\u5176\u4ed6\u4e0d\u540c patch \u7248\u672c\u7684 etcd \u8fdb\u7a0b\u4e2d\u83b7\u53d6\u7684\u5feb\u7167\u8fdb\u884c\u6062\u590d\u3002\u8fd8\u539f\u64cd\u4f5c\u7528\u4e8e\u6062\u590d\u5931\u8d25\u7684\u96c6\u7fa4\u7684\u6570\u636e\u3002 etcd \u652f\u6301\u4ece [major.minor](http://semver.org/) \u6216\u5176\u4ed6\u4e0d\u540c patch \u7248\u672c\u7684 etcd \u8fdb\u7a0b\u4e2d\u83b7\u53d6\u7684\u5feb\u7167\u8fdb\u884c\u6062\u590d\u3002 \u8fd8\u539f\u64cd\u4f5c\u7528\u4e8e\u6062\u590d\u5931\u8d25\u7684\u96c6\u7fa4\u7684\u6570\u636e\u3002 \u5728\u542f\u52a8\u8fd8\u539f\u64cd\u4f5c\u4e4b\u524d\uff0c\u5fc5\u987b\u6709\u4e00\u4e2a\u5feb\u7167\u6587\u4ef6\u3002\u5b83\u53ef\u4ee5\u662f\u6765\u81ea\u4ee5\u524d\u5907\u4efd\u64cd\u4f5c\u7684\u5feb\u7167\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u662f\u6765\u81ea\u5269\u4f59[\u6570\u636e\u76ee\u5f55](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/configuration.md#--data-dir)\u7684\u5feb\u7167\u6587\u4ef6\u3002 \u6709\u5173\u4ece\u5feb\u7167\u6587\u4ef6\u8fd8\u539f\u96c6\u7fa4\u7684\u8be6\u7ec6\u4fe1\u606f\u548c\u793a\u4f8b\uff0c\u8bf7\u53c2\u9605 [etcd \u707e\u96be\u6062\u590d\u6587\u6863](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/recovery.md#restoring-a-cluster)\u3002 \u5728\u542f\u52a8\u8fd8\u539f\u64cd\u4f5c\u4e4b\u524d\uff0c\u5fc5\u987b\u6709\u4e00\u4e2a\u5feb\u7167\u6587\u4ef6\u3002\u5b83\u53ef\u4ee5\u662f\u6765\u81ea\u4ee5\u524d\u5907\u4efd\u64cd\u4f5c\u7684\u5feb\u7167\u6587\u4ef6\uff0c \u4e5f\u53ef\u4ee5\u662f\u6765\u81ea\u5269\u4f59[\u6570\u636e\u76ee\u5f55]( https://etcd.io/docs/current/op-guide/configuration/#--data-dir)\u7684\u5feb\u7167\u6587\u4ef6\u3002 \u4f8b\u5982\uff1a ```shell ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshotdb ``` \u6709\u5173\u4ece\u5feb\u7167\u6587\u4ef6\u8fd8\u539f\u96c6\u7fa4\u7684\u8be6\u7ec6\u4fe1\u606f\u548c\u793a\u4f8b\uff0c\u8bf7\u53c2\u9605 [etcd \u707e\u96be\u6062\u590d\u6587\u6863](https://etcd.io/docs/current/op-guide/recovery/#restoring-a-cluster)\u3002 \u5982\u679c\u8fd8\u539f\u7684\u96c6\u7fa4\u7684\u8bbf\u95ee URL \u4e0e\u524d\u4e00\u4e2a\u96c6\u7fa4\u4e0d\u540c\uff0c\u5219\u5fc5\u987b\u76f8\u5e94\u5730\u91cd\u65b0\u914d\u7f6e Kubernetes API \u670d\u52a1\u5668\u3002 \u5728\u672c\u4f8b\u4e2d\uff0c\u4f7f\u7528\u53c2\u6570 `--etcd-servers=$NEW_ETCD_CLUSTER` \u800c\u4e0d\u662f\u53c2\u6570 `--etcd-servers=$OLD_ETCD_CLUSTER` \u91cd\u65b0\u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\u3002", "positive_passages": [{"docid": "doc-en-website-e137b3467942095722d53969564746ac8d1e05b2a4541b803909ce4bfa1bd149", "text": "\" etcd \"client.cert \" etcd etcd \" \" etcd client.key etcd \"\n~ GitHub is not the right place for support requests.~ ~If you're looking for help, oyu could ask on .~ ~You can also post your question on the or the forum. There are other support venues with contributions from the wider community of Kubernetes users.~\n/triage accepted /kind bug\n/remove-kind support\nThanks\n/language zh\n/priority backlog", "commid": "website_issue_27444", "tokennum": 106}], "negative_passages": []} {"query_id": "q-en-website-a2d13b3d3435fea8745fa7c21f3e84a5b2b315fc2f6f1b3bfd234c5ab51e69d9", "query": "If this is a documentation issue, please re-open this issue. ``` ### Squashing As an approver, when you review pull requests (PRs), there are various cases where you might do the following: - Advise the contributor to squash their commits. - Squash the commits for the contributor. - Advise the contributor not to squash yet. - Prevent squashing. **Advising contributors to squash**: A new contributor might not know that they should squash commits in their pull requests (PRs). If this is the case, advise them to do so, provide links to useful information, and offer to arrange help if they need it. Some useful links: - [Opening pull requests and squashing your commits](/docs/contribute/new-content/open-a-pr#squashing-commits) for documentation contributors. - [GitHub Workflow](https://www.k8s.dev/docs/guide/github-workflow/), including diagrams, for developers. **Squashing commits for contributors**: If a contributor might have difficulty squashing commits or there is time pressure to merge a PR, you can perform the squash for them: - The kubernetes/website repo is [configured to allow squashing for pull request merges](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests). Simply select the *Squash commits* button. - In the PR, if the contributor enables maintainers to manage the PR, you can squash their commits and update their fork with the result. Before you squash, advise them to save and push their latest changes to the PR. After you squash, advise them to pull the squashed commit to their local clone. - You can get GitHub to squash the commits by using a label so that Tide / GitHub performs the squash or by clicking the *Squash commits* button when you merge the PR. **Advise contributors to avoid squashing** - If one commit does something broken or unwise, and the last commit reverts this error, don't squash the commits. Even though the \"Files changed\" tab in the PR on GitHub and the Netlify preview will both look OK, merging this PR might create rebase or merge conflicts for other folks. Intervene as you see fit to avoid that risk to other contributors. **Never squash** - If you're launching a localization or releasing the docs for a new version, you are merging in a branch that's not from a user's fork, _never squash the commits_. Not squashing is essential because you must maintain the commit history for those files. ", "positive_passages": [{"docid": "doc-en-website-f1ab4e5a47fe7db0d79a37fe98f69c61baebff818a52ac86265b0cfd6733b2e1", "text": "This is a Feature Request What would you like to be As a PR reviewer, I'd like guidance on when to ask PR owners to squash their commits, when to do it for them, and when to never squash commits. Why is this needed Please see the following thread: Do we require PR owners to squash before merge, or do merge folk sometimes help them out by using the GitHub squash feature when we merge PRs? (edited) If there are lots of commits, maybe a history of edits towards getting the PR right: I strongly prefer a squash first if the author doesn't know how, a maintainer can offer to squash it for them and update their fork with the result if there is time pressure we could get GitHub to do a squash instead, via the label If there are two or three commits: I will ask for a squash first if I am confident the PR author knows how to if the author doesn't know how, it's fine to add the label and get Tide / GitHub to sort it out except that: if there are say three commits, and the middle commit does something obviously broken or unwise, and the last commit reverts it then this will create rebase / merge conflicts for other folks even though the \u201cfiles\u201d view in GitHub web looks OK, and the Netlify preview looks OK a maintainer should intervene as they see fit, to avoid that risk to other contributors If we're launching a localization or doing a release, and we're merging in a branch that's not from a fork: never squash Comments \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001[CRI](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md)\u306eAPI\u3068\u4ed5\u69d8\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 ", "positive_passages": [{"docid": "doc-en-website-6eedc0867e200d26e015dfc8e218f2d021c4f8fab44bb8a6c93517971fbdbbf6", "text": "Note that this issue is for Japanese Speaker This is a Feature Request What would you like to be Translate into Japanese Why is this needed There is no Japanese translation for this page Comments File to translate: Original: Japanese Localization document:\n/area localization /language ja /good-first-issue\nThis request has been marked as suitable for new contributors. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. # Buatlah file yang selanjutnya akan digunakan pada contoh-contoh selanjutnya # Buatlah berkas yang selanjutnya akan digunakan pada contoh-contoh selanjutnya echo -n 'admin' > ./username.txt echo -n '1f2d1e2e67df' > ./password.txt ```", "positive_passages": [{"docid": "doc-en-website-1a1d20e97d5721bd79b1304d2e9cab4ce6148cb08f3fdb764664c3d6c46ad71b", "text": "This issue is intended for contributor workshop as part of Cloud Native Day Indonesia on 7th Nov 2020. Please don't take it if you are not part of the workshop. There are several old translated pages that contain the english glossary \"file\", supposed to use Indonesian \"berkas\" as per KBBI. Please claim the task to fix them by giving comments on this Github issue. /language id Tasks to fix \"file\" -\"berkas\": [x] docs/tasks/manage-kubernetes-objects/imperative-[x] docs/tasks/manage-kubernetes-objects/declarative-[ ] docs/tasks/manage-kubernetes-objects/imperative-[ ] docs/tasks/configure-pod-container/configure-pod-[ ] docs/tasks/administer-cluster/sysctl-[ ] [x] [ ] docs/concepts/storage/storage-[ ] docs/concepts/services-networking/connect-applications-[ ] docs/concepts/services-[x] [x] docs/concepts/cluster-\n/triage accepted\n/assign\nI'm taking this page docs/tasks/manage-kubernetes-objects/imperative-\n/reopen\nReopened this issue. # Buatlah file yang selanjutnya akan digunakan pada contoh-contoh selanjutnya # Buatlah berkas yang selanjutnya akan digunakan pada contoh-contoh selanjutnya echo -n 'admin' > ./username.txt echo -n '1f2d1e2e67df' > ./password.txt ```", "positive_passages": [{"docid": "doc-en-website-e59816a103de55b89a0eb872a1448689d93039ff70b1b64a6ee71d97ccdb408a", "text": "If this issue is safe to close now please do so with . Send feedback to sig-contributor-experience at . /lifecycle stale\nStale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-contributor-experience at . /lifecycle rotten\nRotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . Send feedback to sig-contributor-experience at . /close\nClosing this issue. --- layout: blog title: \"\u514d\u8d39\u7684 Katacoda Kubernetes \u6559\u7a0b\u5373\u5c06\u5173\u95ed\" date: 2023-02-14 slug: kubernetes-katacoda-tutorials-stop-from-2023-03-31 evergreen: true --- **\u4f5c\u8005**\uff1aNatali Vlatko\uff0cKubernetes SIG Docs \u8054\u5408\u4e3b\u5e2d **\u8bd1\u8005**\uff1aMichael Yao (DaoCloud) [Katacoda](https://katacoda.com/kubernetes) \u662f O\u2019Reilly \u5f00\u8bbe\u7684\u70ed\u95e8\u5b66\u4e60\u5e73\u53f0\uff0c \u5e2e\u52a9\u4eba\u4eec\u5b66\u4e60 Java\u3001Docker\u3001Kubernetes\u3001Python\u3001Go\u3001C++ \u548c\u5176\u4ed6\u66f4\u591a\u5185\u5bb9\uff0c \u8fd9\u4e2a\u5b66\u4e60\u5e73\u53f0\u4e8e [2022 \u5e74 6 \u6708\u505c\u6b62\u5bf9\u516c\u4f17\u5f00\u653e](https://www.oreilly.com/online-learning/leveraging-katacoda-technology.html)\u3002 \u4f46\u662f\uff0c\u4ece Kubernetes \u7f51\u7ad9\u4e3a\u76f8\u5173\u9879\u76ee\u7528\u6237\u548c\u8d21\u732e\u8005\u5173\u8054\u7684 Kubernetes \u4e13\u95e8\u6559\u7a0b\u5728\u90a3\u6b21\u53d8\u66f4\u540e\u4ecd\u7136\u53ef\u7528\u5e76\u5904\u4e8e\u6d3b\u8dc3\u72b6\u6001\u3002 \u9057\u61be\u7684\u662f\uff0c\u63a5\u4e0b\u6765\u60c5\u51b5\u5c06\u53d1\u751f\u53d8\u5316\uff0cKatacoda \u4e0a\u6709\u5173\u5b66\u4e60 Kubernetes \u7684\u6559\u7a0b\u5c06\u5728 2023 \u5e74 3 \u6708 31 \u65e5\u4e4b\u540e\u5f7b\u5e95\u5173\u95ed\u3002 Kubernetes \u9879\u76ee\u611f\u8c22 O'Reilly Media \u591a\u5e74\u6765\u901a\u8fc7 Katacoda \u5b66\u4e60\u5e73\u53f0\u5bf9 Kubernetes \u793e\u533a\u7684\u652f\u6301\u3002 \u4f60\u53ef\u4ee5\u5728 O'Reilly \u81ea\u6709\u7684\u7f51\u7ad9\u4e0a\u9605\u8bfb [the decision to shutter katacoda.com](https://www.oreilly.com/online-learning/leveraging-katacoda-technology.html) \u6709\u5173\u7684\u66f4\u591a\u4fe1\u606f\u3002\u6b64\u6b21\u53d8\u66f4\u4e4b\u540e\uff0c\u6211\u4eec\u5c06\u4e13\u6ce8\u4e8e\u79fb\u9664\u6307\u5411 Katacoda \u5404\u79cd\u6559\u7a0b\u7684\u94fe\u63a5\u3002 \u6211\u4eec\u901a\u8fc7 [Issue #33936](https://github.com/kubernetes/website/issues/33936) \u548c [GitHub \u8ba8\u8bba](https://github.com/kubernetes/website/discussions/38878)\u8ddf\u8e2a\u6b64\u4e3b\u9898\u76f8\u5173\u7684\u5e38\u89c4\u95ee\u9898\u3002 \u6211\u4eec\u4e5f\u6709\u5174\u8da3\u8c03\u7814\u5176\u4ed6\u54ea\u4e9b\u5b66\u4e60\u5e73\u53f0\u53ef\u80fd\u5bf9 Kubernetes \u793e\u533a\u6709\u76ca\uff0c\u5c1d\u8bd5\u5c06 Katacoda \u94fe\u63a5\u66ff\u6362\u4e3a\u5177\u6709\u7c7b\u4f3c\u7528\u6237\u4f53\u9a8c\u7684\u5e73\u53f0\u6216\u670d\u52a1\u3002 \u7136\u800c\uff0c\u8fd9\u9879\u8c03\u7814\u9700\u8981\u65f6\u95f4\uff0c\u56e0\u6b64\u6211\u4eec\u6b63\u5728\u79ef\u6781\u5bfb\u89c5\u5fd7\u613f\u8005\u6765\u534f\u52a9\u5b8c\u6210\u8fd9\u9879\u5de5\u4f5c\u3002 \u5982\u679c\u627e\u5230\u66ff\u4ee3\u7684\u5e73\u53f0\uff0c\u9700\u8981\u5f97\u5230 Kubernetes \u9886\u5bfc\u5c42\u7684\u652f\u6301\uff0c\u7279\u522b\u662f SIG Contributor Experience\u3001SIG Docs \u548c Kubernetes Steering Committee\u3002 Katacoda \u7684\u5173\u95ed\u4f1a\u5f71\u54cd 25 \u4e2a\u82f1\u6587\u6559\u7a0b\u9875\u9762\u3001\u5bf9\u5e94\u7684\u591a\u8bed\u8a00\u9875\u9762\u4ee5\u53ca Katacoda Scenario\u4ed3\u5e93\uff1a [github.com/katacoda-scenarios/kubernetes-bootcamp-scenarios](https://github.com/katacoda-scenarios/kubernetes-bootcamp-scenarios)\u3002 \u6211\u4eec\u5efa\u8bae\u4f60\u7acb\u5373\u66f4\u65b0\u6307\u5411 Katacoda \u5b66\u4e60\u5e73\u53f0\u7684\u6240\u6709\u94fe\u63a5\u3001\u6307\u5357\u6216\u6587\u6863\uff0c\u4ee5\u53cd\u6620\u8fd9\u4e00\u53d8\u5316\u3002 \u867d\u7136\u6211\u4eec\u8fd8\u6ca1\u6709\u627e\u5230\u66ff\u4ee3\u8fd9\u4e2a\u5b66\u4e60\u5e73\u53f0\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4f46 Kubernetes \u7f51\u7ad9\u672c\u8eab\u5c31\u5305\u542b\u4e86\u5927\u91cf\u6709\u7528\u7684\u6587\u6863\u53ef\u52a9\u4f60\u7ee7\u7eed\u5b66\u4e60\u548c\u6210\u957f\u3002 \u4f60\u53ef\u4ee5\u5728 https://k8s.io/docs/tutorials/ \u627e\u5230\u6240\u6709\u53ef\u7528\u7684 Kubernetes \u6587\u6863\u6559\u7a0b\u3002 \u5982\u679c\u4f60\u5bf9 Katacoda \u5173\u95ed\u6216\u540e\u7eed\u4ece Kubernetes \u6559\u7a0b\u9875\u9762\u79fb\u9664\u76f8\u5173\u94fe\u63a5\u6709\u4efb\u4f55\u7591\u95ee\uff0c \u8bf7\u5728 [general issue tracking the shutdown](https://github.com/kubernetes/website/issues/33936) \u4e0a\u53d1\u8868\u8bc4\u8bba\uff0c\u6216\u52a0\u5165 Kubernetes Slack \u7684 #sig-docs \u9891\u9053\u3002 ", "positive_passages": [{"docid": "doc-en-website-8e53a75c4afc11fd69d4ffba3b2b0a62852ad7a6b77e4a5be50d7a197867e7e9", "text": "Plan to localize recently. This issue is opened to avoid any probable conflicts. /assign /language zh\nThis issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. * Read the API reference for [object metadata](/docs/reference/kubernetes-api/common-definitions/object-meta/#System). No newline at end of file * Read the API reference for [object metadata](/docs/reference/kubernetes-api/common-definitions/object-meta/#System). ", "positive_passages": [{"docid": "doc-en-website-418bae61b4c8db9d2545fb3261286fd392e45f1529f978dd7b9e12daa3f6d13b", "text": "This is a Feature Request What would you like to be There are terms that can use the addition of a glossary tooltip to show the meaning of the said term. Some terms can add into What's next section like: ReplicaSets, DaemonSets, Deployments, Jobs and CronJobs, and ReplicationControllers. Why is this needed This will enhance user experience and bring more clarity and less confusion. Comments Page to update:\n/sig docs /language en /assign\nThis issue is fixed here .\nIMO this is an acceptable change but I'd like another org member to chime in\n/triage accepted\nHi Thanks for sharing your feedback and triage accepted.", "commid": "website_issue_38136", "tokennum": 143}], "negative_passages": []} {"query_id": "q-en-website-ad6c6c2872b47c3314f6f5d4e531f64237764e1a28961639daa8196e1e7f3783", "query": "``` ```shell kubectl get pods -l run=cattle kubectl get pods -l app=cattle ``` ``` NAME READY STATUS RESTARTS AGE", "positive_passages": [{"docid": "doc-en-website-81a43a8a463067b959ea1f2c8fdd7accf002b63b288f4f272aa44805eeca2c14", "text": "This is a Bug Report CRI-O\u306fOpen Container Initiative (OCI) [runtime spec](https://www.github.com/opencontainers/runtime-spec)\u3068\u4e92\u63db\u6027\u304c\u3042\u308b{{< glossary_tooltip text=\"\u30b3\u30f3\u30c6\u30ca\" term_id=\"container\" >}}\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e{{< glossary_tooltip term_id=\"cri\" >}}\u306e\u5b9f\u88c5\u306e\uff11\u3064\u3067\u3059\u3002 CRI-O\u306e\u30c7\u30d7\u30ed\u30a4\u306b\u3088\u3063\u3066\u3001Kubernetes\u306f\u4efb\u610f\u306eOCI\u6e96\u62e0\u306e\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u3001{{< glossary_tooltip text=\"Pod\" term_id=\"pod\" >}}\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3053\u3068\u3068\u3001\u30ea\u30e2\u30fc\u30c8\u30ec\u30b8\u30b9\u30c8\u30ea\u304b\u3089OCI\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ", "positive_passages": [{"docid": "doc-en-website-7b7a59f3c54d188fa9167839b39e581f978ccae7b91f9742e8f0bf7ff081ae1f", "text": "Note that this issue is for Japanese Speaker This is a Feature Request What would you like to be Translate into Japanese Why is this needed There is no Japanese translation for this page Comments File to translate: Original: Japanese Localization document: /area localization /language ja /good-first-issue\nThis request has been marked as suitable for new contributors. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. ### Support requests or code bug reports Some issues that are opened for docs are actually issues with the underlying code, or requests for assistance when something (such as a tutorial) didn't work. Since these issues aren't related to documentation requests or problems, it is appropriate to respond directing the requester to potential support avenues, and if relevant, where an appropriate issue can be filed if the problem is a bug report. - example support request response ``` Thank you for this report, This sounds more like a request for support and less like an issue specifically for docs. I encourage you to bring your question to the `#kubernetes-users` channel in [Kubernetes slack](http://slack.k8s.io/). You can also search resources like [Stack Overflow](http://stackoverflow.com/questions/tagged/kubernetes) for answers to similar questions. You can also open issues for Kubernetes functionality in https://github.com/kubernetes/kubernetes. If this is a documentation issue, please re-open this issue. ``` - example code bug report response ``` Thank you for this report, This sounds more like an issue with the code than an issue with the documentation. Please open an issue at https://github.com/kubernetes/kubernetes/issues. If this is a documentation issue, please re-open this issue. ``` {% endcapture %}", "positive_passages": [{"docid": "doc-en-website-eaa8bf0bfeed07bdd2b4831affb0ead19d8d687ec85a495f603a2d26df3db476", "text": " ## {{% heading \"prerequisites\" %}} kubectl \u7248\u672c\u548c\u96c6\u7fa4\u7248\u672c\u4e4b\u95f4\u7684\u5dee\u5f02\u5fc5\u987b\u5728\u4e00\u4e2a\u5c0f\u7248\u672c\u53f7\u5185\u3002 \u4f8b\u5982\uff1av1.2 \u7248\u672c\u7684\u5ba2\u6237\u7aef\u53ea\u80fd\u4e0e v1.1\u3001v1.2 \u548c v1.3 \u7248\u672c\u7684\u96c6\u7fa4\u4e00\u8d77\u5de5\u4f5c\u3002 \u7528\u6700\u65b0\u7248\u7684 kubectl \u6709\u52a9\u4e8e\u907f\u514d\u4e0d\u53ef\u9884\u89c1\u7684\u95ee\u9898\u3002 ## \u5728 Linux \u7cfb\u7edf\u4e2d\u5b89\u88c5 kubectl {#install-kubectl-on-linux} \u5728 Linux \u7cfb\u7edf\u4e2d\u5b89\u88c5 kubectl \u6709\u5982\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a - [{{% heading \"prerequisites\" %}}](#{{% heading \"prerequisites\" %}}) - [\u5728 Linux \u7cfb\u7edf\u4e2d\u5b89\u88c5 kubectl](#install-kubectl-on-linux) - [\u7528 curl \u5728 Linux \u7cfb\u7edf\u4e2d\u5b89\u88c5 kubectl](#install-kubectl-binary-with-curl-on-linux) - [\u7528\u539f\u751f\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5](#install-using-native-package-management) - [\u7528\u5176\u4ed6\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5](#install-using-other-package-management) - [\u4f5c\u4e3a\u8c37\u6b4c\u4e91 SDK \u7684\u4e00\u90e8\u5206\uff0c\u5728 Linux \u4e2d\u5b89\u88c5](#install-on-linux-as-part-of-the-google-cloud-sdk) - [\u9a8c\u8bc1 kubectl \u914d\u7f6e](#verify-kubectl-configration) - [\u53ef\u9009\u7684 kubectl \u914d\u7f6e](#optional-kubectl-configurations) - [\u542f\u7528 shell \u81ea\u52a8\u8865\u5168\u529f\u80fd](#enable-shell-autocompletion) - [{{% heading \"whatsnext\" %}}](#{{% heading \"whatsnext\" %}}) ### \u7528 curl \u5728 Linux \u7cfb\u7edf\u4e2d\u5b89\u88c5 kubectl {#install-kubectl-binary-with-curl-on-linux} 1. \u7528\u4ee5\u4e0b\u547d\u4ee4\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248\uff1a ```bash curl -LO \"https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl\" ``` {{< note >}} \u5982\u9700\u4e0b\u8f7d\u67d0\u4e2a\u6307\u5b9a\u7684\u7248\u672c\uff0c\u8bf7\u7528\u6307\u5b9a\u7248\u672c\u53f7\u66ff\u6362\u8be5\u547d\u4ee4\u7684\u8fd9\u4e00\u90e8\u5206\uff1a `$(curl -L -s https://dl.k8s.io/release/stable.txt)`\u3002 \u4f8b\u5982\uff0c\u8981\u5728 Linux \u4e2d\u4e0b\u8f7d {{< param \"fullversion\" >}} \u7248\u672c\uff0c\u8bf7\u8f93\u5165\uff1a ```bash curl -LO https://dl.k8s.io/release/{{< param \"fullversion\" >}}/bin/linux/amd64/kubectl ``` {{< /note >}} 1. \u9a8c\u8bc1\u8be5\u53ef\u6267\u884c\u6587\u4ef6\uff08\u53ef\u9009\u6b65\u9aa4\uff09 \u4e0b\u8f7d kubectl \u6821\u9a8c\u548c\u6587\u4ef6\uff1a ```bash curl -LO \"https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256\" ``` \u57fa\u4e8e\u6821\u9a8c\u548c\u6587\u4ef6\uff0c\u9a8c\u8bc1 kubectl \u7684\u53ef\u6267\u884c\u6587\u4ef6\uff1a ```bash echo \"$( \u9a8c\u8bc1\u901a\u8fc7\u65f6\uff0c\u8f93\u51fa\u4e3a\uff1a ```console kubectl: OK ``` \u9a8c\u8bc1\u5931\u8d25\u65f6\uff0c`sha256` \u5c06\u4ee5\u975e\u96f6\u503c\u9000\u51fa\uff0c\u5e76\u6253\u5370\u5982\u4e0b\u8f93\u51fa\uff1a ```bash kubectl: FAILED sha256sum: WARNING: 1 computed checksum did NOT match ``` {{< note >}} \u4e0b\u8f7d\u7684 kubectl \u4e0e\u6821\u9a8c\u548c\u6587\u4ef6\u7248\u672c\u5fc5\u987b\u76f8\u540c\u3002 {{< /note >}} 1. \u5b89\u88c5 kubectl ```bash sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl ``` {{< note >}} \u5373\u4f7f\u4f60\u6ca1\u6709\u76ee\u6807\u7cfb\u7edf\u7684 root \u6743\u9650\uff0c\u4ecd\u7136\u53ef\u4ee5\u5c06 kubectl \u5b89\u88c5\u5230\u76ee\u5f55 `~/.local/bin` \u4e2d\uff1a ```bash mkdir -p ~/.local/bin/kubectl mv ./kubectl ~/.local/bin/kubectl # and then add ~/.local/bin/kubectl to $PATH ``` {{< /note >}} 1. \u6267\u884c\u6d4b\u8bd5\uff0c\u4ee5\u4fdd\u969c\u4f60\u5b89\u88c5\u7684\u7248\u672c\u662f\u6700\u65b0\u7684\uff1a ```bash kubectl version --client ``` ### \u7528\u539f\u751f\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5 {#install-using-native-package-management} {{< tabs name=\"kubectl_install\" >}} {{< tab name=\"Ubuntu\u3001Debian \u6216 HypriotOS\" codelang=\"bash\" >}} sudo apt-get update && sudo apt-get install -y apt-transport-https gnupg2 curl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - echo \"deb https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list sudo apt-get update sudo apt-get install -y kubectl {{< /tab >}} {{< tab name=\"CentOS\u3001RHEL \u6216 Fedora\" codelang=\"bash\" >}}cat < /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF yum install -y kubectl {{< /tab >}} {{< /tabs >}} ### \u7528\u5176\u4ed6\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5 {#install-using-other-package-management} {{< tabs name=\"other_kubectl_install\" >}} {{% tab name=\"Snap\" %}} \u5982\u679c\u4f60\u4f7f\u7528\u7684 Ubuntu \u6216\u5176\u4ed6 Linux \u53d1\u884c\u7248\uff0c\u5185\u5efa\u652f\u6301 [snap](https://snapcraft.io/docs/core/install) \u5305\u7ba1\u7406\u5de5\u5177\uff0c \u5219\u53ef\u7528 [snap](https://snapcraft.io/) \u547d\u4ee4\u5b89\u88c5 kubectl\u3002 ```shell snap install kubectl --classic kubectl version --client ``` {{% /tab %}} {{% tab name=\"Homebrew\" %}} \u5982\u679c\u4f60\u4f7f\u7528 Linux \u7cfb\u7edf\uff0c\u5e76\u4e14\u88c5\u4e86 [Homebrew](https://docs.brew.sh/Homebrew-on-Linux) \u5305\u7ba1\u7406\u5de5\u5177\uff0c \u5219\u53ef\u4ee5\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f[\u5b89\u88c5](https://docs.brew.sh/Homebrew-on-Linux#install) kubectl\u3002 ```shell brew install kubectl kubectl version --client ``` {{% /tab %}} {{< /tabs >}} ### \u4f5c\u4e3a\u8c37\u6b4c\u4e91 SDK \u7684\u4e00\u90e8\u5206\uff0c\u5728 Linux \u4e0a\u5b89\u88c5 {#install-on-linux-as-part-of-the-google-cloud-sdk} {{< include \"included/install-kubectl-gcloud.md\" >}} ## \u9a8c\u8bc1 kubectl \u914d\u7f6e {#verify-kubectl-configration} {{< include \"included/verify-kubectl.md\" >}} ## kubectl \u7684\u53ef\u9009\u914d\u7f6e {#optional-kubectl-configurations} ### \u542f\u7528 shell \u81ea\u52a8\u8865\u5168\u529f\u80fd {#enable-shell-autocompletion} kubectl \u4e3a Bash \u548c Zsh \u63d0\u4f9b\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff0c\u53ef\u4ee5\u51cf\u8f7b\u8bb8\u591a\u8f93\u5165\u7684\u8d1f\u62c5\u3002 \u4e0b\u9762\u662f\u4e3a Bash \u548c Zsh \u8bbe\u7f6e\u81ea\u52a8\u8865\u5168\u529f\u80fd\u7684\u64cd\u4f5c\u6b65\u9aa4\u3002 {{< tabs name=\"kubectl_autocompletion\" >}} {{< tab name=\"Bash\" include=\"included/optional-kubectl-configs-bash-linux.md\" />}} {{< tab name=\"Zsh\" include=\"included/optional-kubectl-configs-zsh.md\" />}} {{< /tabs >}} ## {{% heading \"whatsnext\" %}} {{< include \"included/kubectl-whats-next.md\" >}} ", "positive_passages": [{"docid": "doc-en-website-b9b97b635b211fcadbcf336461efbdbe8ea320ad06426906ea27434f0027dd35", "text": "This is a Feature Request translate content/docs/tasks/tools/install-kubectl- into Chinese What would you like to be content/zh/docs/tasks/tools/install-kubectl- /assign /language zh\n/triage accepted", "commid": "website_issue_27002", "tokennum": 59}], "negative_passages": []} {"query_id": "q-en-website-b277ef21e2260f88dcfca6769b80b1e54cfc2058dcdbfbf1276affa51fb7ab27", "query": "title: Code Contributor id: code-contributor date: 2018-04-12 full_link: /docs/community/devel/ full_link: https://github.com/kubernetes/community/tree/master/contributors/devel short_description: > A person who develops and contributes code to the Kubernetes open source codebase.", "positive_passages": [{"docid": "doc-en-website-12c7bc967dae673f47483f58b1a8dae5ccc0102d6f96c095b03b957f89d43c94", "text": "Problem: The text on is not working, it should point to these Check the page for the problem. Page to Update: Proposed Solution: It should resolve this issue by adding a simple link and enhancing the document line. Update the link on the texts Code Contributor to and not to this . /kind document /assign /language en\nThe label(s) cannot be applied, because the repository doesn't have them. full_link: /docs/community/devel/ full_link: https://github.com/kubernetes/community/tree/master/contributors/devel short_description: > A person who develops and contributes code to the Kubernetes open source codebase.", "positive_passages": [{"docid": "doc-en-website-65805c3b4c46831aa12b6275abb82b068f920aaca77593ae96d96b27d51df95d", "text": " DaemonSet \u786e\u4fdd\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u8282\u70b9\u90fd\u8fd0\u884c\u8be5 Pod \u7684\u4e00\u4e2a\u526f\u672c\u3002 \u901a\u5e38\uff0c\u8fd0\u884c Pod \u7684\u8282\u70b9\u7531 Kubernetes \u8c03\u5ea6\u5668\u9009\u62e9\u3002 \u4e0d\u8fc7\uff0cDaemonSet pods \u7531 DaemonSet \u63a7\u5236\u5668\u521b\u5efa\u548c\u8c03\u5ea6\u3002\u8fd9\u5c31\u5e26\u6765\u4e86\u4ee5\u4e0b\u95ee\u9898\uff1a \u4e0d\u8fc7\uff0cDaemonSet Pods \u7531 DaemonSet \u63a7\u5236\u5668\u521b\u5efa\u548c\u8c03\u5ea6\u3002\u8fd9\u5c31\u5e26\u6765\u4e86\u4ee5\u4e0b\u95ee\u9898\uff1a * Pod \u884c\u4e3a\u7684\u4e0d\u4e00\u81f4\u6027\uff1a\u6b63\u5e38 Pod \u5728\u88ab\u521b\u5efa\u540e\u7b49\u5f85\u8c03\u5ea6\u65f6\u5904\u4e8e `Pending` \u72b6\u6001\uff0c DaemonSet Pods \u521b\u5efa\u540e\u4e0d\u4f1a\u5904\u4e8e `Pending` \u72b6\u6001\u4e0b\u3002\u8fd9\u4f7f\u7528\u6237\u611f\u5230\u56f0\u60d1\u3002", "positive_passages": [{"docid": "doc-en-website-d25aca5c0dd975395d85285d7b9db9400d31923767ef7054fe5fbc0fca345fce", "text": "\u201c DaemonSet spec.template.\u201c \u201c\u201d\u201c\u201d\nMind propose a fix?\n/triage accepted\n/language zh (I presume)\nThe label(s) cannot be applied, because the repository doesn't have them \u57fa\u4e8e YAML \u6587\u4ef6\u521b\u5efa DaemonSet: \u57fa\u4e8e YAML \u6587\u4ef6\u521b\u5efa DaemonSet\uff1a ``` kubectl apply -f https://k8s.io/examples/controllers/daemonset.yaml", "positive_passages": [{"docid": "doc-en-website-d25aca5c0dd975395d85285d7b9db9400d31923767ef7054fe5fbc0fca345fce", "text": "\u201c DaemonSet spec.template.\u201c \u201c\u201d\u201c\u201d\nMind propose a fix?\n/triage accepted\n/language zh (I presume)\nThe label(s) cannot be applied, because the repository doesn't have them other = \"\u611f\u8c22\u53cd\u9988\u3002\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u5173\u4e8e\u5982\u4f55\u4f7f\u7528 Kubernetes \u7684\u7279\u5b9a\u7684\u3001\u9700\u8981\u7b54\u6848\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u8bbf\u95ee\" other = \"\u611f\u8c22\u53cd\u9988\u3002\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u5173\u4e8e\u5982\u4f55\u4f7f\u7528 Kubernetes \u7684\u5177\u4f53\u95ee\u9898\u9700\u8981\u7b54\u6848\uff0c\u53ef\u4ee5\u8bbf\u95ee\" [layouts_docs_search_fetching] other = \"\u68c0\u7d22\u7ed3\u679c\u4e2d..\"", "positive_passages": [{"docid": "doc-en-website-ba038e9157e4feaa45266711cf3eedabe8e5585b425fd2c2da31bff0a034219d", "text": "What would you like to be This issue is a follow-up task from displays some English text: ! To replace this text with localized strings, you can update with from . Specifically, these:\n/language zh-cn\nThe label(s) cannot be applied, because the repository doesn't have them.

The Master is responsible for managing the cluster. The master coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates.

A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster. Each node has a Kubelet, which is an agent for managing the node and communicating with the Kubernetes master. The node should also have tools for handling container operations, such as containerd or Docker. A Kubernetes cluster that handles production traffic should have a minimum of three nodes.

The Control Plane is responsible for managing the cluster. The Control Plane coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates.

A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster. Each node has a Kubelet, which is an agent for managing the node and communicating with the Kubernetes control plane. The node should also have tools for handling container operations, such as containerd or Docker. A Kubernetes cluster that handles production traffic should have a minimum of three nodes.

Masters manage the cluster and the nodes that are used to host the running applications.

Control Planes manage the cluster and the nodes that are used to host the running applications.

When you deploy applications on Kubernetes, you tell the master to start the application containers. The master schedules the containers to run on the cluster's nodes. The nodes communicate with the master using the Kubernetes API, which the master exposes. End users can also use the Kubernetes API directly to interact with the cluster.

When you deploy applications on Kubernetes, you tell the control plane to start the application containers. The control plane schedules the containers to run on the cluster's nodes. The nodes communicate with the control plane using the Kubernetes API, which the control plane exposes. End users can also use the Kubernetes API directly to interact with the cluster.

A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use Minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this tutorial, however, you'll use a provided online terminal with Minikube pre-installed.

A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use Minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this tutorial, however, you'll use a provided online terminal with Minikube pre-installed.

Now that you know what Kubernetes is, let's go to the online tutorial and start our first cluster!

", "positive_passages": [{"docid": "doc-en-website-17f540fc6c21212c838b50eb4156f5964b95c89c18c753052da8688b288fe265", "text": "This is a Clean Up Request \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001Node Affinity\u3092\u5229\u7528\u3057\u3066\u3001Pod\u3092Kubernetes\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u7279\u5b9a\u306e\u30ce\u30fc\u30c9\u306b\u5272\u308a\u5f53\u3066\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 ## {{% heading \"prerequisites\" %}} {{< include \"task-tutorial-prereqs.md\" >}} {{< version-check >}} ## \u30ce\u30fc\u30c9\u306b\u30e9\u30d9\u30eb\u3092\u8ffd\u52a0\u3059\u308b 1. \u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30ce\u30fc\u30c9\u3092\u4e00\u89a7\u8868\u793a\u3057\u3066\u3001\u30e9\u30d9\u30eb\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 ```shell kubectl get nodes --show-labels ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ```shell NAME STATUS ROLES AGE VERSION LABELS worker0 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker0 worker1 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker2 ``` 1. \u30ce\u30fc\u30c9\u3092\u9078\u629e\u3057\u3066\u3001\u30e9\u30d9\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 ```shell kubectl label nodes disktype=ssd ``` \u3053\u3053\u3067\u3001``\u306f\u9078\u629e\u3057\u305f\u30ce\u30fc\u30c9\u306e\u540d\u524d\u3067\u7f6e\u63db\u3057\u307e\u3059\u3002 1. \u9078\u629e\u3057\u305f\u30ce\u30fc\u30c9\u306b`disktype=ssd`\u30e9\u30d9\u30eb\u304c\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 ```shell kubectl get nodes --show-labels ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ``` NAME STATUS ROLES AGE VERSION LABELS worker0 Ready 1d v1.13.0 ...,disktype=ssd,kubernetes.io/hostname=worker0 worker1 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker2 ``` \u3053\u306e\u51fa\u529b\u3092\u898b\u308b\u3068\u3001`worker0`\u30ce\u30fc\u30c9\u306b`disktype=ssd`\u3068\u3044\u3046\u30e9\u30d9\u30eb\u304c\u8ffd\u52a0\u3055\u308c\u305f\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002 ## required node affinity\u3092\u4f7f\u7528\u3057\u3066Pod\u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3059\u308b \u4ee5\u4e0b\u306b\u793a\u3059\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306b\u306f\u3001`requiredDuringSchedulingIgnoredDuringExecution`\u306b`disktype: ssd`\u3068\u3044\u3046node affinity\u3092\u4f7f\u7528\u3057\u305fPod\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u66f8\u304f\u3068\u3001Pod\u306f`disktype=ssd`\u3068\u3044\u3046\u30e9\u30d9\u30eb\u3092\u6301\u3064\u30ce\u30fc\u30c9\u306b\u3060\u3051\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 {{< codenew file=\"pods/pod-nginx-required-affinity.yaml\" >}} 1. \u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u9069\u7528\u3057\u3066\u3001\u9078\u629e\u3057\u305f\u30ce\u30fc\u30c9\u4e0a\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u308c\u308bPod\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 ```shell kubectl apply -f https://k8s.io/examples/pods/pod-nginx-required-affinity.yaml ``` 1. Pod\u304c\u9078\u629e\u3057\u305f\u30ce\u30fc\u30c9\u4e0a\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 ```shell kubectl get pods --output=wide ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ``` NAME READY STATUS RESTARTS AGE IP NODE nginx 1/1 Running 0 13s 10.200.0.4 worker0 ``` ## preferred node affinity\u3092\u4f7f\u7528\u3057\u3066Pod\u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3059\u308b \u4ee5\u4e0b\u306b\u793a\u3059\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306b\u306f\u3001`preferredDuringSchedulingIgnoredDuringExecution`\u306b`disktype: ssd`\u3068\u3044\u3046node affinity\u3092\u4f7f\u7528\u3057\u305fPod\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u66f8\u304f\u3068\u3001Pod\u306f`disktype=ssd`\u3068\u3044\u3046\u30e9\u30d9\u30eb\u3092\u6301\u3064\u30ce\u30fc\u30c9\u306b\u512a\u5148\u7684\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 {{< codenew file=\"pods/pod-nginx-preferred-affinity.yaml\" >}} 1. \u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u9069\u7528\u3057\u3066\u3001\u9078\u629e\u3057\u305f\u30ce\u30fc\u30c9\u4e0a\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u3055\u308c\u308bPod\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 ```shell kubectl apply -f https://k8s.io/examples/pods/pod-nginx-preferred-affinity.yaml ``` 1. Pod\u304c\u9078\u629e\u3057\u305f\u30ce\u30fc\u30c9\u4e0a\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 ```shell kubectl get pods --output=wide ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ``` NAME READY STATUS RESTARTS AGE IP NODE nginx 1/1 Running 0 13s 10.200.0.4 worker0 ``` ## {{% heading \"whatsnext\" %}} [Node Affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity)\u306b\u3064\u3044\u3066\u3055\u3089\u306b\u5b66\u3076\u3002 ", "positive_passages": [{"docid": "doc-en-website-b5afe9625acd835bfb356724335541400d355ff53ffcc31c220548c4d068d851", "text": "This is a Feature Request What would you like to be Translate into Japanese. Why is this needed This page has not been translated. Comments /language ja /assign", "commid": "website_issue_23175", "tokennum": 32}], "negative_passages": []} {"query_id": "q-en-website-c3d6f6124d8688cf8f4c9675543ea7899639d47d52ba970e0625e1393c75ecdb", "query": " --- layout: blog title: \"\u805a\u7126 SIG Usability\" date: 2021-07-15 slug: sig-usability-spotlight-2021 --- **\u4f5c\u8005\uff1a** Kunal Kushwaha\u3001Civo ## \u4ecb\u7ecd \u4f60\u662f\u5426\u6709\u5174\u8da3\u4e86\u89e3 [SIG Usability](https://github.com/kubernetes/community/tree/master/sig-usability) \u505a\u4ec0\u4e48\uff1f \u4f60\u662f\u5426\u60f3\u77e5\u9053\u5982\u4f55\u53c2\u4e0e\uff1f\u90a3\u4f60\u6765\u5bf9\u5730\u65b9\u4e86\u3002 SIG Usability \u65e8\u5728\u8ba9 Kubernetes \u66f4\u6613\u4e8e\u89e6\u8fbe\u65b0\u7684\u4f19\u4f34\uff0c\u5176\u4e3b\u8981\u6d3b\u52a8\u662f\u9488\u5bf9\u793e\u533a\u5b9e\u65bd\u7528\u6237\u8c03\u7814\u3002 \u5728\u672c\u535a\u5ba2\u4e2d\uff0c\u6211\u4eec\u603b\u7ed3\u4e86\u4e0e Gaby Moreno \u7684\u5bf9\u8bdd\uff0c \u4ed6\u5411\u6211\u4eec\u4ecb\u7ecd\u4e86\u6210\u4e3a SIG \u6210\u5458\u7684\u5404\u4e2a\u65b9\u9762\uff0c\u5e76\u5206\u4eab\u4e86\u4e00\u4e9b\u5173\u4e8e\u5176\u4ed6\u4eba\u5982\u4f55\u53c2\u4e0e\u7684\u89c1\u89e3\u3002 Gaby \u662f SIG Usability \u7684\u8054\u5408\u8d1f\u8d23\u4eba\u3002 \u5979\u5728 IBM \u62c5\u4efb\u4ea7\u54c1\u8bbe\u8ba1\u5e08\uff0c \u559c\u6b22\u7814\u7a76 Kubernetes\u3001OpenShift\u3001Terraform \u548c Cloud Foundry \u7b49\u5f00\u653e\u5f0f\u6df7\u5408\u4e91\u6280\u672f\u7684\u7528\u6237\u4f53\u9a8c\u3002 ## \u6211\u4eec\u8c08\u8bdd\u7684\u6458\u8981 ### \u95ee\uff1a\u4f60\u80fd\u544a\u8bc9\u6211\u4eec\u4e00\u4e9b\u5173\u4e8e SIG Usability \u7684\u4e8b\u60c5\u5417\uff1f \u7b54\uff1a\u7b80\u5355\u800c\u8a00\uff0c\u542f\u52a8 SIG Usability \u7684\u539f\u56e0\u662f\u90a3\u65f6 Kubernetes \u6ca1\u6709\u4e13\u95e8\u7684\u7528\u6237\u4f53\u9a8c\u56e2\u961f\u3002 SIG Usability \u7684\u5173\u6ce8\u9886\u57df\u96c6\u4e2d\u5728\u4e3a Kubernetes \u9879\u76ee\u6700\u7ec8\u5ba2\u6237\u63d0\u4f9b\u7684\u6613\u7528\u6027\u4e0a\u3002 \u4e3b\u8981\u6d3b\u52a8\u662f\u793e\u533a\u7684\u7528\u6237\u8c03\u7814\uff0c\u5305\u62ec\u5bf9 Kubernetes \u7528\u6237\u5ba3\u8bb2\u3002 \u6240\u6d89\u53ca\u7684\u5305\u62ec\u7528\u6237\u4f53\u9a8c\u548c\u53ef\u8bbf\u95ee\u6027\u7b49\u65b9\u9762\u3002 SIG \u7684\u76ee\u6807\u662f\u786e\u4fdd Kubernetes \u9879\u76ee\u80fd\u591f\u6700\u5927\u9650\u5ea6\u5730\u88ab\u5177\u6709\u5404\u7c7b\u4e0d\u540c\u57fa\u7840\u548c\u80fd\u529b\u7684\u4eba\u4f7f\u7528\uff0c \u4f8b\u5982\u5f15\u5165\u6587\u6863\u7684\u56fd\u9645\u5316\u5e76\u786e\u4fdd\u5176\u5f00\u653e\u6027\u3002 ### \u95ee\uff1a\u4e3a\u4ec0\u4e48\u65b0\u7684\u548c\u73b0\u6709\u7684\u8d21\u732e\u8005\u5e94\u8be5\u8003\u8651\u52a0\u5165 SIG Usability\uff1f \u7b54\uff1a\u65b0\u7684\u8d21\u732e\u8005\u53ef\u4ee5\u5728\u5f88\u591a\u9886\u57df\u7740\u624b\u3002\u4f8b\u5982\uff1a - \u7528\u6237\u7814\u7a76\u9879\u76ee\u53ef\u4ee5\u8ba9\u4eba\u4eec\u5e2e\u52a9\u4e86\u89e3\u6700\u7ec8\u7528\u6237\u4f53\u9a8c\u7684\u53ef\u7528\u6027\uff0c\u5305\u62ec\u9519\u8bef\u6d88\u606f\u3001\u7aef\u5230\u7aef\u4efb\u52a1\u7b49\u3002 - Kubernetes \u793e\u533a\u7ec4\u4ef6\u7684\u53ef\u8bbf\u95ee\u6027\u6307\u5357\uff0c\u5305\u62ec\uff1a\u6587\u6863\u7684\u56fd\u9645\u5316\u3001\u8272\u76f2\u4eba\u7fa4\u7684\u989c\u8272\u9009\u62e9\u3001 \u786e\u4fdd\u4e0e\u5c4f\u5e55\u9605\u8bfb\u5668\u6280\u672f\u7684\u517c\u5bb9\u6027\u3001\u6838\u5fc3 UI \u7ec4\u4ef6\u7684\u7528\u6237\u754c\u9762\u8bbe\u8ba1\u7b49\u7b49\u3002 ### \u95ee\uff1a\u5982\u4f55\u5e2e\u52a9\u65b0\u7684\u8d21\u732e\u8005\u5165\u95e8\uff1f \u7b54\uff1a\u65b0\u7684\u8d21\u732e\u8005\u4eec\u521a\u5f00\u59cb\u53ef\u4ee5\u65c1\u89c2\u53c2\u4e0e\u5176\u4e2d\u4e00\u4e2a\u7528\u6237\u8bbf\u8c08\uff0c\u6d4f\u89c8\u7528\u6237\u8bbf\u8c08\u8bb0\u5f55\uff0c\u5206\u6790\u8fd9\u4e9b\u8bb0\u5f55\u5e76\u8bbe\u8ba1\u8c03\u67e5\u8fc7\u7a0b\u3002 SIG Usability \u4e5f\u5bf9\u65b0\u7684\u9879\u76ee\u60f3\u6cd5\u6301\u5f00\u653e\u6001\u5ea6\u3002 \u5982\u679c\u4f60\u6709\u60f3\u6cd5\uff0c\u6211\u4eec\u5c06\u5c3d\u6211\u4eec\u6240\u80fd\u652f\u6301\u5b83\u3002 \u6211\u4eec\u6709\u5b9a\u671f\u7684 SIG \u4f1a\u8bae\uff0c\u4eba\u4eec\u53ef\u4ee5\u73b0\u573a\u63d0\u95ee\u3002 \u8fd9\u4e9b\u4f1a\u8bae\u4e5f\u4f1a\u5f55\u5236\u4f1a\u8bae\u89c6\u9891\uff0c\u65b9\u4fbf\u90a3\u4e9b\u53ef\u80fd\u65e0\u6cd5\u53c2\u4f1a\u7684\u4eba\u3002 \u4e0e\u5f80\u5e38\u4e00\u6837\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5728 Slack \u4e0a\u4e0e\u6211\u4eec\u8054\u7cfb\u3002 ### \u95ee\uff1a\u8c03\u67e5\u5305\u62ec\u4ec0\u4e48\uff1f \u7b54\uff1a\u7b80\u5355\u6765\u8bf4\uff0c\u8c03\u67e5\u4f1a\u6536\u96c6\u4eba\u4eec\u5982\u4f55\u4f7f\u7528 Kubernetes \u7684\u4fe1\u606f\uff0c \u4f8b\u5982\u5b66\u4e60\u90e8\u7f72\u65b0\u7cfb\u7edf\u7684\u8d8b\u52bf\u3001\u4ed6\u4eec\u6536\u5230\u7684\u9519\u8bef\u6d88\u606f\u548c\u5de5\u4f5c\u6d41\u7a0b\u3002 \u6211\u4eec\u7684\u76ee\u6807\u4e4b\u4e00\u662f\u6839\u636e\u9700\u8981\u5bf9\u53cd\u9988\u8fdb\u884c\u6807\u51c6\u5316\u3002 \u6700\u7ec8\u76ee\u6807\u662f\u5206\u6790\u90a3\u4e9b\u9700\u6c42\u6ca1\u6709\u5f97\u5230\u6ee1\u8db3\u7684\u91cd\u8981\u7528\u6237\u6545\u4e8b\u7684\u8c03\u67e5\u53cd\u9988\u3002 ### \u95ee\uff1a\u62db\u52df\u8d21\u732e\u8005\u65f6\u4f60\u5e0c\u671b\u4ed6\u4eec\u5177\u5907\u4ec0\u4e48\u7279\u522b\u7684\u6280\u80fd\u5417\uff1fSIG Usability \u7684\u8d21\u732e\u8005\u53ef\u80fd\u8981\u5b66\u4e60\u54ea\u4e9b\u6280\u80fd\uff1f \u7b54\uff1a\u867d\u7136\u4e3a SIG Usability \u505a\u8d21\u732e\u6ca1\u6709\u4efb\u4f55\u5148\u51b3\u6761\u4ef6\uff0c \u4f46\u7528\u6237\u7814\u7a76\u3001\u5b9a\u6027\u7814\u7a76\u7684\u7ecf\u9a8c\u6216\u4e4b\u524d\u5982\u4f55\u8fdb\u884c\u8bbf\u8c08\u7684\u7ecf\u9a8c\u5c06\u662f\u5f88\u597d\u7684\u52a0\u5206\u9879\u3002 \u5b9a\u91cf\u7814\u7a76\uff0c\u5982\u8c03\u67e5\u8bbe\u8ba1\u548c\u7b5b\u9009\uff0c\u4e5f\u5f88\u6709\u5e2e\u52a9\uff0c\u4e5f\u662f\u6211\u4eec\u5e0c\u671b\u8d21\u732e\u8005\u5b66\u4e60\u7684\u4e1c\u897f\u3002 ### \u95ee\uff1a\u60a8\u5728\u54ea\u4e9b\u65b9\u9762\u83b7\u5f97\u4e86\u79ef\u6781\u7684\u53cd\u9988\uff0c\u4ee5\u53ca SIG Usability \u63a5\u4e0b\u6765\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f \u7b54\uff1a\u6211\u4eec\u4e00\u76f4\u6709\u65b0\u6210\u5458\u52a0\u5165\u5e76\u7ecf\u5e38\u53c2\u52a0\u6708\u5ea6\u4f1a\u8bae\uff0c\u5e76\u8868\u73b0\u51fa\u5bf9\u6210\u4e3a\u8d21\u732e\u8005\u548c\u5e2e\u52a9\u793e\u533a\u7684\u5174\u8da3\u3002 \u6211\u4eec\u4e5f\u6709\u5f88\u591a\u4eba\u901a\u8fc7 Slack \u4e0e\u6211\u4eec\u8054\u7cfb\uff0c\u8868\u8fbe\u4ed6\u4eec\u5bf9 SIG \u7684\u5174\u8da3\u3002 \u76ee\u524d\uff0c\u6211\u4eec\u6b63\u4e13\u6ce8\u4e8e\u5b8c\u6210\u6211\u4eec[\u6f14\u8bb2](https://www.youtube.com/watch?v=Byn0N_ZstE0)\u4e2d\u63d0\u5230\u7684\u8c03\u7814\uff0c \u4e5f\u662f\u6211\u4eec\u4eca\u5e74\u7684\u9879\u76ee\u3002\u6211\u4eec\u603b\u662f\u5f88\u9ad8\u5174\u6709\u65b0\u7684\u8d21\u732e\u8005\u52a0\u5165\u6211\u4eec\u3002 ### \u95ee\uff1a\u5728\u7ed3\u675f\u4e4b\u524d\uff0c\u4f60\u8fd8\u6709\u4ec0\u4e48\u60f3\u6cd5/\u8d44\u6e90\u8981\u5206\u4eab\u5417\uff1f \u7b54\uff1a\u6211\u4eec\u559c\u6b22\u7ed3\u8bc6\u65b0\u7684\u8d21\u732e\u8005\u5e76\u5e2e\u52a9\u4ed6\u4eec\u7814\u7a76\u4e0d\u540c\u7684 Kubernetes \u9879\u76ee\u9886\u57df\u3002 \u6211\u4eec\u5c06\u4e0e\u5176\u4ed6 SIG \u5408\u4f5c\uff0c\u4ee5\u4fc3\u8fdb\u4e0e\u6700\u7ec8\u7528\u6237\u7684\u4e92\u52a8\uff0c\u5f00\u5c55\u8c03\u7814\uff0c\u5e76\u5e2e\u52a9\u4ed6\u4eec\u5c06\u53ef\u8bbf\u95ee\u7684\u8bbe\u8ba1\u5b9e\u8df5\u6574\u5408\u5230\u4ed6\u4eec\u7684\u5f00\u53d1\u5b9e\u8df5\u4e2d\u3002 \u8fd9\u91cc\u6709\u4e00\u4e9b\u8d44\u6e90\u4f9b\u4f60\u5165\u95e8\uff1a - [GitHub](https://github.com/kubernetes/community/tree/master/sig-usability) - [\u90ae\u4ef6\u5217\u8868](https://groups.google.com/g/kubernetes-sig-usability) - [Open Community Issues/PRs](https://github.com/kubernetes/community/labels/sig%2Fusability) - [Slack](https://slack.k8s.io/) - [Slack \u9891\u9053 #sig-usability](https://kubernetes.slack.com/archives/CLC5EF63T) ## \u603b\u7ed3 SIG Usability \u4e3e\u529e\u4e86\u4e00\u4e2a\u5173\u4e8e\u8c03\u7814 Kubernetes \u7528\u6237\u4f53\u9a8c\u7684 [KubeCon \u6f14\u8bb2](https://www.youtube.com/watch?v=Byn0N_ZstE0)\u3002 \u6f14\u8bb2\u7684\u91cd\u70b9\u662f\u7528\u6237\u8c03\u7814\u9879\u76ee\u7684\u66f4\u65b0\uff0c\u4e86\u89e3\u8c01\u5728\u4f7f\u7528 Kubernetes\u3001\u4ed6\u4eec\u8bd5\u56fe\u5b9e\u73b0\u4ec0\u4e48\u3001\u9879\u76ee\u5982\u4f55\u6ee1\u8db3\u4ed6\u4eec\u7684\u9700\u6c42\u3001\u4ee5\u53ca\u6211\u4eec\u9700\u8981\u6539\u8fdb\u9879\u76ee\u548c\u5ba2\u6237\u4f53\u9a8c\u7684\u5730\u65b9\u3002 \u6b22\u8fce\u52a0\u5165 SIG \u7684\u66f4\u65b0\uff0c\u4e86\u89e3\u6700\u65b0\u7684\u8c03\u7814\u6210\u679c\u3001\u6765\u5e74\u7684\u8ba1\u5212\u4ee5\u53ca\u5982\u4f55\u4f5c\u4e3a\u8d21\u732e\u8005\u53c2\u4e0e\u4e0a\u6e38\u53ef\u7528\u6027\u56e2\u961f\uff01 ", "positive_passages": [{"docid": "doc-en-website-3e311064a44ce9903865d9a6738f3b4320f40603b8a865930254cf5d330d3d43", "text": "Problem: do not have chinese docs: Proposed Solution: add chinese docs in website Comments /language zh /assign\n/triage accepted", "commid": "website_issue_36346", "tokennum": 29}], "negative_passages": []} {"query_id": "q-en-website-c3e619d0b635e09e1054df80f5abbd874b16965fb487089a3c33fc157b78640a", "query": "## {{% heading \"prerequisites\" %}} You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master. You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew latestVersion >}} client can communicate with v{{< skew prevMinorVersion >}}, v{{< skew latestVersion >}}, and v{{< skew nextMinorVersion >}} control planes. Using the latest version of kubectl helps avoid unforeseen issues. ## Install kubectl on Windows", "positive_passages": [{"docid": "doc-en-website-678a9d82c48ff2a40befb7e5f570170a7444aaa1a093e9468647507d2008fa6c", "text": "This is a Bug Report \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001[StatefulSet](/ja/docs/concepts/workloads/controllers/statefulset/)\u3001[PodDisruptionBudgets](/docs/concepts/workloads/pods/disruptions/#pod-disruption-budget)\u3001[Pod\u30a2\u30f3\u30c1\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3](/ja/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)\u3092\u4f7f\u3063\u3066\u3001Kubernetes\u4e0a\u3067\u306e[Apache Zookeeper](https://zookeeper.apache.org)\u306e\u5b9f\u884c\u3092\u30c7\u30e2\u30f3\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u307e\u3059\u3002 ## {{% heading \"prerequisites\" %}} \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u59cb\u3081\u308b\u524d\u306b\u3001\u4ee5\u4e0b\u306eKubernetes\u306e\u6982\u5ff5\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 - [Pod](/ja/docs/concepts/workloads/pods/) - [\u30af\u30e9\u30b9\u30bf\u30fcDNS](/ja/docs/concepts/services-networking/dns-pod-service/) - [Headless Service](/ja/docs/concepts/services-networking/service/#headless-service) - [PersistentVolume](/ja/docs/concepts/storage/volumes/) - [PersistentVolume Provisioning](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/) - [StatefulSet](/ja/docs/concepts/workloads/controllers/statefulset/) - [PodDisruptionBudgets](/docs/concepts/workloads/pods/disruptions/#pod-disruption-budget) - [Pod\u30a2\u30f3\u30c1\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3](/ja/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) - [kubectl CLI](/docs/reference/kubectl/kubectl/) \u5c11\u306a\u304f\u3068\u30824\u3064\u306e\u30ce\u30fc\u30c9\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u304c\u5fc5\u8981\u3067\u3001\u5404\u30ce\u30fc\u30c9\u306f\u5c11\u306a\u304f\u3068\u30822\u3064\u306eCPU\u30684GiB\u306e\u30e1\u30e2\u30ea\u304c\u5fc5\u9808\u3067\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u30ce\u30fc\u30c9\u3092cordon\u304a\u3088\u3073drain\u3057\u307e\u3059\u3002 **\u3064\u307e\u308a\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u304c\u305d\u306e\u30ce\u30fc\u30c9\u306e\u5168\u3066\u306ePod\u3092\u7d42\u4e86\u3057\u3066\u9000\u53bb\u3055\u305b\u3001\u30ce\u30fc\u30c9\u304c\u4e00\u6642\u7684\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3067\u304d\u306a\u304f\u306a\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002** \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u5c02\u7528\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u4f7f\u3046\u304b\u3001\u8d77\u3053\u3057\u305f\u7834\u58ca\u304c\u307b\u304b\u306e\u30c6\u30ca\u30f3\u30c8\u306b\u5e72\u6e09\u3057\u306a\u3044\u78ba\u8a3c\u3092\u5f97\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u304cPersistentVolume\u306e\u52d5\u7684\u306a\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u304c\u884c\u308f\u308c\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u307e\u3059\u3002 \u30af\u30e9\u30b9\u30bf\u30fc\u304c\u305d\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u59cb\u3081\u308b\u524d\u306b20GiB\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u30923\u3064\u3001\u624b\u52d5\u3067\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 ## {{% heading \"objectives\" %}} \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u7d42\u3048\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u77e5\u8b58\u3092\u5f97\u3089\u308c\u307e\u3059\u3002 - StatefulSet\u3092\u4f7f\u3063\u3066ZooKeeper\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u65b9\u6cd5\u3002 - \u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u3092\u4e00\u8cab\u3057\u3066\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3002 - ZooKeeper\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30d7\u30ed\u30a4\u3092\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306b\u5e83\u3052\u308b\u65b9\u6cd5\u3002 - \u8a08\u753b\u3055\u308c\u305f\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4e2d\u3082\u30b5\u30fc\u30d3\u30b9\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306bPodDisruptionBudgets\u3092\u4f7f\u3046\u65b9\u6cd5\u3002 ### ZooKeeper [Apache ZooKeeper](https://zookeeper.apache.org/doc/current/)\u306f\u3001\u5206\u6563\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u3001\u5206\u6563\u578b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002 ZooKeeper\u3067\u306f\u3001\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u66f8\u304d\u3001\u304a\u3088\u3073\u66f4\u65b0\u306e\u76e3\u8996\u304c\u3067\u304d\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u306f\u968e\u5c64\u5316\u3055\u308c\u3066\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u5185\u306b\u7de8\u6210\u3055\u308c\u3001\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb(ZooKeeper\u30b5\u30fc\u30d0\u30fc\u306e\u30bb\u30c3\u30c8)\u5185\u306e\u5168\u3066\u306eZooKeeper\u30b5\u30fc\u30d0\u30fc\u306b\u8907\u88fd\u3055\u308c\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u3078\u306e\u5168\u3066\u306e\u64cd\u4f5c\u306f\u30a2\u30c8\u30df\u30c3\u30af\u304b\u3064\u9010\u6b21\u7684\u306b\u4e00\u8cab\u6027\u3092\u6301\u3061\u307e\u3059\u3002 ZooKeeper\u306f\u3001\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u5185\u306e\u5168\u3066\u306e\u30b5\u30fc\u30d0\u30fc\u9593\u3067\u30b9\u30c6\u30fc\u30c8\u30de\u30b7\u30f3\u3092\u8907\u88fd\u3059\u308b\u305f\u3081\u306b[Zab](https://pdfs.semanticscholar.org/b02c/6b00bd5dbdbd951fddb00b906c82fa80f0b3.pdf)\u5408\u610f\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u3063\u3066\u3053\u308c\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 \u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306f\u30ea\u30fc\u30c0\u30fc\u3092\u9078\u51fa\u3059\u308b\u306e\u306bZab\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u3044\u3001\u9078\u51fa\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u51fa\u3057\u307e\u305b\u3093\u3002 \u5b8c\u4e86\u3059\u308b\u3068\u3001\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306f\u8907\u88fd\u3059\u308b\u306e\u306bZab\u3092\u4f7f\u3044\u3001\u66f8\u304d\u8fbc\u307f\u304c\u627f\u8a8d\u3055\u308c\u3066\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u53ef\u8996\u5316\u3055\u308c\u308b\u3088\u308a\u524d\u306b\u3001\u5168\u3066\u306e\u66f8\u304d\u8fbc\u307f\u3092\u30af\u30a9\u30fc\u30e9\u30e0\u306b\u8907\u88fd\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 \u91cd\u307f\u4ed8\u3051\u3055\u308c\u305f\u30af\u30a9\u30fc\u30e9\u30e0\u3067\u306a\u3051\u308c\u3070\u3001\u30af\u30a9\u30fc\u30e9\u30e0\u306f\u73fe\u5728\u306e\u30ea\u30fc\u30c0\u30fc\u3092\u542b\u3080\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306e\u591a\u6570\u3092\u5360\u3081\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u3059\u3002 \u4f8b\u3048\u3070\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u304c3\u3064\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u6301\u3064\u6642\u3001\u30ea\u30fc\u30c0\u30fc\u3068\u305d\u308c\u4ee5\u5916\u306e\u3082\u30461\u3064\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u542b\u3080\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u3001\u30af\u30a9\u30fc\u30e9\u30e0\u3092\u69cb\u6210\u3057\u307e\u3059\u3002 \u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u304c\u30af\u30a9\u30fc\u30e9\u30e0\u306b\u9054\u3057\u306a\u3044\u5834\u5408\u3001\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306f\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u51fa\u305b\u307e\u305b\u3093\u3002 ZooKeeper\u30b5\u30fc\u30d0\u30fc\u7fa4\u306f\u305d\u308c\u3089\u306e\u5168\u3066\u306e\u30b9\u30c6\u30fc\u30c8\u30de\u30b7\u30f3\u3092\u30e1\u30e2\u30ea\u306b\u4fdd\u6301\u3057\u3001\u305d\u308c\u305e\u308c\u306e\u5909\u5316\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u30e1\u30c7\u30a3\u30a2\u4e0a\u306e\u6c38\u7d9a\u7684\u306aWAL(Write Ahead Log)\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 \u30b5\u30fc\u30d0\u30fc\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u6642\u306b\u306f\u3001WAL\u3092\u30ea\u30d7\u30ec\u30fc\u3059\u308b\u3053\u3068\u3067\u4ee5\u524d\u306e\u30b9\u30c6\u30fc\u30c8\u306b\u56de\u5fa9\u3067\u304d\u307e\u3059\u3002 WAL\u3092\u969b\u9650\u306e\u306a\u3044\u5897\u52a0\u304b\u3089\u9632\u3050\u305f\u3081\u306b\u3001ZooKeeper\u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30e1\u30e2\u30ea\u30b9\u30c6\u30fc\u30c8\u306b\u3042\u308b\u3082\u306e\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u30e1\u30c7\u30a3\u30a2\u306b\u5b9a\u671f\u7684\u306b\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306f\u30e1\u30e2\u30ea\u306b\u76f4\u63a5\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u3001\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3088\u308a\u524d\u306e\u5168\u3066\u306eWAL\u30a8\u30f3\u30c8\u30ea\u306f\u7834\u68c4\u3055\u308c\u5f97\u307e\u3059\u3002 ## ZooKeeper\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306e\u4f5c\u6210 \u4ee5\u4e0b\u306e\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306f[Headless Service](/ja/docs/concepts/services-networking/service/#headless-services)\u3001[Service](/ja/docs/concepts/services-networking/service/)\u3001[PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets)\u3001[StatefulSet](/ja/docs/concepts/workloads/controllers/statefulset/)\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002 {{< codenew file=\"application/zookeeper/zookeeper.yaml\" >}} \u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u304d\u3001\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b [`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands/#apply)\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl apply -f https://k8s.io/examples/application/zookeeper/zookeeper.yaml ``` \u3053\u308c\u306f`zk-hs` Headless Service\u3001`zk-cs` Service\u3001`zk-pdb` PodDisruptionBudget\u3001 `zk` StatefulSet\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 ``` service/zk-hs created service/zk-cs created poddisruptionbudget.policy/zk-pdb created statefulset.apps/zk created ``` StatefulSet\u306ePod\u3092\u4f5c\u6210\u3059\u308bStatefulSet\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u76e3\u8996\u3059\u308b\u305f\u3081\u3001[`kubectl get`](/docs/reference/generated/kubectl/kubectl-commands/#get)\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl get pods -w -l app=zk ``` `zk-2` Pod\u304cRunning\u304a\u3088\u3073Ready\u306b\u306a\u3063\u305f\u3089\u3001`CTRL-C`\u3067kubectl\u3092\u7d42\u4e86\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ``` NAME READY STATUS RESTARTS AGE zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 19s zk-0 1/1 Running 0 40s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 ContainerCreating 0 0s zk-1 0/1 Running 0 18s zk-1 1/1 Running 0 40s zk-2 0/1 Pending 0 0s zk-2 0/1 Pending 0 0s zk-2 0/1 ContainerCreating 0 0s zk-2 0/1 Running 0 19s zk-2 1/1 Running 0 40s ``` StatefulSet\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304c3\u3064\u306ePod\u3092\u4f5c\u6210\u3057\u3001\u5404Pod\u306f[ZooKeeper](https://archive.apache.org/dist/zookeeper/stable/)\u30b5\u30fc\u30d0\u30fc\u4ed8\u304d\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u6301\u3061\u307e\u3059\u3002 ### \u30ea\u30fc\u30c0\u30fc\u306e\u9078\u51fa\u306e\u30d5\u30a1\u30b7\u30ea\u30c6\u30fc\u30c8 {#facilitating-leader-election} \u533f\u540d\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u304a\u3044\u3066\u30ea\u30fc\u30c0\u30fc\u9078\u51fa\u3092\u7d42\u4e86\u3059\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u306a\u3044\u306e\u3067\u3001Zab\u306f\u30ea\u30fc\u30c0\u30fc\u9078\u51fa\u306e\u305f\u3081\u306e\u660e\u793a\u7684\u306a\u30e1\u30f3\u30d0\u30fc\u30b7\u30c3\u30d7\u8a2d\u5b9a\u3092\u8981\u3057\u307e\u3059\u3002 \u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306e\u5404\u30b5\u30fc\u30d0\u30fc\u306f\u30e6\u30cb\u30fc\u30af\u8b58\u5225\u5b50\u3092\u6301\u3064\u5fc5\u8981\u304c\u3042\u308a\u3001\u5168\u3066\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u8b58\u5225\u5b50\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u30bb\u30c3\u30c8\u3092\u77e5\u3063\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u5404\u8b58\u5225\u5b50\u306f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u3068\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 `zk` StatefulSet\u306ePod\u306e\u30db\u30b9\u30c8\u540d\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b[`kubectl exec`](/docs/reference/generated/kubectl/kubectl-commands/#exec)\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell for i in 0 1 2; do kubectl exec zk-$i -- hostname; done ``` StatefulSet\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u5404Pod\u306b\u3001\u305d\u306e\u9806\u5e8f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u57fa\u3065\u304f\u30e6\u30cb\u30fc\u30af\u306a\u30db\u30b9\u30c8\u540d\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u30db\u30b9\u30c8\u540d\u306f`-<\u9806\u5e8f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9>`\u3068\u3044\u3046\u5f62\u3092\u3068\u308a\u307e\u3059\u3002 `zk` StatefulSet\u306e`replicas`\u30d5\u30a3\u30fc\u30eb\u30c9\u304c`3`\u306b\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u306e\u30bb\u30c3\u30c8\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u3001\u30db\u30b9\u30c8\u540d\u306b\u305d\u308c\u305e\u308c`zk-0`\u3001`zk-1`\u3001`zk-2`\u304c\u4ed8\u3044\u305f3\u3064\u306ePod\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 ``` zk-0 zk-1 zk-2 ``` ZooKeeper\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30e6\u30cb\u30fc\u30af\u8b58\u5225\u5b50\u3068\u3057\u3066\u81ea\u7136\u6570\u3092\u4f7f\u3044\u3001\u305d\u308c\u305e\u308c\u306e\u30b5\u30fc\u30d0\u30fc\u306e\u8b58\u5225\u5b50\u3092\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30fc\u30bf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e`myid`\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002 \u5404\u30b5\u30fc\u30d0\u30fc\u306e`myid`\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u8abf\u3079\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell for i in 0 1 2; do echo \"myid zk-$i\";kubectl exec zk-$i -- cat /var/lib/zookeeper/data/myid; done ``` \u8b58\u5225\u5b50\u304c\u81ea\u7136\u6570\u3067\u9806\u5e8f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u6b63\u306e\u6574\u6570\u306a\u306e\u3067\u3001\u9806\u5e8f\u306b1\u3092\u52a0\u7b97\u3059\u308b\u3053\u3068\u3067\u8b58\u5225\u5b50\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002 ``` myid zk-0 1 myid zk-1 2 myid zk-2 3 ``` `zk` StatefulSet\u5185\u306e\u5404Pod\u306e\u5b8c\u5168\u4fee\u98fe\u30c9\u30e1\u30a4\u30f3\u540d(FQDN)\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell for i in 0 1 2; do kubectl exec zk-$i -- hostname -f; done ``` `zk-hs` Service\u306f\u3001\u5168Pod\u306e\u305f\u3081\u306e\u30c9\u30e1\u30a4\u30f3`zk-hs.default.svc.cluster.local`\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 ``` zk-0.zk-hs.default.svc.cluster.local zk-1.zk-hs.default.svc.cluster.local zk-2.zk-hs.default.svc.cluster.local ``` [Kubernetes DNS](/ja/docs/concepts/services-networking/dns-pod-service/)\u306eA\u30ec\u30b3\u30fc\u30c9\u306f\u3001FQDN\u3092Pod\u306eIP\u30a2\u30c9\u30ec\u30b9\u306b\u89e3\u6c7a\u3057\u307e\u3059\u3002 Kubernetes\u304cPod\u3092\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3057\u305f\u5834\u5408\u3001A\u30ec\u30b3\u30fc\u30c9\u306fPod\u306e\u65b0\u3057\u3044IP\u30a2\u30c9\u30ec\u30b9\u306b\u66f4\u65b0\u3055\u308c\u307e\u3059\u304c\u3001A\u30ec\u30b3\u30fc\u30c9\u306e\u540d\u524d\u306f\u5909\u66f4\u3055\u308c\u307e\u305b\u3093\u3002 ZooKeeper\u306f\u305d\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u8a2d\u5b9a\u3092`zoo.cfg`\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002 `zk-0` Pod\u5185\u306e`zoo.cfg`\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u898b\u308b\u306b\u306f\u3001`kubectl exec`\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec zk-0 -- cat /opt/zookeeper/conf/zoo.cfg ``` \u30d5\u30a1\u30a4\u30eb\u672b\u5c3e\u306b\u3042\u308b`server.1`\u3001`server.2`\u3001`server.3`\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u3001`1`\u3001`2`\u3001`3`\u306fZooKeeper\u30b5\u30fc\u30d0\u30fc\u306e`myid`\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u8b58\u5225\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306f`zk` StatefulSet\u5185\u306ePod\u306eFQDN\u306b\u30bb\u30c3\u30c8\u3055\u308c\u307e\u3059\u3002 ``` clientPort=2181 dataDir=/var/lib/zookeeper/data dataLogDir=/var/lib/zookeeper/log tickTime=2000 initLimit=10 syncLimit=2000 maxClientCnxns=60 minSessionTimeout= 4000 maxSessionTimeout= 40000 autopurge.snapRetainCount=3 autopurge.purgeInterval=0 server.1=zk-0.zk-hs.default.svc.cluster.local:2888:3888 server.2=zk-1.zk-hs.default.svc.cluster.local:2888:3888 server.3=zk-2.zk-hs.default.svc.cluster.local:2888:3888 ``` ### \u5408\u610f\u5f62\u6210 {#achieving-consensus} \u5408\u610f(consensus)\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u3001\u5404\u53c2\u52a0\u8005\u306e\u8b58\u5225\u5b50\u304c\u30e6\u30cb\u30fc\u30af\u3067\u3042\u308b\u3053\u3068\u3092\u8981\u4ef6\u3068\u3057\u3066\u3044\u307e\u3059\u3002 Zab\u30d7\u30ed\u30c8\u30b3\u30eb\u5185\u3067\u540c\u3058\u30e6\u30cb\u30fc\u30af\u8b58\u5225\u5b50\u3092\u4e3b\u5f35\u3059\u308b2\u3064\u306e\u53c2\u52a0\u8005\u306f\u306a\u3044\u3082\u306e\u3068\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u5185\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u3001\u3069\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u3069\u306e\u30c7\u30fc\u30bf\u3092\u30b3\u30df\u30c3\u30c8\u3057\u305f\u304b\u3092\u540c\u610f\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u5fc5\u9808\u3067\u3059\u3002 2\u3064\u306ePod\u304c\u540c\u3058\u9806\u5e8f\u5024\u3067\u8d77\u52d5\u3055\u308c\u305f\u306a\u3089\u30012\u3064\u306eZooKeeper\u30b5\u30fc\u30d0\u30fc\u306f\u3069\u3061\u3089\u3082\u305d\u308c\u3089\u81ea\u8eab\u3092\u540c\u3058\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u8a8d\u8b58\u3057\u3066\u3057\u307e\u3046\u3067\u3057\u3087\u3046\u3002 ```shell kubectl get pods -w -l app=zk ``` ``` NAME READY STATUS RESTARTS AGE zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 19s zk-0 1/1 Running 0 40s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 ContainerCreating 0 0s zk-1 0/1 Running 0 18s zk-1 1/1 Running 0 40s zk-2 0/1 Pending 0 0s zk-2 0/1 Pending 0 0s zk-2 0/1 ContainerCreating 0 0s zk-2 0/1 Running 0 19s zk-2 1/1 Running 0 40s ``` \u5404Pod\u306eA\u30ec\u30b3\u30fc\u30c9\u306f\u3001Pod\u304cReady\u306b\u306a\u3063\u305f\u6642\u306b\u8a18\u5165\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001ZooKeeper\u30b5\u30fc\u30d0\u30fc\u7fa4\u306eFQDN\u306f\u3042\u308b1\u3064\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3001\u3059\u306a\u308f\u3061`myid`\u30d5\u30a1\u30a4\u30eb\u3067\u8a2d\u5b9a\u3055\u308c\u305f\u8b58\u5225\u5b50\u3092\u4e3b\u5f35\u3059\u308b\u30e6\u30cb\u30fc\u30af\u306aZooKeeper\u30b5\u30fc\u30d0\u30fc\u306b\u89e3\u6c7a\u3055\u308c\u307e\u3059\u3002 ``` zk-0.zk-hs.default.svc.cluster.local zk-1.zk-hs.default.svc.cluster.local zk-2.zk-hs.default.svc.cluster.local ``` \u3053\u308c\u306f\u3001ZooKeeper\u306e`zzo.cfg`\u30d5\u30a1\u30a4\u30eb\u5185\u306e`servers`\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u6b63\u3057\u304f\u8a2d\u5b9a\u3055\u308c\u305f\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u3092\u8868\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 ``` server.1=zk-0.zk-hs.default.svc.cluster.local:2888:3888 server.2=zk-1.zk-hs.default.svc.cluster.local:2888:3888 server.3=zk-2.zk-hs.default.svc.cluster.local:2888:3888 ``` \u30b5\u30fc\u30d0\u30fc\u304c\u5024\u306e\u30b3\u30df\u30c3\u30c8\u3092\u8a66\u307f\u308b\u305f\u3081\u306bZab\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u3046\u6642\u3001(\u30ea\u30fc\u30c0\u30fc\u9078\u51fa\u304c\u6210\u529f\u3057\u3066\u3044\u3066\u3001\u5c11\u306a\u304f\u3068\u3082Pod\u306e\u3046\u3061\u306e2\u3064\u304cRunning\u304a\u3088\u3073Ready\u306a\u3089\u3070)\u305d\u308c\u305e\u308c\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u53cc\u65b9\u306e\u5408\u610f\u3092\u3068\u3063\u3066\u5024\u3092\u30b3\u30df\u30c3\u30c8\u3001\u3042\u308b\u3044\u306f\u3001(\u3082\u3057\u53cc\u65b9\u306e\u72b6\u614b\u304c\u5408\u308f\u306a\u3051\u308c\u3070)\u305d\u308c\u3092\u884c\u3046\u3053\u3068\u306b\u5931\u6557\u3057\u307e\u3059\u3002 \u3042\u308b\u30b5\u30fc\u30d0\u30fc\u304c\u5225\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u4ee3\u884c\u3057\u3066\u66f8\u304d\u8fbc\u307f\u3092\u627f\u8a8d\u3059\u308b\u72b6\u614b\u306f\u767a\u751f\u3057\u307e\u305b\u3093\u3002 ### \u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306e\u5065\u5168\u6027\u30c6\u30b9\u30c8 {#sanity-testing-the-ensemble} \u6700\u3082\u57fa\u672c\u7684\u306a\u5065\u5168\u6027\u30c6\u30b9\u30c8\u306f\u3001\u30c7\u30fc\u30bf\u30921\u3064\u306eZooKeeper\u30b5\u30fc\u30d0\u30fc\u306b\u66f8\u304d\u8fbc\u307f\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092\u5225\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u8aad\u307f\u53d6\u308b\u3053\u3068\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001`world`\u3092\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u5185\u306e`zk-0` Pod\u306e\u30d1\u30b9`/hello`\u306b\u66f8\u304d\u8fbc\u3080\u306e\u306b\u3001`zkCli.sh`\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell kubectl exec zk-0 -- zkCli.sh create /hello world ``` ``` WATCHER:: WatchedEvent state:SyncConnected type:None path:null Created /hello ``` `zk-1` Pod\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec zk-1 -- zkCli.sh get /hello ``` `zk-0`\u306b\u4f5c\u6210\u3057\u305f\u30c7\u30fc\u30bf\u306f\u3001\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u5185\u306e\u5168\u3066\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u5229\u7528\u3067\u304d\u307e\u3059\u3002 ``` WATCHER:: WatchedEvent state:SyncConnected type:None path:null world cZxid = 0x100000002 ctime = Thu Dec 08 15:13:30 UTC 2016 mZxid = 0x100000002 mtime = Thu Dec 08 15:13:30 UTC 2016 pZxid = 0x100000002 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 5 numChildren = 0 ``` ### \u6c38\u7d9a\u7684\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u63d0\u4f9b [ZooKeeper\u306e\u6982\u8981](#zookeeper)\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u8a00\u53ca\u3057\u305f\u3088\u3046\u306b\u3001 ZooKeeper\u306f\u5168\u3066\u306e\u30a8\u30f3\u30c8\u30ea\u3092\u6c38\u7d9a\u7684\u306aWAL\u306b\u30b3\u30df\u30c3\u30c8\u3057\u3001\u5b9a\u671f\u7684\u306b\u30e1\u30e2\u30ea\u72b6\u614b\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u30e1\u30c7\u30a3\u30a2\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 \u6c38\u7d9a\u6027\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306bWAL\u3092\u4f7f\u7528\u3059\u308b\u306e\u306f\u3001\u8907\u88fd\u3055\u308c\u305f\u30b9\u30c6\u30fc\u30c8\u30de\u30b7\u30f3\u3092\u7acb\u3066\u308b\u305f\u3081\u306b\u5408\u610f\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u3046\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3088\u304f\u3042\u308b\u30c6\u30af\u30cb\u30c3\u30af\u3067\u3059\u3002 `zk` StatefulSet\u3092\u524a\u9664\u3059\u308b\u305f\u3081\u306b\u3001[`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands/#delete)\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl delete statefulset zk ``` ``` statefulset.apps \"zk\" deleted ``` StatefulSet\u5185\u306ePod\u306e\u7d42\u4e86\u3092\u89b3\u5bdf\u3057\u307e\u3059\u3002 ```shell kubectl get pods -w -l app=zk ``` `zk-0`\u304c\u5b8c\u5168\u306b\u7d42\u4e86\u3057\u305f\u3089\u3001`CTRL-C`\u3067kubectl\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002 ``` zk-2 1/1 Terminating 0 9m zk-0 1/1 Terminating 0 11m zk-1 1/1 Terminating 0 10m zk-2 0/1 Terminating 0 9m zk-2 0/1 Terminating 0 9m zk-2 0/1 Terminating 0 9m zk-1 0/1 Terminating 0 10m zk-1 0/1 Terminating 0 10m zk-1 0/1 Terminating 0 10m zk-0 0/1 Terminating 0 11m zk-0 0/1 Terminating 0 11m zk-0 0/1 Terminating 0 11m ``` `zookeeper.yaml`\u306e\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u518d\u9069\u7528\u3057\u307e\u3059\u3002 ```shell kubectl apply -f https://k8s.io/examples/application/zookeeper/zookeeper.yaml ``` \u3053\u308c\u306f`zk` StatefulSet\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u304c\u3001\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306e\u305d\u306e\u4ed6\u306eAPI\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u306e\u3067\u5909\u66f4\u3055\u308c\u307e\u305b\u3093\u3002 StatefulSet\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304cStatefulSet\u306ePod\u3092\u518d\u4f5c\u6210\u3059\u308b\u306e\u3092\u898b\u3066\u307f\u307e\u3059\u3002 ```shell kubectl get pods -w -l app=zk ``` `zk-2` Pod\u304cRunning\u304a\u3088\u3073Ready\u306b\u306a\u3063\u305f\u3089\u3001`CTRL-C`\u3067kubectl\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002 ``` NAME READY STATUS RESTARTS AGE zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 19s zk-0 1/1 Running 0 40s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 ContainerCreating 0 0s zk-1 0/1 Running 0 18s zk-1 1/1 Running 0 40s zk-2 0/1 Pending 0 0s zk-2 0/1 Pending 0 0s zk-2 0/1 ContainerCreating 0 0s zk-2 0/1 Running 0 19s zk-2 1/1 Running 0 40s ``` [\u5065\u5168\u6027\u30c6\u30b9\u30c8](#sanity-testing-the-ensemble)\u3067\u5165\u529b\u3057\u305f\u5024\u3092`zk-2` Pod\u304b\u3089\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec zk-2 zkCli.sh get /hello ``` `zk` StatefulSet\u5185\u306e\u5168\u3066\u306ePod\u3092\u7d42\u4e86\u3057\u3066\u518d\u4f5c\u6210\u3057\u305f\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306f\u5143\u306e\u5024\u3092\u306a\u304a\u3082\u4f9b\u7d66\u3057\u307e\u3059\u3002 ``` WATCHER:: WatchedEvent state:SyncConnected type:None path:null world cZxid = 0x100000002 ctime = Thu Dec 08 15:13:30 UTC 2016 mZxid = 0x100000002 mtime = Thu Dec 08 15:13:30 UTC 2016 pZxid = 0x100000002 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 5 numChildren = 0 ``` `zk` StatefulSet\u306e`spec`\u306e`volumeClaimTemplates`\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3001\u5404Pod\u306b\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u3055\u308c\u308bPersistentVolume\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 ```yaml volumeClaimTemplates: - metadata: name: datadir annotations: volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: [ \"ReadWriteOnce\" ] resources: requests: storage: 20Gi ``` `StatefulSet`\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u3001`StatefulSet`\u5185\u306e\u5404Pod\u306e\u305f\u3081\u306b`PersistentVolumeClaim`\u3092\u751f\u6210\u3057\u307e\u3059\u3002 `StatefulSet`\u306e`PersistentVolumeClaims`\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl get pvc -l app=zk ``` `StatefulSet`\u304c\u305d\u306ePod\u3092\u518d\u4f5c\u6210\u3057\u305f\u6642\u3001`StatefulSet`\u306fPod\u306ePersistentVolume\u3092\u518d\u30de\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002 ``` NAME STATUS VOLUME CAPACITY ACCESSMODES AGE datadir-zk-0 Bound pvc-bed742cd-bcb1-11e6-994f-42010a800002 20Gi RWO 1h datadir-zk-1 Bound pvc-bedd27d2-bcb1-11e6-994f-42010a800002 20Gi RWO 1h datadir-zk-2 Bound pvc-bee0817e-bcb1-11e6-994f-42010a800002 20Gi RWO 1h ``` `StatefulSet`\u306e\u30b3\u30f3\u30c6\u30ca`template`\u306e`volumeMounts`\u30bb\u30af\u30b7\u30e7\u30f3\u306f\u3001ZooKeeper\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30fc\u30bf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308bPersistentVolume\u3092\u30de\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002 ```yaml volumeMounts: - name: datadir mountPath: /var/lib/zookeeper ``` `zk` `StatefulSet`\u5185\u306ePod\u304c(\u518d)\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u308b\u3068\u3001ZooKeeper\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30fc\u30bf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u540c\u3058`PersistentVolume`\u3092\u5e38\u306b\u5f97\u307e\u3059\u3002 Pod\u304c\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u305f\u3068\u3057\u3066\u3082\u3001\u5168\u3066\u306e\u66f8\u304d\u8fbc\u307f\u306fZooKeeper\u30b5\u30fc\u30d0\u30fc\u306eWAL\u304a\u3088\u3073\u5168\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u884c\u308f\u308c\u3001\u6c38\u7d9a\u6027\u306f\u6b8b\u308a\u307e\u3059\u3002 ## \u4e00\u8cab\u6027\u306e\u3042\u308b\u8a2d\u5b9a\u306e\u4fdd\u8a3c [\u30ea\u30fc\u30c0\u30fc\u306e\u9078\u51fa\u306e\u30d5\u30a1\u30b7\u30ea\u30c6\u30fc\u30c8](#facilitating-leader-election)\u304a\u3088\u3073[\u5408\u610f\u5f62\u6210](#achieving-consensus)\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u8a18\u3057\u305f\u3088\u3046\u306b\u3001ZooKeeper\u306e\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u5185\u306e\u30b5\u30fc\u30d0\u30fc\u7fa4\u306f\u3001\u30ea\u30fc\u30c0\u30fc\u3092\u9078\u51fa\u3057\u30af\u30a9\u30fc\u30e9\u30e0\u3092\u5f62\u6210\u3059\u308b\u305f\u3081\u306e\u4e00\u8cab\u6027\u306e\u3042\u308b\u8a2d\u5b9a\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8d8a\u3057\u3067\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u305f\u3081\u306b\u3001Zab\u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u4e00\u8cab\u6027\u306e\u3042\u308b\u8a2d\u5b9a\u3082\u5fc5\u8981\u3067\u3059\u3002 \u3053\u306e\u4f8b\u3067\u306f\u3001\u8a2d\u5b9a\u3092\u76f4\u63a5\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306b\u57cb\u3081\u8fbc\u3080\u3053\u3068\u3067\u4e00\u8cab\u6027\u306e\u3042\u308b\u8a2d\u5b9a\u3092\u9054\u6210\u3057\u307e\u3059\u3002 `zk` StatefulSet\u3092\u53d6\u5f97\u3057\u307e\u3057\u3087\u3046\u3002 ```shell kubectl get sts zk -o yaml ``` ``` \u2026 command: - sh - -c - \"start-zookeeper --servers=3 --data_dir=/var/lib/zookeeper/data --data_log_dir=/var/lib/zookeeper/data/log --conf_dir=/opt/zookeeper/conf --client_port=2181 --election_port=3888 --server_port=2888 --tick_time=2000 --init_limit=10 --sync_limit=5 --heap=512M --max_client_cnxns=60 --snap_retain_count=3 --purge_interval=12 --max_session_timeout=40000 --min_session_timeout=4000 --log_level=INFO\" \u2026 ``` \u3053\u306ecommand\u3067\u306f\u3001ZooKeeper\u30b5\u30fc\u30d0\u30fc\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u8a2d\u5b9a\u3092\u6e21\u3057\u3066\u3044\u307e\u3059\u3002 \u8a2d\u5b9a\u3092\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u3078\u6e21\u3059\u306e\u306b\u306f\u74b0\u5883\u5909\u6570\u3092\u4f7f\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 ### \u30ed\u30b0\u306e\u8a2d\u5b9a `zkGenConfig.sh`\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e1\u3064\u306f\u3001ZooKeeper\u306e\u30ed\u30b0\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 ZooKeeper\u306f[Log4j](https://logging.apache.org/log4j/2.x/)\u3092\u4f7f\u3044\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30ed\u30b0\u306e\u8a2d\u5b9a\u306b\u57fa\u3065\u3044\u3066\u3001\u30ed\u30b0\u8a2d\u5b9a\u306b\u6642\u9593\u304a\u3088\u3073\u30b5\u30a4\u30ba\u30d9\u30fc\u30b9\u3067\u306e\u30ed\u30fc\u30ea\u30f3\u30b0\u30d5\u30a1\u30a4\u30eb\u30a2\u30da\u30f3\u30c0\u30fc(\u30ed\u30b0\u306e\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3)\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 `zk` `StatefulSet`\u5185\u306ePod\u306e1\u3064\u304b\u3089\u30ed\u30b0\u8a2d\u5b9a\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec zk-0 cat /usr/etc/zookeeper/log4j.properties ``` \u4ee5\u4e0b\u306e\u30ed\u30b0\u8a2d\u5b9a\u306f\u3001ZooKeeper\u306b\u30ed\u30b0\u306e\u5168\u3066\u3092\u6a19\u6e96\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u30b9\u30c8\u30ea\u30fc\u30e0\u306b\u66f8\u304d\u51fa\u3059\u51e6\u7406\u3092\u3055\u305b\u307e\u3059\u3002 ``` zookeeper.root.logger=CONSOLE zookeeper.console.threshold=INFO log4j.rootLogger=${zookeeper.root.logger} log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold} log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n ``` \u3053\u308c\u306f\u30ed\u30b0\u30b3\u30f3\u30c6\u30ca\u5185\u306e\u30ed\u30b0\u3092\u5b89\u5168\u306b\u3068\u308b\u305f\u3081\u306e\u3001\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u3068\u601d\u308f\u308c\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30ed\u30b0\u3092\u6a19\u6e96\u51fa\u529b\u306b\u66f8\u304d\u51fa\u3057\u3001Kubernetes\u304c\u30ed\u30b0\u306e\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u51e6\u7406\u3057\u3066\u304f\u308c\u307e\u3059\u3002 Kubernetes\u306f\u3001\u6a19\u6e96\u51fa\u529b\u3068\u6a19\u6e96\u30a8\u30e9\u30fc\u51fa\u529b\u306b\u66f8\u304d\u51fa\u3055\u308c\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30b0\u304c\u30ed\u30fc\u30ab\u30eb\u30b9\u30c8\u30ec\u30fc\u30b8\u30e1\u30c7\u30a3\u30a2\u3092\u4f7f\u3044\u5c3d\u304f\u3055\u306a\u3044\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u3001\u5065\u5168\u7dad\u6301\u30dd\u30ea\u30b7\u30fc\u3082\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002 Pod\u306e1\u3064\u304b\u3089\u672b\u5c3e20\u884c\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001[`kubectl logs`](/docs/reference/generated/kubectl/kubectl-commands/#logs)\u3092\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002 ```shell kubectl logs zk-0 --tail 20 ``` `kubectl logs`\u3092\u5229\u7528\u3059\u308b\u304b\u3001Kubernetes Dashboard\u304b\u3089\u3001\u6a19\u6e96\u51fa\u529b\u307e\u305f\u306f\u6a19\u6e96\u30a8\u30e9\u30fc\u306b\u66f8\u304d\u51fa\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30ed\u30b0\u3092\u53c2\u7167\u3067\u304d\u307e\u3059\u3002 ``` 2016-12-06 19:34:16,236 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52740 2016-12-06 19:34:16,237 [myid:1] - INFO [Thread-1136:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52740 (no session established for client) 2016-12-06 19:34:26,155 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52749 2016-12-06 19:34:26,155 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52749 2016-12-06 19:34:26,156 [myid:1] - INFO [Thread-1137:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52749 (no session established for client) 2016-12-06 19:34:26,222 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52750 2016-12-06 19:34:26,222 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52750 2016-12-06 19:34:26,226 [myid:1] - INFO [Thread-1138:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52750 (no session established for client) 2016-12-06 19:34:36,151 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52760 2016-12-06 19:34:36,152 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52760 2016-12-06 19:34:36,152 [myid:1] - INFO [Thread-1139:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52760 (no session established for client) 2016-12-06 19:34:36,230 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52761 2016-12-06 19:34:36,231 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52761 2016-12-06 19:34:36,231 [myid:1] - INFO [Thread-1140:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52761 (no session established for client) 2016-12-06 19:34:46,149 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52767 2016-12-06 19:34:46,149 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52767 2016-12-06 19:34:46,149 [myid:1] - INFO [Thread-1141:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52767 (no session established for client) 2016-12-06 19:34:46,230 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52768 2016-12-06 19:34:46,230 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52768 2016-12-06 19:34:46,230 [myid:1] - INFO [Thread-1142:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52768 (no session established for client) ``` Kubernetes\u306f\u591a\u304f\u306e\u30ed\u30b0\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u7d71\u5408\u3057\u3066\u3044\u307e\u3059\u3002 \u30af\u30e9\u30b9\u30bf\u30fc\u304a\u3088\u3073\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u6700\u3082\u9069\u5408\u3059\u308b\u30ed\u30b0\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u9078\u3079\u307e\u3059\u3002 \u30af\u30e9\u30b9\u30bf\u30fc\u30ec\u30d9\u30eb\u306e\u30ed\u30ae\u30f3\u30b0\u3068\u30a2\u30b0\u30ea\u30b2\u30fc\u30b7\u30e7\u30f3\u3068\u3057\u3066\u3001\u30ed\u30b0\u3092\u30ed\u30fc\u30c6\u30fc\u30c8\u304a\u3088\u3073\u8f38\u9001\u3059\u308b\u305f\u3081\u306e[\u30b5\u30a4\u30c9\u30ab\u30fc\u30b3\u30f3\u30c6\u30ca](/ja/docs/concepts/cluster-administration/logging#sidecar-container-with-logging-agent)\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3053\u3068\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ### \u975e\u7279\u6a29\u30e6\u30fc\u30b6\u30fc\u306e\u8a2d\u5b9a \u30b3\u30f3\u30c6\u30ca\u5185\u3067\u7279\u6a29\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u306e\u5b9f\u884c\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u8a31\u53ef\u3059\u308b\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306f\u3001\u8b70\u8ad6\u306e\u7684\u3067\u3059\u3002 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u975e\u7279\u6a29\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u7d44\u7e54\u3067\u5fc5\u9808\u3068\u3057\u3066\u3044\u308b\u306a\u3089\u3001\u30a8\u30f3\u30c8\u30ea\u30dd\u30a4\u30f3\u30c8\u304c\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u5b9f\u884c\u3067\u304d\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u5236\u5fa1\u3059\u308b[\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8](/ja/docs/tasks/configure-pod-container/security-context/)\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002 `zk` `StatefulSet`\u306ePod `template`\u306f\u3001`SecurityContext`\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002 ```yaml securityContext: runAsUser: 1000 fsGroup: 1000 ``` Pod\u306e\u30b3\u30f3\u30c6\u30ca\u5185\u3067\u3001UID 1000\u306fzookeeper\u30e6\u30fc\u30b6\u30fc\u306b\u3001GID 1000\u306fzookeeper\u30b0\u30eb\u30fc\u30d7\u306b\u305d\u308c\u305e\u308c\u76f8\u5f53\u3057\u307e\u3059\u3002 `zk-0` Pod\u304b\u3089\u306eZooKeeper\u30d7\u30ed\u30bb\u30b9\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002 ```shell kubectl exec zk-0 -- ps -elf ``` `securityContext`\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e`runAsUser`\u30d5\u30a3\u30fc\u30eb\u30c9\u304c1000\u306b\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u3068\u304a\u308a\u3001ZooKeeper\u30d7\u30ed\u30bb\u30b9\u306f\u3001root\u3068\u3057\u3066\u5b9f\u884c\u3055\u308c\u308b\u4ee3\u308f\u308a\u306bzookeeper\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002 ``` F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 4 S zookeep+ 1 0 0 80 0 - 1127 - 20:46 ? 00:00:00 sh -c zkGenConfig.sh && zkServer.sh start-foreground 0 S zookeep+ 27 1 0 80 0 - 1155556 - 20:46 ? 00:00:19 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dzookeeper.log.dir=/var/log/zookeeper -Dzookeeper.root.logger=INFO,CONSOLE -cp /usr/bin/../build/classes:/usr/bin/../build/lib/*.jar:/usr/bin/../share/zookeeper/zookeeper-3.4.9.jar:/usr/bin/../share/zookeeper/slf4j-log4j12-1.6.1.jar:/usr/bin/../share/zookeeper/slf4j-api-1.6.1.jar:/usr/bin/../share/zookeeper/netty-3.10.5.Final.jar:/usr/bin/../share/zookeeper/log4j-1.2.16.jar:/usr/bin/../share/zookeeper/jline-0.9.94.jar:/usr/bin/../src/java/lib/*.jar:/usr/bin/../etc/zookeeper: -Xmx2G -Xms2G -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /usr/bin/../etc/zookeeper/zoo.cfg ``` \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001Pod\u306ePersistentVolume\u304cZooKeeper\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30fc\u30bf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u6642\u3001root\u30e6\u30fc\u30b6\u30fc\u306e\u307f\u304c\u305d\u3053\u306b\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u3067\u3059\u3002 \u3053\u306e\u8a2d\u5b9a\u306fZooKeeper\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u305d\u306eWAL\u306b\u66f8\u304d\u8fbc\u3093\u3060\u308a\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u683c\u7d0d\u3057\u305f\u308a\u3059\u308b\u306e\u3092\u59a8\u3052\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 `zk-0` Pod\u306eZooKeeper\u30c7\u30fc\u30bf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d5\u30a1\u30a4\u30eb\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec -ti zk-0 -- ls -ld /var/lib/zookeeper/data ``` `securityContext`\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e`fsGroup`\u30d5\u30a3\u30fc\u30eb\u30c9\u304c1000\u306b\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001Pod\u306ePersistentVolume\u306e\u6240\u6709\u6a29\u306fzookeeper\u30b0\u30eb\u30fc\u30d7\u306b\u30bb\u30c3\u30c8\u3055\u308c\u3001ZooKeeper\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u305d\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 ``` drwxr-sr-x 3 zookeeper zookeeper 4096 Dec 5 20:45 /var/lib/zookeeper/data ``` ## ZooKeeper\u30d7\u30ed\u30bb\u30b9\u306e\u7ba1\u7406 [ZooKeeper\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_supervision)\u3067\u306f\u3001\u300cYou will want to have a supervisory process that manages each of your ZooKeeper server processes (JVM).(\u5404ZooKeeper\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30bb\u30b9(JVM)\u3092\u7ba1\u7406\u3059\u308b\u76e3\u7763\u30d7\u30ed\u30bb\u30b9\u3092\u6301\u3061\u305f\u304f\u306a\u308a\u307e\u3059)\u300d\u3068\u8ff0\u3079\u3066\u3044\u307e\u3059\u3002 \u5206\u6563\u578b\u30b7\u30b9\u30c6\u30e0\u5185\u3067\u5931\u6557\u3057\u305f\u30d7\u30ed\u30bb\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u306e\u306bwatchdog(\u76e3\u7763\u30d7\u30ed\u30bb\u30b9)\u3092\u4f7f\u3046\u306e\u306f\u3001\u5178\u578b\u7684\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092Kubernetes\u306b\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u6642\u306b\u306f\u3001\u76e3\u7763\u30d7\u30ed\u30bb\u30b9\u306e\u3088\u3046\u306a\u5916\u90e8\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3092\u4f7f\u3046\u3088\u308a\u3082\u3080\u3057\u308d\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306ewatchdog\u3068\u3057\u3066Kubernetes\u3092\u4f7f\u3046\u3079\u304d\u3067\u3059\u3002 ### \u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8 `zk` `StatefulSet`\u306f`RollingUpdate`\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6226\u7565\u3092\u4f7f\u3046\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u30b5\u30fc\u30d0\u30fc\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u308b`cpus`\u306e\u6570\u3092\u66f4\u65b0\u3059\u308b\u306e\u306b\u3001`kubectl patch`\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002 ```shell kubectl patch sts zk --type='json' -p='[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/resources/requests/cpu\", \"value\":\"0.3\"}]' ``` ``` statefulset.apps/zk patched ``` \u66f4\u65b0\u306e\u72b6\u6cc1\u3092\u898b\u308b\u306b\u306f\u3001`kubectl rollout status`\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl rollout status sts/zk ``` ``` waiting for statefulset rolling update to complete 0 pods at revision zk-5db4499664... Waiting for 1 pods to be ready... Waiting for 1 pods to be ready... waiting for statefulset rolling update to complete 1 pods at revision zk-5db4499664... Waiting for 1 pods to be ready... Waiting for 1 pods to be ready... waiting for statefulset rolling update to complete 2 pods at revision zk-5db4499664... Waiting for 1 pods to be ready... Waiting for 1 pods to be ready... statefulset rolling update complete 3 pods at revision zk-5db4499664... ``` \u3053\u308c\u306fPod\u7fa4\u3092\u7d42\u4e86\u3057\u3001\u9006\u306e\u9806\u756a\u30671\u3064\u305a\u3064\u305d\u308c\u3089\u3092\u65b0\u3057\u3044\u8a2d\u5b9a\u3067\u518d\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u30af\u30a9\u30fc\u30e9\u30e0\u304c\u30ed\u30fc\u30ea\u30f3\u30b0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u7dad\u6301\u3055\u308c\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 \u5c65\u6b74\u3084\u904e\u53bb\u306e\u8a2d\u5b9a\u3092\u898b\u308b\u306b\u306f\u3001`kubectl rollout history`\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl rollout history sts/zk ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` statefulsets \"zk\" REVISION 1 2 ``` \u5909\u66f4\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b\u306b\u306f\u3001`kubectl rollout undo`\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl rollout undo sts/zk ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` statefulset.apps/zk rolled back ``` ### \u30d7\u30ed\u30bb\u30b9\u306e\u5931\u6557\u306e\u53d6\u308a\u6271\u3044 [\u518d\u8d77\u52d5\u30dd\u30ea\u30b7\u30fc](/ja/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)\u306f\u3001Pod\u5185\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u30a8\u30f3\u30c8\u30ea\u30dd\u30a4\u30f3\u30c8\u3078\u306e\u30d7\u30ed\u30bb\u30b9\u306e\u5931\u6557\u3092Kubernetes\u304c\u3069\u306e\u3088\u3046\u306b\u53d6\u308a\u6271\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 `StatefulSet`\u5185\u306ePod\u306b\u304a\u3044\u3066\u552f\u4e00\u59a5\u5f53\u306a`RestartPolicy`\u306fAlways\u3067\u3001\u3053\u308c\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3067\u3059\u3002 \u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3053\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30ea\u30b7\u30fc\u306e\u4e0a\u66f8\u304d\u306f**\u7d76\u5bfe\u306b\u3059\u3079\u304d\u3067\u306f\u3042\u308a\u307e\u305b\u3093**\u3002 `zk-0` Pod\u5185\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308bZooKeeper\u30b5\u30fc\u30d0\u30fc\u306e\u30d7\u30ed\u30bb\u30b9\u30c4\u30ea\u30fc\u3092\u8abf\u67fb\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec zk-0 -- ps -ef ``` \u30b3\u30f3\u30c6\u30ca\u306e\u30a8\u30f3\u30c8\u30ea\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u4f7f\u308f\u308c\u308b\u30b3\u30de\u30f3\u30c9\u306fPID 1\u3001\u30a8\u30f3\u30c8\u30ea\u30dd\u30a4\u30f3\u30c8\u306e\u5b50\u3067\u3042\u308bZooKeeper\u30d7\u30ed\u30bb\u30b9\u306fPID 27\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002 ``` UID PID PPID C STIME TTY TIME CMD zookeep+ 1 0 0 15:03 ? 00:00:00 sh -c zkGenConfig.sh && zkServer.sh start-foreground zookeep+ 27 1 0 15:03 ? 00:00:03 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dzookeeper.log.dir=/var/log/zookeeper -Dzookeeper.root.logger=INFO,CONSOLE -cp /usr/bin/../build/classes:/usr/bin/../build/lib/*.jar:/usr/bin/../share/zookeeper/zookeeper-3.4.9.jar:/usr/bin/../share/zookeeper/slf4j-log4j12-1.6.1.jar:/usr/bin/../share/zookeeper/slf4j-api-1.6.1.jar:/usr/bin/../share/zookeeper/netty-3.10.5.Final.jar:/usr/bin/../share/zookeeper/log4j-1.2.16.jar:/usr/bin/../share/zookeeper/jline-0.9.94.jar:/usr/bin/../src/java/lib/*.jar:/usr/bin/../etc/zookeeper: -Xmx2G -Xms2G -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /usr/bin/../etc/zookeeper/zoo.cfg ``` \u5225\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066`zk` `StatefulSet`\u5185\u306ePod\u3092\u898b\u3066\u307f\u307e\u3059\u3002 ```shell kubectl get pod -w -l app=zk ``` \u5225\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066Pod `zk-0`\u5185\u306eZooKeeper\u30d7\u30ed\u30bb\u30b9\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002 ```shell kubectl exec zk-0 -- pkill java ``` ZooKeeper\u30d7\u30ed\u30bb\u30b9\u306e\u7d42\u4e86\u306f\u3001\u305d\u306e\u89aa\u30d7\u30ed\u30bb\u30b9\u306e\u7d42\u4e86\u3092\u5f15\u304d\u8d77\u3053\u3057\u307e\u3059\u3002 \u30b3\u30f3\u30c6\u30ca\u306e`RestartPolicy`\u306fAlways\u306a\u306e\u3067\u3001\u89aa\u30d7\u30ed\u30bb\u30b9\u304c\u518d\u8d77\u52d5(restart)\u3055\u308c\u307e\u3059\u3002 ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 0 21m zk-1 1/1 Running 0 20m zk-2 1/1 Running 0 19m NAME READY STATUS RESTARTS AGE zk-0 0/1 Error 0 29m zk-0 0/1 Running 1 29m zk-0 1/1 Running 1 29m ``` \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u3001\u305d\u306e\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u88c5\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u7acb\u3061\u4e0a\u3052\u308b\u306e\u306b\u30b9\u30af\u30ea\u30d7\u30c8(`zkServer.sh`\u306a\u3069)\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u5b50\u30d7\u30ed\u30bb\u30b9\u3068\u3068\u3082\u306b\u7d42\u4e86\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306f\u3001Kubernetes\u304c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u3001\u305d\u306e\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u30d7\u30ed\u30bb\u30b9\u304c\u5931\u6557\u3057\u305f\u6642\u306b\u518d\u8d77\u52d5\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 ### \u751f\u5b58\u6027\u30c6\u30b9\u30c8 \u5931\u6557\u3057\u305f\u30d7\u30ed\u30bb\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u65bd\u3059\u306e\u306f\u3001\u5206\u6563\u578b\u30b7\u30b9\u30c6\u30e0\u306e\u5065\u5168\u3055\u3092\u4fdd\u3064\u306e\u306b\u5341\u5206\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30b7\u30b9\u30c6\u30e0\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u751f\u304d\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308c\u3070\u7121\u53cd\u5fdc\u306a\u3053\u3068\u3082\u3042\u308a\u3001\u3042\u308b\u3044\u306f\u305d\u3046\u3067\u306a\u304f\u4e0d\u5065\u5168\u3068\u3044\u3046\u72b6\u6cc1\u3082\u3042\u308a\u307e\u3059\u3002 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u4e0d\u5065\u5168\u3067\u518d\u8d77\u52d5\u3059\u3079\u304d\u3067\u3042\u308b\u3053\u3068\u3092Kubernetes\u306b\u901a\u77e5\u3059\u308b\u306b\u306f\u3001liveness probe\u3092\u4f7f\u3046\u306e\u304c\u3088\u3044\u3067\u3057\u3087\u3046\u3002 `zk` `StatefulSet`\u306ePod `template`\u3067liveness probe\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 ```yaml livenessProbe: exec: command: - sh - -c - \"zookeeper-ready 2181\" initialDelaySeconds: 15 timeoutSeconds: 5 ``` \u30d7\u30ed\u30fc\u30d6\u306f\u30b5\u30fc\u30d0\u30fc\u306e\u5065\u5168\u3055\u3092\u30c6\u30b9\u30c8\u3059\u308b\u306e\u306b\u3001ZooKeeper\u306e`ruok` 4\u6587\u5b57\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002 ``` OK=$(echo ruok | nc 127.0.0.1 $1) if [ \"$OK\" == \"imok\" ]; then exit 0 else exit 1 fi ``` \u30bf\u30fc\u30df\u30ca\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3001`zk` StatefulSet\u5185\u306ePod\u3092\u898b\u308b\u306e\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl get pod -w -l app=zk ``` \u5225\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3001Pod `zk-0`\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089`zookeeper-ready`\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u524a\u9664\u3059\u308b\u305f\u3081\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec zk-0 -- rm /opt/zookeeper/bin/zookeeper-ready ``` ZooKeeper\u30d7\u30ed\u30bb\u30b9\u306e\u5931\u6557\u306e\u305f\u3081\u306bliveness probe\u3092\u4f7f\u3046\u6642\u3001\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u5185\u306e\u4e0d\u5065\u5168\u306a\u30d7\u30ed\u30bb\u30b9\u304c\u518d\u8d77\u52d5\u3055\u308c\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306b\u3001Kubernetes\u306f\u81ea\u52d5\u7684\u306b\u30d7\u30ed\u30bb\u30b9\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002 ```shell kubectl get pod -w -l app=zk ``` ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 0 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 0/1 Running 0 1h zk-0 0/1 Running 1 1h zk-0 1/1 Running 1 1h ``` ### \u6e96\u5099\u6027\u30c6\u30b9\u30c8 \u6e96\u5099\u6027\u306f\u751f\u5b58\u6027\u3068\u540c\u3058\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30d7\u30ed\u30bb\u30b9\u304c\u751f\u304d\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u5065\u5168\u3067\u3059\u3002 \u30d7\u30ed\u30bb\u30b9\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u3089\u3001\u5165\u529b\u3092\u51e6\u7406\u3067\u304d\u307e\u3059\u3002 \u751f\u5b58\u6027\u306f\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u3082\u306e\u3067\u3059\u304c\u3001\u6e96\u5099\u6027\u306e\u72b6\u614b\u306b\u306f\u5341\u5206\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30d7\u30ed\u30bb\u30b9\u306f\u751f\u304d\u3066\u306f\u3044\u308b\u304c\u6e96\u5099\u306f\u3067\u304d\u3066\u3044\u306a\u3044\u6642\u3001\u7279\u306b\u521d\u671f\u5316\u304a\u3088\u3073\u7d42\u4e86\u306e\u9593\u304c\u305d\u306e\u30b1\u30fc\u30b9\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002 \u6e96\u5099\u6027\u30d7\u30ed\u30fc\u30d6\u3092\u6307\u5b9a\u3059\u308b\u3068Kubernetes\u306f\u3001\u6e96\u5099\u6027\u30c1\u30a7\u30c3\u30af\u306b\u5408\u683c\u3059\u308b\u307e\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u53d7\u3051\u53d6\u3089\u306a\u3044\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 ZooKeeper\u30b5\u30fc\u30d0\u30fc\u306b\u3068\u3063\u3066\u3001\u5065\u5168\u6027\u306f\u6e96\u5099\u6027\u3092\u610f\u5473\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001`zookeeper.yaml`\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u304b\u3089\u306e\u6e96\u5099\u6027\u30d7\u30ed\u30fc\u30d6\u306f\u3001\u751f\u5b58\u30d7\u30ed\u30fc\u30d6\u3068\u540c\u4e00\u3067\u3059\u3002 ```yaml readinessProbe: exec: command: - sh - -c - \"zookeeper-ready 2181\" initialDelaySeconds: 15 timeoutSeconds: 5 ``` \u5065\u5168\u6027\u30d7\u30ed\u30fc\u30d6\u3068\u6e96\u5099\u6027\u30d7\u30ed\u30fc\u30d6\u304c\u540c\u4e00\u3060\u3068\u3057\u3066\u3082\u3001\u4e21\u65b9\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002 \u3053\u308c\u306f\u3001ZooKeeper\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u5185\u306e\u5065\u5168\u306a\u30b5\u30fc\u30d0\u30fc\u3060\u3051\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 ## \u30ce\u30fc\u30c9\u306e\u5931\u6557\u306e\u8a31\u5bb9 ZooKeeper\u306f\u30c7\u30fc\u30bf\u306e\u5909\u66f4\u3092\u6b63\u3057\u304f\u30b3\u30df\u30c3\u30c8\u3059\u308b\u306e\u306b\u30b5\u30fc\u30d0\u30fc\u306e\u30af\u30a9\u30fc\u30e9\u30e0\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u3002 3\u3064\u306e\u30b5\u30fc\u30d0\u30fc\u306e\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306b\u304a\u3044\u3066\u306f\u3001\u66f8\u304d\u8fbc\u307f\u306e\u6210\u529f\u306e\u305f\u3081\u306b2\u3064\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u5065\u5168\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u30af\u30a9\u30fc\u30e9\u30e0\u30d9\u30fc\u30b9\u306e\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3044\u3066\u3001\u53ef\u7528\u6027\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306b\u3001\u30e1\u30f3\u30d0\u30fc\u306f\u969c\u5bb3\u30c9\u30e1\u30a4\u30f3\u306b\u30c7\u30d7\u30ed\u30a4\u3055\u308c\u307e\u3059\u3002 \u500b\u3005\u306e\u30de\u30b7\u30f3\u3092\u5931\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u6545\u969c\u3092\u907f\u3051\u308b\u305f\u3081\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306f\u3001\u540c\u3058\u30de\u30b7\u30f3\u4e0a\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8907\u6570\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30b3\u30ed\u30b1\u30fc\u30c8(\u540c\u3058\u5834\u6240\u306b\u914d\u7f6e)\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067Kubernetes\u306f\u3001\u540c\u3058\u30ce\u30fc\u30c9\u306e`StatefulSet`\u306bPod\u3092\u30b3\u30ed\u30b1\u30fc\u30c8\u3057\u307e\u3059\u3002 3\u3064\u306e\u30b5\u30fc\u30d0\u30fc\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3044\u305f\u3068\u3057\u3066\u30012\u3064\u306e\u30b5\u30fc\u30d0\u30fc\u304c\u540c\u3058\u30ce\u30fc\u30c9\u306b\u3042\u308a\u3001\u305d\u306e\u30ce\u30fc\u30c9\u304c\u969c\u5bb3\u3092\u8d77\u3053\u3057\u305f\u5834\u5408\u3001ZooKeeper\u30b5\u30fc\u30d3\u30b9\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u3001\u5c11\u306a\u304f\u3068\u3082Pod\u306e1\u3064\u304c\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u308b\u307e\u3067\u969c\u5bb3\u306b\u898b\u821e\u308f\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 \u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u30ce\u30fc\u30c9\u306e\u5931\u6557\u30a4\u30d9\u30f3\u30c8\u3067\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u3001\u8ffd\u52a0\u306e\u30ad\u30e3\u30d1\u30b7\u30c6\u30a3\u3092\u5e38\u306b\u30d7\u30ed\u30d3\u30b8\u30e7\u30f3\u3057\u3066\u304a\u304f\u3079\u304d\u3067\u3059\u3002 \u305d\u3046\u3057\u3066\u304a\u3051\u3070\u3001\u969c\u5bb3\u306f\u5358\u306bKubernetes\u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u30fc\u304cZooKeeper\u306e\u30b5\u30fc\u30d0\u30fc\u306e1\u3064\u3092\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3059\u308b\u307e\u3067\u306e\u8f9b\u62b1\u3067\u3059\u3002 \u305f\u3060\u3057\u3001\u30c0\u30a6\u30f3\u30bf\u30a4\u30e0\u306a\u3057\u3067\u30ce\u30fc\u30c9\u306e\u969c\u5bb3\u3078\u306e\u8010\u6027\u3092\u30b5\u30fc\u30d3\u30b9\u306b\u6301\u305f\u305b\u305f\u3044\u306a\u3089\u3001`podAntiAffinity`\u3092\u30bb\u30c3\u30c8\u3059\u3079\u304d\u3067\u3059\u3002 `zk` `StatefulSet`\u5185\u306ePod\u306e\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell for i in 0 1 2; do kubectl get pod zk-$i --template {{.spec.nodeName}}; echo \"\"; done ``` `zk` `StatefulSet`\u5185\u306e\u5168\u3066\u306ePod\u306f\u3001\u5225\u3005\u306e\u30ce\u30fc\u30c9\u306b\u30c7\u30d7\u30ed\u30a4\u3055\u308c\u307e\u3059\u3002 ``` kubernetes-node-cxpk kubernetes-node-a5aq kubernetes-node-2g2d ``` \u3053\u308c\u306f`zk` `StatefulSet`\u5185\u306ePod\u306b`PodAntiAffinity`\u306e\u6307\u5b9a\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002 ```yaml affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: \"app\" operator: In values: - zk topologyKey: \"kubernetes.io/hostname\" ``` `requiredDuringSchedulingIgnoredDuringExecution`\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3001`topologyKey`\u3067\u5b9a\u7fa9\u3055\u308c\u305f\u30c9\u30e1\u30a4\u30f3\u5185\u3067`app`\u30e9\u30d9\u30eb\u306e\u5024\u304c`zk`\u306e2\u3064\u306ePod\u304c\u7d76\u5bfe\u306b\u30b3\u30ed\u30b1\u30fc\u30c8\u3059\u3079\u304d\u3067\u306a\u3044\u3053\u3068\u3092\u3001Kubernetes Scheduler\u306b\u6307\u793a\u3057\u307e\u3059\u3002 `topologyKey`\u306e`kubernetes.io/hostname`\u306f\u3001\u30c9\u30e1\u30a4\u30f3\u304c\u56fa\u6709\u30ce\u30fc\u30c9\u3067\u3042\u308b\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u7570\u306a\u308b\u30eb\u30fc\u30eb\u3001\u30e9\u30d9\u30eb\u3001\u30bb\u30ec\u30af\u30bf\u30fc\u3092\u4f7f\u3063\u3066\u3001\u7269\u7406\u30fb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30fb\u96fb\u6e90\u3068\u3044\u3063\u305f\u969c\u5bb3\u30c9\u30e1\u30a4\u30f3\u5168\u4f53\u306b\u5e83\u304c\u308b\u30a2\u30f3\u30b5\u30f3\u30d6\u30eb\u306b\u3053\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5e83\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 ## \u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306e\u5b58\u7d9a \u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30ce\u30fc\u30c9\u3092cordon(\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u4e0d\u53ef\u5316)\u304a\u3088\u3073dorain(\u89e3\u653e)\u3057\u307e\u3059\u3002\u3082\u3057\u5171\u6709\u30af\u30e9\u30b9\u30bf\u30fc\u3067\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u8a66\u3057\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u3053\u308c\u304c\u307b\u304b\u306e\u30c6\u30ca\u30f3\u30c8\u306b\u6709\u5bb3\u306a\u5f71\u97ff\u3092\u53ca\u307c\u3055\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u8a08\u753b\u5916\u306e\u30ce\u30fc\u30c9\u969c\u5bb3\u306b\u5099\u3048\u3066\u3069\u306e\u3088\u3046\u306bPod\u3092\u30ce\u30fc\u30c9\u5168\u4f53\u306b\u5e83\u3052\u308b\u304b\u3092\u793a\u3057\u307e\u3057\u305f\u304c\u3001\u8a08\u753b\u3055\u308c\u305f\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306e\u305f\u3081\u5f15\u304d\u8d77\u3053\u3055\u308c\u308b\u4e00\u6642\u7684\u306a\u30ce\u30fc\u30c9\u969c\u5bb3\u306b\u5bfe\u3057\u3066\u8a08\u753b\u3059\u308b\u5fc5\u8981\u3082\u3042\u308a\u307e\u3059\u3002 \u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl get nodes ``` \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u30014\u3064\u306e\u30ce\u30fc\u30c9\u306e\u3042\u308b\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u4eee\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 \u30af\u30e9\u30b9\u30bf\u30fc\u304c4\u3064\u3088\u308a\u3082\u591a\u304f\u3042\u308b\u5834\u5408\u306b\u306f\u30014\u3064\u306e\u30ce\u30fc\u30c9\u4ee5\u5916\u5168\u3066\u3092cordon\u3059\u308b\u305f\u3081\u306b[`kubectl cordon`](/docs/reference/generated/kubectl/kubectl-commands/#cordon)\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002 \u30ce\u30fc\u30c9\u30924\u3064\u306b\u5236\u7d04\u3059\u308b\u3053\u3068\u3067\u3001\u4ee5\u4e0b\u306e\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066zookeeper Pod\u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3057\u305f\u6642\u306b\u3001Kubernetes\u304c\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3\u3068PodDisruptionBudget\u5236\u7d04\u306b\u906d\u9047\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002 ```shell kubectl cordon <\u30ce\u30fc\u30c9\u540d> ``` `zk-pdb`\u306e`PodDisruptionBudget`\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl get pdb zk-pdb ``` `max-unavailable`\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3001`zk` `StatefulSet`\u306e\u6700\u5927\u30671\u3064\u306ePod\u304c\u3044\u3064\u3067\u3082\u5229\u7528\u3067\u304d\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3001Kubernetes\u306b\u6307\u793a\u3057\u307e\u3059\u3002 ``` NAME MIN-AVAILABLE MAX-UNAVAILABLE ALLOWED-DISRUPTIONS AGE zk-pdb N/A 1 1 ``` 1\u3064\u76ee\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u3001`zk` `StatefulSet`\u5185\u306ePod\u3092\u898b\u308b\u306e\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl get pods -w -l app=zk ``` \u6b21\u306b\u5225\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u3001Pod\u304c\u73fe\u5728\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell for i in 0 1 2; do kubectl get pod zk-$i --template {{.spec.nodeName}}; echo \"\"; done ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` kubernetes-node-pb41 kubernetes-node-ixsl kubernetes-node-i4c4 ``` `zk-0` Pod\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30ce\u30fc\u30c9\u3092cordon\u304a\u3088\u3073drain\u3059\u308b\u306b\u306f\u3001[`kubectl drain`](/docs/reference/generated/kubectl/kubectl-commands/#drain)\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl drain $(kubectl get pod zk-0 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` node \"kubernetes-node-pb41\" cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-pb41, kube-proxy-kubernetes-node-pb41; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-o5elz pod \"zk-0\" deleted node \"kubernetes-node-pb41\" drained ``` \u30af\u30e9\u30b9\u30bf\u30fc\u306b4\u3064\u306e\u30ce\u30fc\u30c9\u304c\u3042\u308b\u306e\u3067\u3001`kubectl drain`\u306f\u6210\u529f\u3057\u3001`zk-0`\u304c\u5225\u306e\u30ce\u30fc\u30c9\u306b\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002 ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 1/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 51s zk-0 1/1 Running 0 1m ``` \u6700\u521d\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067`StatefulSet`\u306ePod\u3092\u898b\u5b88\u308a\u3001`zk-1`\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u305f\u30ce\u30fc\u30c9\u3092drain\u3057\u307e\u3059\u3002 ```shell kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` \"kubernetes-node-ixsl\" cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-ixsl, kube-proxy-kubernetes-node-ixsl; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-voc74 pod \"zk-1\" deleted node \"kubernetes-node-ixsl\" drained ``` `zk` `StatefulSet`\u304cPod\u306e\u30b3\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6291\u6b62\u3059\u308b`PodAntiAffinity`\u30eb\u30fc\u30eb\u3092\u542b\u3093\u3067\u3044\u308b\u306e\u3067\u3001`zk-1` Pod\u306f\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u305a\u3001\u307e\u305f\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u53ef\u80fd\u306a\u306e\u306f2\u3064\u306e\u30ce\u30fc\u30c9\u3060\u3051\u306a\u306e\u3067\u3001Pod\u306fPending\u306e\u72b6\u614b\u306e\u307e\u307e\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 ```shell kubectl get pods -w -l app=zk ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 1/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 51s zk-0 1/1 Running 0 1m zk-1 1/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s ``` StatefulSet\u306ePod\u3092\u898b\u7d9a\u3051\u3001`zk-2`\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30ce\u30fc\u30c9\u3092drain\u3057\u307e\u3059\u3002 ```shell kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` node \"kubernetes-node-i4c4\" cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-i4c4, kube-proxy-kubernetes-node-i4c4; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-dyrog WARNING: Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-dyrog; Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-i4c4, kube-proxy-kubernetes-node-i4c4 There are pending pods when an error occurred: Cannot evict pod as it would violate the pod's disruption budget. pod/zk-2 ``` kubectl\u3092\u7d42\u4e86\u3059\u308b\u305f\u3081\u306b`CTRL-C`\u3092\u62bc\u3057\u307e\u3059\u3002 `zk-2`\u3092\u9000\u53bb\u3055\u305b\u308b\u3068`zk-budget`\u9055\u53cd\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u30013\u3064\u76ee\u306e\u30ce\u30fc\u30c9\u306fdrain\u3067\u304d\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u30ce\u30fc\u30c9\u306fcordon\u3055\u308c\u305f\u307e\u307e\u3068\u306a\u308a\u307e\u3059\u3002 \u5065\u5168\u6027\u30c6\u30b9\u30c8\u4e2d\u306b\u5165\u529b\u3057\u305f\u5024\u3092`zk-0`\u304b\u3089\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001`zkCli.sh`\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl exec zk-0 zkCli.sh get /hello ``` `PodDisruptionBudget`\u304c\u9075\u5b88\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30b5\u30fc\u30d3\u30b9\u306f\u307e\u3060\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002 ``` WatchedEvent state:SyncConnected type:None path:null world cZxid = 0x200000002 ctime = Wed Dec 07 00:08:59 UTC 2016 mZxid = 0x200000002 mtime = Wed Dec 07 00:08:59 UTC 2016 pZxid = 0x200000002 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 5 numChildren = 0 ``` \u6700\u521d\u306e\u30ce\u30fc\u30c9\u3092uncordon(\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u53ef\u80fd\u5316)\u3059\u308b\u306b\u306f\u3001[`kubectl uncordon`](/docs/reference/generated/kubectl/kubectl-commands/#uncordon)\u3092\u4f7f\u3044\u307e\u3059\u3002 ```shell kubectl uncordon kubernetes-node-pb41 ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` node \"kubernetes-node-pb41\" uncordoned ``` `zk-1`\u306f\u3053\u306e\u30ce\u30fc\u30c9\u3067\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002`zk-1`\u304cRunning\u304a\u3088\u3073Ready\u306b\u306a\u308b\u307e\u3067\u5f85\u3061\u307e\u3059\u3002 ```shell kubectl get pods -w -l app=zk ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 1/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 51s zk-0 1/1 Running 0 1m zk-1 1/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 12m zk-1 0/1 ContainerCreating 0 12m zk-1 0/1 Running 0 13m zk-1 1/1 Running 0 13m ``` \u8a66\u3057\u306b`zk-2`\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30ce\u30fc\u30c9\u3092drain\u3057\u3066\u307f\u307e\u3059\u3002 ```shell kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` node \"kubernetes-node-i4c4\" already cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-i4c4, kube-proxy-kubernetes-node-i4c4; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-dyrog pod \"heapster-v1.2.0-2604621511-wht1r\" deleted pod \"zk-2\" deleted node \"kubernetes-node-i4c4\" drained ``` \u4eca\u5ea6\u306f`kubectl drain`\u306f\u6210\u529f\u3057\u307e\u3057\u305f\u3002 `zk-2`\u306e\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u30012\u3064\u76ee\u306e\u30ce\u30fc\u30c9\u3092uncordon\u3057\u307e\u3059\u3002 ```shell kubectl uncordon kubernetes-node-ixsl ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` node \"kubernetes-node-ixsl\" uncordoned ``` \u30b5\u30fc\u30d3\u30b9\u304c\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4e2d\u3082\u5229\u7528\u53ef\u80fd\u306a\u307e\u307e\u3067\u3042\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306b\u3001`PodDisruptionBudgets`\u3068\u3042\u308f\u305b\u3066`kubectl drain`\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002 \u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3067\u30ce\u30fc\u30c9\u304c\u30aa\u30d5\u30e9\u30a4\u30f3\u306b\u306a\u308b\u524d\u306b\u30ce\u30fc\u30c9\u3092cordon\u3057\u3066\u3001Pod\u3092\u9000\u53bb\u3055\u305b\u308b\u306e\u306bdrain\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u5834\u5408\u3001Disruption Budget(\u505c\u6b62\u72b6\u614b\u306e\u4e88\u7b97)\u3092\u8868\u3059\u30b5\u30fc\u30d3\u30b9\u306f\u9075\u5b88\u3059\u3079\u304d\u30d0\u30b8\u30a7\u30c3\u30c8\u3092\u6301\u3061\u307e\u3059\u3002 \u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3001Pod\u3092\u3059\u3050\u306b\u518d\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u3001\u8ffd\u52a0\u306e\u30ad\u30e3\u30d1\u30c6\u30a3\u3092\u5e38\u306b\u5272\u308a\u5f53\u3066\u3066\u304a\u304f\u3079\u304d\u3067\u3059\u3002 ## {{% heading \"cleanup\" %}} - \u30af\u30e9\u30b9\u30bf\u30fc\u306e\u5168\u3066\u306e\u30ce\u30fc\u30c9\u3092uncordon\u3059\u308b\u305f\u3081\u306b\u3001`kubectl uncordon`\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002 - \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u4f7f\u3063\u305fPersistentVolume\u306e\u6c38\u7d9a\u7684\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\u30e1\u30c7\u30a3\u30a2\u3092\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5168\u3066\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u56de\u53ce\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u5b9f\u3068\u3059\u308b\u305f\u3081\u306b\u3001\u304a\u4f7f\u3044\u306e\u74b0\u5883\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u8a2d\u5b9a\u3001\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u65b9\u6cd5\u306b\u57fa\u3044\u3066\u5fc5\u8981\u306a\u624b\u9806\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002 ", "positive_passages": [{"docid": "doc-en-website-3ae5ff8428957b2dba899cae924b0518a9b8537a974a667466639f6f7f6adf56", "text": "This is a Feature Request kubeadm\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u3068\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9{{< glossary_tooltip text=\"\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\" term_id=\"node\" >}}\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u4e21\u65b9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002 kubeadm\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u3068{{< glossary_tooltip text=\"\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\" term_id=\"node\" >}}\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u4e21\u65b9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002 ", "positive_passages": [{"docid": "doc-en-website-0cdd74d1da643fec92f00dece20d870dbec66e699c2c3cf1cd341276385f0ea6", "text": "This is a Bug Report In Kubernetes, you can _scale_ a workload depending on the current demand of resources. This allows your cluster to react to changes in resource demand more elastically and efficiently. When you scale a workload, you can either increase or decrease the number of replicas managed by the workload, or adjust the resources available to the replicas in-place. The first approach is referred to as _horizontal scaling_, while the second is referred to as _vertical scaling_. There are manual and automatic ways to scale your workloads, depending on your use case. ## Scaling workloads manually Kubernetes supports _manual scaling_ of workloads. Horizontal scaling can be done using the `kubectl` CLI. For vertical scaling, you need to _patch_ the resource definition of your workload. See below for examples of both strategies. - **Horizontal scaling**: [Running multiple instances of your app](/docs/tutorials/kubernetes-basics/scale/scale-intro/) - **Vertical scaling**: [Resizing CPU and memory resources assigned to containers](/docs/tasks/configure-pod-container/resize-container-resources) ## Scaling workloads automatically Kubernetes also supports _automatic scaling_ of workloads, which is the focus of this page. The concept of _Autoscaling_ in Kubernetes refers to the ability to automatically update an object that manages a set of Pods (for example a {{< glossary_tooltip text=\"Deployment\" term_id=\"deployment\" >}}. ### Scaling workloads horizontally In Kubernetes, you can automatically scale a workload horizontally using a _HorizontalPodAutoscaler_ (HPA). It is implemented as a Kubernetes API resource and a {{< glossary_tooltip text=\"controller\" term_id=\"controller\" >}} and periodically adjusts the number of {{< glossary_tooltip text=\"replicas\" term_id=\"replica\" >}} in a workload to match observed resource utilization such as CPU or memory usage. There is a [walkthrough tutorial](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough) of configuring a HorizontalPodAutoscaler for a Deployment. ### Scaling workloads vertically {{< feature-state for_k8s_version=\"v1.25\" state=\"stable\" >}} You can automatically scale a workload vertically using a _VerticalPodAutoscaler_ (VPA). Different to the HPA, the VPA doesn't come with Kubernetes by default, but is a separate project that can be found [on GitHub](https://github.com/kubernetes/autoscaler/tree/9f87b78df0f1d6e142234bb32e8acbd71295585a/vertical-pod-autoscaler). Once installed, it allows you to create {{< glossary_tooltip text=\"CustomResourceDefinitions\" term_id=\"customresourcedefinition\" >}} (CRDs) for your workloads which define _how_ and _when_ to scale the resources of the managed replicas. {{< note >}} You will need to have the [Metrics Server](https://github.com/kubernetes-sigs/metrics-server) installed to your cluster for the HPA to work. {{< /note >}} At the moment, the VPA can operate in four different modes: {{< table caption=\"Different modes of the VPA\" >}} Mode | Description :----|:----------- `Auto` | Currently `Recreate`, might change to in-place updates in the future `Recreate` | The VPA assigns resource requests on pod creation as well as updates them on existing pods by evicting them when the requested resources differ significantly from the new recommendation `Initial` | The VPA only assigns resource requests on pod creation and never changes them later. `Off` | The VPA does not automatically change the resource requirements of the pods. The recommendations are calculated and can be inspected in the VPA object. {{< /table >}} #### Requirements for in-place resizing {{< feature-state for_k8s_version=\"v1.27\" state=\"alpha\" >}} Resizing a workload in-place **without** restarting the {{< glossary_tooltip text=\"Pods\" term_id=\"pod\" >}} or its {{< glossary_tooltip text=\"Containers\" term_id=\"container\" >}} requires Kubernetes version 1.27 or later.
Additionally, the `InPlaceVerticalScaling` feature gate needs to be enabled. {{< feature-gate-description name=\"InPlacePodVerticalScaling\" >}} ### Autoscaling based on cluster size For workloads that need to be scaled based on the size of the cluster (for example `cluster-dns` or other system components), you can use the _Cluster Proportional Autoscaler_.
Just like the VPA, it is not part of the Kubernetes core, but hosted in its own repository [on GitHub](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler). The Cluster Proportional Autoscaler watches the number of schedulable {{< glossary_tooltip text=\"nodes\" term_id=\"node\" >}} and cores and scales the number of replicas of the target workload accordingly. ### Event driven Autoscaling It is also possible to scale workloads based on events, for example using the [_Kubernetes Event Driven Autoscaler_ (**KEDA**)](https://keda.sh/). KEDA is a CNCF graduated enabling you to scale your workloads based on the number of events to be processed, for example the amount of messages in a queue. There exists a wide range of adapters for different event sources to choose from. ### Autoscaling based on schedules Another strategy for scaling your workloads is to **schedule** the scaling operations, for example in order to reduce resource consumption during off-peak hours. Similar to event driven autoscaling, such behavior can be achieved using KEDA in conjunction with its [`Cron` scaler](https://keda.sh/docs/2.13/scalers/cron/). The `Cron` scaler allows you to define schedules (and time zones) for scaling your workloads in or out. ## Scaling cluster infrastructure If scaling workloads isn't enough to meet your needs, you can also scale your cluster infrastructure itself. Scaling the cluster infrastructure normally means adding or removing {{< glossary_tooltip text=\"nodes\" term_id=\"node\" >}}. This can be done using one of two available autoscalers: - [**Cluster Autoscaler**](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) - [**Karpenter**](https://github.com/kubernetes-sigs/karpenter?tab=readme-ov-file) Both scalers work by watching for pods marked as _unschedulable_ or _underutilized_ nodes and then adding or removing nodes as needed. ## {{% heading \"whatsnext\" %}} - Learn more about scaling horizontally - [Scale a StatefulSet](/docs/tasks/run-application/scale-stateful-set/) - [HorizontalPodAutoscaler Walkthrough](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) - [Resize Container Resources In-Place](/docs/tasks/configure-pod-container/resize-container-resources/) - [Autoscale the DNS Service in a Cluster](/docs/tasks/administer-cluster/dns-horizontal-autoscaling/) ", "positive_passages": [{"docid": "doc-en-website-fc28ab35d6ebecf83598905ffd8d07dd4c45c598bb125d0b98fdcedde608a862", "text": "This is a Feature Request In Kubernetes, you can _scale_ a workload depending on the current demand of resources. This allows your cluster to react to changes in resource demand more elastically and efficiently. When you scale a workload, you can either increase or decrease the number of replicas managed by the workload, or adjust the resources available to the replicas in-place. The first approach is referred to as _horizontal scaling_, while the second is referred to as _vertical scaling_. There are manual and automatic ways to scale your workloads, depending on your use case. ## Scaling workloads manually Kubernetes supports _manual scaling_ of workloads. Horizontal scaling can be done using the `kubectl` CLI. For vertical scaling, you need to _patch_ the resource definition of your workload. See below for examples of both strategies. - **Horizontal scaling**: [Running multiple instances of your app](/docs/tutorials/kubernetes-basics/scale/scale-intro/) - **Vertical scaling**: [Resizing CPU and memory resources assigned to containers](/docs/tasks/configure-pod-container/resize-container-resources) ## Scaling workloads automatically Kubernetes also supports _automatic scaling_ of workloads, which is the focus of this page. The concept of _Autoscaling_ in Kubernetes refers to the ability to automatically update an object that manages a set of Pods (for example a {{< glossary_tooltip text=\"Deployment\" term_id=\"deployment\" >}}. ### Scaling workloads horizontally In Kubernetes, you can automatically scale a workload horizontally using a _HorizontalPodAutoscaler_ (HPA). It is implemented as a Kubernetes API resource and a {{< glossary_tooltip text=\"controller\" term_id=\"controller\" >}} and periodically adjusts the number of {{< glossary_tooltip text=\"replicas\" term_id=\"replica\" >}} in a workload to match observed resource utilization such as CPU or memory usage. There is a [walkthrough tutorial](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough) of configuring a HorizontalPodAutoscaler for a Deployment. ### Scaling workloads vertically {{< feature-state for_k8s_version=\"v1.25\" state=\"stable\" >}} You can automatically scale a workload vertically using a _VerticalPodAutoscaler_ (VPA). Different to the HPA, the VPA doesn't come with Kubernetes by default, but is a separate project that can be found [on GitHub](https://github.com/kubernetes/autoscaler/tree/9f87b78df0f1d6e142234bb32e8acbd71295585a/vertical-pod-autoscaler). Once installed, it allows you to create {{< glossary_tooltip text=\"CustomResourceDefinitions\" term_id=\"customresourcedefinition\" >}} (CRDs) for your workloads which define _how_ and _when_ to scale the resources of the managed replicas. {{< note >}} You will need to have the [Metrics Server](https://github.com/kubernetes-sigs/metrics-server) installed to your cluster for the HPA to work. {{< /note >}} At the moment, the VPA can operate in four different modes: {{< table caption=\"Different modes of the VPA\" >}} Mode | Description :----|:----------- `Auto` | Currently `Recreate`, might change to in-place updates in the future `Recreate` | The VPA assigns resource requests on pod creation as well as updates them on existing pods by evicting them when the requested resources differ significantly from the new recommendation `Initial` | The VPA only assigns resource requests on pod creation and never changes them later. `Off` | The VPA does not automatically change the resource requirements of the pods. The recommendations are calculated and can be inspected in the VPA object. {{< /table >}} #### Requirements for in-place resizing {{< feature-state for_k8s_version=\"v1.27\" state=\"alpha\" >}} Resizing a workload in-place **without** restarting the {{< glossary_tooltip text=\"Pods\" term_id=\"pod\" >}} or its {{< glossary_tooltip text=\"Containers\" term_id=\"container\" >}} requires Kubernetes version 1.27 or later.
Additionally, the `InPlaceVerticalScaling` feature gate needs to be enabled. {{< feature-gate-description name=\"InPlacePodVerticalScaling\" >}} ### Autoscaling based on cluster size For workloads that need to be scaled based on the size of the cluster (for example `cluster-dns` or other system components), you can use the _Cluster Proportional Autoscaler_.
Just like the VPA, it is not part of the Kubernetes core, but hosted in its own repository [on GitHub](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler). The Cluster Proportional Autoscaler watches the number of schedulable {{< glossary_tooltip text=\"nodes\" term_id=\"node\" >}} and cores and scales the number of replicas of the target workload accordingly. ### Event driven Autoscaling It is also possible to scale workloads based on events, for example using the [_Kubernetes Event Driven Autoscaler_ (**KEDA**)](https://keda.sh/). KEDA is a CNCF graduated enabling you to scale your workloads based on the number of events to be processed, for example the amount of messages in a queue. There exists a wide range of adapters for different event sources to choose from. ### Autoscaling based on schedules Another strategy for scaling your workloads is to **schedule** the scaling operations, for example in order to reduce resource consumption during off-peak hours. Similar to event driven autoscaling, such behavior can be achieved using KEDA in conjunction with its [`Cron` scaler](https://keda.sh/docs/2.13/scalers/cron/). The `Cron` scaler allows you to define schedules (and time zones) for scaling your workloads in or out. ## Scaling cluster infrastructure If scaling workloads isn't enough to meet your needs, you can also scale your cluster infrastructure itself. Scaling the cluster infrastructure normally means adding or removing {{< glossary_tooltip text=\"nodes\" term_id=\"node\" >}}. This can be done using one of two available autoscalers: - [**Cluster Autoscaler**](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) - [**Karpenter**](https://github.com/kubernetes-sigs/karpenter?tab=readme-ov-file) Both scalers work by watching for pods marked as _unschedulable_ or _underutilized_ nodes and then adding or removing nodes as needed. ## {{% heading \"whatsnext\" %}} - Learn more about scaling horizontally - [Scale a StatefulSet](/docs/tasks/run-application/scale-stateful-set/) - [HorizontalPodAutoscaler Walkthrough](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) - [Resize Container Resources In-Place](/docs/tasks/configure-pod-container/resize-container-resources/) - [Autoscale the DNS Service in a Cluster](/docs/tasks/administer-cluster/dns-horizontal-autoscaling/) ", "positive_passages": [{"docid": "doc-en-website-4f1a166042420cb2769dc0a78753b905a19b983c6e03c569c363146a9b2cbb34", "text": "In 1 PR I will be creating 2 topics like (HorizontalPodAutoscaler, VerticalPodAutoscaler) and will it be sufficient, because It will be taking 2-3 PR's!\nFor advice on how to contribute to the Kubernetes docs, please ask in #sig-docs on the Kubernetes Slack workspace. If you're not already a member of that workspace, you can visit for an invitation. Anyone is welcome to work on this issue. it's slightly unhelpful to assign an issue to yourself and also to ask questions about how to work on it; ideally, people only assign an issue once they are confident that they know how to resolve it.\nOur no cookie-licking policy means that anyone is welcome to open a PR that closes an open issue. It's still friendly to reach out to people who might already be working on the same thing. See for an explanation of the jargon.\nThanks I was just asking it. I can fix this issue!\nHey This has been pending for more than a month. So, May I go ahead and create a PR? I have a basic markdown structure for file is ready and I can add more details as needed after raising a PR.\nPRs are welcome, and because this project is open source, nobody needs permission.\nIn light of our policy on cookie licking: /unassign I think we'll make progress better without any assignee. If anyone wants to share that they have started work, feel free to open a draft pull request that mentions this issue.", "commid": "website_issue_44084", "tokennum": 327}], "negative_passages": []} {"query_id": "q-en-website-c956b156c05d16947fdf0808d5d7721dd83a2f8726a2ae944620df0a20d9a9b7", "query": "The list of phases can be obtained with the kubeadm init --help command. The flag "--skip-phases" takes precedence over this field.

-->

skipPhases \u662f\u547d\u4ee4\u6267\u884c\u8fc7\u7a0b\u4e2d\u836f\u7565\u8fc7\u7684\u9636\u6bb5\uff08Phases\uff09\u3002

skipPhases \u662f\u547d\u4ee4\u6267\u884c\u8fc7\u7a0b\u4e2d\u8981\u7565\u8fc7\u7684\u9636\u6bb5\uff08Phases\uff09\u3002 \u901a\u8fc7\u6267\u884c\u547d\u4ee4 kubeadm init --help \u53ef\u4ee5\u83b7\u5f97\u9636\u6bb5\u7684\u5217\u8868\u3002 \u53c2\u6570\u6807\u5fd7 "--skip-phases" \u4f18\u5148\u4e8e\u6b64\u5b57\u6bb5\u7684\u8bbe\u7f6e\u3002

", "positive_passages": [{"docid": "doc-en-website-9583575baa64d7bb27f123cbda234fb67e547bac6a663ec8f22cc69ff2e7b7af", "text": "skipPhases Phases skipPhases Phases\n/triage accepted /kind bug PRs welcomed.\n/language zh\n/assign", "commid": "website_issue_43796", "tokennum": 25}], "negative_passages": []} {"query_id": "q-en-website-ca50688297b52ef07865828c9a438e894f7aae3d2396fe518acaafdff55aebc8", "query": " --- # reviewers: # - enisoc # - erictune # - foxish # - janetkuo # - kow3ns # - smarterclayton title: \ubcf5\uc81c \uc2a4\ud14c\uc774\ud2b8\ud480 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uc2e4\ud589\ud558\uae30 content_type: tutorial weight: 30 --- \uc774 \ud398\uc774\uc9c0\uc5d0\uc11c\ub294 {{< glossary_tooltip term_id=\"statefulset\" >}} \uc73c\ub85c \ubcf5\uc81c \uc2a4\ud14c\uc774\ud2b8\ud480 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc2e4\ud589\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc18c\uac1c\ud55c\ub2e4. \uc774 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc740 \ubcf5\uc81c MySQL \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc774\ub2e4. \uc774 \uc608\uc81c\uc758 \ud1a0\ud3f4\ub85c\uc9c0\ub294 \ub2e8\uc77c \uc8fc \uc11c\ubc84\uc640 \uc5ec\ub7ec \ubcf5\uc81c \uc11c\ubc84\ub85c \uc774\ub8e8\uc5b4\uc838\uc788\uc73c\uba70, row-based \ube44\ub3d9\uae30 \ubcf5\uc81c \ubc29\uc2dd\uc744 \uc0ac\uc6a9\ud55c\ub2e4. {{< note >}} **\ud574\ub2f9 \uc124\uc815\uc740 \ud504\ub85c\ub355\uc158 \uc124\uc815\uc774 \uc544\ub2c8\ub2e4**. \ucfe0\ubc84\ub124\ud2f0\uc2a4\uc5d0\uc11c \uc2a4\ud14c\uc774\ud2b8\ud480\ud55c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc2e4\ud589\ud558\uae30 \uc704\ud55c \uc77c\ubc18\uc801\uc778 \ud328\ud134\uc5d0 \uc9d1\uc911\ud558\uae30 \uc704\ud574 MySQL \uc138\ud305\uc774 \uc548\uc804\ud558\uc9c0 \uc54a\uc740 \uae30\ubcf8 \uc124\uc815\uc73c\ub85c \ub418\uc5b4 \uc788\ub2e4. {{< /note >}} ## {{% heading \"prerequisites\" %}} * {{< include \"task-tutorial-prereqs.md\" >}} {{< version-check >}} * {{< include \"default-storage-class-prereqs.md\" >}} * \uc774 \ud29c\ud1a0\ub9ac\uc5bc\uc740 [\ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968](/ko/docs/concepts/storage/persistent-volumes/) \uadf8\ub9ac\uace0 [\uc2a4\ud14c\uc774\ud2b8\ud480\uc14b](/ko/docs/concepts/workloads/controllers/statefulset/), [\ud30c\ub4dc](/ko/docs/concepts/workloads/pods/), [\uc11c\ube44\uc2a4](/ko/docs/concepts/services-networking/service/), [\ucee8\ud53c\uadf8\ub9f5(ConfigMap)](/docs/tasks/configure-pod-container/configure-pod-configmap/)\uc640 \uac19\uc740 \ud575\uc2ec \uac1c\ub150\ub4e4\uc5d0 \ub300\ud574 \uc54c\uace0 \uc788\ub2e4\uace0 \uac00\uc815\ud55c\ub2e4. * MySQL\uc5d0 \ub300\ud55c \uc9c0\uc2dd\uc774 \uc788\uc73c\uba74 \ub3c4\uc6c0\uc774 \ub418\uc9c0\ub9cc, \uc774 \ud29c\ud1a0\ub9ac\uc5bc\uc740 \ub2e4\ub978 \uc2dc\uc2a4\ud15c\uc744 \ud65c\uc6a9\ud558\uc600\uc744 \ub54c\ub3c4 \ub3c4\uc6c0\uc774 \ub418\ub294 \uc77c\ubc18\uc801\uc778 \ud328\ud134\uc744 \ub2e4\ub8e8\ub294\ub370 \uc911\uc810\uc744 \ub454\ub2e4. * default \ub124\uc784\uc2a4\ud398\uc774\uc2a4\ub97c \uc0ac\uc6a9\ud558\uac70\ub098, \ub2e4\ub978 \uc624\ube0c\uc81d\ud2b8\ub4e4\uacfc \ucda9\ub3cc\uc774 \ub098\uc9c0 \uc54a\ub294 \ub2e4\ub978 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\ub97c \uc0ac\uc6a9\ud55c\ub2e4. ## {{% heading \"objectives\" %}} * \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc744 \uc774\uc6a9\ud55c \ubcf5\uc81c MySQL \ud1a0\ud3f4\ub85c\uc9c0\ub97c \ubc30\ud3ec\ud55c\ub2e4. * MySQL \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0\uac8c \ud2b8\ub798\ud53d\uc744 \ubcf4\ub0b8\ub2e4. * \ub2e4\uc6b4\ud0c0\uc784\uc5d0 \ub300\ud55c \uc800\ud56d\ub825\uc744 \uad00\ucc30\ud55c\ub2e4. * \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc744 \ud655\uc7a5/\ucd95\uc18c\ud55c\ub2e4. ## MySQL \ubc30\ud3ec\ud558\uae30 MySQL \ub514\ud50c\ub85c\uc774\uba3c\ud2b8 \uc608\uc2dc\ub294 \ucee8\ud53c\uadf8\ub9f5\uacfc, 2\uac1c\uc758 \uc11c\ube44\uc2a4, \uadf8\ub9ac\uace0 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc73c\ub85c \uad6c\uc131\ub418\uc5b4 \uc788\ub2e4. ### \ucee8\ud53c\uadf8\ub9f5 \uc0dd\uc131\ud558\uae30 {#configmap} \ub2e4\uc74c YAML \uc124\uc815 \ud30c\uc77c\ub85c\ubd80\ud130 \ucee8\ud53c\uadf8\ub9f5\uc744 \uc0dd\uc131\ud55c\ub2e4. {{< codenew file=\"application/mysql/mysql-configmap.yaml\" >}} ```shell kubectl apply -f https://k8s.io/examples/application/mysql/mysql-configmap.yaml ``` \uc774 \ucee8\ud53c\uadf8\ub9f5\uc740 \ub2f9\uc2e0\uc774 \ub3c5\ub9bd\uc801\uc73c\ub85c \uc8fc MySQL \uc11c\ubc84\uc640 \ub808\ud50c\ub9ac\uce74\ub4e4\uc758 \uc124\uc815\uc744 \ucee8\ud2b8\ub864\ud560 \uc218 \uc788\ub3c4\ub85d `my.cnf` \uc744 \uc624\ubc84\ub77c\uc774\ub4dc\ud55c\ub2e4. \uc774 \uacbd\uc6b0\uc5d0\ub294, \uc8fc \uc11c\ubc84\ub294 \ubcf5\uc81c \ub85c\uadf8\ub97c \ub808\ud50c\ub9ac\uce74\ub4e4\uc5d0\uac8c \uc81c\uacf5\ud558\uace0 \ub808\ud50c\ub9ac\uce74\ub4e4\uc740 \ubcf5\uc81c\ub97c \ud1b5\ud55c \uc4f0\uae30\uac00 \uc544\ub2cc \ub2e4\ub978 \uc4f0\uae30\ub4e4\uc740 \uac70\ubd80\ud558\ub3c4\ub85d \ud560 \uac83\uc774\ub2e4. \ucee8\ud53c\uadf8\ub9f5 \uc790\uccb4\uac00 \ub2e4\ub978 \ud30c\ub4dc\ub4e4\uc5d0 \uc11c\ub85c \ub2e4\ub978 \uc124\uc815 \uc601\uc5ed\uc774 \uc801\uc6a9\ub418\ub3c4\ub85d \ud558\ub294 \uac83\uc774 \uc544\ub2c8\ub2e4. \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \ucee8\ud2b8\ub864\ub7ec\uac00 \uc81c\uacf5\ud574\uc8fc\ub294 \uc815\ubcf4\uc5d0 \ub530\ub77c\uc11c, \uac01 \ud30c\ub4dc\ub4e4\uc740 \ucd08\uae30\ud654\ub418\uba74\uc11c \uc124\uc815 \uc601\uc5ed\uc744 \ucc38\uc870\ud560\uc9c0 \uacb0\uc815\ud55c\ub2e4. ### \uc11c\ube44\uc2a4 \uc0dd\uc131\ud558\uae30 {#services} \ub2e4\uc74c YAML \uc124\uc815 \ud30c\uc77c\ub85c\ubd80\ud130 \uc11c\ube44\uc2a4\ub97c \uc0dd\uc131\ud55c\ub2e4. {{< codenew file=\"application/mysql/mysql-services.yaml\" >}} ```shell kubectl apply -f https://k8s.io/examples/application/mysql/mysql-services.yaml ``` \ud5e4\ub4dc\ub9ac\uc2a4 \uc11c\ube44\uc2a4\ub294 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b {{< glossary_tooltip text=\"\ucee8\ud2b8\ub864\ub7ec\" term_id=\"controller\" >}}\uac00 \uc9d1\ud569\uc758 \uc77c\ubd80\ubd84\uc778 \ud30c\ub4dc\ub4e4\uc744 \uc704\ud574 \uc0dd\uc131\ud55c DNS \uc5d4\ud2b8\ub9ac\ub4e4(entries)\uc758 \uc704\ud55c \uac70\uc810\uc774 \ub41c\ub2e4. \ud5e4\ub4dc\ub9ac\uc2a4 \uc11c\ube44\uc2a4\uc758 \uc774\ub984\uc774 `mysql`\uc774\ubbc0\ub85c, \ud30c\ub4dc\ub4e4\uc740 \uac19\uc740 \ucfe0\ubc84\ub124\ud2f0\uc2a4 \ud074\ub7ec\uc2a4\ud130\ub098 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uc5d0 \uc874\uc7ac\ud558\ub294 \ub2e4\ub978 \ud30c\ub4dc\ub4e4\uc5d0\uac8c `.mysql`\ub77c\ub294 \uc774\ub984\uc73c\ub85c \uc811\uadfc\ub420 \uc218 \uc788\ub2e4. `mysql-read`\ub77c\uace0 \ubd88\ub9ac\uc6b0\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8 \uc11c\ube44\uc2a4\ub294 \uace0\uc720\uc758 \ud074\ub7ec\uc2a4\ud130 IP\ub97c \uac00\uc9c0\uba70, Ready \uc0c1\ud0dc\uc778 \ubaa8\ub4e0 MySQL \ud30c\ub4dc\ub4e4\uc5d0\uac8c \ucee4\ub125\uc158\uc744 \ubd84\ubc30\ud558\ub294 \uc77c\ubc18\uc801\uc778 \uc11c\ube44\uc2a4\uc774\ub2e4. \uc7a0\uc7ac\uc801\uc778 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub4e4\uc758 \uc9d1\ud569\uc740 \uc8fc MySQL \uc11c\ubc84\uc640 \ud574\ub2f9 \ub808\ud50c\ub9ac\uce74\ub4e4\uc744 \ud3ec\ud568\ud55c\ub2e4. \uc624\uc9c1 \uc77d\uae30 \ucffc\ub9ac\ub4e4\ub9cc \ub85c\ub4dc-\ubc38\ub7f0\uc2f1\ub41c \ud074\ub77c\uc774\uc5b8\ud2b8 \uc11c\ube44\uc2a4\ub97c \uc774\uc6a9\ud560 \uc218 \uc788\ub2e4\ub294 \uc0ac\uc2e4\uc5d0 \uc8fc\ubaa9\ud558\uc790. \ud558\ub098\uc758 \uc8fc MySQL \uc11c\ubc84\ub9cc\uc774 \uc874\uc7ac\ud558\uae30 \ub584\ubb38\uc5d0, \ud074\ub77c\uc774\uc5b8\ud2b8\ub4e4\uc740 \uc4f0\uae30 \uc791\uc5c5\uc744 \uc2e4\ud589\ud558\uae30 \uc704\ud574\uc11c \uc8fc MySQL \ud30c\ub4dc\uc5d0 (\ud5e4\ub4dc\ub9ac\uc2a4 \uc11c\ube44\uc2a4 \uc548\uc5d0 \uc874\uc7ac\ud558\ub294 DNS \uc5d4\ud2b8\ub9ac\ub97c \ud1b5\ud574) \uc9c1\uc811 \uc811\uadfc\ud574\uc57c \ud55c\ub2e4. ### \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \uc0dd\uc131\ud558\uae30 {#statefulset} \ub9c8\uc9c0\ub9c9\uc73c\ub85c, \ub2e4\uc74c YAML \uc124\uc815 \ud30c\uc77c\ub85c\ubd80\ud130 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc744 \uc0dd\uc131\ud55c\ub2e4. {{< codenew file=\"application/mysql/mysql-statefulset.yaml\" >}} ```shell kubectl apply -f https://k8s.io/examples/application/mysql/mysql-statefulset.yaml ``` \ub2e4\uc74c\uc744 \uc2e4\ud589\ud558\uc5ec, \ucd08\uae30\ud654\ub418\ub294 \ud504\ub85c\uc138\uc2a4\ub4e4\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4. ```shell kubectl get pods -l app=mysql --watch ``` \uc7a0\uc2dc \ub4a4\uc5d0, 3\uac1c\uc758 \ud30c\ub4dc\ub4e4\uc774 `Running` \uc0c1\ud0dc\uac00 \ub418\ub294 \uac83\uc744 \ubcfc \uc218 \uc788\ub2e4. ``` NAME READY STATUS RESTARTS AGE mysql-0 2/2 Running 0 2m mysql-1 2/2 Running 0 1m mysql-2 2/2 Running 0 1m ``` **Ctrl+C**\ub97c \uc785\ub825\ud558\uc5ec watch\ub97c \uc885\ub8cc\ud558\uc790. {{< note >}} \ub9cc\uc57d \uc544\ubb34 \uc9c4\ud589 \uc0c1\ud669\ub3c4 \ubcf4\uc774\uc9c0 \uc54a\ub294\ub2e4\uba74, [\uc2dc\uc791\ud558\uae30 \uc804\uc5d0](#before-you-begin) \uc5d0 \uc5b8\uae09\ub41c \ub3d9\uc801 \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968 \ud504\ub85c\ube44\uc800\ub108(provisioner)\uac00 \ud65c\uc131\ud654\ub418\uc5b4 \uc788\ub294\uc9c0 \ud655\uc778\ud55c\ub2e4. {{< /note >}} \ud574\ub2f9 \uba54\ub2c8\ud398\uc2a4\ud2b8\uc5d0\ub294 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc758 \uc77c\ubd80\ubd84\uc778 \uc2a4\ud14c\uc774\ud2b8\ud480 \ud30c\ub4dc\ub4e4\uc744 \uad00\ub9ac\ud558\uae30 \uc704\ud55c \ub2e4\uc591\ud55c \uae30\ubc95\ub4e4\uc774 \uc801\uc6a9\ub418\uc5b4 \uc788\ub2e4. \ub2e4\uc74c \uc139\uc158\uc5d0\uc11c\ub294 \uc2a4\ud14c\ud2b8\ud480\uc14b\uc774 \ud30c\ub4dc\ub4e4\uc744 \uc0dd\uc131\ud560 \ub54c \uc77c\uc5b4\ub098\ub294 \uc77c\ub4e4\uc744 \uc774\ud574\ud560 \uc218 \uc788\ub3c4\ub85d \uc77c\ubd80 \uae30\ubc95\ub4e4\uc744 \uac15\uc870\ud558\uc5ec \uc124\uba85\ud55c\ub2e4. ## \uc2a4\ud14c\uc774\ud2b8\ud480 \ud30c\ub4dc \ucd08\uae30\ud654 \uc774\ud574\ud558\uae30 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \ucee8\ud2b8\ub864\ub7ec\ub294 \ud30c\ub4dc\ub4e4\uc758 \uc778\ub371\uc2a4\uc5d0 \ub530\ub77c \uc21c\ucc28\uc801\uc73c\ub85c \uc2dc\uc791\uc2dc\ud0a8\ub2e4. \ucee8\ud2b8\ub864\ub7ec\ub294 \ub2e4\uc74c \ud30c\ub4dc \uc0dd\uc131 \uc774\uc804\uc5d0 \uac01 \ud30c\ub4dc\uac00 Ready \uc0c1\ud0dc\uac00 \ub418\uc5c8\ub2e4\uace0 \uc54c\ub824\uc904 \ub54c\uae4c\uc9c0 \uae30\ub2e4\ub9b0\ub2e4. \ucd94\uac00\uc801\uc73c\ub85c, \ucee8\ud2b8\ub864\ub7ec\ub294 \uac01 \ud30c\ub4dc\ub4e4\uc5d0\uac8c `<\uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \uc774\ub984>-<\uc21c\ucc28\uc801 \uc778\ub371\uc2a4>` \ud615\ud0dc\uc758 \uace0\uc720\ud558\uace0 \uc548\uc815\uc801\uc778 \uc774\ub984\uc744 \ubd80\uc5ec\ud558\ub294\ub370, \uacb0\uacfc\uc801\uc73c\ub85c \ud30c\ub4dc\ub4e4\uc740 `mysql-0`, `mysql-1`, \uadf8\ub9ac\uace0 `mysql-2` \ub77c\ub294 \uc774\ub984\uc744 \uac00\uc9c0\uac8c \ub41c\ub2e4. \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \ub9e4\ub2c8\ud398\uc2a4\ud2b8\uc758 \ud30c\ub4dc \ud15c\ud50c\ub9bf\uc740 \ud574\ub2f9 \uc18d\uc131\ub4e4\uc744 \ud1b5\ud574 \uc21c\ucc28\uc801\uc778 MySQL \ubcf5\uc81c\uc758 \uc2dc\uc791\uc744 \uc218\ud589\ud55c\ub2e4. ### \uc124\uc815 \uc0dd\uc131\ud558\uae30 \ud30c\ub4dc \uc2a4\ud399\uc758 \ucee8\ud14c\uc774\ub108\ub97c \uc2dc\uc791\ud558\uae30 \uc804\uc5d0, \ud30c\ub4dc\ub294 \uc21c\uc11c\uac00 \uc815\uc758\ub418\uc5b4 \uc788\ub294 [\ucd08\uae30\ud654 \ucee8\ud14c\uc774\ub108](/ko/docs/concepts/workloads/pods/init-containers/)\ub4e4\uc744 \uba3c\uc800 \uc2e4\ud589\uc2dc\ud0a8\ub2e4. `init-mysql`\ub77c\ub294 \uc774\ub984\uc758 \uccab \ubc88\uc9f8 \ucd08\uae30\ud654 \ucee8\ud14c\uc774\ub108\ub294, \uc778\ub371\uc2a4\uc5d0 \ub530\ub77c \ud2b9\ubcc4\ud55c MySQL \uc124\uc815 \ud30c\uc77c\uc744 \uc0dd\uc131\ud55c\ub2e4. \uc2a4\ud06c\ub9bd\ud2b8\ub294 \uc778\ub371\uc2a4\ub97c `hostname` \uba85\ub839\uc73c\ub85c \ubc18\ud658\ub418\ub294 \ud30c\ub4dc \uc774\ub984\uc758 \ub9c8\uc9c0\ub9c9 \ubd80\ubd84\uc5d0\uc11c \ucd94\ucd9c\ud558\uc5ec \uacb0\uc815\ud55c\ub2e4. \uadf8\ub9ac\uace0 \uc778\ub371\uc2a4(\uc774\ubbf8 \uc0ac\uc6a9\ub41c \uac12\ub4e4\uc744 \ud53c\ud558\uae30 \uc704\ud55c \uc624\ud504\uc14b \uc22b\uc790\uc640 \ud568\uaed8)\ub97c MySQL\uc758 `conf.d` \ub514\ub809\ud1a0\ub9ac\uc758 `server-id.cnf` \ud30c\uc77c\uc5d0 \uc800\uc7a5\ud55c\ub2e4. \uc774\ub294 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc5d0\uac8c\uc11c \uc81c\uacf5\ub41c \uace0\uc720\ud558\uace0, \uc548\uc815\uc801\uc778 \uc2e0\uc6d0\uc744 \uac19\uc740 \uc18d\uc131\uc744 \ud544\uc694\ub85c \ud558\ub294 MySQL \uc11c\ubc84 ID\uc758 \ud615\ud0dc\ub85c \ubc14\uafb8\uc5b4\uc900\ub2e4. \ub610\ud55c `init-mysql` \ucee8\ud14c\uc774\ub108\uc758 \uc2a4\ud06c\ub9bd\ud2b8\ub294 \ucee8\ud53c\uadf8\ub9f5\uc744 `conf.d`\ub85c \ubcf5\uc0ac\ud558\uc5ec, `primary.cnf` \ub610\ub294 `replica.cnf`\uc744 \uc801\uc6a9\ud55c\ub2e4. \uc774 \uc608\uc81c\uc758 \ud1a0\ud3f4\ub85c\uc9c0\uac00 \ud558\ub098\uc758 \uc8fc MySQL \uc11c\ubc84\uc640 \uc77c\uc815 \uc218\uc758 \ub808\ud50c\ub9ac\uce74\ub4e4\ub85c \uc774\ub8e8\uc5b4\uc838 \uc788\uae30 \ub54c\ubb38\uc5d0, \uc2a4\ud06c\ub9bd\ud2b8\ub294 `0` \uc778\ub371\uc2a4\ub97c \uc8fc \uc11c\ubc84\ub85c, \uadf8\ub9ac\uace0 \ub098\uba38\uc9c0 \uac12\ub4e4\uc740 \ub808\ud50c\ub9ac\uce74\ub85c \uc9c0\uc815\ud55c\ub2e4. \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \ucee8\ud2b8\ub864\ub7ec\uc758 [\ub514\ud50c\ub85c\uc774\uba3c\ud2b8\uc640 \uc2a4\ucf00\uc77c\ub9c1 \ubcf4\uc99d](/ko/docs/concepts/workloads/controllers/statefulset/#\ub514\ud50c\ub85c\uc774\uba3c\ud2b8\uc640-\uc2a4\ucf00\uc77c\ub9c1-\ubcf4\uc99d)\uacfc \ud569\uccd0\uc9c0\uba74, \ubcf5\uc81c\ub97c \uc704\ud55c \ub808\ud50c\ub9ac\uce74\ub4e4\uc744 \uc0dd\uc131\ud558\uae30 \uc804\uc5d0 \uc8fc MySQL \uc11c\ubc84\uac00 Ready \uc0c1\ud0dc\uac00 \ub418\ub3c4\ub85d \ubcf4\uc7a5\ud560 \uc218 \uc788\ub2e4. ### \uae30\uc874 \ub370\uc774\ud130 \ubcf5\uc81c(cloning) \uc77c\ubc18\uc801\uc73c\ub85c, \ub808\ud50c\ub9ac\uce74\uc5d0 \uc0c8\ub85c\uc6b4 \ud30c\ub4dc\uac00 \ucd94\uac00\ub418\ub294 \uacbd\uc6b0, \uc8fc MySQL \uc11c\ubc84\uac00 \uc774\ubbf8 \ub370\uc774\ud130\ub97c \uac00\uc9c0\uace0 \uc788\ub2e4\uace0 \uac00\uc815\ud574\uc57c \ud55c\ub2e4. \ub610\ud55c \ubcf5\uc81c \ub85c\uadf8\uac00 \uccab \uc2dc\uc791\uc810\ubd80\ud130\uc758 \ub85c\uadf8\ub4e4\uc744 \ub2e4 \uac00\uc9c0\uace0 \uc788\uc9c0\ub294 \uc54a\uc744 \uc218 \uc788\ub2e4\uace0 \uac00\uc815\ud574\uc57c \ud55c\ub2e4. \uc774\ub7ec\ud55c \ubcf4\uc218\uc801\uc778 \uac00\uc815\ub4e4\uc740 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc774 \ucd08\uae30 \ud06c\uae30\ub85c \uace0\uc815\ub418\uc5b4 \uc788\ub294 \uac83\ubcf4\ub2e4, \uc2dc\uac04\uc5d0 \ub530\ub77c \ud655\uc7a5/\ucd95\uc18c\ud558\uac8c \ud560 \uc218 \uc788\ub3c4\ub85d \ud558\ub294 \uc911\uc694\ud55c \uc5f4\uc1e0\uac00 \ub41c\ub2e4. `clone-mysql`\ub77c\ub294 \uc774\ub984\uc758 \ub450 \ubc88\uc9f8 \ucd08\uae30\ud654 \ucee8\ud14c\uc774\ub108\ub294, \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968\uc5d0\uc11c \ucc98\uc74c \ucd08\uae30\ud654\ub41c \ub808\ud50c\ub9ac\uce74 \ud30c\ub4dc\uc5d0 \ubcf5\uc81c \uc791\uc5c5\uc744 \uc218\ud589\ud55c\ub2e4. \uc774 \ub9d0\uc740 \ub2e4\ub978 \uc2e4\ud589 \uc911\uc778 \ud30c\ub4dc\ub85c\ubd80\ud130 \ubaa8\ub4e0 \ub370\uc774\ud130\ub4e4\uc744 \ubcf5\uc81c\ud558\uae30 \ub54c\ubb38\uc5d0, \ub85c\uceec\uc758 \uc0c1\ud0dc\uac00 \ucda9\ubd84\ud788 \uc77c\uad00\uc131\uc744 \uc720\uc9c0\ud558\uace0 \uc788\uc5b4\uc11c \uc8fc \uc11c\ubc84\uc5d0\uc11c\ubd80\ud130 \ubcf5\uc81c\ub97c \uc2dc\uc791\ud560 \uc218 \uc788\ub2e4\ub294 \uc758\ubbf8\uc774\ub2e4. MySQL \uc790\uccb4\uac00 \uc774\ub7ec\ud55c \uba54\ucee4\ub2c8\uc998\uc744 \uc81c\uacf5\ud574\uc8fc\uc9c0\ub294 \uc54a\uae30 \ub54c\ubb38\uc5d0, \uc774 \uc608\uc81c\uc5d0\uc11c\ub294 XtraBackup\uc774\ub77c\ub294 \uc720\uba85\ud55c \uc624\ud508\uc18c\uc2a4 \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud55c\ub2e4. \ubcf5\uc81c \uc911\uc5d0\ub294, \ubcf5\uc81c \ub300\uc0c1 MySQL \uc11c\ubc84\uac00 \uc131\ub2a5 \uc800\ud558\ub97c \uacaa\uc744 \uc218 \uc788\ub2e4. \uc8fc MySQL \uc11c\ubc84\uc758 \uc774\ub7ec\ud55c \ucda9\uaca9\uc744 \ucd5c\uc18c\ud654\ud558\uae30 \uc704\ud574, \uc2a4\ud06c\ub9bd\ud2b8\ub294 \uac01 \ud30c\ub4dc\uac00 \uc790\uc2e0\uc758 \uc778\ub371\uc2a4\ubcf4\ub2e4 \ud558\ub098 \uc791\uc740 \ud30c\ub4dc\ub85c\ubd80\ud130 \ubcf5\uc81c\ud558\ub3c4\ub85d \uc9c0\uc2dc\ud55c\ub2e4. \uc774\uac83\uc774 \uc815\uc0c1\uc801\uc73c\ub85c \ub3d9\uc791\ud558\ub294 \uc774\uc720\ub294 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \ucee8\ud2b8\ub864\ub7ec\uac00 \ud30c\ub4dc `N+1`\uc744 \uc2e4\ud589\ud558\uae30 \uc804\uc5d0 \ud56d\uc0c1 \ud30c\ub4dc `N`\uc774 Ready \uc0c1\ud0dc\ub77c\ub294 \uac83\uc744 \ubcf4\uc7a5\ud558\uae30 \ub54c\ubb38\uc774\ub2e4. ### \ubcf5\uc81c(replication) \uc2dc\uc791\ud558\uae30 \ucd08\uae30\ud654 \ucee8\ud14c\uc774\ub108\ub4e4\uc758 \uc131\uacf5\uc801\uc73c\ub85c \uc644\ub8cc\ub418\uba74, \uc77c\ubc18\uc801\uc778 \ucee8\ud14c\uc774\ub108\uac00 \uc2e4\ud589\ub41c\ub2e4. MySQL \ud30c\ub4dc\ub294 `mysqld` \uc11c\ubc84\ub97c \uad6c\ub3d9\ud558\ub294 `mysql` \ucee8\ud14c\uc774\ub108\ub85c \uad6c\uc131\ub418\uc5b4 \uc788\uc73c\uba70, `xtrabackup` \ucee8\ud14c\uc774\ub108\ub294 [\uc0ac\uc774\ub4dc\uce74(sidecar)](/blog/2015/06/the-distributed-system-toolkit-patterns)\ub85c\uc11c \uc791\ub3d9\ud55c\ub2e4. `xtrabackup` \uc0ac\uc774\ub4dc\uce74\ub294 \ubcf5\uc81c\ub41c \ub370\uc774\ud130 \ud30c\uc77c\ub4e4\uc744 \ubcf4\uace0 \ub808\ud50c\ub9ac\uce74\uc5d0 MySQL \ubcf5\uc81c\ub97c \uc2dc\uc791\ud574\uc57c \ud560 \ud544\uc694\uac00 \uc788\ub294\uc9c0 \uacb0\uc815\ud55c\ub2e4. \ub9cc\uc57d \uadf8\ub807\ub2e4\uba74, `mysqld`\uc774 \uc900\ube44\ub420 \ub54c\uae4c\uc9c0 \uae30\ub2e4\ub9b0 \ud6c4 `CHANGE MASTER TO`, \uadf8\ub9ac\uace0 `START SLAVE`\ub97c XtraBackup \ubcf5\uc81c(clone) \ud30c\uc77c\ub4e4\uc5d0\uc11c \ucd94\ucd9c\ud55c \ubcf5\uc81c(replication) \ud30c\ub77c\ubbf8\ud130\ub4e4\uacfc \ud568\uaed8 \uc2e4\ud589\uc2dc\ud0a8\ub2e4. \ub808\ud50c\ub9ac\uce74\uac00 \ubcf5\uc81c\ub97c \uc2dc\uc791\ud558\uba74, \uba3c\uc800 \uc8fc MySQL \uc11c\ubc84\ub97c \uae30\uc5b5\ud558\uace0, \uc11c\ubc84\uac00 \uc7ac\uc2dc\uc791\ub418\uac70\ub098 \ucee4\ub125\uc158\uc774 \ub04a\uc5b4\uc9c0\uba74 \ub2e4\uc2dc \uc5f0\uacb0\ud55c\ub2e4. \ub610\ud55c \ub808\ud50c\ub9ac\uce74\ub4e4\uc740 \uc8fc \uc11c\ubc84\ub97c \uc548\uc815\ub41c DNS \uc774\ub984 (`mysql-0.mysql`)\uc73c\ub85c \ucc3e\uae30 \ub54c\ubb38\uc5d0, \uc8fc \uc11c\ubc84\uac00 \ub9ac\uc2a4\ucf00\uc974\ub9c1\uc5d0 \uc758\ud574 \uc0c8\ub85c\uc6b4 \ud30c\ub4dc IP\ub97c \ubc1b\uc544\ub3c4 \uc8fc \uc11c\ubc84\ub97c \uc790\ub3d9\uc73c\ub85c \ucc3e\ub294\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c, \ubcf5\uc81c\ub97c \uc2dc\uc791\ud55c \ud6c4\uc5d0\ub294, `xtrabackup` \ucee8\ud14c\uc774\ub108\ub294 \ub370\uc774\ud130 \ubcf5\uc81c\ub97c \uc694\uccad\ud558\ub294 \ub2e4\ub978 \ud30c\ub4dc\ub4e4\uc758 \ucee4\ub125\uc158\uc744 \ub9ac\uc2a4\ub2dd\ud55c\ub2e4. \uc774 \uc11c\ubc84\ub294 \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc774 \ud655\uc7a5\ud558\uac70\ub098, \ub2e4\uc74c \ud30c\ub4dc\uac00 \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968\ud074\ub808\uc784\uc744 \uc783\uc5b4\uc11c \ub2e4\uc2dc \ubcf5\uc81c\ub97c \uc218\ud589\ud574\ud590 \ud560 \uacbd\uc6b0\ub97c \ub300\ube44\ud558\uc5ec \ub3c5\ub9bd\uc801\uc73c\ub85c \uc874\uc7ac\ud574\uc57c \ud55c\ub2e4. ## \ud074\ub77c\uc774\uc5b8\ud2b8 \ud2b8\ub798\ud53d \ubcf4\ub0b4\uae30 \uc784\uc2dc \ucee8\ud14c\uc774\ub108\ub97c `mysql:5.7` \uc774\ubbf8\uc9c0\ub85c \uc2e4\ud589\ud558\uace0 `mysql` \ud074\ub77c\uc774\uc5b8\ud2b8 \ubc14\uc774\ub108\ub9ac\ub97c \uc2e4\ud589\ud558\ub294 \uac83\uc73c\ub85c \ud14c\uc2a4\ud2b8 \ucffc\ub9ac\ub97c \uc8fc MySQL \uc11c\ubc84(`mysql-0.mysql` \ud638\uc2a4\ud2b8\ub124\uc784)\ub85c \ubcf4\ub0bc \uc218 \uc788\ub2e4. ```shell kubectl run mysql-client --image=mysql:5.7 -i --rm --restart=Never -- mysql -h mysql-0.mysql <`\ub97c \uc774\uc804 \ub2e8\uacc4\uc5d0\uc11c \ucc3e\uc558\ub358 \ub178\ub4dc\uc758 \uc774\ub984\uc73c\ub85c \ubc14\uafb8\uc790. {{< caution >}} \ub178\ub4dc \ub4dc\ub808\uc778\uc740 \ud574\ub2f9 \ub178\ub4dc\uc5d0\uc11c \uc2e4\ud589 \uc911\uc778 \ub2e4\ub978 \uc6cc\ud06c\ub85c\ub4dc\uc640 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\ub4e4\uc5d0\uac8c \uc601\ud5a5\uc744 \uc904 \uc218 \uc788\ub2e4. \ud14c\uc2a4\ud2b8 \ud074\ub7ec\uc2a4\ud130\uc5d0\ub9cc \ub2e4\uc74c \ub2e8\uacc4\ub97c \uc218\ud589\ud558\uc790. {{< /caution >}} ```shell # \uc704\uc5d0 \uba85\uc2dc\ub41c \ub2e4\ub978 \uc6cc\ud06c\ub85c\ub4dc\ub4e4\uc774 \ubc1b\ub294 \uc601\ud5a5\uc5d0 \ub300\ud55c \uc8fc\uc758\uc0ac\ud56d\uc744 \ud655\uc778\ud55c\ub2e4. kubectl drain --force --delete-emptydir-data --ignore-daemonsets ``` \uc774\uc81c \ud30c\ub4dc\uac00 \ub2e4\ub978 \ub178\ub4dc\uc5d0 \ub9ac\uc2a4\ucf00\uc904\ub9c1\ub418\ub294 \uac83\uc744 \uad00\ucc30\ud560 \uc218 \uc788\ub2e4. ```shell kubectl get pod mysql-2 -o wide --watch ``` \ucd9c\ub825\uc740 \ub2e4\uc74c\uacfc \ube44\uc2b7\ud560 \uac83\uc774\ub2e4. ``` NAME READY STATUS RESTARTS AGE IP NODE mysql-2 2/2 Terminating 0 15m 10.244.1.56 kubernetes-node-9l2t [...] mysql-2 0/2 Pending 0 0s kubernetes-node-fjlm mysql-2 0/2 Init:0/2 0 0s kubernetes-node-fjlm mysql-2 0/2 Init:1/2 0 20s 10.244.5.32 kubernetes-node-fjlm mysql-2 0/2 PodInitializing 0 21s 10.244.5.32 kubernetes-node-fjlm mysql-2 1/2 Running 0 22s 10.244.5.32 kubernetes-node-fjlm mysql-2 2/2 Running 0 30s 10.244.5.32 kubernetes-node-fjlm ``` \uadf8\ub9ac\uace0, \uc11c\ubc84 ID `102`\uac00 `SELECT @@server_id` \ub8e8\ud504 \ucd9c\ub825\uc5d0\uc11c \uc7a0\uc2dc \uc0ac\ub77c\uc9c4 \ud6c4 \ub2e4\uc2dc \ubcf4\uc774\ub294 \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc744 \uac83\uc774\ub2e4. \uc774\uc81c \ub178\ub4dc\uc758 \uc2a4\ucf00\uc904 \ubc29\uc9c0\ub97c \ub2e4\uc2dc \ud574\uc81c(uncordon)\ud574\uc11c \uc815\uc0c1\uc73c\ub85c \ub3cc\uc544\uac00\ub3c4\ub85d \uc870\uce58\ud55c\ub2e4. ```shell kubectl uncordon ``` ## \ub808\ud50c\ub9ac\uce74 \uc2a4\ucf00\uc77c\ub9c1\ud558\uae30 MySQL \ub808\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc0ac\uc6a9\ud558\uba74, \ub808\ud50c\ub9ac\uce74\ub97c \ucd94\uac00\ud558\ub294 \uac83\uc73c\ub85c \uc77d\uae30 \ucffc\ub9ac \uc6a9\ub7c9\uc744 \ud0a4\uc6b8 \uc218 \uc788\ub2e4. \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc744 \uc0ac\uc6a9\ud558\uba74, \ub2e8 \ud55c \uc904\uc758 \uba85\ub839\uc73c\ub85c \ub2ec\uc131\ud560 \uc218 \uc788\ub2e4. ```shell kubectl scale statefulset mysql --replicas=5 ``` \uba85\ub839\uc744 \uc2e4\ud589\uc2dc\ucf1c\uc11c \uc0c8\ub85c\uc6b4 \ud30c\ub4dc\ub4e4\uc774 \uc62c\ub77c\uc624\ub294 \uac83\uc744 \uad00\ucc30\ud558\uc790. ```shell kubectl get pods -l app=mysql --watch ``` \ud30c\ub4dc\ub4e4\uc774 \uc62c\ub77c\uc624\uba74, `SELECT @@server_id` \ub8e8\ud504 \ucd9c\ub825\uc5d0 \uc11c\ubc84 ID `103` \uacfc `104`\uac00 \ub098\ud0c0\ub098\uae30 \uc2dc\uc791\ud560 \uac83\uc774\ub2e4. \uadf8\ub9ac\uace0 \ud574\ub2f9 \ud30c\ub4dc\ub4e4\uc774 \uc874\uc7ac\ud558\uae30 \uc804\uc5d0 \ucd94\uac00\ub41c \ub370\uc774\ud130\ub4e4\uc774 \ud574\ub2f9 \uc0c8 \uc11c\ubc84\ub4e4\uc5d0\uac8c\ub3c4 \uc874\uc7ac\ud558\ub294 \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4. ```shell kubectl run mysql-client --image=mysql:5.7 -i -t --rm --restart=Never -- mysql -h mysql-3.mysql -e \"SELECT * FROM test.messages\" ``` ``` Waiting for pod default/mysql-client to be running, status is Pending, pod ready: false +---------+ | message | +---------+ | hello | +---------+ pod \"mysql-client\" deleted ``` \ucd95\uc18c\ud558\ub294 \uac83\ub3c4 \uac04\ub2e8\ud558\uac8c \ud560 \uc218 \uc788\ub2e4. ```shell kubectl scale statefulset mysql --replicas=3 ``` {{< note >}} \ud655\uc7a5\uc740 \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968\ud074\ub808\uc784\uc744 \uc790\ub3d9\uc73c\ub85c \uc0dd\uc131\ud558\uc9c0\ub9cc, \ucd95\uc18c\uc5d0\uc11c\ub294 \ud574\ub2f9 PVC\ub4e4\uc774 \uc790\ub3d9\uc73c\ub85c \uc0ad\uc81c\ub418\uc9c0 \uc54a\ub294\ub2e4. \uc774\ub85c\uc368 \ud655\uc7a5\uc744 \ube60\ub974\uac8c \ud558\uae30 \uc704\ud574 \ucd08\uae30\ud654\ub41c PVC\ub4e4\uc744 \ubcf4\uad00\ud574 \ub450\uac70\ub098, \uc0ad\uc81c\ud558\uae30 \uc804\uc5d0 \ub370\uc774\ud130\ub97c \ucd94\ucd9c\ud558\ub294 \uc120\ud0dd\uc744 \ud560 \uc218 \uc788\ub2e4. {{< /note >}} \ub2e4\uc74c \uba85\ub839\uc744 \uc2e4\ud589\ud558\uc5ec \ud655\uc778\ud560 \uc218 \uc788\ub2e4. ```shell kubectl get pvc -l app=mysql ``` \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc744 3\uc73c\ub85c \ucd95\uc18c\ud588\uc74c\uc5d0\ub3c4 PVC 5\uac1c\uac00 \uc544\uc9c1 \ub0a8\uc544\uc788\uc74c\uc744 \ubcf4\uc5ec\uc900\ub2e4. ``` NAME STATUS VOLUME CAPACITY ACCESSMODES AGE data-mysql-0 Bound pvc-8acbf5dc-b103-11e6-93fa-42010a800002 10Gi RWO 20m data-mysql-1 Bound pvc-8ad39820-b103-11e6-93fa-42010a800002 10Gi RWO 20m data-mysql-2 Bound pvc-8ad69a6d-b103-11e6-93fa-42010a800002 10Gi RWO 20m data-mysql-3 Bound pvc-50043c45-b1c5-11e6-93fa-42010a800002 10Gi RWO 2m data-mysql-4 Bound pvc-500a9957-b1c5-11e6-93fa-42010a800002 10Gi RWO 2m ``` \ub9cc\uc57d \uc5ec\ubd84\uc758 PVC\ub4e4\uc744 \uc7ac\uc0ac\uc6a9\ud558\uc9c0 \uc54a\uc744 \uac83\uc774\ub77c\uba74, \uc774\ub4e4\uc744 \uc0ad\uc81c\ud560 \uc218 \uc788\ub2e4. ```shell kubectl delete pvc data-mysql-3 kubectl delete pvc data-mysql-4 ``` ## {{% heading \"cleanup\" %}} 1. `SELECT @@server_id` \ub8e8\ud504\ub97c \ub05d\ub0b4\uae30 \uc704\ud574, \ud130\ubbf8\ub110\uc5d0 **Ctrl+C**\ub97c \uc785\ub825\ud558\uac70\ub098, \ud574\ub2f9 \uba85\ub839\uc744 \ub2e4\ub978 \ud130\ubbf8\ub110\uc5d0\uc11c \uc2e4\ud589\uc2dc\ud0a4\uc790. ```shell kubectl delete pod mysql-client-loop --now ``` 1. \uc2a4\ud14c\uc774\ud2b8\ud480\uc14b\uc744 \uc0ad\uc81c\ud55c\ub2e4. \uc774\uac83\uc740 \ud30c\ub4dc\ub4e4 \ub610\ud55c \uc0ad\uc81c\ud560 \uac83\uc774\ub2e4. ```shell kubectl delete statefulset mysql ``` 1. \ud30c\ub4dc\ub4e4\uc758 \uc0ad\uc81c\ub97c \ud655\uc778\ud55c\ub2e4. \uc0ad\uc81c\uac00 \uc644\ub8cc\ub418\uae30\uae4c\uc9c0 \uc2dc\uac04\uc774 \uac78\ub9b4 \uc218 \uc788\ub2e4. ```shell kubectl get pods -l app=mysql ``` \uc704\uc640 \uac19\uc740 \uba54\uc138\uc9c0\uac00 \ub098\ud0c0\ub098\uba74 \ud30c\ub4dc\ub4e4\uc774 \uc0ad\uc81c\ub418\uc5c8\ub2e4\ub294 \uac83\uc744 \uc54c \uc218 \uc788\ub2e4. ``` No resources found. ``` 1. \ucee8\ud53c\uadf8\ub9f5, \uc11c\ube44\uc2a4, \uadf8\ub9ac\uace0 \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968\ud074\ub808\uc784\ub4e4\uc744 \uc0ad\uc81c\ud55c\ub2e4. ```shell kubectl delete configmap,service,pvc -l app=mysql ``` 1. \ub9cc\uc57d \uc218\ub3d9\uc73c\ub85c \ud37c\uc2dc\uc2a4\ud134\uc2a4\ubcfc\ub968\ub4e4\uc744 \ud504\ub85c\ube44\uc800\ub2dd\ud588\ub2e4\uba74, \uc218\ub3d9\uc73c\ub85c \uc0ad\uc81c\ud558\uba74\uc11c, \uadf8 \ubc11\uc5d0 \uc874\uc7ac\ud558\ub294 \ub9ac\uc18c\uc2a4\ub4e4\uc744 \ub610\ud55c \uc0ad\uc81c\ud574\uc57c \ud55c\ub2e4. \ub9cc\uc57d \ub3d9\uc801 \ud504\ub85c\ube44\uc800\ub108\ub97c \uc0ac\uc6a9\ud588\ub2e4\uba74, \ub2f9\uc2e0\uc774 \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968\ud074\ub808\uc784\uc73c\ub85c \uc0ad\uc81c\ud558\uba74 \uc790\ub3d9\uc73c\ub85c \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968\uc744 \uc0ad\uc81c\ud55c\ub2e4. \uc77c\ubd80 (EBS\ub098 PD\uc640 \uac19\uc740) \ub3d9\uc801 \ud504\ub85c\ube44\uc800\ub108\ub4e4\uc740 \ud37c\uc2dc\uc2a4\ud134\ud2b8\ubcfc\ub968\uc744 \uc0ad\uc81c \ud558\uba74 \uadf8 \ub4a4\uc5d0 \uc874\uc7ac\ud558\ub294 \ub9ac\uc18c\uc2a4\ub4e4\ub3c4 \uc0ad\uc81c\ud55c\ub2e4. ## {{% heading \"whatsnext\" %}} * [\uc2a4\ud14c\uc774\ud2b8\ud480\uc14b(StatefulSet) \ud655\uc7a5\ud558\uae30](/ko/docs/tasks/run-application/scale-stateful-set/)\uc5d0 \ub300\ud574 \ub354 \ubc30\uc6cc\ubcf4\uae30. * [\uc2a4\ud14c\uc774\ud2b8\ud480\uc14b \ub514\ubc84\uae45\ud558\uae30](/ko/docs/tasks/debug/debug-application/debug-statefulset/)\uc5d0 \ub300\ud574 \ub354 \ubc30\uc6cc\ubcf4\uae30. * [\uc2a4\ud14c\uc774\ud2b8\ud480\uc14b(StatefulSet) \uc0ad\uc81c\ud558\uae30](/ko/docs/tasks/run-application/delete-stateful-set/)\uc5d0 \ub300\ud574 \ub354 \ubc30\uc6cc\ubcf4\uae30. * [\uc2a4\ud14c\uc774\ud2b8\ud480\uc14b(StatefulSet) \ud30c\ub4dc \uac15\uc81c \uc0ad\uc81c\ud558\uae30](/ko/docs/tasks/run-application/force-delete-stateful-set-pod/)\uc5d0 \ub300\ud574 \ub354 \ubc30\uc6cc\ubcf4\uae30. * [Helm Charts \uc800\uc7a5\uc18c](https://artifacthub.io/)\ub97c \ud1b5\ud574 \ub2e4\ub978 \uc2a4\ud14c\uc774\ud2b8\ud480 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uc608\uc81c\ub4e4\uc744 \ud655\uc778\ud574\ubcf4\uae30. ", "positive_passages": [{"docid": "doc-en-website-e289f12cb15adfa0293a068568f23c493a89351509b05ae38d842a04488feb5c", "text": "This is a Feature Request Korean Localization for branch. What would you like to be Any localization contributions for Korean. Comments This issue is to notify the schedule of Korean localization to contributors. is the current work branch for Korean localization. Important dates A Korean localization work branch is merged to branch after we complete around 3~4 weeks job. PR Freeze: 01/16 (PR opened after freeze will be requested to rebase to next work branch) Branch Merge: 01/19 (merge to main branch) 2~3 , main . PR : 01/16 ( PR , PR ) : 01/19 (main , k8s.io ) /language ko /help\nThis request has been marked as needing help from a contributor. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. To illustrate these labels in action, consider the following StatefulSet object:
To illustrate these labels in action, consider the following {{< glossary_tooltip text=\"StatefulSet\" term_id=\"statefulset\" >}} object: ```yaml # This is an excerpt apiVersion: apps/v1 kind: StatefulSet metadata:", "positive_passages": [{"docid": "doc-en-website-af0c6ecdcebfd8ac83a379c223c5140212f2ad09f90275631856ed43cc7e5715", "text": "The concept of the has not been introduced at this point yet, but is used at multiple locations on this page. It would make sense to briefly explain what that is and link to a page that covers that topic.\n/triage accepted /language en /help I would use a here. We should also mention that StatefulSet is just an example. Related, the example manifest is incomplete. We should add a comment in YAML to make it clear that this is an excerpt.\nThis request has been marked as needing help from a contributor. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. Do check that the version is sufficiently up-to-date using `kubectl version`. Check that the version is sufficiently up-to-date using `kubectl version`. ## Install with brew ## Install with Homebrew on macOS If you are on MacOS and using brew, you can install with: If you are on macOS and using [Homebrew](https://brew.sh/) package manager, you can install with: ```shell brew install kubectl", "positive_passages": [{"docid": "doc-en-website-c756b6ef273e9696d87b5f571280b1846d082f3d2347cb62e8775c5824c7de57", "text": "This is a... [x] Bug Report Problem: There is no directory in the tar bundle. Example: Proposed Solution: Recommend people to execute in the bundle? Page to Update:", "commid": "website_issue_2815", "tokennum": 39}], "negative_passages": []} {"query_id": "q-en-website-cc316be2ee541111e7e1dbe460b2ad9971ed27efe278e0cc4a44c31b1b53cbbf", "query": "body.cid-community #gallery { display: flex; max-width: 100vw; max-width: 100%; gap: 0.75rem; justify-content: center; margin-left: auto;", "positive_passages": [{"docid": "doc-en-website-f2118c1b83bf7a78c158c67a3165acd3c2452aea2a25fcfac2be591e279e9c49", "text": "This is a Bug Report ### \u4ec5\u5728\u67d0\u4e9b\u8282\u70b9\u4e0a\u8fd0\u884c Pod \u5982\u679c\u6307\u5b9a\u4e86 `.spec.template.spec.nodeSelector`\uff0cDaemonSet Controller \u5c06\u5728\u80fd\u591f\u4e0e [Node Selector](/zh/docs/concepts/scheduling-eviction/assign-pod-node/) \u5339\u914d\u7684\u8282\u70b9\u4e0a\u521b\u5efa Pod\u3002\u7c7b\u4f3c\u8fd9\u79cd\u60c5\u51b5\uff0c\u53ef\u4ee5\u6307\u5b9a `.spec.template.spec.affinity`\uff0c\u7136\u540e DaemonSet Controller \u5c06\u5728\u80fd\u591f\u4e0e [node Affinity](/zh/docs/concepts/scheduling-eviction/assign-pod-node/) \u5339\u914d\u7684\u8282\u70b9\u4e0a\u521b\u5efa Pod\u3002 \u5982\u679c\u6307\u5b9a\u4e86 `.spec.template.spec.nodeSelector`\uff0cDaemonSet \u63a7\u5236\u5668\u5c06\u5728\u80fd\u591f\u4e0e [Node \u9009\u62e9\u7b97\u7b26](/zh/docs/concepts/scheduling-eviction/assign-pod-node/) \u5339\u914d\u7684\u8282\u70b9\u4e0a\u521b\u5efa Pod\u3002 \u7c7b\u4f3c\u8fd9\u79cd\u60c5\u51b5\uff0c\u53ef\u4ee5\u6307\u5b9a `.spec.template.spec.affinity`\uff0c\u4e4b\u540e DaemonSet \u63a7\u5236\u5668 \u5c06\u5728\u80fd\u591f\u4e0e[\u8282\u70b9\u4eb2\u548c\u6027](/zh/docs/concepts/scheduling-eviction/assign-pod-node/) \u5339\u914d\u7684\u8282\u70b9\u4e0a\u521b\u5efa Pod\u3002 \u5982\u679c\u6839\u672c\u5c31\u6ca1\u6709\u6307\u5b9a\uff0c\u5219 DaemonSet Controller \u5c06\u5728\u6240\u6709\u8282\u70b9\u4e0a\u521b\u5efa Pod\u3002 \u4e0d\u63a8\u8350\u4f7f\u7528 `run-pod/v1` \u4ee5\u5916\u7684\u5176\u4ed6\u751f\u6210\u5668\u3002 \u4e0d\u63a8\u8350\u4f7f\u7528 `run-pod/v1` \u4ee5\u5916\u7684\u5176\u4ed6\u751f\u6210\u5668. {{< /note >}} **\u4f5c\u8005\uff1a** Xing Yang (VMware) \u6700\u521d\u5728 1.19 \u4e2d\u5f15\u5165\u7684 CSI \u5377\u5065\u5eb7\u76d1\u63a7\u529f\u80fd\u5728 1.21 \u7248\u672c\u4e2d\u8fdb\u884c\u4e86\u5927\u89c4\u6a21\u66f4\u65b0\u3002 ## \u4e3a\u4ec0\u4e48\u8981\u5411 Kubernetes \u6dfb\u52a0\u5377\u5065\u5eb7\u76d1\u63a7\uff1f \u5982\u679c\u6ca1\u6709\u5377\u5065\u5eb7\u76d1\u63a7\uff0c\u5728 PVC \u88ab Pod \u914d\u7f6e\u548c\u4f7f\u7528\u540e\uff0cKubernetes \u5c06\u4e0d\u77e5\u9053\u5b58\u50a8\u7cfb\u7edf\u7684\u5e95\u5c42\u5377\u7684\u72b6\u6001\u3002 \u5728 Kubernetes \u4e2d\u914d\u7f6e\u5377\u540e\uff0c\u5e95\u5c42\u5b58\u50a8\u7cfb\u7edf\u53ef\u80fd\u4f1a\u53d1\u751f\u5f88\u591a\u4e8b\u60c5\u3002 \u4f8b\u5982\uff0c\u5377\u53ef\u80fd\u5728 Kubernetes \u4e4b\u5916\u88ab\u610f\u5916\u5220\u9664\u3001\u5377\u6240\u5728\u7684\u78c1\u76d8\u53ef\u80fd\u53d1\u751f\u6545\u969c\u3001\u5bb9\u91cf\u4e0d\u8db3\u3001\u78c1\u76d8\u53ef\u80fd\u88ab\u964d\u7ea7\u800c\u5f71\u54cd\u5176\u6027\u80fd\u7b49\u7b49\u3002 \u5373\u4f7f\u5377\u88ab\u6302\u8f7d\u5230 Pod \u4e0a\u5e76\u88ab\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528\uff0c\u4ee5\u540e\u4e5f\u53ef\u80fd\u4f1a\u51fa\u73b0\u8bf8\u5982\u8bfb/\u5199 I/O \u9519\u8bef\u3001\u6587\u4ef6\u7cfb\u7edf\u635f\u574f\u3001\u5728 Kubernetes \u4e4b\u5916\u88ab\u610f\u5916\u5378\u8f7d\u5377\u7b49\u95ee\u9898\u3002 \u5f53\u53d1\u751f\u8fd9\u6837\u7684\u4e8b\u60c5\u65f6\uff0c\u8c03\u8bd5\u548c\u68c0\u6d4b\u6839\u672c\u539f\u56e0\u662f\u975e\u5e38\u56f0\u96be\u7684\u3002 \u5377\u5065\u5eb7\u76d1\u63a7\u5bf9 Kubernetes \u7528\u6237\u975e\u5e38\u6709\u76ca\u3002 \u5b83\u53ef\u4ee5\u4e0e CSI \u9a71\u52a8\u7a0b\u5e8f\u901a\u4fe1\u4ee5\u68c0\u7d22\u5230\u5e95\u5c42\u5b58\u50a8\u7cfb\u7edf\u68c0\u6d4b\u5230\u7684\u9519\u8bef\u3002 \u7528\u6237\u53ef\u4ee5\u6536\u5230\u62a5\u544a\u4e0a\u6765\u7684 PVC \u4e8b\u4ef6\u7ee7\u800c\u91c7\u53d6\u884c\u52a8\u3002 \u4f8b\u5982\uff0c\u5982\u679c\u5377\u5bb9\u91cf\u4e0d\u8db3\uff0c\u4ed6\u4eec\u53ef\u4ee5\u8bf7\u6c42\u5377\u6269\u5c55\u4ee5\u83b7\u5f97\u66f4\u591a\u7a7a\u95f4\u3002 ## \u4ec0\u4e48\u662f\u5377\u5065\u5eb7\u76d1\u63a7\uff1f CSI \u5377\u5065\u5eb7\u76d1\u63a7\u5141\u8bb8 CSI \u9a71\u52a8\u7a0b\u5e8f\u68c0\u6d4b\u6765\u81ea\u5e95\u5c42\u5b58\u50a8\u7cfb\u7edf\u7684\u5f02\u5e38\u5377\u72b6\u51b5\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a PVC \u6216 Pod \u4e0a\u7684\u4e8b\u4ef6\u62a5\u9001\u3002 \u76d1\u63a7\u5377\u548c\u4f7f\u7528\u5377\u5065\u5eb7\u4fe1\u606f\u62a5\u9001\u4e8b\u4ef6\u7684 Kubernetes \u7ec4\u4ef6\u5305\u62ec\uff1a * Kubelet \u9664\u4e86\u6536\u96c6\u73b0\u6709\u7684\u5377\u7edf\u8ba1\u4fe1\u606f\u5916\uff0c\u8fd8\u5c06\u89c2\u5bdf\u8be5\u8282\u70b9\u4e0a PVC \u7684\u5377\u5065\u5eb7\u72b6\u51b5\u3002 \u5982\u679c PVC \u7684\u5065\u5eb7\u72b6\u51b5\u5f02\u5e38\uff0c\u5219\u4f1a\u5728\u4f7f\u7528 PVC \u7684 Pod \u5bf9\u8c61\u4e0a\u62a5\u9001\u4e8b\u4ef6\u3002 \u5982\u679c\u591a\u4e2a Pod \u4f7f\u7528\u76f8\u540c\u7684 PVC\uff0c\u5219\u5c06\u5728\u4f7f\u7528\u8be5 PVC \u7684\u6240\u6709 Pod \u4e0a\u62a5\u9001\u4e8b\u4ef6\u3002 * \u4e00\u4e2a[\u5916\u90e8\u5377\u5065\u5eb7\u76d1\u89c6\u63a7\u5236\u5668](https://github.com/kubernetes-csi/external-health-monitor)\u76d1\u89c6 PVC \u7684\u5377\u5065\u5eb7\u5e76\u62a5\u544a PVC \u4e0a\u7684\u4e8b\u4ef6\u3002 \u8bf7\u6ce8\u610f\uff0c\u5728 Kubernetes 1.19 \u7248\u672c\u4e2d\u9996\u6b21\u5f15\u5165\u6b64\u529f\u80fd\u65f6\uff0c\u8282\u70b9\u4fa7\u5377\u5065\u5eb7\u76d1\u63a7\u903b\u8f91\u662f\u4e00\u4e2a\u5916\u90e8\u4ee3\u7406\u3002 \u5728 Kubernetes 1.21 \u4e2d\uff0c\u8282\u70b9\u4fa7\u5377\u5065\u5eb7\u76d1\u63a7\u903b\u8f91\u4ece\u5916\u90e8\u4ee3\u7406\u79fb\u81f3 Kubelet\uff0c\u4ee5\u907f\u514d CSI \u51fd\u6570\u91cd\u590d\u8c03\u7528\u3002 \u968f\u7740 1.21 \u4e2d\u7684\u8fd9\u4e00\u53d8\u5316\uff0c\u4e3a Kubelet \u4e2d\u7684\u5377\u5065\u5eb7\u76d1\u63a7\u903b\u8f91\u5f15\u5165\u4e86\u4e00\u4e2a\u65b0\u7684 alpha [\u7279\u6027\u95e8](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) `CSIVolumeHealth`\u3002 \u76ee\u524d\uff0c\u5377\u5065\u5eb7\u76d1\u63a7\u529f\u80fd\u4ec5\u4f9b\u53c2\u8003\uff0c\u56e0\u4e3a\u5b83\u53ea\u62a5\u9001 PVC \u6216 Pod \u4e0a\u7684\u5f02\u5e38\u5377\u5065\u5eb7\u4e8b\u4ef6\u3002 \u7528\u6237\u5c06\u9700\u8981\u68c0\u67e5\u8fd9\u4e9b\u4e8b\u4ef6\u5e76\u624b\u52a8\u4fee\u590d\u95ee\u9898\u3002 \u6b64\u529f\u80fd\u53ef\u4f5c\u4e3a Kubernetes \u672a\u6765\u4ee5\u7f16\u7a0b\u65b9\u5f0f\u68c0\u6d4b\u548c\u89e3\u51b3\u5377\u5065\u5eb7\u95ee\u9898\u7684\u57fa\u77f3\u3002 ## \u5982\u4f55\u5728 Kubernetes \u96c6\u7fa4\u4e0a\u4f7f\u7528\u5377\u5065\u5eb7\uff1f \u8981\u4f7f\u7528\u5377\u5065\u5eb7\u529f\u80fd\uff0c\u9996\u5148\u786e\u4fdd\u4f60\u4f7f\u7528\u7684 CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301\u6b64\u529f\u80fd\u3002 \u8bf7\u53c2\u9605\u6b64 [CSI \u9a71\u52a8\u7a0b\u5e8f\u6587\u6863](https://kubernetes-csi.github.io/docs/drivers.html)\u4ee5\u4e86\u89e3\u54ea\u4e9b CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301\u6b64\u529f\u80fd\u3002 \u8981\u4ece\u8282\u70b9\u4fa7\u542f\u7528\u5377\u5065\u5eb7\u76d1\u63a7\uff0c\u9700\u8981\u542f\u7528 alpha \u7279\u6027\u95e8 `CSIVolumeHealth`\u3002 \u5982\u679c CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301\u63a7\u5236\u5668\u7aef\u7684\u5377\u5065\u5eb7\u76d1\u63a7\u529f\u80fd\uff0c\u5219\u6709\u5173\u5f02\u5e38\u5377\u6761\u4ef6\u7684\u4e8b\u4ef6\u5c06\u8bb0\u5f55\u5728 PVC \u4e0a\u3002 \u5982\u679c CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301\u63a7\u5236\u5668\u7aef\u7684\u5377\u5065\u5eb7\u76d1\u63a7\u529f\u80fd\uff0c \u5f53\u90e8\u7f72\u5916\u90e8\u5065\u5eb7\u76d1\u63a7\u63a7\u5236\u5668\u65f6 `enable-node-watcher` \u6807\u5fd7\u8bbe\u7f6e\u4e3a true\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u83b7\u5f97\u6709\u5173\u8282\u70b9\u6545\u969c\u7684\u4e8b\u4ef6\u3002 \u5f53\u68c0\u6d4b\u5230\u8282\u70b9\u6545\u969c\u4e8b\u4ef6\u65f6\uff0c\u4f1a\u5728 PVC \u4e0a\u62a5\u9001\u4e00\u4e2a\u4e8b\u4ef6\uff0c\u6307\u793a\u4f7f\u7528\u8be5 PVC \u7684 Pod \u5728\u6545\u969c\u8282\u70b9\u4e0a\u3002 \u5982\u679c CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301\u8282\u70b9\u7aef\u7684\u5377\u5065\u5eb7\u76d1\u63a7\u529f\u80fd\uff0c\u5219\u6709\u5173\u5f02\u5e38\u5377\u6761\u4ef6\u7684\u4e8b\u4ef6\u5c06\u4f7f\u7528 PVC \u8bb0\u5f55\u5728 Pod \u4e0a\u3002 ## \u4f5c\u4e3a\u5b58\u50a8\u4f9b\u5e94\u5546\uff0c\u5982\u4f55\u5411 CSI \u9a71\u52a8\u7a0b\u5e8f\u6dfb\u52a0\u5bf9\u5377\u5065\u5eb7\u7684\u652f\u6301\uff1f \u5377\u5065\u5eb7\u76d1\u63a7\u5305\u62ec\u4e24\u4e2a\u90e8\u5206\uff1a * \u5916\u90e8\u5377\u5065\u5eb7\u76d1\u63a7\u63a7\u5236\u5668\u4ece\u63a7\u5236\u5668\u7aef\u76d1\u63a7\u5377\u5065\u5eb7\u3002 * Kubelet \u4ece\u8282\u70b9\u7aef\u76d1\u63a7\u5377\u7684\u5065\u5eb7\u72b6\u51b5\u3002 \u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [CSI \u89c4\u7ea6](https://github.com/container-storage-interface/spec/blob/master/spec.md) \u548c [Kubernetes-CSI \u9a71\u52a8\u5f00\u53d1\u8005\u6307\u5357](https://kubernetes-csi.github.io/docs/volume-health-monitor.html)\u3002 [CSI \u4e3b\u673a\u8def\u5f84\u9a71\u52a8\u7a0b\u5e8f](https://github.com/kubernetes-csi/csi-driver-host-path)\u4e2d\u6709\u4e00\u4e2a\u5377\u5065\u5eb7\u7684\u793a\u4f8b\u5b9e\u73b0\u3002 ### \u63a7\u5236\u5668\u7aef\u5377\u5065\u5eb7\u76d1\u63a7 \u8981\u4e86\u89e3\u5982\u4f55\u90e8\u7f72\u5916\u90e8\u5377\u5065\u5eb7\u76d1\u63a7\u63a7\u5236\u5668\uff0c \u8bf7\u53c2\u9605 CSI \u6587\u6863\u4e2d\u7684 [CSI external-health-monitor-controller](https://kubernetes-csi.github.io/docs/external-health-monitor-controller.html)\u3002 \u5982\u679c\u68c0\u6d4b\u5230\u5f02\u5e38\u5377\u6761\u4ef6\uff0c \u5916\u90e8\u5065\u5eb7\u76d1\u89c6\u5668\u63a7\u5236\u5668\u8c03\u7528 `ListVolumes` \u6216\u8005 `ControllerGetVolume` CSI RPC \u5e76\u62a5\u9001 VolumeConditionAbnormal \u4e8b\u4ef6\u4ee5\u53ca PVC \u4e0a\u7684\u6d88\u606f\u3002 \u53ea\u6709\u5177\u6709 `LIST_VOLUMES` \u548c `VOLUME_CONDITION` \u63a7\u5236\u5668\u80fd\u529b\u3001 \u6216\u8005\u5177\u6709 `GET_VOLUME` \u548c `VOLUME_CONDITION` \u80fd\u529b\u7684 CSI \u9a71\u52a8\u7a0b\u5e8f\u624d\u652f\u6301\u5916\u90e8\u63a7\u5236\u5668\u4e2d\u7684\u5377\u5065\u5eb7\u76d1\u63a7\u3002 \u8981\u4ece\u63a7\u5236\u5668\u7aef\u5b9e\u73b0\u5377\u5065\u5eb7\u529f\u80fd\uff0cCSI \u9a71\u52a8\u7a0b\u5e8f**\u5fc5\u987b**\u6dfb\u52a0\u5bf9\u65b0\u63a7\u5236\u5668\u529f\u80fd\u7684\u652f\u6301\u3002 \u5982\u679c CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301 `LIST_VOLUMES` \u548c `VOLUME_CONDITION` \u63a7\u5236\u5668\u529f\u80fd\uff0c\u5b83**\u5fc5\u987b**\u5b9e\u73b0\u63a7\u5236\u5668 RPC `ListVolumes` \u5e76\u5728\u54cd\u5e94\u4e2d\u62a5\u9001\u5377\u72b6\u51b5\u3002 \u5982\u679c CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301 `GET_VOLUME` \u548c `VOLUME_CONDITION` \u63a7\u5236\u5668\u529f\u80fd\uff0c\u5b83**\u5fc5\u987b**\u5b9e\u73b0\u63a7\u5236\u5668 PRC `ControllerGetVolume` \u5e76\u5728\u54cd\u5e94\u4e2d\u62a5\u9001\u5377\u72b6\u51b5\u3002 \u5982\u679c CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301 `LIST_VOLUMES`\u3001`GET_VOLUME` \u548c `VOLUME_CONDITION` \u63a7\u5236\u5668\u529f\u80fd\uff0c\u5219\u5916\u90e8\u5065\u5eb7\u76d1\u89c6\u63a7\u5236\u5668\u5c06\u4ec5\u8c03\u7528 `ListVolumes` CSI RPC\u3002 ### \u8282\u70b9\u4fa7\u5377\u5065\u5eb7\u76d1\u63a7 \u5982\u679c\u68c0\u6d4b\u5230\u5f02\u5e38\u7684\u5377\u6761\u4ef6\uff0c Kubelet \u4f1a\u8c03\u7528 `NodeGetVolumeStats` CSI RPC \u5e76\u62a5\u9001 VolumeConditionAbnormal \u4e8b\u4ef6\u4ee5\u53ca Pod \u4e0a\u7684\u4fe1\u606f\u3002 \u53ea\u6709\u5177\u6709 `VOLUME_CONDITION` \u8282\u70b9\u529f\u80fd\u7684 CSI \u9a71\u52a8\u7a0b\u5e8f\u624d\u652f\u6301 Kubelet \u4e2d\u7684\u5377\u5065\u5eb7\u76d1\u63a7\u3002 \u8981\u4ece\u8282\u70b9\u7aef\u5b9e\u73b0\u5377\u5065\u5eb7\u529f\u80fd\uff0cCSI \u9a71\u52a8\u7a0b\u5e8f**\u5fc5\u987b**\u6dfb\u52a0\u5bf9\u65b0\u8282\u70b9\u529f\u80fd\u7684\u652f\u6301\u3002 \u5982\u679c CSI \u9a71\u52a8\u7a0b\u5e8f\u652f\u6301 `VOLUME_CONDITION` \u8282\u70b9\u80fd\u529b\uff0c\u5b83**\u5fc5\u987b**\u5728\u8282\u70b9 RPC `NodeGetVoumeStats` \u4e2d\u62a5\u9001\u5377\u72b6\u51b5\u3002 ## \u4e0b\u4e00\u6b65\u662f\u4ec0\u4e48\uff1f \u6839\u636e\u53cd\u9988\u548c\u91c7\u7eb3\u60c5\u51b5\uff0cKubernetes \u56e2\u961f\u8ba1\u5212\u5728 1.22 \u6216 1.23 \u4e2d\u5c06 CSI \u5377\u5065\u5eb7\u5b9e\u65bd\u63a8\u5411 beta\u3002 \u6211\u4eec\u8fd8\u5728\u63a2\u7d22\u5982\u4f55\u5728 Kubernetes \u4e2d\u4f7f\u7528\u5377\u5065\u5eb7\u4fe1\u606f\u8fdb\u884c\u7f16\u7a0b\u68c0\u6d4b\u548c\u81ea\u52a8\u534f\u8c03\u3002 ## \u5982\u4f55\u4e86\u89e3\u66f4\u591a\uff1f \u8981\u4e86\u89e3\u5377\u5065\u5eb7\u76d1\u63a7\u7684\u8bbe\u8ba1\u7ec6\u8282\uff0c\u8bf7\u9605\u8bfb[\u5377\u5065\u5eb7\u76d1\u63a7](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1432-volume-health-monitor)\u589e\u5f3a\u63d0\u6848\u3002 \u5377\u5065\u5eb7\u68c0\u6d4b\u63a7\u5236\u5668\u6e90\u4ee3\u7801\u4f4d\u4e8e\uff1a [https://github.com/kubernetes-csi/external-health-monitor](https://github.com/kubernetes-csi/external-health-monitor)\u3002 [\u5bb9\u5668\u5b58\u50a8\u63a5\u53e3\u6587\u6863](https://kubernetes-csi.github.io/docs/)\u4e2d\u8fd8\u6709\u5173\u4e8e\u5377\u5065\u5eb7\u68c0\u67e5\u7684\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002 ## \u5982\u4f55\u53c2\u4e0e\uff1f [Kubernetes Slack \u9891\u9053 #csi](https://kubernetes.slack.com/messages/csi) \u548c\u4efb\u4f55[\u6807\u51c6 SIG Storage \u901a\u4fe1\u9891\u9053](https://github.com/kubernetes/community/blob/master/sig-storage/README.md#contact)\u90fd\u662f\u8054\u7cfb SIG Storage \u548c CSI \u56e2\u961f\u7684\u7edd\u4f73\u5a92\u4ecb\u3002 \u6211\u4eec\u975e\u5e38\u611f\u8c22\u5728 1.21 \u4e2d\u5e2e\u52a9\u53d1\u5e03\u6b64\u529f\u80fd\u7684\u8d21\u732e\u8005\u3002 \u6211\u4eec\u8981\u611f\u8c22 Yuquan Ren ([NickrenREN](https://github.com/nickrenren)) \u5728\u5916\u90e8\u5065\u5eb7\u76d1\u63a7\u4ed3\u5e93\u4e2d\u5b9e\u73b0\u4e86\u521d\u59cb\u5377\u5065\u5eb7\u76d1\u63a7\u63a7\u5236\u5668\u548c\u4ee3\u7406\uff0c \u611f\u8c22 Ran Xu ([fengzixu](https://github.com/fengzixu)) \u5728 1.21 \u4e2d\u5c06\u5377\u5065\u5eb7\u76d1\u63a7\u903b\u8f91\u4ece\u5916\u90e8\u4ee3\u7406\u8f6c\u79fb\u5230 Kubelet\uff0c \u6211\u4eec\u7279\u522b\u611f\u8c22\u4ee5\u4e0b\u4eba\u5458\u7684\u6df1\u523b\u8bc4\u8bba\uff1a David Ashpole ([dashpole](https://github.com/dashpole))\u3001 Michelle Au ([msau42](https://github.com/msau42))\u3001 David Eads ([deads2k](https://github.com/deads2k))\u3001 Elana Hashman ([ehashman](https://github.com/ehashman))\u3001 Seth Jennings ([sjenning](https://github.com/sjenning)) \u548c Jiawei Wang ([Jiawei0227](https://github.com/Jiawei0227)) \u90a3\u4e9b\u6709\u5174\u8da3\u53c2\u4e0e CSI \u6216 Kubernetes \u5b58\u50a8\u7cfb\u7edf\u4efb\u4f55\u90e8\u5206\u7684\u8bbe\u8ba1\u548c\u5f00\u53d1\u7684\u4eba\uff0c \u8bf7\u52a0\u5165 [Kubernetes Storage \u7279\u6b8a\u5174\u8da3\u5c0f\u7ec4](https://github.com/kubernetes/community/tree/master/sig-storage)\uff08SIG\uff09\u3002 \u6211\u4eec\u6b63\u5728\u8fc5\u901f\u53d1\u5c55\uff0c\u5e76\u4e14\u6b22\u8fce\u65b0\u7684\u8d21\u732e\u8005\u3002 ", "positive_passages": [{"docid": "doc-en-website-e02b5e261dade2f7eaeb7d43781b2d9c3987b4123eae91318eabf94fcdf51677", "text": "Problem: 2021-04-16-volume-health-monitoring- does not have chinese version Proposed Solution: add chinese docs in website Comments /language zh /assign\n/triage accepted", "commid": "website_issue_35650", "tokennum": 39}], "negative_passages": []} {"query_id": "q-en-website-d81c51e97ae9d2d102c40e7ac0302d4e6b699c272b3cb388a5e8fef6b917d829", "query": " --- title: \u8c03\u5ea6\u5668\u914d\u7f6e content_type: concept weight: 20 --- {{< feature-state for_k8s_version=\"v1.19\" state=\"beta\" >}} \u4f60\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u8def\u5f84\u4f20\u7ed9 `kube-scheduler` \u7684\u547d\u4ee4\u884c\u53c2\u6570\uff0c\u5b9a\u5236 `kube-scheduler` \u7684\u884c\u4e3a\u3002 \u4f60\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c `kube-scheduler --config ` \u6765\u8bbe\u7f6e\u8c03\u5ea6\u914d\u7f6e\uff0c \u914d\u7f6e\u6587\u4ef6\u4f7f\u7528\u7ec4\u4ef6\u914d\u7f6e\u7684 API ([`v1alpha1`](https://pkg.go.dev/k8s.io/kube-scheduler@v0.18.0/config/v1alpha1?tab=doc#KubeSchedulerConfiguration) \u6216 [`v1alpha2`](https://pkg.go.dev/k8s.io/kube-scheduler@v0.18.0/config/v1alpha2?tab=doc#KubeSchedulerConfiguration))\u3002 `v1alpha2` \u53ef\u4ee5\u914d\u7f6e kube-scheduler \u8fd0\u884c[\u591a\u4e2a\u914d\u7f6e\u6587\u4ef6](#multiple-profiles)\u3002 \u6700\u7b80\u5355\u7684\u914d\u7f6e\u5982\u4e0b\uff1a ```yaml apiVersion: kubescheduler.config.k8s.io/v1beta1 kind: KubeSchedulerConfiguration clientConnection: kubeconfig: /etc/srv/kubernetes/kube-scheduler/kubeconfig ``` ## \u914d\u7f6e\u6587\u4ef6 {#profiles} \u901a\u8fc7\u8c03\u5ea6\u914d\u7f6e\u6587\u4ef6\uff0c\u4f60\u53ef\u4ee5\u914d\u7f6e {{< glossary_tooltip text=\"kube-scheduler\" term_id=\"kube-scheduler\" >}} \u5728\u4e0d\u540c\u9636\u6bb5\u7684\u8c03\u5ea6\u884c\u4e3a\u3002 \u6bcf\u4e2a\u9636\u6bb5\u90fd\u5728\u4e00\u4e2a[\u6269\u5c55\u70b9](#extension-points)\u4e2d\u516c\u5f00\u3002 [\u8c03\u5ea6\u63d2\u4ef6](#scheduling-plugins)\u901a\u8fc7\u5b9e\u73b0\u4e00\u4e2a\u6216\u591a\u4e2a\u6269\u5c55\u70b9\uff0c\u6765\u63d0\u4f9b\u8c03\u5ea6\u884c\u4e3a\u3002 \u4f60\u53ef\u4ee5\u914d\u7f6e\u540c\u4e00 `kube-scheduler` \u5b9e\u4f8b\u4f7f\u7528[\u591a\u4e2a\u914d\u7f6e\u6587\u4ef6](#multiple-profiles)\u3002 ### \u6269\u5c55\u70b9 {#extensions-points} \u8c03\u5ea6\u884c\u4e3a\u53d1\u751f\u5728\u4e00\u7cfb\u5217\u9636\u6bb5\u4e2d\uff0c\u8fd9\u4e9b\u9636\u6bb5\u662f\u901a\u8fc7\u4ee5\u4e0b\u6269\u5c55\u70b9\u516c\u5f00\u7684\uff1a 1. `QueueSort`\uff1a\u8fd9\u4e9b\u63d2\u4ef6\u5bf9\u8c03\u5ea6\u961f\u5217\u4e2d\u7684\u60ac\u51b3\u7684 Pod \u6392\u5e8f\u3002 \u4e00\u6b21\u53ea\u80fd\u542f\u7528\u4e00\u4e2a\u961f\u5217\u6392\u5e8f\u63d2\u4ef6\u3002 2. `PreFilter`\uff1a\u8fd9\u4e9b\u63d2\u4ef6\u7528\u4e8e\u5728\u8fc7\u6ee4\u4e4b\u524d\u9884\u5904\u7406\u6216\u68c0\u67e5 Pod \u6216\u96c6\u7fa4\u7684\u4fe1\u606f\u3002 \u5b83\u4eec\u53ef\u4ee5\u5c06 Pod \u6807\u8bb0\u4e3a\u4e0d\u53ef\u8c03\u5ea6\u3002 3. `Filter`\uff1a\u8fd9\u4e9b\u63d2\u4ef6\u76f8\u5f53\u4e8e\u8c03\u5ea6\u7b56\u7565\u4e2d\u7684\u65ad\u8a00\uff08Predicates\uff09\uff0c\u7528\u4e8e\u8fc7\u6ee4\u4e0d\u80fd\u8fd0\u884c Pod \u7684\u8282\u70b9\u3002 \u8fc7\u6ee4\u5668\u7684\u8c03\u7528\u987a\u5e8f\u662f\u53ef\u914d\u7f6e\u7684\u3002 \u5982\u679c\u6ca1\u6709\u4e00\u4e2a\u8282\u70b9\u901a\u8fc7\u6240\u6709\u8fc7\u6ee4\u5668\u7684\u7b5b\u9009\uff0cPod \u5c06\u4f1a\u88ab\u6807\u8bb0\u4e3a\u4e0d\u53ef\u8c03\u5ea6\u3002 4. `PreScore`\uff1a\u8fd9\u662f\u4e00\u4e2a\u4fe1\u606f\u6269\u5c55\u70b9\uff0c\u53ef\u7528\u4e8e\u9884\u6253\u5206\u5de5\u4f5c\u3002 5. `Score`\uff1a\u8fd9\u4e9b\u63d2\u4ef6\u7ed9\u901a\u8fc7\u7b5b\u9009\u9636\u6bb5\u7684\u8282\u70b9\u6253\u5206\u3002\u8c03\u5ea6\u5668\u4f1a\u9009\u62e9\u5f97\u5206\u6700\u9ad8\u7684\u8282\u70b9\u3002 6. `Reserve`\uff1a\u8fd9\u662f\u4e00\u4e2a\u4fe1\u606f\u6269\u5c55\u70b9\uff0c\u5f53\u8d44\u6e90\u5df2\u7ecf\u9884\u7559\u7ed9 Pod \u65f6\uff0c\u4f1a\u901a\u77e5\u63d2\u4ef6\u3002 \u8fd9\u4e9b\u63d2\u4ef6\u8fd8\u5b9e\u73b0\u4e86 `Unreserve` \u63a5\u53e3\uff0c\u5728 `Reserve` \u671f\u95f4\u6216\u4e4b\u540e\u51fa\u73b0\u6545\u969c\u65f6\u8c03\u7528\u3002 7. `Permit`\uff1a\u8fd9\u4e9b\u63d2\u4ef6\u53ef\u4ee5\u963b\u6b62\u6216\u5ef6\u8fdf Pod \u7ed1\u5b9a\u3002 8. `PreBind`\uff1a\u8fd9\u4e9b\u63d2\u4ef6\u5728 Pod \u7ed1\u5b9a\u8282\u70b9\u4e4b\u524d\u6267\u884c\u3002 9. `Bind`\uff1a\u8fd9\u4e2a\u63d2\u4ef6\u5c06 Pod \u4e0e\u8282\u70b9\u7ed1\u5b9a\u3002\u7ed1\u5b9a\u63d2\u4ef6\u662f\u6309\u987a\u5e8f\u8c03\u7528\u7684\uff0c\u53ea\u8981\u6709\u4e00\u4e2a\u63d2\u4ef6\u5b8c\u6210\u4e86\u7ed1\u5b9a\uff0c\u5176\u4f59\u63d2\u4ef6\u90fd\u4f1a\u8df3\u8fc7\u3002\u7ed1\u5b9a\u63d2\u4ef6\u81f3\u5c11\u9700\u8981\u4e00\u4e2a\u3002 10. `PostBind`\uff1a\u8fd9\u662f\u4e00\u4e2a\u4fe1\u606f\u6269\u5c55\u70b9\uff0c\u5728 Pod \u7ed1\u5b9a\u4e86\u8282\u70b9\u4e4b\u540e\u8c03\u7528\u3002 \u5bf9\u6bcf\u4e2a\u6269\u5c55\u70b9\uff0c\u4f60\u53ef\u4ee5\u7981\u7528[\u9ed8\u8ba4\u63d2\u4ef6](#scheduling-plugins)\u6216\u8005\u662f\u542f\u7528\u81ea\u5df1\u7684\u63d2\u4ef6\uff0c\u4f8b\u5982\uff1a ```yaml apiVersion: kubescheduler.config.k8s.io/v1beta1 kind: KubeSchedulerConfiguration profiles: - plugins: score: disabled: - name: NodeResourcesLeastAllocated enabled: - name: MyCustomPluginA weight: 2 - name: MyCustomPluginB weight: 1 ``` \u4f60\u53ef\u4ee5\u5728 `disabled` \u6570\u7ec4\u4e2d\u4f7f\u7528 `*` \u7981\u7528\u8be5\u6269\u5c55\u70b9\u7684\u6240\u6709\u9ed8\u8ba4\u63d2\u4ef6\u3002 \u5982\u679c\u9700\u8981\uff0c\u8fd9\u4e2a\u5b57\u6bb5\u4e5f\u53ef\u4ee5\u7528\u6765\u5bf9\u63d2\u4ef6\u91cd\u65b0\u987a\u5e8f\u3002 ### \u8c03\u5ea6\u63d2\u4ef6 {#scheduling-plugin} 1. `UnReserve`\uff1a\u8fd9\u662f\u4e00\u4e2a\u4fe1\u606f\u6269\u5c55\u70b9\uff0c\u5982\u679c\u4e00\u4e2a Pod \u5728\u9884\u7559\u540e\u88ab\u62d2\u7edd\uff0c\u5e76\u4e14\u88ab `Permit` \u63d2\u4ef6\u6401\u7f6e\uff0c\u5b83\u5c31\u4f1a\u88ab\u8c03\u7528\u3002 ## \u8c03\u5ea6\u63d2\u4ef6 {#scheduling-plugins} \u4e0b\u9762\u9ed8\u8ba4\u542f\u7528\u7684\u63d2\u4ef6\u5b9e\u73b0\u4e86\u4e00\u4e2a\u6216\u591a\u4e2a\u6269\u5c55\u70b9\uff1a - `SelectorSpread`\uff1a\u5bf9\u4e8e\u5c5e\u4e8e {{< glossary_tooltip text=\"Services\" term_id=\"service\" >}}\u3001 {{< glossary_tooltip text=\"ReplicaSets\" term_id=\"replica-set\" >}} \u548c {{< glossary_tooltip text=\"StatefulSets\" term_id=\"statefulset\" >}} \u7684 Pod\uff0c\u504f\u597d\u8de8\u591a\u4e2a\u8282\u70b9\u90e8\u7f72\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PreScore`\uff0c`Score`\u3002 - `ImageLocality`\uff1a\u9009\u62e9\u5df2\u7ecf\u5b58\u5728 Pod \u8fd0\u884c\u6240\u9700\u5bb9\u5668\u955c\u50cf\u7684\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Score`\u3002 - `TaintToleration`\uff1a\u5b9e\u73b0\u4e86[\u6c61\u70b9\u548c\u5bb9\u5fcd](/zh/docs/concepts/scheduling-eviction/taint-and-toleration/)\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\uff0c`Prescore`\uff0c`Score`\u3002 - `NodeName`\uff1a\u68c0\u67e5 Pod \u6307\u5b9a\u7684\u8282\u70b9\u540d\u79f0\u4e0e\u5f53\u524d\u8282\u70b9\u662f\u5426\u5339\u914d\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `NodePorts`\uff1a\u68c0\u67e5 Pod \u8bf7\u6c42\u7684\u7aef\u53e3\u5728\u8282\u70b9\u4e0a\u662f\u5426\u53ef\u7528\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PreFilter`\uff0c`Filter`\u3002 - `NodePreferAvoidPods`\uff1a\u57fa\u4e8e\u8282\u70b9\u7684 {{< glossary_tooltip text=\"\u6ce8\u89e3\" term_id=\"annotation\" >}} `scheduler.alpha.kubernetes.io/preferAvoidPods` \u6253\u5206\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Score`\u3002 - `NodeAffinity`\uff1a\u5b9e\u73b0\u4e86[\u8282\u70b9\u9009\u62e9\u5668](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) \u548c[\u8282\u70b9\u4eb2\u548c\u6027](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity)\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\uff0c`Score`. - `PodTopologySpread`\uff1a\u5b9e\u73b0\u4e86 [Pod \u62d3\u6251\u5206\u5e03](/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints/)\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PreFilter`\uff0c`Filter`\uff0c`PreScore`\uff0c`Score`\u3002 - `NodeUnschedulable`\uff1a\u8fc7\u6ee4 `.spec.unschedulable` \u503c\u4e3a true \u7684\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `NodeResourcesFit`\uff1a\u68c0\u67e5\u8282\u70b9\u662f\u5426\u62e5\u6709 Pod \u8bf7\u6c42\u7684\u6240\u6709\u8d44\u6e90\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PreFilter`\uff0c`Filter`\u3002 - `NodeResourcesBalancedAllocation`\uff1a\u8c03\u5ea6 Pod \u65f6\uff0c\u9009\u62e9\u8d44\u6e90\u4f7f\u7528\u66f4\u4e3a\u5747\u8861\u7684\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Score`\u3002 - `NodeResourcesLeastAllocated`\uff1a\u9009\u62e9\u8d44\u6e90\u5206\u914d\u8f83\u5c11\u7684\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Score`\u3002 - `VolumeBinding`\uff1a\u68c0\u67e5\u8282\u70b9\u662f\u5426\u6709\u8bf7\u6c42\u7684\u5377\uff0c\u6216\u662f\u5426\u53ef\u4ee5\u7ed1\u5b9a\u8bf7\u6c42\u7684\u5377\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9: `PreFilter`\uff0c`Filter`\uff0c`Reserve`\uff0c`PreBind`\u3002 - `VolumeRestrictions`\uff1a\u68c0\u67e5\u6302\u8f7d\u5230\u8282\u70b9\u4e0a\u7684\u5377\u662f\u5426\u6ee1\u8db3\u5377\u63d0\u4f9b\u7a0b\u5e8f\u7684\u9650\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `VolumeZone`\uff1a\u68c0\u67e5\u8bf7\u6c42\u7684\u5377\u662f\u5426\u5728\u4efb\u4f55\u533a\u57df\u90fd\u6ee1\u8db3\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `NodeVolumeLimits`\uff1a\u68c0\u67e5\u8be5\u8282\u70b9\u662f\u5426\u6ee1\u8db3 CSI \u5377\u9650\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `EBSLimits`\uff1a\u68c0\u67e5\u8282\u70b9\u662f\u5426\u6ee1\u8db3 AWS EBS \u5377\u9650\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `GCEPDLimits`\uff1a\u68c0\u67e5\u8be5\u8282\u70b9\u662f\u5426\u6ee1\u8db3 GCP-PD \u5377\u9650\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `AzureDiskLimits`\uff1a\u68c0\u67e5\u8be5\u8282\u70b9\u662f\u5426\u6ee1\u8db3 Azure \u5377\u9650\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `InterPodAffinity`\uff1a\u5b9e\u73b0 [Pod \u95f4\u4eb2\u548c\u6027\u4e0e\u53cd\u4eb2\u548c\u6027](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity)\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PreFilter`\uff0c`Filter`\uff0c`PreScore`\uff0c`Score`\u3002 - `PrioritySort`\uff1a\u63d0\u4f9b\u9ed8\u8ba4\u7684\u57fa\u4e8e\u4f18\u5148\u7ea7\u7684\u6392\u5e8f\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`QueueSort`\u3002 - `DefaultBinder`\uff1a\u63d0\u4f9b\u9ed8\u8ba4\u7684\u7ed1\u5b9a\u673a\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Bind`\u3002 - `DefaultPreemption`\uff1a\u63d0\u4f9b\u9ed8\u8ba4\u7684\u62a2\u5360\u673a\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PostFilter`\u3002 \u4f60\u4e5f\u53ef\u4ee5\u901a\u8fc7\u7ec4\u4ef6\u914d\u7f6e API \u542f\u7528\u4ee5\u4e0b\u63d2\u4ef6\uff08\u9ed8\u8ba4\u4e0d\u542f\u7528\uff09: - `NodeResourcesMostAllocated`\uff1a\u9009\u62e9\u5df2\u5206\u914d\u8d44\u6e90\u591a\u7684\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Score`\u3002 - `RequestedToCapacityRatio`\uff1a\u6839\u636e\u5df2\u5206\u914d\u8d44\u6e90\u7684\u67d0\u51fd\u6570\u8bbe\u7f6e\u9009\u62e9\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Score`\u3002 - `NodeResourceLimits`\uff1a\u9009\u62e9\u6ee1\u8db3 Pod \u8d44\u6e90\u9650\u5236\u7684\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PreScore`\uff0c`Score`\u3002 - `CinderVolume`\uff1a\u68c0\u67e5\u8be5\u8282\u70b9\u662f\u5426\u6ee1\u8db3 OpenStack Cinder \u5377\u9650\u5236\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\u3002 - `NodeLabel`\uff1a\u6839\u636e\u914d\u7f6e\u7684 {{< glossary_tooltip text=\"\u6807\u7b7e\" term_id=\"label\" >}} \u8fc7\u6ee4\u8282\u70b9\u548c/\u6216\u7ed9\u8282\u70b9\u6253\u5206\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`Filter`\uff0c`Score`\u3002 - `ServiceAffinity`\uff1a\u68c0\u67e5\u5c5e\u4e8e\u67d0\u4e2a {{< glossary_tooltip term_id=\"service\" >}} \u7684 Pod \u4e0e\u914d\u7f6e\u7684\u6807\u7b7e\u6240\u5b9a\u4e49\u7684\u8282\u70b9\u96c6\u662f\u5426\u9002\u914d\u3002 \u8fd9\u4e2a\u63d2\u4ef6\u8fd8\u652f\u6301\u5c06\u5c5e\u4e8e\u67d0\u4e2a Service \u7684 Pod \u5206\u6563\u5230\u5404\u4e2a\u8282\u70b9\u3002 \u5b9e\u73b0\u7684\u6269\u5c55\u70b9\uff1a`PreFilter`\uff0c`Filter`\uff0c`Score`\u3002 ### \u591a\u914d\u7f6e\u6587\u4ef6 {#multiple-profiles} \u4f60\u53ef\u4ee5\u914d\u7f6e `kube-scheduler` \u8fd0\u884c\u591a\u4e2a\u914d\u7f6e\u6587\u4ef6\u3002 \u6bcf\u4e2a\u914d\u7f6e\u6587\u4ef6\u90fd\u6709\u4e00\u4e2a\u5173\u8054\u7684\u8c03\u5ea6\u5668\u540d\u79f0\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u5176\u6269\u5c55\u70b9\u4e2d\u914d\u7f6e\u4e00\u7ec4\u4e0d\u540c\u7684\u63d2\u4ef6\u3002 \u4f7f\u7528\u4e0b\u9762\u7684\u914d\u7f6e\u6837\u4f8b\uff0c\u8c03\u5ea6\u5668\u5c06\u8fd0\u884c\u4e24\u4e2a\u914d\u7f6e\u6587\u4ef6\uff1a\u4e00\u4e2a\u4f7f\u7528\u9ed8\u8ba4\u63d2\u4ef6\uff0c\u53e6\u4e00\u4e2a\u7981\u7528\u6240\u6709\u6253\u5206\u63d2\u4ef6\u3002 ```yaml apiVersion: kubescheduler.config.k8s.io/v1beta1 kind: KubeSchedulerConfiguration profiles: - schedulerName: default-scheduler - schedulerName: no-scoring-scheduler plugins: preScore: disabled: - name: '*' score: disabled: - name: '*' ``` \u5e0c\u671b\u6839\u636e\u7279\u5b9a\u914d\u7f6e\u6587\u4ef6\u8c03\u5ea6\u7684 Pod\uff0c\u53ef\u4ee5\u5728 `.spec.schedulerName` \u5b57\u6bb5\u6307\u5b9a\u76f8\u5e94\u7684\u8c03\u5ea6\u5668\u540d\u79f0\u3002 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a `default-scheduler` \u7684\u914d\u7f6e\u6587\u4ef6\u3002 \u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u5305\u62ec\u4e0a\u9762\u63cf\u8ff0\u7684\u6240\u6709\u9ed8\u8ba4\u63d2\u4ef6\u3002 \u58f0\u660e\u591a\u4e2a\u914d\u7f6e\u6587\u4ef6\u65f6\uff0c\u6bcf\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d\u8c03\u5ea6\u5668\u540d\u79f0\u5fc5\u987b\u552f\u4e00\u3002 \u5982\u679c Pod \u672a\u6307\u5b9a\u8c03\u5ea6\u5668\u540d\u79f0\uff0ckube-apiserver \u5c06\u4f1a\u628a\u5b83\u8bbe\u7f6e\u4e3a `default-scheduler`\u3002 \u56e0\u6b64\uff0c\u5e94\u8be5\u5b58\u5728\u4e00\u4e2a\u540d\u4e3a `default-scheduler` \u7684\u914d\u7f6e\u6587\u4ef6\u6765\u8c03\u5ea6\u8fd9\u4e9b Pod\u3002 {{< note >}} Pod \u7684\u8c03\u5ea6\u4e8b\u4ef6\u628a `.spec.schedulerName` \u5b57\u6bb5\u503c\u4f5c\u4e3a ReportingController\u3002 \u9886\u5bfc\u8005\u9009\u62e9\u4e8b\u4ef6\u4f7f\u7528\u5217\u8868\u4e2d\u7b2c\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u8c03\u5ea6\u5668\u540d\u79f0\u3002 {{< /note >}} {{< note >}} \u6240\u6709\u914d\u7f6e\u6587\u4ef6\u5fc5\u987b\u5728 QueueSort \u6269\u5c55\u70b9\u4f7f\u7528\u76f8\u540c\u7684\u63d2\u4ef6\uff0c\u5e76\u5177\u6709\u76f8\u540c\u7684\u914d\u7f6e\u53c2\u6570\uff08\u5982\u679c\u9002\u7528\uff09\u3002 \u8fd9\u662f\u56e0\u4e3a\u8c03\u5ea6\u5668\u53ea\u6709\u4e00\u4e2a\u7684\u961f\u5217\u4fdd\u5b58\u60ac\u51b3\u7684 Pod\u3002 {{< /note >}} ## {{% heading \"whatsnext\" %}} * \u9605\u8bfb [kube-scheduler \u53c2\u8003](/zh/docs/reference/command-line-tools-reference/kube-scheduler/) * \u4e86\u89e3[\u8c03\u5ea6](/zh/docs/concepts/scheduling-eviction/kube-scheduler/) No newline at end of file", "positive_passages": [{"docid": "doc-en-website-678a13a3b65e95bd91ea659eff148f84bdf02a26f57bda73bc993c22baf72c68", "text": "Problem: is missing in Chinese version. See more: Proposed Solution: Add /docs/tasks/configmap-secret/ to zh version with three articles to be translated. [x] [x] Page to Update:\n/assign\n/language zh", "commid": "website_issue_24018", "tokennum": 55}], "negative_passages": []} {"query_id": "q-en-website-d92eed0afe691b58b59d93fec9a9244e2853ed0d2e21855e37b31b0cdc8ec75d", "query": "{{< codenew file=\"service/networking/network-policy-default-deny-egress.yaml\" >}} This ensures that even pods that aren't selected by any other NetworkPolicy will not be allowed egress traffic. This policy does not change the default ingress isolation behavior. change the ingress isolation behavior of any pod. ### Default allow all egress traffic ### Allow all egress traffic If you want to allow all traffic from all pods in a namespace (even if policies are added that cause some pods to be treated as \"isolated\"), you can create a policy that explicitly allows all egress traffic in that namespace. If you want to allow all connections from all pods in a namespace, you can create a policy that explicitly allows all outgoing connections from pods in that namespace. {{< codenew file=\"service/networking/network-policy-allow-all-egress.yaml\" >}} With this policy in place, no additional policy or policies can cause any outgoing connection from those pods to be denied. This policy has no effect on isolation for ingress to any pod. ### Default deny all ingress and all egress traffic You can create a \"default\" policy for a namespace which prevents all ingress AND egress traffic by creating the following NetworkPolicy in that namespace.", "positive_passages": [{"docid": "doc-en-website-3fe28d3fe0159a80bd4bc084cd20522de06d6ed5856d6d70ebf1a58a8d15ad74", "text": "As discussed in the sig-networking mailing list (), has not been fully updated since the introduction of egress filtering.\n/sig network /sig docs /kind bug (it's a bug because the doc should already have been updated) /language en /triage accepted\n/priority backlog", "commid": "website_issue_30908", "tokennum": 66}], "negative_passages": []} {"query_id": "q-en-website-d9cdb5c7c2bc52f8eda762f8b72333bb8a03e61e8d6496173315e8e5312d002d", "query": "```shell $ export SERVICE_IP=$(kubectl get service nginx-service -o go-template={% raw %}{{.spec.clusterIP}}{% endraw %}) $ export SERVICE_PORT=$(kubectl get service nginx-service -o go-template={% raw %}{{(index .spec.ports 0).port}}{% endraw %}) $ export SERVICE_PORT=$(kubectl get service nginx-service -o go-template='{% raw %}{{(index .spec.ports 0).port}}{% endraw %}') $ curl http://${SERVICE_IP}:${SERVICE_PORT} ```", "positive_passages": [{"docid": "doc-en-website-af4d70c31fbb2d60b0b95fca9ce2377cf369cc64c810dce9f7350bcf3092bed1", "text": "Below command has a syntax error Add a single quotation or double quotation for the template part can make it work. PR will be sent later.", "commid": "website_issue_435", "tokennum": 30}], "negative_passages": []} {"query_id": "q-en-website-da6759f31f0507ffef9b6507a0f1e2dbf48b5a4f3460a11da3b92f9820f8672f", "query": "Sebagai contoh, untuk menghasilan sebuah Secret dari _file-file_ `./username.txt` dan `./password.txt` ```shell # Membuat sebuah file kustomization.yaml dengan SecretGenerator # Membuat sebuah berkas kustomization.yaml dengan SecretGenerator cat <./kustomization.yaml secretGenerator: - name: db-user-pass", "positive_passages": [{"docid": "doc-en-website-1a1d20e97d5721bd79b1304d2e9cab4ce6148cb08f3fdb764664c3d6c46ad71b", "text": "This issue is intended for contributor workshop as part of Cloud Native Day Indonesia on 7th Nov 2020. Please don't take it if you are not part of the workshop. There are several old translated pages that contain the english glossary \"file\", supposed to use Indonesian \"berkas\" as per KBBI. Please claim the task to fix them by giving comments on this Github issue. /language id Tasks to fix \"file\" -\"berkas\": [x] docs/tasks/manage-kubernetes-objects/imperative-[x] docs/tasks/manage-kubernetes-objects/declarative-[ ] docs/tasks/manage-kubernetes-objects/imperative-[ ] docs/tasks/configure-pod-container/configure-pod-[ ] docs/tasks/administer-cluster/sysctl-[ ] [x] [ ] docs/concepts/storage/storage-[ ] docs/concepts/services-networking/connect-applications-[ ] docs/concepts/services-[x] [x] docs/concepts/cluster-\n/triage accepted\n/assign\nI'm taking this page docs/tasks/manage-kubernetes-objects/imperative-\n/reopen\nReopened this issue. # Membuat sebuah file kustomization.yaml dengan SecretGenerator # Membuat sebuah berkas kustomization.yaml dengan SecretGenerator cat <./kustomization.yaml secretGenerator: - name: db-user-pass", "positive_passages": [{"docid": "doc-en-website-e59816a103de55b89a0eb872a1448689d93039ff70b1b64a6ee71d97ccdb408a", "text": "If this issue is safe to close now please do so with . Send feedback to sig-contributor-experience at . /lifecycle stale\nStale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-contributor-experience at . /lifecycle rotten\nRotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . Send feedback to sig-contributor-experience at . /close\nClosing this issue. title: CRI\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb title: \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0 content_type: concept weight: 10 weight: 20 --- {{< feature-state for_k8s_version=\"v1.6\" state=\"stable\" >}} Pod\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u3001Kubernetes\u306f\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u69d8\u3005\u306a\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002 {{% dockershim-removal %}} \u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u5404\u30ce\u30fc\u30c9\u304cPod\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3001{{< glossary_tooltip text=\"\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\" term_id=\"container-runtime\" >}}\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u30ce\u30fc\u30c9\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u305f\u3081\u306e\u6982\u8981\u3068\u95a2\u9023\u3059\u308b\u4f5c\u696d\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 Kubernetes {{< skew currentVersion >}}\u306b\u304a\u3044\u3066\u306f\u3001{{< glossary_tooltip term_id=\"cri\" text=\"Container Runtime Interface\">}} (CRI)\u306b\u6e96\u62e0\u3057\u305f\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 {{< caution >}} \u30b3\u30f3\u30c6\u30ca\u5b9f\u884c\u6642\u306brunc\u304c\u30b7\u30b9\u30c6\u30e0\u30d5\u30a1\u30a4\u30eb\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u30fc\u3092\u6271\u3048\u308b\u8106\u5f31\u6027\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002 \u60aa\u610f\u306e\u3042\u308b\u30b3\u30f3\u30c6\u30ca\u304c\u3053\u306e\u8106\u5f31\u6027\u3092\u5229\u7528\u3057\u3066runc\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u4e0a\u66f8\u304d\u3057\u3001 \u30b3\u30f3\u30c6\u30ca\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u4e0a\u3067\u4efb\u610f\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f[\u30b5\u30dd\u30fc\u30c8\u3059\u308bCRI\u306e\u30d0\u30fc\u30b8\u30e7\u30f3](#cri-versions)\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 \u3053\u306e\u554f\u984c\u306e\u66f4\u306a\u308b\u60c5\u5831\u306f[CVE-2019-5736](https://access.redhat.com/security/cve/cve-2019-5736)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 {{< /caution >}} \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3044\u304f\u3064\u304b\u306e\u4e00\u822c\u7684\u306a\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3092Kubernetes\u3067\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306e\u6982\u8981\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 ### \u9069\u7528\u6027 - [containerd](#containerd) - [CRI-O](#cri-o) - [Docker Engine](#docker) - [Mirantis Container Runtime](#mcr) {{< note >}} \u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306fLinux\u306bCRI\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u305f\u3081\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002 \u4ed6\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u5834\u5408\u3001\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u56fa\u6709\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u898b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002 {{< /note >}} \u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u5168\u3066\u306e\u30b3\u30de\u30f3\u30c9\u3092 `root` \u3067\u5b9f\u884c\u3057\u307e\u3059\u3002 \u4f8b\u3068\u3057\u3066\u3001\u30b3\u30de\u30f3\u30c9\u306b `sudo` \u3092\u4ed8\u3051\u305f\u308a\u3001 `root` \u306b\u306a\u3063\u3066\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u3067\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ### Cgroup\u30c9\u30e9\u30a4\u30d0\u30fc systemd\u304cLinux\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306einit\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001 init\u30d7\u30ed\u30bb\u30b9\u304c\u4f5c\u6210\u3055\u308c\u3001root\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30b0\u30eb\u30fc\u30d7(`cgroup`)\u3092\u4f7f\u3044\u3001cgroup\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3068\u3057\u3066\u884c\u52d5\u3057\u307e\u3059\u3002 systemd\u306fcgroup\u3068\u5bc6\u63a5\u306b\u7d71\u5408\u3055\u308c\u3066\u304a\u308a\u3001\u30d7\u30ed\u30bb\u30b9\u3054\u3068\u306bcgroup\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002 `cgroupfs` \u3092\u4f7f\u3046\u3088\u3046\u306b\u3001\u3042\u306a\u305f\u306e\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30e9\u30a4\u30e0\u3068kubelet\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 systemd\u3068\u4e00\u7dd2\u306b `cgroupfs` \u3092\u4f7f\u7528\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u306f\u30012\u3064\u306e\u7570\u306a\u308bcgroup\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304c\u3042\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002 v1.24\u4ee5\u524d\u306eKubernetes\u30ea\u30ea\u30fc\u30b9\u3067\u306f\u3001 _dockershim_ \u3068\u3044\u3046\u540d\u524d\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u305fDocker Engine\u3068\u306e\u76f4\u63a5\u306e\u7d71\u5408\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u306e\u7279\u5225\u306a\u76f4\u63a5\u7d71\u5408\u306f\u3001\u3082\u306f\u3084Kubernetes\u306e\u4e00\u90e8\u3067\u306f\u3042\u308a\u307e\u305b\u3093(\u3053\u306e\u524a\u9664\u306fv1.20\u30ea\u30ea\u30fc\u30b9\u306e\u4e00\u90e8\u3068\u3057\u3066[\u767a\u8868](/blog/2020/12/08/kubernetes-1-20-release-announcement/#dockershim-deprecation)\u3055\u308c\u3066\u3044\u307e\u3059)\u3002 dockershim\u306e\u5ec3\u6b62\u304c\u3069\u306e\u3088\u3046\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u304b\u306b\u3064\u3044\u3066\u306f\u3001[dockershim\u524a\u9664\u306e\u5f71\u97ff\u7bc4\u56f2\u3092\u78ba\u8a8d\u3059\u308b](/ja/docs/tasks/administer-cluster/migrating-from-dockershim/check-if-dockershim-removal-affects-you/) \u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 dockershim\u304b\u3089\u306e\u79fb\u884c\u306b\u3064\u3044\u3066\u77e5\u308a\u305f\u3044\u5834\u5408\u3001[dockershim\u304b\u3089\u306e\u79fb\u884c](/ja/docs/tasks/administer-cluster/migrating-from-dockershim/)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30b0\u30eb\u30fc\u30d7\u306f\u30d7\u30ed\u30bb\u30b9\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 \u5358\u4e00\u306ecgroup\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u306f\u3001\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u30d3\u30e5\u30fc\u3092\u5358\u7d14\u5316\u3057\u3001 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u4f7f\u7528\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u3068\u4f7f\u7528\u4e2d\u306e\u30ea\u30bd\u30fc\u30b9\u306b\u3064\u3044\u3066\u3088\u308a\u4e00\u8cab\u6027\u306e\u3042\u308b\u30d3\u30e5\u30fc\u306b\u306a\u308a\u307e\u3059\u3002 2\u3064\u306e\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304c\u3042\u308b\u5834\u5408\u3001\u305d\u308c\u3089\u306e\u30ea\u30bd\u30fc\u30b9\u306b\u3064\u3044\u30662\u3064\u306e\u30d3\u30e5\u30fc\u304c\u5f97\u3089\u308c\u307e\u3059\u3002 kubelet\u3068Docker\u306b `cgroupfs` \u3092\u4f7f\u7528\u3057\u3001\u30ce\u30fc\u30c9\u4e0a\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u6b8b\u308a\u306e\u30d7\u30ed\u30bb\u30b9\u306b `systemd` \u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u305f\u30ce\u30fc\u30c9\u304c\u3001 \u30ea\u30bd\u30fc\u30b9\u5727\u8feb\u4e0b\u3067\u4e0d\u5b89\u5b9a\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3068kubelet\u304ccgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3068\u3057\u3066systemd\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u30b7\u30b9\u30c6\u30e0\u306f\u5b89\u5b9a\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306eDocker\u8a2d\u5b9a\u306e `native.cgroupdriver=systemd` \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 v{{< skew currentVersion >}}\u4ee5\u5916\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306eKubernetes\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u305d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 {{< /note >}} {{< caution >}} \u3059\u3067\u306b\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u308b\u30ce\u30fc\u30c9\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u306f\u975e\u5e38\u306b\u304a\u3059\u3059\u3081\u3057\u307e\u305b\u3093\u3002 kubelet\u304c\u4e00\u65b9\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066Pod\u3092\u4f5c\u6210\u3057\u305f\u5834\u5408\u3001\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u5225\u306e\u3082\u3046\u4e00\u65b9\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u5909\u66f4\u3059\u308b\u3068\u3001\u305d\u306e\u3088\u3046\u306a\u65e2\u5b58\u306ePod\u306ePod\u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9\u3092\u518d\u4f5c\u6210\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 kubelet\u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u554f\u984c\u306f\u89e3\u6c7a\u3057\u306a\u3044\u3067\u3057\u3087\u3046\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u304b\u3089\u30ce\u30fc\u30c9\u3092\u7e2e\u9000\u3055\u305b\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u304b\u3089\u524a\u9664\u3057\u3066\u518d\u3073\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 {{< /caution >}} ## Docker ## \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a\u306e\u5fc5\u9808\u8981\u4ef6 \u305d\u308c\u305e\u308c\u306e\u30de\u30b7\u30f3\u306b\u5bfe\u3057\u3066Docker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u30d0\u30fc\u30b8\u30e7\u30f319.03.11\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u30011.13.1\u300117.03\u300117.06\u300117.09\u300118.06\u300118.09\u306b\u3064\u3044\u3066\u3082\u52d5\u4f5c\u304c\u78ba\u8a8d\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Kubernetes\u306e\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8\u306b\u3042\u308b\u3001Docker\u306e\u52d5\u4f5c\u78ba\u8a8d\u6e08\u307f\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3064\u3044\u3066\u3082\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306e\u624b\u9806\u3067\u306f\u3001\u5168\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306b\u5171\u901a\u306e\u8a2d\u5b9a\u3092Linux\u4e0a\u306eKubernetes\u30ce\u30fc\u30c9\u306b\u9069\u7528\u3057\u307e\u3059\u3002 \u30b7\u30b9\u30c6\u30e0\u3078Docker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u7279\u5b9a\u306e\u8a2d\u5b9a\u304c\u4e0d\u8981\u3067\u3042\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u624b\u9806\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u9802\u3044\u3066\u69cb\u3044\u307e\u305b\u3093\u3002 {{< tabs name=\"tab-cri-docker-installation\" >}} {{% tab name=\"Ubuntu 16.04+\" %}} \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001[Network Plugin Requirements](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements)\u307e\u305f\u306f\u3001\u7279\u5b9a\u306e\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ```shell # (Install Docker CE) ## \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 ### HTTPS\u8d8a\u3057\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4f7f\u7528\u3092apt\u306b\u8a31\u53ef\u3059\u308b\u305f\u3081\u306b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb apt-get update && apt-get install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 ``` ### IPv4\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6709\u52b9\u5316\u3057\u3001iptables\u304b\u3089\u30d6\u30ea\u30c3\u30b8\u3055\u308c\u305f\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u898b\u3048\u308b\u3088\u3046\u306b\u3059\u308b ```shell # Docker\u516c\u5f0f\u306eGPG\u9375\u3092\u8ffd\u52a0: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - ``` \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell # Docker\u306eapt\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0: add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" ``` ```bash cat < ```shell # Docker CE\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb apt-get update && apt-get install -y containerd.io=1.2.13-2 docker-ce=5:19.03.11~3-0~ubuntu-$(lsb_release -cs) docker-ce-cli=5:19.03.11~3-0~ubuntu-$(lsb_release -cs) ``` sudo modprobe overlay sudo modprobe br_netfilter ```shell # \u30c7\u30fc\u30e2\u30f3\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 cat > /etc/docker/daemon.json < # \u3053\u306e\u69cb\u6210\u306b\u5fc5\u8981\u306a\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3001\u518d\u8d77\u52d5\u3057\u3066\u3082\u5024\u306f\u6c38\u7d9a\u3057\u307e\u3059 cat < EOF ``` ```shell mkdir -p /etc/systemd/system/docker.service.d # \u518d\u8d77\u52d5\u305b\u305a\u306b\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u9069\u7528 sudo sysctl --system ``` ```shell # docker\u3092\u518d\u8d77\u52d5 systemctl daemon-reload systemctl restart docker ``` {{% /tab %}} {{% tab name=\"CentOS/RHEL 7.4+\" %}} \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066`br_netfilter`\u3068`overlay`\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u8aad\u307f\u8fbc\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ```shell # (Docker CE\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb) ## \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 ### \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb yum install -y yum-utils device-mapper-persistent-data lvm2 ```bash lsmod | grep br_netfilter lsmod | grep overlay ``` ```shell ## Docker\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo ``` \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001`net.bridge.bridge-nf-call-iptables`\u3001`net.bridge.bridge-nf-call-ip6tables`\u3001`net.ipv4.ip_forward`\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c1\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 ```shell ## Docker CE\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb yum update -y && yum install -y containerd.io-1.2.13 docker-ce-19.03.11 docker-ce-cli-19.03.11 ```bash sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward ``` ```shell ## /etc/docker \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210 mkdir /etc/docker ``` ## cgroup\u30c9\u30e9\u30a4\u30d0\u30fc {#cgroup-drivers} ```shell # \u30c7\u30fc\u30e2\u30f3\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 cat > /etc/docker/daemon.json < Linux\u3067\u306f\u3001\u30d7\u30ed\u30bb\u30b9\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u7d04\u3059\u308b\u305f\u3081\u306b{{< glossary_tooltip text=\"cgroup\" term_id=\"cgroup\" >}}\u304c\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 ```shell mkdir -p /etc/systemd/system/docker.service.d ``` {{< glossary_tooltip text=\"kubelet\" term_id=\"kubelet\" >}}\u3068\u57fa\u76e4\u3068\u306a\u308b\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u3001[\u30b3\u30f3\u30c6\u30ca\u306e\u30ea\u30bd\u30fc\u30b9\u7ba1\u7406](/ja/docs/concepts/configuration/manage-resources-containers/)\u3092\u5b9f\u65bd\u3057\u3001CPU/\u30e1\u30e2\u30ea\u30fc\u306e\u8981\u6c42\u3084\u5236\u9650\u306a\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u3001cgroup\u3068\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 cgroup\u3068\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3059\u308b\u305f\u3081\u306b\u3001kubelet\u304a\u3088\u3073\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306f*cgroup\u30c9\u30e9\u30a4\u30d0\u30fc*\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u969b\u3001kubelet\u3068\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u304c\u540c\u4e00\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3001\u540c\u4e00\u306e\u8a2d\u5b9a\u3092\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u4e0d\u53ef\u6b20\u3068\u306a\u308a\u307e\u3059\u3002 ```shell # docker\u3092\u518d\u8d77\u52d5 systemctl daemon-reload systemctl restart docker ``` {{% /tab %}} {{< /tabs >}} \u5229\u7528\u53ef\u80fd\u306acgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306f\u4ee5\u4e0b\u306e2\u3064\u3067\u3059\u3002 \u30d6\u30fc\u30c8\u6642\u306bDocker\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u59cb\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: * [`cgroupfs`](#cgroupfs-cgroup-driver) * [`systemd`](#systemd-cgroup-driver) ```shell sudo systemctl enable docker ``` ### cgroupfs\u30c9\u30e9\u30a4\u30d0\u30fc {#cgroupfs-cgroup-driver} \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001[Docker\u306e\u516c\u5f0f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30ac\u30a4\u30c9](https://docs.docker.com/engine/installation/)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 `cgroupfs`\u30c9\u30e9\u30a4\u30d0\u30fc\u306f\u3001kubelet\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3067\u3059\u3002 `cgroupfs`\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001kubelet\u3068\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306fcgroup\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3068\u76f4\u63a5\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3057\u3001cgroup\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 ## CRI-O [systemd](https://www.freedesktop.org/wiki/Software/systemd/)\u304cinit\u30b7\u30b9\u30c6\u30e0\u3067\u3042\u308b\u5834\u5408\u3001`cgroupfs`\u30c9\u30e9\u30a4\u30d0\u30fc\u306f\u63a8\u5968**\u3055\u308c\u307e\u305b\u3093**\u3002 \u306a\u305c\u306a\u3089\u3001systemd\u306f\u30b7\u30b9\u30c6\u30e0\u4e0a\u306ecgroup\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304c\u5358\u4e00\u3067\u3042\u308b\u3068\u60f3\u5b9a\u3057\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002 \u307e\u305f\u3001[cgroup v2](/ja/docs/concepts/architecture/cgroups)\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001`cgroupfs`\u306e\u4ee3\u308f\u308a\u306b`systemd` cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001CRI\u30e9\u30f3\u30bf\u30a4\u30e0\u3068\u3057\u3066`CRI-O`\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 ### systemd cgroup\u30c9\u30e9\u30a4\u30d0\u30fc {#systemd-cgroup-driver} \u30b7\u30b9\u30c6\u30e0\u3078CRI-O\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059: Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306einit\u30b7\u30b9\u30c6\u30e0\u306b[systemd](https://www.freedesktop.org/wiki/Software/systemd/)\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001 init\u30d7\u30ed\u30bb\u30b9\u306f\u30eb\u30fc\u30c8cgroup\u3092\u751f\u6210\u30fb\u6d88\u8cbb\u3057\u3001cgroup\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3068\u3057\u3066\u52d5\u4f5c\u3057\u307e\u3059\u3002 {{< note >}} CRI-O\u306e\u30e1\u30b8\u30e3\u30fc\u3068\u30de\u30a4\u30ca\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u306fKubernetes\u306e\u30e1\u30b8\u30e3\u30fc\u3068\u30de\u30a4\u30ca\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u4e00\u81f4\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u8a73\u7d30\u306f[CRI-O\u4e92\u63db\u6027\u8868](https://github.com/cri-o/cri-o)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 {{< /note >}} systemd\u306fcgroup\u3068\u5bc6\u63a5\u306b\u9023\u643a\u3057\u3066\u304a\u308a\u3001systemd\u30e6\u30cb\u30c3\u30c8\u3054\u3068\u306bcgroup\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002 \u305d\u306e\u7d50\u679c\u3001init\u30b7\u30b9\u30c6\u30e0\u306b`systemd`\u3092\u4f7f\u7528\u3057\u305f\u72b6\u614b\u3067`cgroupfs`\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001 \u30b7\u30b9\u30c6\u30e0\u306b\u306f2\u3064\u306e\u7570\u306a\u308bcgroup\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 ### \u4e8b\u524d\u6e96\u5099 2\u3064\u306ecgroup\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u3067\u5229\u7528\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u304a\u3088\u3073\u4f7f\u7528\u4e2d\u306e\u30ea\u30bd\u30fc\u30b9\u306b\u30012\u3064\u306e\u7570\u306a\u308b\u898b\u3048\u65b9\u304c\u4e0e\u3048\u3089\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 \u7279\u5b9a\u306e\u5834\u5408\u306b\u304a\u3044\u3066\u3001kubelet\u3068\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306b`cgroupfs`\u3092\u3001\u6b8b\u308a\u306e\u30d7\u30ed\u30bb\u30b9\u306b`systemd`\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u305f\u30ce\u30fc\u30c9\u304c\u9ad8\u8ca0\u8377\u6642\u306b\u4e0d\u5b89\u5b9a\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 ```shell modprobe overlay modprobe br_netfilter \u3053\u306e\u3088\u3046\u306a\u4e0d\u5b89\u5b9a\u6027\u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306f\u3001systemd\u304cinit\u30b7\u30b9\u30c6\u30e0\u306b\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306bkubelet\u3068\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3068\u3057\u3066`systemd`\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002 # \u5fc5\u8981\u306a\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u5024\u306f\u518d\u8d77\u52d5\u5f8c\u3082\u6c38\u7d9a\u5316\u3055\u308c\u307e\u3059\u3002 cat > /etc/sysctl.d/99-kubernetes-cri.conf < cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306b`systemd`\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b[`KubeletConfiguration`](/docs/tasks/administer-cluster/kubelet-config-file/)\u306e`cgroupDriver`\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u7de8\u96c6\u3057\u3066`systemd`\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 sysctl --system ```yaml apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration ... cgroupDriver: systemd ``` {{< tabs name=\"tab-cri-cri-o-installation\" >}} {{% tab name=\"Debian\" %}} kubelet\u7528\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3068\u3057\u3066`systemd`\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3001\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u3082`systemd`\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5177\u4f53\u7684\u306a\u624b\u9806\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u306a\u3069\u306e\u3001\u304a\u4f7f\u3044\u306e\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CRI-O\u3092\u4ee5\u4e0b\u306eOS\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001\u74b0\u5883\u5909\u6570$OS\u3092\u4ee5\u4e0b\u306e\u8868\u306e\u9069\u5207\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002 * [containerd](#containerd-systemd) * [CRI-O](#cri-o) | Operating system | $OS | | ---------------- | ----------------- | | Debian Unstable | `Debian_Unstable` | | Debian Testing | `Debian_Testing` | {{< caution >}} \u30af\u30e9\u30b9\u30bf\u30fc\u306b\u53c2\u52a0\u3057\u305f\u30ce\u30fc\u30c9\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u5909\u66f4\u3059\u308b\u306e\u306f\u30c7\u30ea\u30b1\u30fc\u30c8\u306a\u64cd\u4f5c\u3067\u3059\u3002 kubelet\u304c\u7279\u5b9a\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30bb\u30de\u30f3\u30c6\u30a3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066Pod\u3092\u4f5c\u6210\u3057\u3066\u3044\u305f\u5834\u5408\u3001 \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u5225\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u5909\u66f4\u3059\u308b\u3068\u3001\u305d\u306e\u3088\u3046\u306a\u65e2\u5b58\u306ePod\u306b\u5bfe\u3057\u3066Pod\u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9\u3092\u518d\u4f5c\u6210\u3057\u3088\u3046\u3068\u3057\u305f\u3068\u304d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 kubelet\u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u3053\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306f\u89e3\u6c7a\u3057\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002
\u305d\u3057\u3066\u3001`$VERSION`\u306bKubernetes\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5408\u308f\u305b\u305fCRI-O\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001CRI-O 1.18\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u5834\u5408\u306f\u3001`VERSION=1.18` \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u7279\u5b9a\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u56fa\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d0\u30fc\u30b8\u30e7\u30f3 1.18.3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001`VERSION=1.18:1.18.3` \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002
\u3082\u3057\u3042\u306a\u305f\u304c\u9069\u5207\u306a\u81ea\u52d5\u5316\u306e\u624b\u6bb5\u3092\u6301\u3063\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u66f4\u65b0\u3055\u308c\u305f\u8a2d\u5b9a\u3092\u4f7f\u7528\u3057\u3066\u30ce\u30fc\u30c9\u3092\u5225\u306e\u30ce\u30fc\u30c9\u306b\u7f6e\u304d\u63db\u3048\u308b\u304b\u3001\u81ea\u52d5\u5316\u3092\u4f7f\u7528\u3057\u3066\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002 {{< /caution >}} \u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell echo \"deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /\" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list echo \"deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /\" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list ### kubeadm\u3067\u7ba1\u7406\u3055\u308c\u305f\u30af\u30e9\u30b9\u30bf\u30fc\u3067\u306e`systemd`\u30c9\u30e9\u30a4\u30d0\u30fc\u3078\u306e\u79fb\u884c curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | apt-key add - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | apt-key add - \u65e2\u5b58\u306ekubeadm\u7ba1\u7406\u30af\u30e9\u30b9\u30bf\u30fc\u3067`systemd` cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u79fb\u884c\u3057\u305f\u3044\u5834\u5408\u306f\u3001[cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u8a2d\u5b9a](/ja/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/)\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002 apt-get update apt-get install cri-o cri-o-runc ``` ## \u30b5\u30dd\u30fc\u30c8\u3059\u308bCRI\u306e\u30d0\u30fc\u30b8\u30e7\u30f3 {#cri-versions} {{% /tab %}} \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u3001Container Runtime Interface\u306ev1alpha2\u4ee5\u4e0a\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 {{% tab name=\"Ubuntu\" %}} Kubernetes {{< skew currentVersion >}}\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067CRI API\u306ev1\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u304cv1 API\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001kubelet\u306f\u4ee3\u308f\u308a\u306b(\u975e\u63a8\u5968\u306e)v1alpha2 API\u306b\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u3057\u307e\u3059\u3002 CRI-O\u3092\u4ee5\u4e0b\u306eOS\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001\u74b0\u5883\u5909\u6570$OS\u3092\u4ee5\u4e0b\u306e\u8868\u306e\u9069\u5207\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002 ## \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0 {#container-runtimes} | Operating system | $OS | | ---------------- | ----------------- | | Ubuntu 20.04 | `xUbuntu_20.04` | | Ubuntu 19.10 | `xUbuntu_19.10` | | Ubuntu 19.04 | `xUbuntu_19.04` | | Ubuntu 18.04 | `xUbuntu_18.04` | {{% thirdparty-content %}}
\u6b21\u306b\u3001`$VERSION`\u3092Kubernetes\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u4e00\u81f4\u3059\u308bCRI-O\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001CRI-O 1.18\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u5834\u5408\u306f\u3001`VERSION=1.18` \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u7279\u5b9a\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u56fa\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d0\u30fc\u30b8\u30e7\u30f3 1.18.3 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001`VERSION=1.18:1.18.3` \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002
### containerd \u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell echo \"deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /\" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list echo \"deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /\" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list \u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001CRI\u30e9\u30f3\u30bf\u30a4\u30e0\u3068\u3057\u3066containerd\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u624b\u9806\u306e\u6982\u8981\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | apt-key add - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | apt-key add - \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b7\u30b9\u30c6\u30e0\u306bcontainerd\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059: apt-get update apt-get install cri-o cri-o-runc ``` {{% /tab %}} \u307e\u305a\u306f[containerd\u306e\u4f7f\u7528\u3092\u958b\u59cb\u3059\u308b](https://github.com/containerd/containerd/blob/main/docs/getting-started.md)\u306e\u6307\u793a\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002\u6709\u52b9\u306a`config.toml`\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u306b\u623b\u308a\u307e\u3059\u3002 {{% tab name=\"CentOS\" %}} {{< tabs name=\"Finding your config.toml file\" >}} {{% tab name=\"Linux\" %}} \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u30d1\u30b9`/etc/containerd/config.toml`\u306b\u3042\u308a\u307e\u3059\u3002 {{% /tab %}} {{% tab name=\"Windows\" %}} \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f`C:Program Filescontainerdconfig.toml`\u306b\u3042\u308a\u307e\u3059\u3002 {{% /tab %}} {{< /tabs >}} CRI-O\u3092\u4ee5\u4e0b\u306eOS\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001\u74b0\u5883\u5909\u6570$OS\u3092\u4ee5\u4e0b\u306e\u8868\u306e\u9069\u5207\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002 Linux\u3067\u306f\u3001containerd\u7528\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306eCRI\u30bd\u30b1\u30c3\u30c8\u306f`/run/containerd/containerd.sock`\u3067\u3059\u3002 Windows\u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306eCRI\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306f`npipe://./pipe/containerd-containerd`\u3067\u3059\u3002 | Operating system | $OS | | ---------------- | ----------------- | | Centos 8 | `CentOS_8` | | Centos 8 Stream | `CentOS_8_Stream` | | Centos 7 | `CentOS_7` | #### `systemd` cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u69cb\u6210\u3059\u308b
\u6b21\u306b\u3001`$VERSION`\u3092Kubernetes\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u4e00\u81f4\u3059\u308bCRI-O\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001CRI-O 1.18 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u5834\u5408\u306f\u3001`VERSION=1.18` \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u7279\u5b9a\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u56fa\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d0\u30fc\u30b8\u30e7\u30f3 1.18.3 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001`VERSION=1.18:1.18.3` \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002
`/etc/containerd/config.toml`\u5185\u3067`runc`\u304c`systemd` cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u3046\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo yum install cri-o ``` [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc] ... [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc.options] SystemdCgroup = true ``` {{% /tab %}} {{% tab name=\"openSUSE Tumbleweed\" %}} [cgroup v2](/ja/docs/concepts/architecture/cgroups)\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f`systemd` cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u5229\u7528\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 ```shell sudo zypper install cri-o ``` {{% /tab %}} {{% tab name=\"Fedora\" %}} {{< note >}} \u30d1\u30c3\u30b1\u30fc\u30b8(RPM\u3084`.deb`\u306a\u3069)\u304b\u3089containerd\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5834\u5408\u3001 CRI\u7d71\u5408\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 Kubernetes\u3067containerd\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001CRI\u30b5\u30dd\u30fc\u30c8\u3092\u6709\u52b9\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 `/etc/containerd/config.toml`\u5185\u306e`disabled_plugins`\u30ea\u30b9\u30c8\u306b`cri`\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u305f\u5834\u5408\u3001`containerd`\u3082\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30af\u30e9\u30b9\u30bf\u30fc\u306e\u521d\u56de\u69cb\u7bc9\u5f8c\u3001\u307e\u305f\u306fCNI\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u306b\u30b3\u30f3\u30c6\u30ca\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30eb\u30fc\u30d7\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001 \u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u5171\u306b\u63d0\u4f9b\u3055\u308c\u308bcontainerd\u306e\u8a2d\u5b9a\u306b\u4e92\u63db\u6027\u306e\u306a\u3044\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 [get-started.md](https://github.com/containerd/containerd/blob/main/docs/getting-started.md#advanced-topics)\u306b\u3042\u308b\u3088\u3046\u306b\u3001 `containerd config default > /etc/containerd/config.toml`\u3067containerd\u306e\u8a2d\u5b9a\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u305f\u4e0a\u3067\u3001 \u4e0a\u8a18\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 {{< /note >}} $VERSION\u306b\u306f\u3001Kubernetes\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u4e00\u81f4\u3059\u308bCRI-O\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001CRI-O 1.18\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u5834\u5408\u306f\u3001$VERSION=1.18\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u5229\u7528\u53ef\u80fd\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 ```shell dnf module list cri-o ``` CRI-O\u306fFedora\u306e\u7279\u5b9a\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u30d4\u30f3\u7559\u3081\u3059\u308b\u3053\u3068\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u3053\u306e\u5909\u66f4\u3092\u9069\u7528\u3057\u305f\u5834\u5408\u3001\u5fc5\u305acontainerd\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell dnf module enable cri-o:$VERSION dnf install cri-o sudo systemctl restart containerd ``` {{% /tab %}} {{< /tabs >}} kubeadm\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u624b\u52d5\u3067[kubelet cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u8a2d\u5b9a](/ja/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/#configuring-the-kubelet-cgroup-driver)\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002 #### \u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9(pause)\u30a4\u30e1\u30fc\u30b8\u306e\u4e0a\u66f8\u304d {#override-pause-image-containerd} ### CRI-O\u306e\u8d77\u52d5 [containerd\u306e\u8a2d\u5b9a](https://github.com/containerd/containerd/blob/main/docs/cri/config.md)\u3067\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3053\u3068\u3067\u3001\u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u4e0a\u66f8\u304d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 ```shell systemctl daemon-reload systemctl start crio ```toml [plugins.\"io.containerd.grpc.v1.cri\"] sandbox_image = \"registry.k8s.io/pause:3.2\" ``` \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001[CRI-O\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30ac\u30a4\u30c9](https://github.com/kubernetes-sigs/cri-o#getting-started)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3053\u306e\u5834\u5408\u3082\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u66f4\u65b0\u5f8c\u306b`systemctl restart containerd`\u3092\u5b9f\u884c\u3057\u3066`containerd`\u3082\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002 ## Containerd ### CRI-O \u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001CRI\u30e9\u30f3\u30bf\u30a4\u30e0\u3068\u3057\u3066`containerd`\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u672c\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3068\u3057\u3066CRI-O\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u624b\u9806\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 \u30b7\u30b9\u30c6\u30e0\u3078Containerd\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u306f\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 CRI-O\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001[CRI-O\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806](https://github.com/cri-o/cri-o/blob/main/install.md#readme)\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002 ### \u5fc5\u8981\u306a\u8a2d\u5b9a\u306e\u8ffd\u52a0 #### cgroup\u30c9\u30e9\u30a4\u30d0\u30fc ```shell cat > /etc/modules-load.d/containerd.conf < CRI-O\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067systemd cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3001\u304a\u305d\u3089\u304f\u554f\u984c\u306a\u304f\u52d5\u4f5c\u3057\u307e\u3059\u3002 `cgroupfs` cgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u5207\u308a\u66ff\u3048\u308b\u306b\u306f\u3001`/etc/crio/crio.conf` \u3092\u7de8\u96c6\u3059\u308b\u304b\u3001 `/etc/crio/crio.conf.d/02-cgroup-manager.conf`\u306b\u30c9\u30ed\u30c3\u30d7\u30a4\u30f3\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # \u5fc5\u8981\u306a\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u5024\u306f\u518d\u8d77\u52d5\u5f8c\u3082\u6c38\u7d9a\u5316\u3055\u308c\u307e\u3059\u3002 cat > /etc/sysctl.d/99-kubernetes-cri.conf < ```toml [crio.runtime] conmon_cgroup = \"pod\" cgroup_manager = \"cgroupfs\" ``` ### containerd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4e0a\u8a18\u3067`conmon_cgroup`\u3082\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CRI-O\u3067`cgroupfs`\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u3053\u3053\u306b\u306f`pod`\u3068\u3044\u3046\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4e00\u822c\u306b\u3001kubelet\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u8a2d\u5b9a(\u901a\u5e38\u306fkubeadm\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u307e\u3059)\u3068CRI-O\u306e\u8a2d\u5b9a\u306f\u4e00\u81f4\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 {{< tabs name=\"tab-cri-containerd-installation\" >}} {{% tab name=\"Ubuntu 16.04\" %}} CRI-O\u306e\u5834\u5408\u3001CRI\u30bd\u30b1\u30c3\u30c8\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067`/var/run/crio/crio.sock`\u3068\u306a\u308a\u307e\u3059\u3002 ```shell # (containerd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb) ## \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a ### HTTPS\u8d8a\u3057\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4f7f\u7528\u3092apt\u306b\u8a31\u53ef\u3059\u308b\u305f\u3081\u306b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb apt-get update && apt-get install -y apt-transport-https ca-certificates curl software-properties-common ``` #### \u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9(pause)\u30a4\u30e1\u30fc\u30b8\u306e\u4e0a\u66f8\u304d {#override-pause-image-cri-o} ```shell ## Docker\u516c\u5f0f\u306eGPG\u9375\u3092\u8ffd\u52a0 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - ``` [CRI-O\u306e\u8a2d\u5b9a](https://github.com/cri-o/cri-o/blob/main/docs/crio.conf.5.md)\u306b\u304a\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 ```shell ## Docker\u306eapt\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0 add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" ```toml [crio.image] pause_image=\"registry.k8s.io/pause:3.6\" ``` ```shell ## containerd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb apt-get update && apt-get install -y containerd.io ``` \u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u30e9\u30a4\u30d6\u8a2d\u5b9a\u30ea\u30ed\u30fc\u30c9\u306b\u3088\u308b\u5909\u66f4\u306e\u9069\u7528\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 `systemctl reload crio`\u307e\u305f\u306f`crio`\u30d7\u30ed\u30bb\u30b9\u306b`SIGHUP`\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u5909\u66f4\u3092\u9069\u7528\u3067\u304d\u307e\u3059\u3002 ```shell # containerd\u306e\u8a2d\u5b9a mkdir -p /etc/containerd containerd config default | sudo tee /etc/containerd/config.toml ``` ### Docker Engine {#docker} ```shell # containerd\u306e\u518d\u8d77\u52d5 systemctl restart containerd ``` {{% /tab %}} {{% tab name=\"CentOS/RHEL 7.4+\" %}} {{< note >}} \u3053\u306e\u624b\u9806\u3067\u306f\u3001Docker Engine\u3068Kubernetes\u3092\u7d71\u5408\u3059\u308b\u305f\u3081\u306b[`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)\u30a2\u30c0\u30d7\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 {{< /note >}} ```shell # (containerd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb) ## \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a ### \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb yum install -y yum-utils device-mapper-persistent-data lvm2 ``` 1. \u5404\u30ce\u30fc\u30c9\u306b\u3001\u4f7f\u7528\u3057\u3066\u3044\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u7528\u306eDocker\u3092[Docker Engine\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb](https://docs.docker.com/engine/install/#server)\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 ```shell ## Docker\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo ``` 2. [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)\u3092\u30ea\u30dd\u30b8\u30c8\u30ea\u5185\u306e\u6307\u793a\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 ```shell ## containerd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb yum update -y && yum install -y containerd.io ``` `cri-dockerd`\u306e\u5834\u5408\u3001CRI\u30bd\u30b1\u30c3\u30c8\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067`/run/cri-dockerd.sock`\u306b\u306a\u308a\u307e\u3059\u3002 ```shell ## containerd\u306e\u8a2d\u5b9a mkdir -p /etc/containerd containerd config default | sudo tee /etc/containerd/config.toml ``` ### Mirantis Container Runtime {#mcr} ```shell # containerd\u306e\u518d\u8d77\u52d5 systemctl restart containerd ``` {{% /tab %}} {{< /tabs >}} [Mirantis Container Runtime](https://docs.mirantis.com/mcr/20.10/overview.html)(MCR)\u306f\u3001 \u4ee5\u524d\u306fDocker Enterprise Edition\u3068\u3057\u3066\u77e5\u3089\u308c\u3066\u3044\u305f\u3001\u5546\u696d\u7684\u306b\u5229\u7528\u53ef\u80fd\u306a\u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u3067\u3059\u3002 MCR\u306b\u542b\u307e\u308c\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e[`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001 Mirantis Container Runtime\u3092Kubernetes\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 ### systemd Mirantis Container Runtime\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306b\u3064\u3044\u3066\u77e5\u308b\u306b\u306f\u3001[MCR\u30c7\u30d7\u30ed\u30a4\u30ac\u30a4\u30c9](https://docs.mirantis.com/mcr/20.10/install.html)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 `systemd`\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u3046\u306b\u306f\u3001`/etc/containerd/config.toml`\u5185\u3067`plugins.cri.systemd_cgroup = true`\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 kubeadm\u3092\u4f7f\u3046\u5834\u5408\u306f[kubelet\u306e\u305f\u3081\u306ecgroup\u30c9\u30e9\u30a4\u30d0\u30fc](/ja/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#\u30de\u30b9\u30bf\u30fc\u30ce\u30fc\u30c9\u306ekubelet\u306b\u3088\u3063\u3066\u4f7f\u7528\u3055\u308c\u308bcgroup\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u8a2d\u5b9a)\u3092\u624b\u52d5\u3067\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CRI\u30bd\u30b1\u30c3\u30c8\u306e\u30d1\u30b9\u3092\u898b\u3064\u3051\u308b\u306b\u306f\u3001systemd\u306e`cri-docker.socket`\u3068\u3044\u3046\u540d\u524d\u306e\u30e6\u30cb\u30c3\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ## \u305d\u306e\u4ed6\u306eCRI\u30e9\u30f3\u30bf\u30a4\u30e0: frakti #### \u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9(pause)\u30a4\u30e1\u30fc\u30b8\u3092\u4e0a\u66f8\u304d\u3059\u308b {#override-pause-image-cri-dockerd-mcr} \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f[Frakti\u306e\u30af\u30a4\u30c3\u30af\u30b9\u30bf\u30fc\u30c8\u30ac\u30a4\u30c9](https://github.com/kubernetes/frakti#quickstart)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 `cri-dockerd`\u30a2\u30c0\u30d7\u30bf\u30fc\u306f\u3001Pod\u30a4\u30f3\u30d5\u30e9\u30b3\u30f3\u30c6\u30ca(\"pause image\")\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u5f15\u6570\u3092\u53d7\u3051\u4ed8\u3051\u307e\u3059\u3002 \u4f7f\u7528\u3059\u308b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u5f15\u6570\u306f `--pod-infra-container-image`\u3067\u3059\u3002 ## {{% heading \"whatsnext\" %}} \u30b3\u30f3\u30c6\u30ca\u30e9\u30f3\u30bf\u30a4\u30e0\u306b\u52a0\u3048\u3066\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u306f\u52d5\u4f5c\u3059\u308b[\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d7\u30e9\u30b0\u30a4\u30f3](/ja/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-network-model)\u304c\u5fc5\u8981\u3067\u3059\u3002 ", "positive_passages": [{"docid": "doc-en-website-ce76db007c0a91a66f52e17aec135a19b1fc010ece3748a48d11e33013c9a8b5", "text": "This is a Feature Request `apiVersion: networking.k8s.io/v1` `import \"k8s.io/api/networking/v1\"` ## IngressClass {#IngressClass} IngressClass \u4ee3\u8868 Ingress \u7684\u7c7b, \u88ab Ingress \u7684\u89c4\u7ea6\u5f15\u7528\u3002 `ingressclass.kubernetes.io/is-default-class` \u6ce8\u89e3\u53ef\u4ee5\u7528\u6765\u6807\u660e\u4e00\u4e2a IngressClass \u5e94\u8be5\u88ab\u89c6\u4e3a\u9ed8\u8ba4\u7684 Ingress \u7c7b\u3002 \u5f53\u67d0\u4e2a IngressClass \u8d44\u6e90\u5c06\u6b64\u6ce8\u89e3\u8bbe\u7f6e\u4e3a true \u65f6\uff0c \u6ca1\u6709\u6307\u5b9a\u7c7b\u7684\u65b0 Ingress \u8d44\u6e90\u5c06\u88ab\u5206\u914d\u5230\u6b64\u9ed8\u8ba4\u7c7b\u3002
- **apiVersion**: networking.k8s.io/v1 - **kind**: IngressClass - **metadata** (}}\">ObjectMeta) \u6807\u51c6\u7684\u5217\u8868\u5143\u6570\u636e\u3002 \u66f4\u591a\u4fe1\u606f\uff1ahttps://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - **spec** (}}\">IngressClassSpec) spec \u662f IngressClass \u7684\u671f\u671b\u72b6\u6001\u3002\u66f4\u591a\u4fe1\u606f\uff1ahttps://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status ## IngressClassSpec {#IngressClassSpec} IngressClassSpec \u63d0\u4f9b\u6709\u5173 Ingress \u7c7b\u7684\u4fe1\u606f\u3002
- **controller** (string) controller \u662f\u6307\u5e94\u8be5\u5904\u7406\u6b64\u7c7b\u7684\u63a7\u5236\u5668\u540d\u79f0\u3002 \u8fd9\u5141\u8bb8\u7531\u540c\u4e00\u63a7\u5236\u5668\u63a7\u5236\u4e0d\u540c\u201c\u53e3\u5473\u201d\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u540c\u4e00\u4e2a\u5b9e\u73b0\u7684\u63a7\u5236\u5668\u4f60\u53ef\u80fd\u6709\u4e0d\u540c\u7684\u53c2\u6570\u3002 \u6b64\u5b57\u6bb5\u5e94\u8be5\u6307\u5b9a\u4e3a\u957f\u5ea6\u4e0d\u8d85\u8fc7 250 \u4e2a\u5b57\u7b26\u7684\u57df\u524d\u7f00\u8def\u5f84\uff0c\u4f8b\u5982 \u201cacme.io/ingress-controller\u201d\u3002 \u8be5\u5b57\u6bb5\u662f\u4e0d\u53ef\u53d8\u7684\u3002 - **parameters** (IngressClassParametersReference) parameters \u662f\u6307\u5411\u63a7\u5236\u5668\u4e2d\u5305\u542b\u989d\u5916\u914d\u7f6e\u7684\u81ea\u5b9a\u4e49\u8d44\u6e90\u7684\u94fe\u63a5\u3002 \u5982\u679c\u63a7\u5236\u5668\u4e0d\u9700\u8981\u989d\u5916\u7684\u5c5e\u6027\uff0c\u8fd9\u662f\u53ef\u9009\u7684\u3002 **IngressClassParametersReference \u6807\u8bc6\u4e00\u4e2a API \u5bf9\u8c61\u3002\u8fd9\u53ef\u4ee5\u7528\u6765\u6307\u5b9a\u4e00\u4e2a\u96c6\u7fa4\u6216\u8005\u547d\u540d\u7a7a\u95f4\u8303\u56f4\u7684\u8d44\u6e90** - **parameters.kind** (string)\uff0c\u5fc5\u9700 kind \u662f\u88ab\u5f15\u7528\u8d44\u6e90\u7684\u7c7b\u578b\u3002 - **parameters.name** (string)\uff0c\u5fc5\u9700 name \u662f\u88ab\u5f15\u7528\u8d44\u6e90\u7684\u540d\u79f0\u3002 - **parameters.apiGroup** (string) apiGroup \u662f\u88ab\u5f15\u7528\u8d44\u6e90\u7684\u7ec4\u3002 \u5982\u679c\u672a\u6307\u5b9a apiGroup\uff0c\u5219\u88ab\u6307\u5b9a\u7684 kind \u5fc5\u987b\u5728\u6838\u5fc3 API \u7ec4\u4e2d\u3002 \u5bf9\u4e8e\u4efb\u4f55\u5176\u4ed6\u7b2c\u4e09\u65b9\u7c7b\u578b\uff0c APIGroup \u662f\u5fc5\u9700\u7684\u3002 - **parameters.namespace** (string) namespace \u662f\u88ab\u5f15\u7528\u8d44\u6e90\u7684\u547d\u540d\u7a7a\u95f4\u3002\u5f53\u8303\u56f4\u88ab\u8bbe\u7f6e\u4e3a \u201cnamespace\u201d \u65f6\uff0c\u6b64\u5b57\u6bb5\u662f\u5fc5\u9700\u7684\uff0c\u5f53\u8303\u56f4\u88ab\u8bbe\u7f6e\u4e3a \u201cCluster\u201d\uff0c\u6b64\u5b57\u6bb5\u5fc5\u987b\u53d6\u6d88\u8bbe\u7f6e\u3002 - **parameters.scope** (string) scope \u8868\u793a\u662f\u5426\u5f15\u7528\u96c6\u7fa4\u6216\u8005\u547d\u540d\u7a7a\u95f4\u8303\u56f4\u7684\u8d44\u6e90\u3002 \u8fd9\u53ef\u4ee5\u8bbe\u7f6e\u4e3a\u201c\u96c6\u7fa4\u201d\uff08\u9ed8\u8ba4\uff09\u6216\u8005\u201c\u547d\u540d\u7a7a\u95f4\u201d\u3002 ## IngressClassList {#IngressClassList} IngressClassList \u662f IngressClasses \u7684\u96c6\u5408\u3002
- **apiVersion**: networking.k8s.io/v1 - **kind**: IngressClassList - **metadata** (}}\">ListMeta) \u6807\u51c6\u7684\u5217\u8868\u5143\u6570\u636e\u3002 - **items** ([]}}\">IngressClass)\uff0c\u5fc5\u9700 items \u662f IngressClasses \u7684\u5217\u8868 ## \u64cd\u4f5c {#Operations}
### `get` \u8bfb\u53d6\u6307\u5b9a\u7684 IngressClass #### HTTP \u8bf7\u6c42 GET /apis/networking.k8s.io/v1/ingressclasses/{name} #### \u53c2\u6570 - **name** \uff08**\u8def\u5f84\u53c2\u6570**\uff09\uff1astring\uff0c\u5fc5\u9700 IngressClass \u7684\u540d\u79f0 - **pretty** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">pretty #### \u54cd\u5e94 200 (}}\">IngressClass): OK 401: Unauthorized ### `list` \u5217\u51fa\u6216\u76d1\u89c6 IngressClass \u7c7b\u578b\u7684\u5bf9\u8c61 #### HTTP \u8bf7\u6c42 GET /apis/networking.k8s.io/v1/ingressclasses #### \u53c2\u6570 - **allowWatchBookmarks** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1aboolean }}\">allowWatchBookmarks - **continue** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">continue - **fieldSelector** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldSelector - **labelSelector** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">labelSelector - **limit** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1ainteger }}\">limit - **pretty** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">pretty - **resourceVersion** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">resourceVersion - **resourceVersionMatch** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">resourceVersionMatch - **timeoutSeconds** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1ainteger }}\">timeoutSeconds - **watch** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1aboolean }}\">watch #### \u54cd\u5e94 200 (}}\">IngressClassList): OK 401: Unauthorized ### `create` \u521b\u5efa\u4e00\u4e2a IngressClass #### HTTP \u8bf7\u6c42 POST /apis/networking.k8s.io/v1/ingressclasses #### \u53c2\u6570 - **body**: }}\">IngressClass\uff0c\u5fc5\u9700 - **dryRun** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">dryRun - **fieldManager** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldManager - **fieldValidation** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldValidation - **pretty** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">pretty #### \u54cd\u5e94 200 (}}\">IngressClass): OK 201 (}}\">IngressClass): Created 202 (}}\">IngressClass): Accepted 401: Unauthorized ### `update` \u66ff\u6362\u6307\u5b9a\u7684 IngressClass #### HTTP \u8bf7\u6c42 PUT /apis/networking.k8s.io/v1/ingressclasses/{name} #### \u53c2\u6570 - **name** \uff08**\u8def\u5f84\u53c2\u6570**\uff09\uff1astring\uff0c\u5fc5\u9700 IngressClass \u7684\u540d\u79f0 - **body**: }}\">IngressClass\uff0c\u5fc5\u9700 - **dryRun** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">dryRun - **fieldManager** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldManager - **fieldValidation** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldValidation - **pretty** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">pretty #### \u54cd\u5e94 200 (}}\">IngressClass): OK 201 (}}\">IngressClass): Created 401: Unauthorized ### `patch` \u90e8\u5206\u66f4\u65b0\u6307\u5b9a\u7684 IngressClass #### HTTP \u8bf7\u6c42 PATCH /apis/networking.k8s.io/v1/ingressclasses/{name} #### \u53c2\u6570 - **name** \uff08**\u8def\u5f84\u53c2\u6570**\uff09\uff1astring\uff0c\u5fc5\u9700 IngressClass \u7684\u540d\u79f0 - **body**: }}\">Patch\uff0c\u5fc5\u9700 - **dryRun** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">dryRun - **fieldManager** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldManager - **fieldValidation** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldValidation - **force** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1aboolean }}\">force - **pretty** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">pretty #### \u54cd\u5e94 200 (}}\">IngressClass): OK 201 (}}\">IngressClass): Created 401: Unauthorized ### `delete` \u5220\u9664\u4e00\u4e2a IngressClass #### HTTP \u8bf7\u6c42 DELETE /apis/networking.k8s.io/v1/ingressclasses/{name} #### \u53c2\u6570 - **name** \uff08**\u8def\u5f84\u53c2\u6570**\uff09\uff1astring\uff0c\u5fc5\u9700 IngressClass \u7684\u540d\u79f0 - **body**: }}\">DeleteOptions - **dryRun** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">dryRun - **gracePeriodSeconds** \uff08**\u67e5\u8be2\u5b57\u7b26\u4e32**\uff09\uff1ainteger }}\">gracePeriodSeconds - **pretty** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">pretty - **propagationPolicy** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">propagationPolicy #### \u54cd\u5e94 200 (}}\">Status): OK 202 (}}\">Status): Accepted 401: Unauthorized ### `deletecollection` \u5220\u9664 IngressClass \u7684\u96c6\u5408 DELETE /apis/networking.k8s.io/v1/ingressclasses #### \u53c2\u6570 - **body**: }}\">DeleteOptions - **continue** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">continue - **dryRun** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">dryRun - **fieldSelector** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">fieldSelector - **gracePeriodSeconds** \uff08**\u67e5\u8be2\u5b57\u7b26\u4e32**\uff09\uff1ainteger }}\">gracePeriodSeconds - **labelSelector** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">labelSelector - **limit** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1ainteger }}\">limit - **pretty** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">pretty - **propagationPolicy** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">propagationPolicy - **resourceVersion** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">resourceVersion - **resourceVersionMatch** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1astring }}\">resourceVersionMatch - **timeoutSeconds** \uff08**\u67e5\u8be2\u53c2\u6570**\uff09\uff1ainteger }}\">timeoutSeconds #### \u54cd\u5e94 200 (}}\">Status): OK 401: Unauthorized
", "positive_passages": [{"docid": "doc-en-website-b9a179e0a83f9664effa81842c0881edbb0781dad2ac1e6814611a21f48d6100", "text": "This is a Feature Request What would you like to be Translate docs/reference/kubernetes-api/service-resources/ingress-class- Comments Link: /language zh /kind feature /assign\n/triage accepted\n/close This is now tracked in\nClosing this issue. ## Install kubectl Binary Via curl
## Install kubectl binary via curl Download the latest release with the command:", "positive_passages": [{"docid": "doc-en-website-c756b6ef273e9696d87b5f571280b1846d082f3d2347cb62e8775c5824c7de57", "text": "This is a... [x] Bug Report Problem: There is no directory in the tar bundle. Example: Proposed Solution: Recommend people to execute in the bundle? Page to Update:", "commid": "website_issue_2815", "tokennum": 39}], "negative_passages": []} {"query_id": "q-en-website-df765e0cb2a3b4528acc86cac5a97a0ad41e8c73f5cd5c249dfa0a39f236ca1a", "query": " --- title: \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30dd\u30ea\u30b7\u30fc\u3092\u5ba3\u8a00\u3059\u308b min-kubernetes-server-version: v1.8 content_type: task --- \u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001Pod\u540c\u58eb\u306e\u901a\u4fe1\u3092\u5236\u5fa1\u3059\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30dd\u30ea\u30b7\u30fc\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u3001Kubernetes\u306e[NetworkPolicy API](/docs/concepts/services-networking/network-policies/)\u3092\u4f7f\u3044\u59cb\u3081\u308b\u624b\u52a9\u3051\u3092\u3057\u307e\u3059\u3002 ## {{% heading \"prerequisites\" %}} {{< include \"task-tutorial-prereqs.md\" >}} {{< version-check >}} \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30dd\u30ea\u30b7\u30fc\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u304c\u8a2d\u5b9a\u6e08\u307f\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3055\u307e\u3056\u307e\u306a\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u304cNetworkPolicy\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\u6b21\u306b\u6319\u3052\u308b\u306e\u306f\u4e00\u4f8b\u3067\u3059\u3002 * [Calico](/docs/tasks/administer-cluster/network-policy-provider/calico-network-policy/) * [Cilium](/docs/tasks/administer-cluster/network-policy-provider/cilium-network-policy/) * [Kube-router](/docs/tasks/administer-cluster/network-policy-provider/kube-router-network-policy/) * [Romana](/docs/tasks/administer-cluster/network-policy-provider/romana-network-policy/) * [Weave Net](/docs/tasks/administer-cluster/network-policy-provider/weave-network-policy/) {{< note >}} \u4e0a\u8a18\u306e\u30ea\u30b9\u30c8\u306f\u88fd\u54c1\u540d\u306e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u9806\u306b\u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u3066\u3001\u63a8\u5968\u9806\u3084\u597d\u307e\u3057\u3044\u9806\u306b\u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u30da\u30fc\u30b8\u306e\u4f8b\u306f\u3001Kubernetes\u30af\u30e9\u30b9\u30bf\u30fc\u3067\u3053\u308c\u3089\u306e\u3069\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3044\u3066\u3082\u6709\u52b9\u3067\u3059\u3002 {{< /note >}} ## `nginx` Deployment\u3092\u4f5c\u6210\u3057\u3066Service\u7d4c\u7531\u3067\u516c\u958b\u3059\u308b Kubernetes\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30dd\u30ea\u30b7\u30fc\u306e\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3001\u307e\u305a\u306f`nginx` Deployment\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304b\u3089\u59cb\u3081\u307e\u3057\u3087\u3046\u3002 ```console kubectl create deployment nginx --image=nginx ``` ```none deployment.apps/nginx created ``` `nginx`\u3068\u3044\u3046\u540d\u524d\u306eService\u7d4c\u7531\u3067Deployment\u3092\u516c\u958b\u3057\u307e\u3059\u3002 ```console kubectl expose deployment nginx --port=80 ``` ```none service/nginx exposed ``` \u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001nginx Pod\u3092\u6301\u3064Deployment\u304c\u4f5c\u6210\u3055\u308c\u3001\u305d\u306eDeployment\u304c`nginx`\u3068\u3044\u3046\u540d\u524d\u306eService\u7d4c\u7531\u3067\u516c\u958b\u3055\u308c\u307e\u3059\u3002`nginx`\u306ePod\u304a\u3088\u3073Deployment\u306f`default`\u540d\u524d\u7a7a\u9593\u306e\u4e2d\u306b\u3042\u308a\u307e\u3059\u3002 ```console kubectl get svc,pod ``` ```none NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes 10.100.0.1 443/TCP 46m service/nginx 10.100.0.16 80/TCP 33s NAME READY STATUS RESTARTS AGE pod/nginx-701339712-e0qfq 1/1 Running 0 35s ``` ## \u3082\u30461\u3064\u306ePod\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066Service\u3092\u691c\u8a3c\u3059\u308b \u3053\u308c\u3067\u3001\u65b0\u3057\u3044`nginx`\u30b5\u30fc\u30d3\u30b9\u306b\u4ed6\u306ePod\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306f\u305a\u3067\u3059\u3002`default`\u540d\u524d\u7a7a\u9593\u5185\u306e\u4ed6\u306ePod\u304b\u3089`nginx` Service\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u3001busybox\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 ```console kubectl run busybox --rm -ti --image=busybox -- /bin/sh ``` \u30b7\u30a7\u30eb\u306e\u4e2d\u3067\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell wget --spider --timeout=1 nginx ``` ```none Connecting to nginx (10.100.0.16:80) remote file exists ``` ## `nginx` Service\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5236\u9650\u3059\u308b `nginx` Service\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5236\u9650\u3059\u308b\u305f\u3081\u306b\u3001`access: true`\u3068\u3044\u3046\u30e9\u30d9\u30eb\u304c\u4ed8\u3044\u305fPod\u3060\u3051\u304c\u30af\u30a8\u30ea\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u6b21\u306e\u5185\u5bb9\u3067NetworkPolicy\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002 {{< codenew file=\"service/networking/nginx-policy.yaml\" >}} NetworkPolicy\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d\u306f\u3001\u6709\u52b9\u306a[DNS\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u540d](/ja/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 {{< note >}} \u3053\u306eNetworkPolicy\u306b\u306f\u3001\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308bPod\u306e\u30b0\u30eb\u30fc\u30d7\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306e`podSelector`\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30dd\u30ea\u30b7\u30fc\u306f\u3001\u30e9\u30d9\u30eb`app=nginx`\u306e\u4ed8\u3044\u305fPod\u3092\u9078\u629e\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u306e\u30e9\u30d9\u30eb\u306f\u3001`nginx` Deployment\u5185\u306ePod\u306b\u81ea\u52d5\u7684\u306b\u8ffd\u52a0\u3055\u308c\u305f\u3082\u306e\u3067\u3059\u3002\u7a7a\u306e`podSelector`\u306f\u3001\u305d\u306e\u540d\u524d\u7a7a\u9593\u5185\u306e\u3059\u3079\u3066\u306ePod\u3092\u9078\u629e\u3057\u307e\u3059\u3002 {{< /note >}} ## Service\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u5272\u308a\u5f53\u3066\u308b kubectl\u3092\u4f7f\u3063\u3066\u3001\u4e0a\u8a18\u306e`nginx-policy.yaml`\u30d5\u30a1\u30a4\u30eb\u304b\u3089NetworkPolicy\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 ```console kubectl apply -f https://k8s.io/examples/service/networking/nginx-policy.yaml ``` ```none networkpolicy.networking.k8s.io/access-nginx created ``` ## access\u30e9\u30d9\u30eb\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u72b6\u614b\u3067Service\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u30c6\u30b9\u30c8\u3059\u308b `nginx` Service\u306b\u6b63\u3057\u3044\u30e9\u30d9\u30eb\u304c\u4ed8\u3044\u3066\u3044\u306a\u3044Pod\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3092\u8a66\u3057\u3066\u307f\u308b\u3068\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u307e\u3059\u3002 ```console kubectl run busybox --rm -ti --image=busybox -- /bin/sh ``` \u30b7\u30a7\u30eb\u306e\u4e2d\u3067\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell wget --spider --timeout=1 nginx ``` ```none Connecting to nginx (10.100.0.16:80) wget: download timed out ``` ## access\u30e9\u30d9\u30eb\u3092\u5b9a\u7fa9\u3057\u3066\u518d\u30c6\u30b9\u30c8\u3059\u308b \u6b63\u3057\u3044\u30e9\u30d9\u30eb\u304c\u4ed8\u3044\u305fPod\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u8a31\u53ef\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u3002 ```console kubectl run busybox --rm -ti --labels=\"access=true\" --image=busybox -- /bin/sh ``` \u30b7\u30a7\u30eb\u306e\u4e2d\u3067\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 ```shell wget --spider --timeout=1 nginx ``` ```none Connecting to nginx (10.100.0.16:80) remote file exists ``` ", "positive_passages": [{"docid": "doc-en-website-b5afe9625acd835bfb356724335541400d355ff53ffcc31c220548c4d068d851", "text": "This is a Feature Request What would you like to be Translate into Japanese. Why is this needed This page has not been translated. Comments /language ja /assign", "commid": "website_issue_23010", "tokennum": 32}], "negative_passages": []} {"query_id": "q-en-website-dfb843ea2f256f6c49e13cd5e1aaf3fef17dae5f3baa0814687a9fb99adcd3cf", "query": "# Replace the value of \"containerRuntimeEndpoint\" for a different container runtime if needed. ``` --> ```sh cat << EOF > /etc/systemd/system/kubelet.service.d/kubelet.conf # \u5c06\u4e0b\u9762\u7684 \"systemd\" \u66ff\u6362\u4e3a\u4f60\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\u6240\u4f7f\u7528\u7684 cgroup \u9a71\u52a8\u3002", "positive_passages": [{"docid": "doc-en-website-9e9528247a4cdb81221b07c692cc414cd6fcc82432285f6c65747ee18510dc26", "text": "apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow\nUse kubeadm to create a highly available etcd cluster apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow There is a problem here, there is no indentation Normal should be apiVersion: kind: KubeletConfiguration authentication: anonymous: enabled: false webhook: enabled: false authorization: mode: AlwaysAllow\nprovide more details of the issue as it's difficult to address your issue with the information that you have provided. Atleast mention the page you are referring to. /triage needs-information\nPage related to the issue :\n/language zh\n/retitle The YAML format may be not correct in setup-ha-etcd-with-kubeadm\n/triage accepted /assign", "commid": "website_issue_45033", "tokennum": 241}], "negative_passages": []} {"query_id": "q-en-website-dfd2998269dd71e07d16ed78ad12a2538cc4a7f361c0ff2bce4cddec256e91da", "query": "1. \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a ```sh ./etcd --listen-client-urls=http://$PRIVATE_IP:2379 --advertise-client-urls=http://$PRIVATE_IP:2379 ``` ```sh etcd --listen-client-urls=http://$PRIVATE_IP:2379 --advertise-client-urls=http://$PRIVATE_IP:2379 ``` 2. \u4f7f\u7528\u53c2\u6570 `--etcd-servers=$PRIVATE_IP:2379` \u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\u3002 \u4f7f\u7528\u60a8 etcd \u5ba2\u6237\u7aef IP \u66ff\u6362 `PRIVATE_IP`\u3002 \u786e\u4fdd\u5c06 `PRIVATE_IP` \u8bbe\u7f6e\u4e3aetcd\u5ba2\u6237\u7aef IP\u3002 ### \u591a\u8282\u70b9 etcd \u96c6\u7fa4 \u4e3a\u4e86\u8010\u7528\u6027\u548c\u9ad8\u53ef\u7528\u6027\uff0c\u5728\u751f\u4ea7\u4e2d\u5c06\u4ee5\u591a\u8282\u70b9\u96c6\u7fa4\u7684\u65b9\u5f0f\u8fd0\u884c etcd\uff0c\u5e76\u4e14\u5b9a\u671f\u5907\u4efd\u3002\u5efa\u8bae\u5728\u751f\u4ea7\u4e2d\u4f7f\u7528\u4e94\u4e2a\u6210\u5458\u7684\u96c6\u7fa4\u3002\u6709\u5173\u8be5\u5185\u5bb9\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605[\u5e38\u89c1\u95ee\u9898\u6587\u6863](https://github.com/coreos/etcd/blob/master/Documentation/faq.md#what-is-failure-tolerance)\u3002 \u4e3a\u4e86\u8010\u7528\u6027\u548c\u9ad8\u53ef\u7528\u6027\uff0c\u5728\u751f\u4ea7\u4e2d\u5c06\u4ee5\u591a\u8282\u70b9\u96c6\u7fa4\u7684\u65b9\u5f0f\u8fd0\u884c etcd\uff0c\u5e76\u4e14\u5b9a\u671f\u5907\u4efd\u3002 \u5efa\u8bae\u5728\u751f\u4ea7\u4e2d\u4f7f\u7528\u4e94\u4e2a\u6210\u5458\u7684\u96c6\u7fa4\u3002 \u6709\u5173\u8be5\u5185\u5bb9\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [\u5e38\u89c1\u95ee\u9898\u6587\u6863](https://etcd.io/docs/current/faq/#what-is-failure-tolerance)\u3002 \u53ef\u4ee5\u901a\u8fc7\u9759\u6001\u6210\u5458\u4fe1\u606f\u6216\u52a8\u6001\u53d1\u73b0\u7684\u65b9\u5f0f\u914d\u7f6e etcd \u96c6\u7fa4\u3002\u6709\u5173\u96c6\u7fa4\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [etcd \u96c6\u7fa4\u6587\u6863](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/clustering.md)\u3002 \u53ef\u4ee5\u901a\u8fc7\u9759\u6001\u6210\u5458\u4fe1\u606f\u6216\u52a8\u6001\u53d1\u73b0\u7684\u65b9\u5f0f\u914d\u7f6e etcd \u96c6\u7fa4\u3002 \u6709\u5173\u96c6\u7fa4\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [etcd \u96c6\u7fa4\u6587\u6863](https://etcd.io/docs/current/op-guide/clustering/)\u3002 \u4f8b\u5982\uff0c\u8003\u8651\u8fd0\u884c\u4ee5\u4e0b\u5ba2\u6237\u7aef URL \u7684\u4e94\u4e2a\u6210\u5458\u7684 etcd \u96c6\u7fa4\uff1a`http://$IP1:2379`\uff0c`http://$IP2:2379`\uff0c`http://$IP3:2379`\uff0c`http://$IP4:2379` \u548c `http://$IP5:2379`\u3002\u8981\u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\uff1a \u4f8b\u5982\uff0c\u8003\u8651\u8fd0\u884c\u4ee5\u4e0b\u5ba2\u6237\u7aef URL \u7684\u4e94\u4e2a\u6210\u5458\u7684 etcd \u96c6\u7fa4\uff1a`http://$IP1:2379`\uff0c `http://$IP2:2379`\uff0c`http://$IP3:2379`\uff0c`http://$IP4:2379` \u548c `http://$IP5:2379`\u3002 \u8981\u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\uff1a 1. \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a ```sh ./etcd --listen-client-urls=http://$IP1:2379, http://$IP2:2379, http://$IP3:2379, http://$IP4:2379, http://$IP5:2379 --advertise-client-urls=http://$IP1:2379, http://$IP2:2379, http://$IP3:2379, http://$IP4:2379, http://$IP5:2379 ``` ```shell etcd --listen-client-urls=http://$IP1:2379,http://$IP2:2379,http://$IP3:2379,http://$IP4:2379,http://$IP5:2379 --advertise-client-urls=http://$IP1:2379,http://$IP2:2379,http://$IP3:2379,http://$IP4:2379,http://$IP5:2379 ``` 2. \u4f7f\u7528\u53c2\u6570 `--etcd-servers=$IP1:2379, $IP2:2379, $IP3:2379, $IP4:2379, $IP5:2379` \u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\u3002 2. \u4f7f\u7528\u53c2\u6570 `--etcd-servers=$IP1:2379,$IP2:2379,$IP3:2379,$IP4:2379,$IP5:2379` \u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\u3002 \u4f7f\u7528\u60a8 etcd \u5ba2\u6237\u7aef IP \u5730\u5740\u66ff\u6362 `IP`\u3002 \u786e\u4fdd\u5c06 `IP` \u53d8\u91cf\u8bbe\u7f6e\u4e3a\u5ba2\u6237\u7aef IP \u5730\u5740\u3002 If you want to control traffic flow at the IP address or port level (OSI layer 3 or 4), then you might consider using Kubernetes NetworkPolicies for particular applications in your cluster. NetworkPolicies are an application-centric construct which allow you to specify how a {{< glossary_tooltip text=\"pod\" term_id=\"pod\">}} is allowed to communicate with various network \"entities\" (we use the word \"entity\" here to avoid overloading the more common terms such as \"endpoints\" and \"services\", which have specific Kubernetes connotations) over the network. If you want to control traffic flow at the IP address or port level (OSI layer 3 or 4), then you might consider using Kubernetes NetworkPolicies for particular applications in your cluster. NetworkPolicies are an application-centric construct which allow you to specify how a {{< glossary_tooltip text=\"pod\" term_id=\"pod\">}} is allowed to communicate with various network \"entities\" (we use the word \"entity\" here to avoid overloading the more common terms such as \"endpoints\" and \"services\", which have specific Kubernetes connotations) over the network. NetworkPolicies apply to a connection with a pod on one or both ends, and are not relevant to other connections. The entities that a Pod can communicate with are identified through a combination of the following 3 identifiers:", "positive_passages": [{"docid": "doc-en-website-3fe28d3fe0159a80bd4bc084cd20522de06d6ed5856d6d70ebf1a58a8d15ad74", "text": "As discussed in the sig-networking mailing list (), has not been fully updated since the introduction of egress filtering.\n/sig network /sig docs /kind bug (it's a bug because the doc should already have been updated) /language en /triage accepted\n/priority backlog", "commid": "website_issue_30908", "tokennum": 66}], "negative_passages": []} {"query_id": "q-en-website-e23453bb542cf9d1d80c45aed4f0e77179529712aa7ea01b7ae9620cd3b56b25", "query": " {{< glossary_definition term_id=\"etcd\" length=\"all\" >}} ## {{% heading \"prerequisites\" %}} {{< include \"task-tutorial-prereqs.md\" >}} {{< version-check >}}", "positive_passages": [{"docid": "doc-en-website-e137b3467942095722d53969564746ac8d1e05b2a4541b803909ce4bfa1bd149", "text": "\" etcd \"client.cert \" etcd etcd \" \" etcd client.key etcd \"\n~ GitHub is not the right place for support requests.~ ~If you're looking for help, oyu could ask on .~ ~You can also post your question on the or the forum. There are other support venues with contributions from the wider community of Kubernetes users.~\n/triage accepted /kind bug\n/remove-kind support\nThanks\n/language zh\n/priority backlog", "commid": "website_issue_27444", "tokennum": 106}], "negative_passages": []} {"query_id": "q-en-website-e31595534352f4a07bf9dda51812e8ee2fee999359f2d4fcce3ae01f8eed35d4", "query": " --- title: \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066Secret\u3092\u7ba1\u7406\u3059\u308b content_type: task weight: 20 description: \u30ea\u30bd\u30fc\u30b9\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066Secret\u3092\u4f5c\u6210\u3059\u308b --- ## {{% heading \"prerequisites\" %}} {{< include \"task-tutorial-prereqs.md\" >}} ## \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b \u3042\u3089\u304b\u3058\u3081YAML\u307e\u305f\u306fJSON\u5f62\u5f0f\u3067Secret\u306e\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3046\u3048\u3067\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 [Secret](/docs/reference/generated/kubernetes-api/{{< param \"version\" >}}/#secret-v1-core)\u30ea\u30bd\u30fc\u30b9\u306b\u306f\u3001`data`\u3068`stringData`\u306e2\u3064\u306e\u30de\u30c3\u30d7\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 `data`\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u4efb\u610f\u306e\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3059\u308b\u306e\u306b\u4f7f\u7528\u3055\u308c\u3001base64\u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002 `stringData`\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u5229\u4fbf\u6027\u306e\u305f\u3081\u306b\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001Secret\u30c7\u30fc\u30bf\u3092\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u3066\u3044\u306a\u3044\u6587\u5b57\u5217\u3068\u3057\u3066\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 `data`\u3068`stringData`\u306e\u30ad\u30fc\u306f\u3001\u82f1\u6570\u5b57\u3001`-`\u3001`_`\u3001`.`\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001`data`\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u7528\u3057\u30662\u3064\u306e\u6587\u5b57\u5217\u3092Secret\u306b\u683c\u7d0d\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u6587\u5b57\u5217\u3092base64\u306b\u5909\u63db\u3057\u307e\u3059: ```shell echo -n 'admin' | base64 ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` YWRtaW4= ``` ```shell echo -n '1f2d1e2e67df' | base64 ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` MWYyZDFlMmU2N2Rm ``` \u4ee5\u4e0b\u306e\u3088\u3046\u306aSecret\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3057\u307e\u3059: ```yaml apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque data: username: YWRtaW4= password: MWYyZDFlMmU2N2Rm ``` \u306a\u304a\u3001Secret\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d\u306f\u3001\u6709\u52b9\u306a[DNS\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u540d](/ja/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 {{< note >}} Secret\u30c7\u30fc\u30bf\u306e\u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u3055\u308c\u305fJSON\u304a\u3088\u3073YAML\u306e\u5024\u306f\u3001base64\u6587\u5b57\u5217\u3068\u3057\u3066\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002 \u6587\u5b57\u5217\u4e2d\u306e\u6539\u884c\u306f\u4e0d\u6b63\u3067\u3001\u542b\u307e\u308c\u3066\u3044\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3002 Darwin/macOS\u3067`base64`\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30fc\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u9577\u3044\u884c\u3092\u5206\u5272\u3059\u308b\u305f\u3081\u306b`-b`\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u306e\u306f\u907f\u3051\u308b\u3079\u304d\u3067\u3059\u3002 \u9006\u306b\u3001Linux \u30e6\u30fc\u30b6\u30fc\u306f\u3001`base64` \u30b3\u30de\u30f3\u30c9\u306b\u30aa\u30d7\u30b7\u30e7\u30f3`-w 0`\u3092\u8ffd\u52a0\u3059\u308b\u304b\u3001`-w`\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306f\u3001\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3`base64 | tr -d 'n'`\u3092\u8ffd\u52a0\u3059\u308b*\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059*\u3002 {{< /note >}} \u7279\u5b9a\u306e\u30b7\u30ca\u30ea\u30aa\u3067\u306f\u3001\u4ee3\u308f\u308a\u306b`stringData`\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u306f\u3001base64\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u3066\u3044\u306a\u3044\u6587\u5b57\u5217\u3092\u76f4\u63a5Secret\u306b\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u3001Secret\u306e\u4f5c\u6210\u6642\u3084\u66f4\u65b0\u6642\u306b\u306f\u3001\u305d\u306e\u6587\u5b57\u5217\u304c\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306bSecret\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u969b\u306b\u3001\u30c7\u30d7\u30ed\u30a4\u30d7\u30ed\u30bb\u30b9\u4e2d\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u90e8\u3092\u5165\u529b\u3057\u305f\u3044\u5834\u5408\u306a\u3069\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u6b21\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408: ```yaml apiUrl: \"https://my.api.com/api/v1\" username: \"\" password: \"\" ``` \u6b21\u306e\u3088\u3046\u306a\u5b9a\u7fa9\u3067Secret\u306b\u683c\u7d0d\u3067\u304d\u307e\u3059: ```yaml apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque stringData: config.yaml: | apiUrl: \"https://my.api.com/api/v1\" username: password: ``` ## Secret\u3092\u4f5c\u6210\u3059\u308b [`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands#apply)\u3067Secret\u3092\u4f5c\u6210\u3057\u307e\u3059: ```shell kubectl apply -f ./secret.yaml ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ``` secret/mysecret created ``` ## Secret\u3092\u78ba\u8a8d\u3059\u308b `stringData`\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3001\u66f8\u304d\u8fbc\u307f\u5c02\u7528\u306e\u4fbf\u5229\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002Secret\u3092\u53d6\u5f97\u3059\u308b\u969b\u306b\u306f\u6c7a\u3057\u3066\u51fa\u529b\u3055\u308c\u307e\u305b\u3093\u3002\u305f\u3068\u3048\u3070\u3001\u6b21\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u5834\u5408: ```shell kubectl get secret mysecret -o yaml ``` \u51fa\u529b\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: ```yaml apiVersion: v1 kind: Secret metadata: creationTimestamp: 2018-11-15T20:40:59Z name: mysecret namespace: default resourceVersion: \"7225\" uid: c280ad2e-e916-11e8-98f2-025000000001 type: Opaque data: config.yaml: YXBpVXJsOiAiaHR0cHM6Ly9teS5hcGkuY29tL2FwaS92MSIKdXNlcm5hbWU6IHt7dXNlcm5hbWV9fQpwYXNzd29yZDoge3twYXNzd29yZH19 ``` `kubectl get`\u3068`kubectl describe`\u30b3\u30de\u30f3\u30c9\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fSecret\u306e\u5185\u5bb9\u3092\u8868\u793a\u3057\u307e\u305b\u3093\u3002 \u3053\u308c\u306f\u3001Secret\u304c\u4e0d\u7528\u610f\u306b\u4ed6\u4eba\u306b\u3055\u3089\u3055\u308c\u305f\u308a\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u30ed\u30b0\u306b\u4fdd\u5b58\u3055\u308c\u305f\u308a\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002 \u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306e\u5b9f\u969b\u306e\u5185\u5bb9\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001[Secret\u306e\u30c7\u30b3\u30fc\u30c9](/ja/docs/tasks/configmap-secret/managing-secret-using-kubectl/#decoding-secret)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 `username`\u306a\u3069\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u304c`data`\u3068`stringData`\u306e\u4e21\u65b9\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001`stringData`\u306e\u5024\u304c\u4f7f\u308f\u308c\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aSecret\u306e\u5b9a\u7fa9\u306e\u5834\u5408: ```yaml apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque data: username: YWRtaW4= stringData: username: administrator ``` \u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059: ```yaml apiVersion: v1 kind: Secret metadata: creationTimestamp: 2018-11-15T20:46:46Z name: mysecret namespace: default resourceVersion: \"7579\" uid: 91460ecb-e917-11e8-98f2-025000000001 type: Opaque data: username: YWRtaW5pc3RyYXRvcg== ``` `YWRtaW5pc3RyYXRvcg==`\u3092\u30c7\u30b3\u30fc\u30c9\u3059\u308b\u3068`administrator`\u3068\u306a\u308a\u307e\u3059\u3002 ## \u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7 \u4f5c\u6210\u3057\u305fSecret\u3092\u524a\u9664\u3059\u308b\u306b\u306f\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059: ```shell kubectl delete secret mysecret ``` ## {{% heading \"whatsnext\" %}} - [Secret\u306e\u30b3\u30f3\u30bb\u30d7\u30c8](/ja/docs/concepts/configuration/secret/)\u3092\u8aad\u3080 - [kubectl\u3092\u4f7f\u7528\u3057\u3066Secret\u3092\u7ba1\u7406\u3059\u308b](/ja/docs/tasks/configmap-secret/managing-secret-using-kubectl/)\u65b9\u6cd5\u3092\u77e5\u308b - [kustomize\u3092\u4f7f\u7528\u3057\u3066Secret\u3092\u7ba1\u7406\u3059\u308b](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)\u65b9\u6cd5\u3092\u77e5\u308b ", "positive_passages": [{"docid": "doc-en-website-1caa8836622c3c22791db12bbb5bf9ddad868b70fe84f0431f11fbf64f2553fd", "text": "This is a Feature Request ## \u5b89\u5168\u7684 etcd \u96c6\u7fa4 \u5bf9 etcd \u7684\u8bbf\u95ee\u76f8\u5f53\u4e8e\u96c6\u7fa4\u4e2d\u7684 root \u6743\u9650\uff0c\u56e0\u6b64\u7406\u60f3\u60c5\u51b5\u4e0b\u53ea\u6709 API \u670d\u52a1\u5668\u624d\u80fd\u8bbf\u95ee\u5b83\u3002\u8003\u8651\u5230\u6570\u636e\u7684\u654f\u611f\u6027\uff0c\u5efa\u8bae\u53ea\u5411\u9700\u8981\u8bbf\u95ee etcd \u96c6\u7fa4\u7684\u8282\u70b9\u6388\u4e88\u6743\u9650\u3002 \u5bf9 etcd \u7684\u8bbf\u95ee\u76f8\u5f53\u4e8e\u96c6\u7fa4\u4e2d\u7684 root \u6743\u9650\uff0c\u56e0\u6b64\u7406\u60f3\u60c5\u51b5\u4e0b\u53ea\u6709 API \u670d\u52a1\u5668\u624d\u80fd\u8bbf\u95ee\u5b83\u3002 \u8003\u8651\u5230\u6570\u636e\u7684\u654f\u611f\u6027\uff0c\u5efa\u8bae\u53ea\u5411\u9700\u8981\u8bbf\u95ee etcd \u96c6\u7fa4\u7684\u8282\u70b9\u6388\u4e88\u6743\u9650\u3002 \u60f3\u8981\u786e\u4fdd etcd \u7684\u5b89\u5168\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u9632\u706b\u5899\u89c4\u5219\u6216\u4f7f\u7528 etcd \u63d0\u4f9b\u7684\u5b89\u5168\u7279\u6027\uff0c\u8fd9\u4e9b\u5b89\u5168\u7279\u6027\u4f9d\u8d56\u4e8e x509 \u516c\u94a5\u57fa\u7840\u8bbe\u65bd\uff08PKI\uff09\u3002\u9996\u5148\uff0c\u901a\u8fc7\u751f\u6210\u5bc6\u94a5\u548c\u8bc1\u4e66\u5bf9\u6765\u5efa\u7acb\u5b89\u5168\u7684\u901a\u4fe1\u901a\u9053\u3002 \u4f8b\u5982\uff0c\u4f7f\u7528\u5bc6\u94a5\u5bf9 `peer.key` \u548c `peer.cert` \u6765\u4fdd\u62a4 etcd \u6210\u5458\u4e4b\u95f4\u7684\u901a\u4fe1\uff0c\u800c `client.cert` \u548c `client.cert` \u7528\u4e8e\u4fdd\u62a4 etcd \u4e0e\u5176\u5ba2\u6237\u7aef\u4e4b\u95f4\u7684\u901a\u4fe1\u3002\u8bf7\u53c2\u9605 etcd \u9879\u76ee\u63d0\u4f9b\u7684[\u793a\u4f8b\u811a\u672c](https://github.com/coreos/etcd/tree/master/hack/tls-setup)\uff0c\u4ee5\u751f\u6210\u7528\u4e8e\u5ba2\u6237\u7aef\u8eab\u4efd\u9a8c\u8bc1\u7684\u5bc6\u94a5\u5bf9\u548c CA \u6587\u4ef6\u3002 \u60f3\u8981\u786e\u4fdd etcd \u7684\u5b89\u5168\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u9632\u706b\u5899\u89c4\u5219\u6216\u4f7f\u7528 etcd \u63d0\u4f9b\u7684\u5b89\u5168\u7279\u6027\uff0c\u8fd9\u4e9b\u5b89\u5168\u7279\u6027\u4f9d\u8d56\u4e8e x509 \u516c\u94a5\u57fa\u7840\u8bbe\u65bd\uff08PKI\uff09\u3002 \u9996\u5148\uff0c\u901a\u8fc7\u751f\u6210\u5bc6\u94a5\u548c\u8bc1\u4e66\u5bf9\u6765\u5efa\u7acb\u5b89\u5168\u7684\u901a\u4fe1\u901a\u9053\u3002 \u4f8b\u5982\uff0c\u4f7f\u7528\u5bc6\u94a5\u5bf9 `peer.key` \u548c `peer.cert` \u6765\u4fdd\u62a4 etcd \u6210\u5458\u4e4b\u95f4\u7684\u901a\u4fe1\uff0c \u800c `client.key` \u548c `client.cert` \u7528\u4e8e\u4fdd\u62a4 etcd \u4e0e\u5176\u5ba2\u6237\u7aef\u4e4b\u95f4\u7684\u901a\u4fe1\u3002 \u8bf7\u53c2\u9605 etcd \u9879\u76ee\u63d0\u4f9b\u7684[\u793a\u4f8b\u811a\u672c](https://github.com/coreos/etcd/tree/master/hack/tls-setup)\uff0c \u4ee5\u751f\u6210\u7528\u4e8e\u5ba2\u6237\u7aef\u8eab\u4efd\u9a8c\u8bc1\u7684\u5bc6\u94a5\u5bf9\u548c CA \u6587\u4ef6\u3002 ### \u5b89\u5168\u901a\u4fe1 \u82e5\u8981\u4f7f\u7528\u5b89\u5168\u5bf9\u7b49\u901a\u4fe1\u5bf9 etcd \u8fdb\u884c\u914d\u7f6e\uff0c\u8bf7\u6307\u5b9a\u53c2\u6570 `--peer-key-file=peer.key` \u548c `--peer-cert-file=peer.cert`\uff0c\u5e76\u4f7f\u7528 https \u4f5c\u4e3a URL \u6a21\u5f0f\u3002 \u82e5\u8981\u4f7f\u7528\u5b89\u5168\u5bf9\u7b49\u901a\u4fe1\u5bf9 etcd \u8fdb\u884c\u914d\u7f6e\uff0c\u8bf7\u6307\u5b9a\u53c2\u6570 `--peer-key-file=peer.key` \u548c `--peer-cert-file=peer.cert`\uff0c\u5e76\u4f7f\u7528 HTTPS \u4f5c\u4e3a URL \u6a21\u5f0f\u3002 \u7c7b\u4f3c\u5730\uff0c\u8981\u4f7f\u7528\u5b89\u5168\u5ba2\u6237\u7aef\u901a\u4fe1\u5bf9 etcd \u8fdb\u884c\u914d\u7f6e\uff0c\u8bf7\u6307\u5b9a\u53c2\u6570 `--key-file=k8sclient.key` \u548c `--cert-file=k8sclient.cert`\uff0c\u5e76\u4f7f\u7528 https \u4f5c\u4e3a URL \u6a21\u5f0f\u3002 \u7c7b\u4f3c\u5730\uff0c\u8981\u4f7f\u7528\u5b89\u5168\u5ba2\u6237\u7aef\u901a\u4fe1\u5bf9 etcd \u8fdb\u884c\u914d\u7f6e\uff0c\u8bf7\u6307\u5b9a\u53c2\u6570 `--key-file=k8sclient.key` \u548c `--cert-file=k8sclient.cert`\uff0c\u5e76\u4f7f\u7528 HTTPS \u4f5c\u4e3a URL \u6a21\u5f0f\u3002 \u4f7f\u7528\u5b89\u5168\u901a\u4fe1\u7684\u5ba2\u6237\u7aef\u547d\u4ee4\u7684\u793a\u4f8b\uff1a ``` ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key --cacert=/etc/kubernetes/pki/etcd/ca.crt member list ``` ### \u9650\u5236 etcd \u96c6\u7fa4\u7684\u8bbf\u95ee \u914d\u7f6e\u5b89\u5168\u901a\u4fe1\u540e\uff0c\u5c06 etcd \u96c6\u7fa4\u7684\u8bbf\u95ee\u9650\u5236\u5728 Kubernetes API \u670d\u52a1\u5668\u4e0a\u3002\u4f7f\u7528 TLS \u8eab\u4efd\u9a8c\u8bc1\u6765\u5b8c\u6210\u6b64\u4efb\u52a1\u3002 \u4f8b\u5982\uff0c\u8003\u8651\u7531 CA `etcd.ca` \u4fe1\u4efb\u7684\u5bc6\u94a5\u5bf9 `k8sclient.key` \u548c `k8sclient.cert`\u3002\u5f53 etcd \u914d\u7f6e\u4e3a `--client-cert-auth` \u548c TLS \u65f6\uff0c\u5b83\u4f7f\u7528\u7cfb\u7edf CA \u6216\u7531 `--trusted-ca-file` \u53c2\u6570\u4f20\u5165\u7684 CA \u9a8c\u8bc1\u6765\u81ea\u5ba2\u6237\u7aef\u7684\u8bc1\u4e66\u3002 \u4f8b\u5982\uff0c\u8003\u8651\u7531 CA `etcd.ca` \u4fe1\u4efb\u7684\u5bc6\u94a5\u5bf9 `k8sclient.key` \u548c `k8sclient.cert`\u3002 \u5f53 etcd \u914d\u7f6e\u4e3a `--client-cert-auth` \u548c TLS \u65f6\uff0c\u5b83\u4f7f\u7528\u7cfb\u7edf CA \u6216\u7531 `--trusted-ca-file` \u53c2\u6570\u4f20\u5165\u7684 CA \u9a8c\u8bc1\u6765\u81ea\u5ba2\u6237\u7aef\u7684\u8bc1\u4e66\u3002 \u6307\u5b9a\u53c2\u6570 `--client-cert-auth=true` \u548c `--trusted-ca-file=etcd.ca` \u5c06\u9650\u5236\u5bf9\u5177\u6709\u8bc1\u4e66 `k8sclient.cert` \u7684\u5ba2\u6237\u7aef\u7684\u8bbf\u95ee\u3002 \u4e00\u65e6\u6b63\u786e\u914d\u7f6e\u4e86 etcd\uff0c\u53ea\u6709\u5177\u6709\u6709\u6548\u8bc1\u4e66\u7684\u5ba2\u6237\u7aef\u624d\u80fd\u8bbf\u95ee\u5b83\u3002\u8981\u8ba9 Kubernetes API \u670d\u52a1\u5668\u8bbf\u95ee\uff0c\u53ef\u4ee5\u4f7f\u7528\u53c2\u6570 `--etcd-certfile=k8sclient.cert`,`--etcd-keyfile=k8sclient.key` \u548c `--etcd-cafile=ca.cert` \u914d\u7f6e\u5b83\u3002 \u4e00\u65e6\u6b63\u786e\u914d\u7f6e\u4e86 etcd\uff0c\u53ea\u6709\u5177\u6709\u6709\u6548\u8bc1\u4e66\u7684\u5ba2\u6237\u7aef\u624d\u80fd\u8bbf\u95ee\u5b83\u3002\u8981\u8ba9 Kubernetes API \u670d\u52a1\u5668\u8bbf\u95ee\uff0c \u53ef\u4ee5\u4f7f\u7528\u53c2\u6570 `--etcd-certfile=k8sclient.cert`,`--etcd-keyfile=k8sclient.key` \u548c `--etcd-cafile=ca.cert` \u914d\u7f6e\u3002 {{< note >}} Kubernetes \u76ee\u524d\u4e0d\u652f\u6301 etcd \u8eab\u4efd\u9a8c\u8bc1\u3002\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u76f8\u5173\u7684\u95ee\u9898[\u652f\u6301 etcd v2 \u7684\u57fa\u672c\u8ba4\u8bc1](https://github.com/kubernetes/kubernetes/issues/23398)\u3002 Kubernetes \u76ee\u524d\u4e0d\u652f\u6301 etcd \u8eab\u4efd\u9a8c\u8bc1\u3002 \u60f3\u8981\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u76f8\u5173\u7684\u95ee\u9898 [\u652f\u6301 etcd v2 \u7684\u57fa\u672c\u8ba4\u8bc1](https://github.com/kubernetes/kubernetes/issues/23398)\u3002 {{< /note >}} ## \u66ff\u6362\u5931\u8d25\u7684 etcd \u6210\u5458 etcd \u96c6\u7fa4\u901a\u8fc7\u5bb9\u5fcd\u5c11\u6570\u6210\u5458\u6545\u969c\u5b9e\u73b0\u9ad8\u53ef\u7528\u6027\u3002\u4f46\u662f\uff0c\u8981\u6539\u5584\u96c6\u7fa4\u7684\u6574\u4f53\u5065\u5eb7\u72b6\u51b5\uff0c\u8bf7\u7acb\u5373\u66ff\u6362\u5931\u8d25\u7684\u6210\u5458\u3002\u5f53\u591a\u4e2a\u6210\u5458\u5931\u8d25\u65f6\uff0c\u9010\u4e2a\u66ff\u6362\u5b83\u4eec\u3002\u66ff\u6362\u5931\u8d25\u6210\u5458\u9700\u8981\u4e24\u4e2a\u6b65\u9aa4\uff1a\u5220\u9664\u5931\u8d25\u6210\u5458\u548c\u6dfb\u52a0\u65b0\u6210\u5458\u3002 etcd \u96c6\u7fa4\u901a\u8fc7\u5bb9\u5fcd\u5c11\u6570\u6210\u5458\u6545\u969c\u5b9e\u73b0\u9ad8\u53ef\u7528\u6027\u3002 \u4f46\u662f\uff0c\u8981\u6539\u5584\u96c6\u7fa4\u7684\u6574\u4f53\u5065\u5eb7\u72b6\u51b5\uff0c\u8bf7\u7acb\u5373\u66ff\u6362\u5931\u8d25\u7684\u6210\u5458\u3002\u5f53\u591a\u4e2a\u6210\u5458\u5931\u8d25\u65f6\uff0c\u9010\u4e2a\u66ff\u6362\u5b83\u4eec\u3002 \u66ff\u6362\u5931\u8d25\u6210\u5458\u9700\u8981\u4e24\u4e2a\u6b65\u9aa4\uff1a\u5220\u9664\u5931\u8d25\u6210\u5458\u548c\u6dfb\u52a0\u65b0\u6210\u5458\u3002 \u867d\u7136 etcd \u5728\u5185\u90e8\u4fdd\u7559\u552f\u4e00\u7684\u6210\u5458 ID\uff0c\u4f46\u5efa\u8bae\u4e3a\u6bcf\u4e2a\u6210\u5458\u4f7f\u7528\u552f\u4e00\u7684\u540d\u79f0\uff0c\u4ee5\u907f\u514d\u4eba\u4e3a\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u8003\u8651\u4e00\u4e2a\u4e09\u6210\u5458\u7684 etcd \u96c6\u7fa4\u3002\u8ba9 URL \u4e3a\uff1amember1=http://10.0.0.1\uff0c member2=http://10.0.0.2 \u548c member3=http://10.0.0.3\u3002\u5f53 member1 \u5931\u8d25\u65f6\uff0c\u5c06\u5176\u66ff\u6362\u4e3a member4=http://10.0.0.4\u3002 \u867d\u7136 etcd \u5728\u5185\u90e8\u4fdd\u7559\u552f\u4e00\u7684\u6210\u5458 ID\uff0c\u4f46\u5efa\u8bae\u4e3a\u6bcf\u4e2a\u6210\u5458\u4f7f\u7528\u552f\u4e00\u7684\u540d\u79f0\uff0c\u4ee5\u907f\u514d\u4eba\u4e3a\u9519\u8bef\u3002 \u4f8b\u5982\uff0c\u8003\u8651\u4e00\u4e2a\u4e09\u6210\u5458\u7684 etcd \u96c6\u7fa4\u3002\u8ba9 URL \u4e3a\uff1a`member1=http://10.0.0.1`\uff0c `member2=http://10.0.0.2` \u548c `member3=http://10.0.0.3`\u3002\u5f53 `member1` \u5931\u8d25\u65f6\uff0c\u5c06\u5176\u66ff\u6362\u4e3a `member4=http://10.0.0.4`\u3002 1. \u83b7\u53d6\u5931\u8d25\u7684 member1 \u7684\u6210\u5458 ID\uff1a 1. \u83b7\u53d6\u5931\u8d25\u7684 `member1` \u7684\u6210\u5458 ID\uff1a `etcdctl --endpoints=http://10.0.0.2,http://10.0.0.3 member list` ```shell etcdctl --endpoints=http://10.0.0.2,http://10.0.0.3 member list ``` \u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\uff1a \u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\uff1a 8211f1d0f64f3269, started, member1, http://10.0.0.1:2380, http://10.0.0.1:2379 91bc3c398fb3c146, started, member2, http://10.0.0.2:2380, http://10.0.0.2:2379 fd422379fda50e48, started, member3, http://10.0.0.3:2380, http://10.0.0.3:2379 ```console 8211f1d0f64f3269, started, member1, http://10.0.0.1:2380, http://10.0.0.1:2379 91bc3c398fb3c146, started, member2, http://10.0.0.2:2380, http://10.0.0.2:2379 fd422379fda50e48, started, member3, http://10.0.0.3:2380, http://10.0.0.3:2379 ``` 2. \u79fb\u9664\u5931\u8d25\u7684\u6210\u5458 `etcdctl member remove 8211f1d0f64f3269` ```shell etcdctl member remove 8211f1d0f64f3269 ``` \u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\uff1a \u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\uff1a Removed member 8211f1d0f64f3269 from cluster ```console Removed member 8211f1d0f64f3269 from cluster ``` 3. \u589e\u52a0\u65b0\u6210\u5458\uff1a `./etcdctl member add member4 --peer-urls=http://10.0.0.4:2380` ```shell etcdctl member add member4 --peer-urls=http://10.0.0.4:2380 ``` \u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\uff1a \u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\uff1a Member 2be1eb8f84b7f63e added to cluster ef37ad9dc622a7c4 ```console Member 2be1eb8f84b7f63e added to cluster ef37ad9dc622a7c4 ``` 4. \u5728 IP \u4e3a `10.0.0.4` \u7684\u673a\u5668\u4e0a\u542f\u52a8\u65b0\u589e\u52a0\u7684\u6210\u5458\uff1a export ETCD_NAME=\"member4\" export ETCD_INITIAL_CLUSTER=\"member2=http://10.0.0.2:2380,member3=http://10.0.0.3:2380,member4=http://10.0.0.4:2380\" export ETCD_INITIAL_CLUSTER_STATE=existing etcd [flags] ```shell export ETCD_NAME=\"member4\" export ETCD_INITIAL_CLUSTER=\"member2=http://10.0.0.2:2380,member3=http://10.0.0.3:2380,member4=http://10.0.0.4:2380\" export ETCD_INITIAL_CLUSTER_STATE=existing etcd [flags] ``` 5. \u505a\u4ee5\u4e0b\u4e8b\u60c5\u4e4b\u4e00\uff1a 1. \u66f4\u65b0\u5176 `--etcd-servers` \u53c2\u6570\uff0c\u4f7f Kubernetes \u77e5\u9053\u914d\u7f6e\u8fdb\u884c\u4e86\u66f4\u6539\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\u3002 1. \u66f4\u65b0 Kubernetes API \u670d\u52a1\u5668\u7684 `--etcd-servers` \u53c2\u6570\uff0c\u4f7f Kubernetes \u77e5\u9053\u914d\u7f6e\u8fdb\u884c\u4e86\u66f4\u6539\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8 Kubernetes API \u670d\u52a1\u5668\u3002 2. \u5982\u679c\u5728 deployment \u4e2d\u4f7f\u7528\u4e86\u8d1f\u8f7d\u5747\u8861\uff0c\u66f4\u65b0\u8d1f\u8f7d\u5747\u8861\u914d\u7f6e\u3002 \u6709\u5173\u96c6\u7fa4\u91cd\u65b0\u914d\u7f6e\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [etcd \u91cd\u6784\u6587\u6863](https://github.com/coreos/etcd/blob/master/Documentation/op-guide/runtime-configuration.md#remove-a-member)\u3002 \u6709\u5173\u96c6\u7fa4\u91cd\u65b0\u914d\u7f6e\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [etcd \u91cd\u6784\u6587\u6863](https://etcd.io/docs/current/op-guide/runtime-configuration/#remove-a-member)\u3002 ## \u5907\u4efd etcd \u96c6\u7fa4 \u6240\u6709 Kubernetes \u5bf9\u8c61\u90fd\u5b58\u50a8\u5728 etcd \u4e0a\u3002\u5b9a\u671f\u5907\u4efd etcd \u96c6\u7fa4\u6570\u636e\u5bf9\u4e8e\u5728\u707e\u96be\u573a\u666f\uff08\u4f8b\u5982\u4e22\u5931\u6240\u6709\u4e3b\u8282\u70b9\uff09\u4e0b\u6062\u590d Kubernetes \u96c6\u7fa4\u975e\u5e38\u91cd\u8981\u3002\u5feb\u7167\u6587\u4ef6\u5305\u542b\u6240\u6709 Kubernetes \u72b6\u6001\u548c\u5173\u952e\u4fe1\u606f\u3002\u4e3a\u4e86\u4fdd\u8bc1\u654f\u611f\u7684 Kubernetes \u6570\u636e\u7684\u5b89\u5168\uff0c\u53ef\u4ee5\u5bf9\u5feb\u7167\u6587\u4ef6\u8fdb\u884c\u52a0\u5bc6\u3002 \u6240\u6709 Kubernetes \u5bf9\u8c61\u90fd\u5b58\u50a8\u5728 etcd \u4e0a\u3002\u5b9a\u671f\u5907\u4efd etcd \u96c6\u7fa4\u6570\u636e\u5bf9\u4e8e\u5728\u707e\u96be\u573a\u666f\uff08\u4f8b\u5982\u4e22\u5931\u6240\u6709\u63a7\u5236\u5e73\u9762\u8282\u70b9\uff09\u4e0b\u6062\u590d Kubernetes \u96c6\u7fa4\u975e\u5e38\u91cd\u8981\u3002 \u5feb\u7167\u6587\u4ef6\u5305\u542b\u6240\u6709 Kubernetes \u72b6\u6001\u548c\u5173\u952e\u4fe1\u606f\u3002\u4e3a\u4e86\u4fdd\u8bc1\u654f\u611f\u7684 Kubernetes \u6570\u636e\u7684\u5b89\u5168\uff0c\u53ef\u4ee5\u5bf9\u5feb\u7167\u6587\u4ef6\u8fdb\u884c\u52a0\u5bc6\u3002 \u5907\u4efd etcd \u96c6\u7fa4\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u5b8c\u6210\uff1aetcd \u5185\u7f6e\u5feb\u7167\u548c\u5377\u5feb\u7167\u3002 **\u4f5c\u8005**: [Jordan Liggitt](https://github.com/liggitt) (Google) \u4f5c\u4e3a Kubernetes \u7ef4\u62a4\u8005\uff0c\u6211\u4eec\u4e00\u76f4\u5728\u5bfb\u627e\u5728\u4fdd\u6301\u517c\u5bb9\u6027\u7684\u540c\u65f6\u63d0\u9ad8\u53ef\u7528\u6027\u7684\u65b9\u6cd5\u3002 \u5728\u5f00\u53d1\u529f\u80fd\u3001\u5206\u7c7b Bug\u3001\u548c\u56de\u7b54\u652f\u6301\u95ee\u9898\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u79ef\u7d2f\u4e86\u6709\u52a9\u4e8e Kubernetes \u7528\u6237\u4e86\u89e3\u7684\u4fe1\u606f\u3002 \u8fc7\u53bb\uff0c\u5171\u4eab\u8fd9\u4e9b\u4fe1\u606f\u4ec5\u9650\u4e8e\u53d1\u5e03\u8bf4\u660e\u3001\u516c\u544a\u7535\u5b50\u90ae\u4ef6\u3001\u6587\u6863\u548c\u535a\u5ba2\u6587\u7ae0\u7b49\u5e26\u5916\u65b9\u6cd5\u3002 \u9664\u975e\u6709\u4eba\u77e5\u9053\u9700\u8981\u5bfb\u627e\u8fd9\u4e9b\u4fe1\u606f\u5e76\u6210\u529f\u627e\u5230\u5b83\u4eec\uff0c\u5426\u5219\u4ed6\u4eec\u4e0d\u4f1a\u4ece\u4e2d\u53d7\u76ca\u3002 \u5728 Kubernetes v1.19 \u4e2d\uff0c\u6211\u4eec\u6dfb\u52a0\u4e86\u4e00\u4e2a\u529f\u80fd\uff0c\u5141\u8bb8 Kubernetes API \u670d\u52a1\u5668[\u5411 API \u5ba2\u6237\u7aef\u53d1\u9001\u8b66\u544a](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1693-warnings)\u3002 \u8b66\u544a\u4fe1\u606f\u4f7f\u7528[\u6807\u51c6 `Warning` \u54cd\u5e94\u5934](https://tools.ietf.org/html/rfc7234#section-5.5)\u53d1\u9001\uff0c \u56e0\u6b64\u5b83\u4e0d\u4f1a\u4ee5\u4efb\u4f55\u65b9\u5f0f\u66f4\u6539\u72b6\u6001\u4ee3\u7801\u6216\u54cd\u5e94\u4f53\u3002 \u8fd9\u4e00\u8bbe\u8ba1\u4f7f\u5f97\u670d\u52a1\u80fd\u591f\u53d1\u9001\u4efb\u4f55 API \u5ba2\u6237\u7aef\u90fd\u53ef\u4ee5\u8f7b\u677e\u8bfb\u53d6\u7684\u8b66\u544a\uff0c\u540c\u65f6\u4fdd\u6301\u4e0e\u4ee5\u524d\u7684\u5ba2\u6237\u7aef\u7248\u672c\u517c\u5bb9\u3002 \u8b66\u544a\u5728 `kubectl` v1.19+ \u7684 `stderr` \u8f93\u51fa\u4e2d\u548c `k8s.io/client-go` v0.19.0+ \u5ba2\u6237\u7aef\u5e93\u7684\u65e5\u5fd7\u4e2d\u51fa\u73b0\u3002 `k8s.io/client-go` \u884c\u4e3a\u53ef\u4ee5[\u5728\u8fdb\u7a0b\u6216\u5ba2\u6237\u7aef\u5c42\u9762\u91cd\u8f7d](#customize-client-handling)\u3002 ## \u5f03\u7528\u8b66\u544a {#deprecation-warnings} \u6211\u4eec\u7b2c\u4e00\u6b21\u4f7f\u7528\u6b64\u65b0\u529f\u80fd\u662f\u9488\u5bf9\u5df2\u5f03\u7528\u7684 API \u8c03\u7528\u53d1\u9001\u8b66\u544a\u3002 Kubernetes \u662f\u4e00\u4e2a[\u5927\u578b\u3001\u5feb\u901f\u53d1\u5c55\u7684\u9879\u76ee](https://www.cncf.io/cncf-kubernetes-project-journey/#development-velocity)\u3002 \u8ddf\u4e0a\u6bcf\u4e2a\u7248\u672c\u7684[\u53d8\u66f4](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#changelog-since-v1180)\u53ef\u80fd\u662f\u4ee4\u4eba\u751f\u754f\u7684\uff0c \u5373\u4f7f\u5bf9\u4e8e\u5168\u804c\u4ece\u4e8b\u8be5\u9879\u76ee\u7684\u4eba\u6765\u8bf4\u4e5f\u662f\u5982\u6b64\u3002\u4e00\u79cd\u91cd\u8981\u7684\u53d8\u66f4\u662f API \u5f03\u7528\u3002 \u968f\u7740 Kubernetes \u4e2d\u7684 API \u5347\u7ea7\u5230 GA \u7248\u672c\uff0c\u9884\u53d1\u5e03\u7684 API \u7248\u672c\u4f1a\u88ab\u5f03\u7528\u5e76\u6700\u7ec8\u88ab\u5220\u9664\u3002 \u5373\u4f7f\u6709[\u5ef6\u957f\u7684\u5f03\u7528\u671f](/zh-cn/docs/reference/using-api/deprecation-policy/)\uff0c \u5e76\u4e14[\u5728\u53d1\u5e03\u8bf4\u660e\u4e2d](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#deprecation)\u4e5f\u5305\u542b\u4e86\u5f03\u7528\u4fe1\u606f\uff0c \u4ed6\u4eec\u4ecd\u7136\u5f88\u96be\u88ab\u8ffd\u8e2a\u3002\u5728\u5f03\u7528\u671f\u5185\uff0c\u9884\u53d1\u5e03 API \u4ecd\u7136\u6709\u6548\uff0c \u5141\u8bb8\u591a\u4e2a\u7248\u672c\u8fc7\u6e21\u5230\u7a33\u5b9a\u7684 API \u7248\u672c\u3002 \u7136\u800c\uff0c\u6211\u4eec\u53d1\u73b0\u7528\u6237\u5f80\u5f80\u751a\u81f3\u6ca1\u6709\u610f\u8bc6\u5230\u4ed6\u4eec\u4f9d\u8d56\u4e8e\u5df2\u5f03\u7528\u7684 API \u7248\u672c\uff0c \u76f4\u5230\u5347\u7ea7\u5230\u4e0d\u518d\u63d0\u4f9b\u76f8\u5e94\u670d\u52a1\u7684\u65b0\u7248\u672c\u3002 \u4ece v1.19 \u5f00\u59cb\uff0c\u7cfb\u7edf\u6bcf\u5f53\u6536\u5230\u9488\u5bf9\u5df2\u5f03\u7528\u7684 REST API \u7684\u8bf7\u6c42\u65f6\uff0c\u90fd\u4f1a\u8fd4\u56de\u8b66\u544a\u4ee5\u53ca API \u54cd\u5e94\u3002 \u6b64\u8b66\u544a\u5305\u62ec\u6709\u5173 API \u5c06\u4e0d\u518d\u53ef\u7528\u7684\u7248\u672c\u4ee5\u53ca\u66ff\u6362 API \u7248\u672c\u7684\u8be6\u7ec6\u4fe1\u606f\u3002 \u56e0\u4e3a\u8b66\u544a\u6e90\u81ea\u670d\u52a1\u5668\u7aef\uff0c\u5e76\u5728\u5ba2\u6237\u7aef\u5c42\u7ea7\u88ab\u62e6\u622a\uff0c\u6240\u4ee5\u5b83\u9002\u7528\u4e8e\u6240\u6709 kubectl \u547d\u4ee4\uff0c \u5305\u62ec\u50cf `kubectl apply` \u8fd9\u6837\u7684\u9ad8\u7ea7\u547d\u4ee4\uff0c\u4ee5\u53ca\u50cf `kubectl get --raw` \u8fd9\u6837\u7684\u4f4e\u7ea7\u547d\u4ee4\uff1a \"kubectl \u8fd9\u6709\u52a9\u4e8e\u53d7\u5f03\u7528\u5f71\u54cd\u7684\u4eba\u4eec\u77e5\u9053\u4ed6\u4eec\u6240\u8bf7\u6c42\u7684API\u5df2\u88ab\u5f03\u7528\uff0c \u4ed6\u4eec\u6709\u591a\u957f\u65f6\u95f4\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u4ee5\u53ca\u4ed6\u4eec\u5e94\u8be5\u4f7f\u7528\u4ec0\u4e48 API\u3002 \u8fd9\u5728\u7528\u6237\u5e94\u7528\u4e0d\u662f\u7531\u4ed6\u4eec\u521b\u5efa\u7684\u6e05\u5355\u6587\u4ef6\u65f6\u7279\u522b\u6709\u7528\uff0c \u6240\u4ee5\u4ed6\u4eec\u6709\u65f6\u95f4\u8054\u7cfb\u4f5c\u8005\u8981\u4e00\u4e2a\u66f4\u65b0\u7684\u7248\u672c\u3002 \u6211\u4eec\u8fd8\u610f\u8bc6\u5230**\u4f7f\u7528**\u5df2\u5f03\u7528\u7684 API \u7684\u4eba\u901a\u5e38\u4e0d\u662f\u8d1f\u8d23\u5347\u7ea7\u96c6\u7fa4\u7684\u4eba\uff0c \u56e0\u6b64\uff0c\u6211\u4eec\u6dfb\u52a0\u4e86\u4e24\u4e2a\u9762\u5411\u7ba1\u7406\u5458\u7684\u5de5\u5177\u6765\u5e2e\u52a9\u8ddf\u8e2a\u5df2\u5f03\u7528\u7684 API \u7684\u4f7f\u7528\u60c5\u51b5\u5e76\u786e\u5b9a\u4f55\u65f6\u5347\u7ea7\u5b89\u5168\u3002 ### \u5ea6\u91cf\u6307\u6807 {#metrics} \u4ece Kubernetes v1.19 \u5f00\u59cb\uff0c\u5f53\u5411\u5df2\u5f03\u7528\u7684 REST API \u7aef\u70b9\u53d1\u51fa\u8bf7\u6c42\u65f6\uff0c \u5728 kube-apiserver \u8fdb\u7a0b\u4e2d\uff0c`apiserver_requested_deprecated_apis` \u5ea6\u91cf\u6307\u6807\u4f1a\u88ab\u8bbe\u7f6e\u4e3a `1`\u3002 \u8be5\u6307\u6807\u5177\u6709 API `group`\u3001`version`\u3001`resource` \u548c `subresource` \u7684\u6807\u7b7e\uff0c \u548c\u4e00\u4e2a `removed_release` \u6807\u7b7e\uff0c\u8868\u660e\u4e0d\u518d\u63d0\u4f9b API \u7684 Kubernetes \u7248\u672c\u3002 \u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528 `kubectl` \u7684\u67e5\u8be2\u793a\u4f8b\uff0c[prom2json](https://github.com/prometheus/prom2json) \u548c [jq](https://stedolan.github.io/jq/) \u7528\u6765\u786e\u5b9a\u5f53\u524d API \u670d\u52a1\u5668\u5b9e\u4f8b\u4e0a\u6536\u5230\u4e86\u54ea\u4e9b\u5bf9\u5df2\u5f03\u7528\u7684 API \u8bf7\u6c42\uff1a ```sh kubectl get --raw /metrics | prom2json | jq ' .[] | select(.name==\"apiserver_requested_deprecated_apis\").metrics[].labels ' ``` \u8f93\u51fa\uff1a ```json { \"group\": \"extensions\", \"removed_release\": \"1.22\", \"resource\": \"ingresses\", \"subresource\": \"\", \"version\": \"v1beta1\" } { \"group\": \"rbac.authorization.k8s.io\", \"removed_release\": \"1.22\", \"resource\": \"clusterroles\", \"subresource\": \"\", \"version\": \"v1beta1\" } ``` \u8f93\u51fa\u5c55\u793a\u5728\u6b64\u670d\u52a1\u5668\u4e0a\u8bf7\u6c42\u4e86\u5df2\u5f03\u7528\u7684 `extensions/v1beta1` Ingress \u548c `rbac.authorization.k8s.io/v1beta1` ClusterRole API\uff0c\u8fd9\u4e24\u4e2a API \u90fd\u5c06\u5728 v1.22 \u4e2d\u88ab\u5220\u9664\u3002 \u6211\u4eec\u53ef\u4ee5\u5c06\u8be5\u4fe1\u606f\u4e0e `apiserver_request_total` \u6307\u6807\u7ed3\u5408\u8d77\u6765\uff0c\u4ee5\u83b7\u53d6\u6709\u5173\u8fd9\u4e9b API \u8bf7\u6c42\u7684\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff1a ```sh kubectl get --raw /metrics | prom2json | jq ' # set $deprecated to a list of deprecated APIs [ .[] | select(.name==\"apiserver_requested_deprecated_apis\").metrics[].labels | {group,version,resource} ] as $deprecated | # select apiserver_request_total metrics which are deprecated .[] | select(.name==\"apiserver_request_total\").metrics[] | select(.labels | {group,version,resource} as $key | $deprecated | index($key)) ' ``` \u8f93\u51fa\uff1a ```json { \"labels\": { \"code\": \"0\", \"component\": \"apiserver\", \"contentType\": \"application/vnd.kubernetes.protobuf;stream=watch\", \"dry_run\": \"\", \"group\": \"extensions\", \"resource\": \"ingresses\", \"scope\": \"cluster\", \"subresource\": \"\", \"verb\": \"WATCH\", \"version\": \"v1beta1\" }, \"value\": \"21\" } { \"labels\": { \"code\": \"200\", \"component\": \"apiserver\", \"contentType\": \"application/vnd.kubernetes.protobuf\", \"dry_run\": \"\", \"group\": \"extensions\", \"resource\": \"ingresses\", \"scope\": \"cluster\", \"subresource\": \"\", \"verb\": \"LIST\", \"version\": \"v1beta1\" }, \"value\": \"1\" } { \"labels\": { \"code\": \"200\", \"component\": \"apiserver\", \"contentType\": \"application/json\", \"dry_run\": \"\", \"group\": \"rbac.authorization.k8s.io\", \"resource\": \"clusterroles\", \"scope\": \"cluster\", \"subresource\": \"\", \"verb\": \"LIST\", \"version\": \"v1beta1\" }, \"value\": \"1\" } ``` \u4e0a\u9762\u7684\u8f93\u51fa\u5c55\u793a\uff0c\u5bf9\u8fd9\u4e9b API \u53d1\u51fa\u7684\u90fd\u53ea\u662f\u8bfb\u8bf7\u6c42\uff0c\u5e76\u4e14\u5927\u591a\u6570\u8bf7\u6c42\u90fd\u7528\u6765\u76d1\u6d4b\u5df2\u5f03\u7528\u7684 Ingress API\u3002 \u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b Prometheus \u67e5\u8be2\u83b7\u53d6\u8fd9\u4e00\u4fe1\u606f\uff0c \u8be5\u67e5\u8be2\u8fd4\u56de\u5173\u4e8e\u5df2\u5f03\u7528\u7684\u3001\u5c06\u5728 v1.22 \u4e2d\u5220\u9664\u7684 API \u8bf7\u6c42\u7684\u4fe1\u606f\uff1a ```promql apiserver_requested_deprecated_apis{removed_release=\"1.22\"} * on(group,version,resource,subresource) group_right() apiserver_request_total ``` ### \u5ba1\u8ba1\u6ce8\u89e3 {#audit-annotations} \u5ea6\u91cf\u6307\u6807\u662f\u68c0\u67e5\u662f\u5426\u6b63\u5728\u4f7f\u7528\u5df2\u5f03\u7528\u7684 API \u4ee5\u53ca\u4f7f\u7528\u7387\u5982\u4f55\u7684\u5feb\u901f\u65b9\u6cd5\uff0c \u4f46\u5b83\u4eec\u6ca1\u6709\u5305\u542b\u8db3\u591f\u7684\u4fe1\u606f\u6765\u8bc6\u522b\u7279\u5b9a\u7684\u5ba2\u6237\u7aef\u6216 API \u5bf9\u8c61\u3002 \u4ece Kubernetes v1.19 \u5f00\u59cb\uff0c \u5bf9\u5df2\u5f03\u7528\u7684 API \u7684\u8bf7\u6c42\u8fdb\u884c\u5ba1\u8ba1\u65f6\uff0c[\u5ba1\u8ba1\u4e8b\u4ef6](/zh-cn/docs/tasks/debug/debug-cluster/audit/)\u4e2d\u4f1a\u5305\u62ec \u5ba1\u8ba1\u6ce8\u89e3 `\"k8s.io/deprecated\":\"true\"`\u3002 \u7ba1\u7406\u5458\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u5ba1\u8ba1\u4e8b\u4ef6\u6765\u8bc6\u522b\u9700\u8981\u66f4\u65b0\u7684\u7279\u5b9a\u5ba2\u6237\u7aef\u6216\u5bf9\u8c61\u3002 ## \u81ea\u5b9a\u4e49\u8d44\u6e90\u5b9a\u4e49 {#custom-resource-definitions} \u9664\u4e86 API \u670d\u52a1\u5668\u5bf9\u5df2\u5f03\u7528\u7684 API \u4f7f\u7528\u53d1\u51fa\u8b66\u544a\u7684\u80fd\u529b\u5916\uff0c\u4ece v1.19 \u5f00\u59cb\uff0cCustomResourceDefinition \u53ef\u4ee5\u6307\u793a[\u5b83\u5b9a\u4e49\u7684\u8d44\u6e90\u7684\u7279\u5b9a\u7248\u672c\u5df2\u88ab\u5f03\u7528](/zh-cn/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#version-deprecation)\u3002 \u5f53\u5bf9\u81ea\u5b9a\u4e49\u8d44\u6e90\u7684\u5df2\u5f03\u7528\u7684\u7248\u672c\u53d1\u51fa API \u8bf7\u6c42\u65f6\uff0c\u5c06\u8fd4\u56de\u4e00\u6761\u8b66\u544a\u6d88\u606f\uff0c\u4e0e\u5185\u7f6e API \u7684\u884c\u4e3a\u76f8\u5339\u914d\u3002 CustomResourceDefinition \u7684\u4f5c\u8005\u8fd8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u81ea\u5b9a\u4e49\u6bcf\u4e2a\u7248\u672c\u7684\u8b66\u544a\u3002 \u8fd9\u5141\u8bb8\u4ed6\u4eec\u5728\u9700\u8981\u65f6\u63d0\u4f9b\u6307\u5411\u8fc1\u79fb\u6307\u5357\u7684\u4fe1\u606f\u6216\u5176\u4ed6\u4fe1\u606f\u3002 ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition name: crontabs.example.com spec: versions: - name: v1alpha1 # \u8fd9\u8868\u793a v1alpha1 \u7248\u672c\u7684\u81ea\u5b9a\u4e49\u8d44\u6e90\u5df2\u7ecf\u5e9f\u5f03\u4e86\u3002 # \u5bf9\u6b64\u7248\u672c\u7684 API \u8bf7\u6c42\u4f1a\u5728\u670d\u52a1\u5668\u54cd\u5e94\u4e2d\u6536\u5230\u8b66\u544a\u3002 deprecated: true # \u8fd9\u4f1a\u628a\u8fd4\u56de\u7ed9\u53d1\u51fa v1alpha1 API \u8bf7\u6c42\u7684\u5ba2\u6237\u7aef\u7684\u9ed8\u8ba4\u8b66\u544a\u8986\u76d6\u3002 deprecationWarning: \"example.com/v1alpha1 CronTab is deprecated; use example.com/v1 CronTab (see http://example.com/v1alpha1-v1)\" ... - name: v1beta1 # \u8fd9\u8868\u793a v1beta1 \u7248\u672c\u7684\u81ea\u5b9a\u4e49\u8d44\u6e90\u5df2\u7ecf\u5e9f\u5f03\u4e86\u3002 # \u5bf9\u6b64\u7248\u672c\u7684 API \u8bf7\u6c42\u4f1a\u5728\u670d\u52a1\u5668\u54cd\u5e94\u4e2d\u6536\u5230\u8b66\u544a\u3002 # \u6b64\u7248\u672c\u8fd4\u56de\u9ed8\u8ba4\u8b66\u544a\u6d88\u606f\u3002 deprecated: true ... - name: v1 ... ``` ## \u51c6\u5165 Webhook {#admission-webhooks} [\u51c6\u5165 Webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers)\u662f\u5c06\u81ea\u5b9a\u4e49\u7b56\u7565\u6216\u9a8c\u8bc1\u4e0e Kubernetes \u96c6\u6210\u7684\u4e3b\u8981\u65b9\u5f0f\u3002 \u4ece v1.19 \u5f00\u59cb\uff0cAdmission Webhook \u53ef\u4ee5[\u8fd4\u56de\u8b66\u544a\u6d88\u606f](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#response)\uff0c \u4f20\u9012\u7ed9\u53d1\u9001\u8bf7\u6c42\u7684 API \u5ba2\u6237\u7aef\u3002\u8b66\u544a\u53ef\u4ee5\u4e0e\u5141\u8bb8\u6216\u62d2\u7edd\u7684\u54cd\u5e94\u4e00\u8d77\u8fd4\u56de\u3002 \u4f8b\u5982\uff0c\u5141\u8bb8\u8bf7\u6c42\u4f46\u8b66\u544a\u5df2\u77e5\u67d0\u4e2a\u914d\u7f6e\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\u65f6\uff0c\u51c6\u5165 Webhook \u53ef\u4ee5\u53d1\u9001\u4ee5\u4e0b\u54cd\u5e94\uff1a ```json { \"apiVersion\": \"admission.k8s.io/v1\", \"kind\": \"AdmissionReview\", \"response\": { \"uid\": \"\", \"allowed\": true, \"warnings\": [ \".spec.memory: requests >1GB do not work on Fridays\" ] } } ``` \u5982\u679c\u4f60\u5728\u5b9e\u73b0\u4e00\u4e2a\u8fd4\u56de\u8b66\u544a\u6d88\u606f\u7684 Webhook\uff0c\u8fd9\u91cc\u6709\u4e00\u4e9b\u63d0\u793a\uff1a * \u4e0d\u8981\u5728\u6d88\u606f\u4e2d\u5305\u542b \u201cWarning:\u201d \u524d\u7f00\uff08\u7531\u5ba2\u6237\u7aef\u5728\u8f93\u51fa\u65f6\u6dfb\u52a0\uff09 * \u4f7f\u7528\u8b66\u544a\u6d88\u606f\u6765\u6b63\u786e\u63cf\u8ff0\u80fd\u88ab\u53d1\u51fa API \u8bf7\u6c42\u7684\u5ba2\u6237\u7aef\u7ea0\u6b63\u6216\u4e86\u89e3\u7684\u95ee\u9898 * \u4fdd\u6301\u7b80\u6d01\uff1b\u5982\u679c\u53ef\u80fd\uff0c\u5c06\u8b66\u544a\u9650\u5236\u4e3a 120 \u4e2a\u5b57\u7b26\u4ee5\u5185 \u51c6\u5165 Webhook \u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u4f7f\u7528\u8fd9\u4e2a\u65b0\u529f\u80fd\uff0c\u6211\u671f\u5f85\u770b\u5230\u5927\u5bb6\u60f3\u51fa\u6765\u7684\u65b9\u6cd5\u3002 \u8fd9\u91cc\u6709\u4e00\u4e9b\u60f3\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5165\u95e8\uff1a * \u6dfb\u52a0 \u201ccomplain\u201d \u6a21\u5f0f\u7684 Webhook \u5b9e\u73b0\uff0c\u5b83\u4eec\u8fd4\u56de\u8b66\u544a\u800c\u4e0d\u662f\u62d2\u7edd\uff0c \u5141\u8bb8\u5728\u5f00\u59cb\u6267\u884c\u4e4b\u524d\u5c1d\u8bd5\u7b56\u7565\u4ee5\u9a8c\u8bc1\u5b83\u662f\u5426\u6309\u9884\u671f\u5de5\u4f5c * \u201clint\u201d \u6216 \u201cvet\u201d \u98ce\u683c\u7684 Webhook\uff0c\u68c0\u67e5\u5bf9\u8c61\u5e76\u5728\u672a\u9075\u5faa\u6700\u4f73\u5b9e\u8df5\u65f6\u663e\u793a\u8b66\u544a ## \u81ea\u5b9a\u4e49\u5ba2\u6237\u7aef\u5904\u7406\u65b9\u5f0f {#customize-client-handling} \u4f7f\u7528 `k8s.io/client-go` \u5e93\u53d1\u51fa API \u8bf7\u6c42\u7684\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5b9a\u5236\u5982\u4f55\u5904\u7406\u4ece\u670d\u52a1\u5668\u8fd4\u56de\u7684\u8b66\u544a\u3002 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6536\u5230\u7684\u8b66\u544a\u4f1a\u4ee5\u65e5\u5fd7\u5f62\u5f0f\u8f93\u51fa\u5230 stderr\uff0c \u4f46[\u5728\u8fdb\u7a0b\u5c42\u9762](https://godoc.org/k8s.io/client-go/rest#SetDefaultWarningHandler)\u6216[\u5ba2\u6237\u7aef\u5c42\u9762] (https://godoc.org/k8s.io/client-go/rest#Config)\u5747\u53ef\u5b9a\u5236\u8fd9\u4e00\u884c\u4e3a\u3002 \u8fd9\u4e2a\u4f8b\u5b50\u5c55\u793a\u4e86\u5982\u4f55\u8ba9\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u8868\u73b0\u5f97\u50cf `kubectl`\uff0c \u5728\u8fdb\u7a0b\u5c42\u9762\u91cd\u8f7d\u6574\u4e2a\u6d88\u606f\u5904\u7406\u903b\u8f91\u4ee5\u5220\u9664\u91cd\u590d\u7684\u8b66\u544a\uff0c \u5e76\u5728\u652f\u6301\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528\u5f69\u8272\u8f93\u51fa\u7a81\u51fa\u663e\u793a\u6d88\u606f\uff1a ```go import ( \"os\" \"k8s.io/client-go/rest\" \"k8s.io/kubectl/pkg/util/term\" ... ) func main() { rest.SetDefaultWarningHandler( rest.NewWarningWriter(os.Stderr, rest.WarningWriterOptions{ // only print a given warning the first time we receive it Deduplicate: true, // highlight the output with color when the output supports it Color: term.AllowsColorOutput(os.Stderr), }, ), ) ... ``` \u4e0b\u4e00\u4e2a\u793a\u4f8b\u5c55\u793a\u5982\u4f55\u6784\u5efa\u4e00\u4e2a\u5ffd\u7565\u8b66\u544a\u7684\u5ba2\u6237\u7aef\u3002 \u8fd9\u5bf9\u4e8e\u90a3\u4e9b\u64cd\u4f5c\u6240\u6709\u8d44\u6e90\u7c7b\u578b\uff08\u4f7f\u7528\u53d1\u73b0 API \u5728\u8fd0\u884c\u65f6\u52a8\u6001\u53d1\u73b0\uff09 \u7684\u5143\u6570\u636e\u5e76\u4e14\u4e0d\u4f1a\u4ece\u5df2\u5f03\u7528\u7684\u7279\u5b9a\u8d44\u6e90\u7684\u8b66\u544a\u4e2d\u53d7\u76ca\u7684\u5ba2\u6237\u7aef\u5f88\u6709\u7528\u3002 \u5bf9\u4e8e\u9700\u8981\u4f7f\u7528\u7279\u5b9a API \u7684\u5ba2\u6237\u7aef\uff0c\u4e0d\u5efa\u8bae\u6291\u5236\u5f03\u7528\u8b66\u544a\u3002 ```go import ( \"k8s.io/client-go/rest\" \"k8s.io/client-go/kubernetes\" ) func getClientWithoutWarnings(config *rest.Config) (kubernetes.Interface, error) { // copy to avoid mutating the passed-in config config = rest.CopyConfig(config) // set the warning handler for this client to ignore warnings config.WarningHandler = rest.NoWarnings{} // construct and return the client return kubernetes.NewForConfig(config) } ``` ## Kubectl \u5f3a\u5236\u6a21\u5f0f {#kubectl-strict-mode} \u5982\u679c\u4f60\u60f3\u786e\u4fdd\u53ca\u65f6\u6ce8\u610f\u5230\u5f03\u7528\u95ee\u9898\u5e76\u7acb\u5373\u7740\u624b\u89e3\u51b3\u5b83\u4eec\uff0c `kubectl` \u5728 v1.19 \u4e2d\u6dfb\u52a0\u4e86 `--warnings-as-errors` \u9009\u9879\u3002\u4f7f\u7528\u6b64\u9009\u9879\u8c03\u7528\u65f6\uff0c `kubectl` \u5c06\u4ece\u670d\u52a1\u5668\u6536\u5230\u7684\u6240\u6709\u8b66\u544a\u89c6\u4e3a\u9519\u8bef\uff0c\u5e76\u4ee5\u975e\u96f6\u7801\u9000\u51fa\uff1a \"kubectl \u8fd9\u53ef\u4ee5\u5728 CI \u4f5c\u4e1a\u4e2d\u7528\u4e8e\u5c06\u6e05\u5355\u6587\u4ef6\u5e94\u7528\u5230\u5f53\u524d\u670d\u52a1\u5668\uff0c \u5176\u4e2d\u8981\u6c42\u901a\u8fc7\u96f6\u9000\u51fa\u7801\u624d\u80fd\u4f7f CI \u4f5c\u4e1a\u6210\u529f\u3002 ## \u672a\u6765\u7684\u53ef\u80fd\u6027 {#future-possibilities} \u73b0\u5728\u6211\u4eec\u6709\u4e86\u4e00\u79cd\u5728\u4e0a\u4e0b\u6587\u4e2d\u5411\u7528\u6237\u4f20\u8fbe\u6709\u7528\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c \u6211\u4eec\u5df2\u7ecf\u5728\u8003\u8651\u4f7f\u7528\u5176\u4ed6\u65b9\u6cd5\u6765\u6539\u5584\u4eba\u4eec\u4f7f\u7528 Kubernetes \u7684\u4f53\u9a8c\u3002 \u6211\u4eec\u63a5\u4e0b\u6765\u8981\u7814\u7a76\u7684\u51e0\u4e2a\u9886\u57df\u662f\u5173\u4e8e[\u5df2\u77e5\u6709\u95ee\u9898\u7684\u503c](http://issue.k8s.io/64841#issuecomment-395141013)\u7684\u8b66\u544a\u3002 \u51fa\u4e8e\u517c\u5bb9\u6027\u539f\u56e0\uff0c\u6211\u4eec\u4e0d\u80fd\u76f4\u63a5\u62d2\u7edd\uff0c\u800c\u5e94\u5c31\u4f7f\u7528\u5df2\u5f03\u7528\u7684\u5b57\u6bb5\u6216\u5b57\u6bb5\u503c \uff08\u4f8b\u5982\u4f7f\u7528 beta os/arch \u8282\u70b9\u6807\u7b7e\u7684\u9009\u62e9\u5668\uff0c [\u5728 v1.14 \u4e2d\u5df2\u5f03\u7528](/zh-cn/docs/reference/labels-annotations-taints/#beta-kubernetes-io-arch-deprecated)\uff09 \u7ed9\u51fa\u8b66\u544a\u3002 \u6211\u5f88\u9ad8\u5174\u770b\u5230\u8fd9\u65b9\u9762\u7684\u8fdb\u5c55\uff0c\u7ee7\u7eed\u8ba9 Kubernetes \u66f4\u5bb9\u6613\u4f7f\u7528\u3002
", "positive_passages": [{"docid": "doc-en-website-943f86187522cc7588ca30b7db9fcea540d09545f57a5b897df9ff50a50ddd56", "text": "link:\n/triage accepted\n/language zh-cn\nThe label(s) cannot be applied, because the repository doesn't have them. {{< feature-state for_k8s_version=\"v1.20\" state=\"alpha\" >}} {{< feature-state for_k8s_version=\"v1.22\" state=\"beta\" >}} `serving` is identical to the `ready` condition, except it does not account for terminating states. Consumers of the EndpointSlice API should check this condition if they care about pod readiness while", "positive_passages": [{"docid": "doc-en-website-b68eda4934111a88778cb92d99bdda5663d3716d629e24c68252b18141bf192c", "text": "This is a Bug Report ", "positive_passages": [{"docid": "doc-en-website-634ada7528254c7eac11010392fe33e0d3f37d44fc31f6dfbf79509f7b8baaa3", "text": "This is a Bug Report \u672c\u9875\u89e3\u91ca\u4e86\u5982\u4f55\u8c03\u8bd5\u8282\u70b9\u4e0a\u6b63\u5728\u8fd0\u884c(\u6216\u8005\u6b63\u5728\u5d29\u6e83)\u7684 Pod\u3002 ## {{% heading \"prerequisites\" %}} * \u4f60\u7684 {{< glossary_tooltip text=\"Pod\" term_id=\"pod\" >}} \u5e94\u8be5\u5df2\u7ecf\u8c03\u5ea6\u5e76\u6b63\u5728\u8fd0\u884c\u3002 \u5982\u679c Pod \u5c1a\u672a\u8fd0\u884c\uff0c\u5219\u4ece [\u5e94\u7528\u6545\u969c\u6392\u67e5](/zh/docs/tasks/debug-application-cluster/debug-application/) \u5f00\u59cb\u3002 * \u5bf9\u4e8e\u4e00\u4e9b\u9ad8\u7ea7\u8c03\u8bd5\u6b65\u9aa4\uff0c \u4f60\u9700\u8981\u77e5\u9053 Pod \u5728\u54ea\u4e2a\u8282\u70b9\u4e0a\u8fd0\u884c\uff0c\u5e76\u62e5\u6709\u5728\u8be5\u8282\u70b9\u4e0a\u6267\u884c shell \u547d\u4ee4\u7684\u6743\u9650\u3002 \u5728\u4f7f\u7528 `kubectl` \u8fd0\u884c\u6807\u51c6\u8c03\u8bd5\u6b65\u9aa4\u65f6\uff0c\u5219\u4e0d\u9700\u8981\u8fd9\u79cd\u6743\u9650\u3002 ## \u68c0\u67e5 Pod \u65e5\u5fd7 {#examine-pod-logs} \u9996\u5148\uff0c\u67e5\u770b\u53d7\u5f71\u54cd\u7684\u5bb9\u5668\u7684\u65e5\u5fd7\uff1a ```shell kubectl logs ${POD_NAME} ${CONTAINER_NAME} ``` \u5982\u679c\u4f60\u7684\u5bb9\u5668\u4ee5\u524d\u5d29\u6e83\u8fc7\uff0c\u4f60\u53ef\u4ee5\u8bbf\u95ee\u524d\u4e00\u4e2a\u5bb9\u5668\u7684\u5d29\u6e83\u65e5\u5fd7\uff1a ```shell kubectl logs --previous ${POD_NAME} ${CONTAINER_NAME} ``` ## \u4f7f\u7528\u5bb9\u5668 exec \u8c03\u8bd5 {#container-exec} \u5982\u679c {{< glossary_tooltip text=\"\u5bb9\u5668\u955c\u50cf\" term_id=\"image\" >}} \u5305\u542b\u8c03\u8bd5\u5de5\u5177\uff0c\u5c31\u50cf\u57fa\u4e8e Linux \u548c Windows \u57fa\u7840\u955c\u50cf\u6784\u5efa\u7684\u955c\u50cf\u4e00\u6837\uff0c \u4f60\u53ef\u4ee5\u4f7f\u7528 `kubectl exec` \u5728\u7279\u5b9a\u7684\u5bb9\u5668\u4e2d\u6267\u884c\u547d\u4ee4\uff1a ```shell kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD} ${ARG1} ${ARG2} ... ${ARGN} ``` {{< note >}} `-c ${CONTAINER_NAME}` \u662f\u53ef\u9009\u9879\u3002 \u5bf9\u4e8e\u5355\u5bb9\u5668 Pod\uff0c\u53ef\u4ee5\u7701\u7565\u6b64\u53c2\u6570\u3002 {{< /note >}} \u4f8b\u5982\uff0c\u8981\u67e5\u770b\u6b63\u5728\u8fd0\u884c\u7684 Cassandra Pod \u7684\u65e5\u5fd7\uff0c\u53ef\u4ee5\u6267\u884c\uff1a ```shell kubectl exec cassandra -- cat /var/log/cassandra/system.log ``` \u4f60\u53ef\u4ee5\u4f7f\u7528 `kubectl exec` \u7684 `-i` \u548c `-t` \u53c2\u6570\u542f\u52a8\u4e00\u4e2a\u8fde\u63a5\u5230\u7ec8\u7aef\u7684 shell\uff0c\u4f8b\u5982\uff1a ```shell kubectl exec -it cassandra -- sh ``` \u66f4\u591a\u7ec6\u8282\uff0c\u53c2\u89c1 [\u83b7\u53d6\u8fd0\u884c\u5bb9\u5668\u7684 Shell]( /zh/docs/tasks/debug-application-cluster/get-shell-running-container/)\u3002 ## \u4f7f\u7528\u4e34\u65f6\u8c03\u8bd5\u5bb9\u5668\u8fdb\u884c\u8c03\u8bd5 {#ephemeral-container} {{< feature-state state=\"alpha\" for_k8s_version=\"v1.18\" >}} \u56e0\u4e3a\u5bb9\u5668\u5df2\u7ecf\u5d29\u6e83\uff0c\u6216\u56e0\u4e3a\u5bb9\u5668\u955c\u50cf\u6ca1\u6709\u5185\u542b\u8c03\u8bd5\u5de5\u5177\uff0c\u6bd4\u5982 [distroless images](https://github.com/GoogleContainerTools/distroless)\uff0c \u5bfc\u81f4 `kubectl exec` \u4e0d\u8db3\u4ee5\u89e3\u51b3\u95ee\u9898\u65f6\uff0c {{< glossary_tooltip text=\"Ephemeral containers\" term_id=\"ephemeral-container\" >}} \u5bf9\u4ea4\u4e92\u5f0f\u6545\u969c\u8bca\u65ad\u975e\u5e38\u6709\u7528\u3002 \u4ece `v1.18` \u5f00\u59cb\uff0c`kubectl` \u63d0\u4f9b alpha \u547d\u4ee4\uff0c\u5b83\u53ef\u4ee5\u4e3a\u8c03\u8bd5\u521b\u5efa\u4e34\u65f6\u5bb9\u5668\u3002 ## \u793a\u4f8b\uff1a\u4f7f\u7528\u4e34\u65f6\u5bb9\u5668\u8c03\u8bd5 {#ephemeral-container-example} {{< note >}} \u672c\u8282\u4e2d\u7684\u793a\u4f8b\u8981\u6c42\u5728\u96c6\u7fa4\u542f\u7528 `EphemeralContainers` [\u7279\u6027\u95e8\u63a7]( /zh/docs/reference/command-line-tools-reference/feature-gates/ )\u3002 \u5e76\u4e14\u8981\u6c42 `kubectl` v1.18 \u6216\u66f4\u9ad8\u7248\u672c\u3002 {{< /note >}} \u53ef\u4ee5\u4f7f\u7528 `kubectl alpha debug` \u547d\u4ee4\u5c06\u4e34\u65f6\u5bb9\u5668\u6dfb\u52a0\u5230\u6b63\u5728\u8fd0\u884c\u7684 Pod \u4e2d\u3002 \u9996\u5148\uff0c\u4e3a\u672c\u4f8b\u521b\u5efa\u4e00\u4e2a Pod\uff1a ```shell kubectl run ephemeral-demo --image=k8s.gcr.io/pause:3.1 --restart=Never ``` {{< note >}} \u672c\u8282\u5728\u793a\u4f8b\u4e2d\u4f7f\u7528 `pause` \u5bb9\u5668\u955c\u50cf\uff0c \u662f\u56e0\u4e3a\u5b83\u4e0d\u5305\u542b\u7528\u6237\u6001\u7684\u8c03\u8bd5\u5de5\u5177\u3002 \u4f46\u6b64\u65b9\u6cd5\u9002\u7528\u4e8e\u6240\u6709\u5bb9\u5668\u955c\u50cf\u3002 {{< /note >}} \u5982\u679c\u4f60\u8bd5\u56fe\u4f7f\u7528 `kubectl exec` \u53bb\u5efa\u7acb\u4e00\u4e2a shell\uff0c \u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u62a5\u9519\uff0c \u8fd9\u662f\u56e0\u4e3a\u5728\u5bb9\u5668\u955c\u50cf\u4e2d\u5e76\u6ca1\u6709\u5305\u542b shell\u3002 ```shell kubectl exec -it ephemeral-demo -- sh ``` ``` OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused \"exec: \"sh\": executable file not found in $PATH\": unknown ``` \u4f60\u53ef\u4ee5\u4f7f\u7528 `kubectl alpha debug` \u6dfb\u52a0\u4e00\u4e2a\u8c03\u8bd5\u5bb9\u5668\u3002 \u5982\u679c\u6307\u5b9a\u4e86 `-i`/`--interactive` \u53c2\u6570\uff0c `kubectl` \u5c06\u81ea\u52a8\u8fde\u63a5\u5230\u4e34\u65f6\u5bb9\u5668\u7684\u63a7\u5236\u53f0\u3002 ```shell kubectl alpha debug -it ephemeral-demo --image=busybox --target=ephemeral-demo ``` ``` Defaulting debug container name to debugger-8xzrl. If you don't see a command prompt, try pressing enter. / # ``` \u6b64\u547d\u4ee4\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684 busybox \u5bb9\u5668\u5e76\u8fde\u63a5\u3002 `--target` \u53c2\u6570\u6307\u5b9a\u4e86\u53e6\u4e00\u4e2a\u5bb9\u5668\u7684\u8fdb\u7a0b\u547d\u540d\u7a7a\u95f4\u3002 \u8fd9\u91cc\u5fc5\u987b\u8fd9\u6837\u505a\uff0c\u56e0\u4e3a `kubectl run` \u6ca1\u6709\u5728\u5b83\u521b\u5efa\u7684 Pod \u4e2d\u542f\u7528 [\u8fdb\u7a0b\u547d\u540d\u7a7a\u95f4\u5171\u4eab](/zh/docs/tasks/configure-pod-container/share-process-namespace/) \u3002 {{< note >}} {{< glossary_tooltip text=\"Container Runtime\" term_id=\"container-runtime\" >}} \u5fc5\u987b\u652f\u6301 `--target` \u53c2\u6570\u3002 \u5982\u679c\u4e0d\u652f\u6301\uff0c\u4e34\u65f6\u5bb9\u5668\u53ef\u80fd\u65e0\u6cd5\u542f\u52a8\uff0c \u6216\u8005\u53ef\u80fd\u4f7f\u7528\u9694\u79bb\u7684\u8fdb\u7a0b\u540d\u79f0\u7a7a\u95f4\u542f\u52a8\u3002 {{< /note >}} \u53ef\u4ee5\u4f7f\u7528 `kubectl describe` \u67e5\u770b\u65b0\u521b\u5efa\u7684\u4e34\u65f6\u5bb9\u5668\u7684\u72b6\u6001\uff1a ```shell kubectl describe pod ephemeral-demo ``` ``` ... Ephemeral Containers: debugger-8xzrl: Container ID: docker://b888f9adfd15bd5739fefaa39e1df4dd3c617b9902082b1cfdc29c4028ffb2eb Image: busybox Image ID: docker-pullable://busybox@sha256:1828edd60c5efd34b2bf5dd3282ec0cc04d47b2ff9caa0b6d4f07a21d1c08084 Port: Host Port: State: Running Started: Wed, 12 Feb 2020 14:25:42 +0100 Ready: False Restart Count: 0 Environment: Mounts: ... ``` \u5b8c\u6210\u540e\uff0c\u4f7f\u7528 `kubectl delete` \u5220\u9664 Pod\uff1a ```shell kubectl delete pod ephemeral-demo ``` ## \u901a\u8fc7\u8282\u70b9\u4e0a\u7684 shell \u8fdb\u884c\u8c03\u8bd5 {#node-shell-session} \u5982\u679c\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u4e0d\u8d77\u4f5c\u7528\uff0c \u4f60\u53ef\u4ee5\u627e\u5230\u8fd0\u884c Pod \u7684\u4e3b\u673a\u5e76\u901a\u8fc7 SSH \u8fde\u63a5\u5230\u8be5\u4e3b\u673a\uff0c \u4f46\u662f Kubernetes API \u4e2d\u7684\u5de5\u5177\u901a\u5e38\u4e0d\u9700\u8981\u8fd9\u6837\u505a\u3002 \u56e0\u6b64\uff0c\u5982\u679c\u4f60\u53d1\u73b0\u81ea\u5df1\u9700\u8981 ssh \u5230\u4e00\u53f0\u673a\u5668\u4e0a\uff0c\u8bf7\u5728 GitHub \u4e0a\u63d0\u4ea4\u4e00\u4e2a\u529f\u80fd\u8bf7\u6c42\uff0c\u63cf\u8ff0\u4f60\u7684\u7528\u4f8b\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u8fd9\u4e9b\u5de5\u5177\u4e0d\u591f\u7528\u3002 ", "positive_passages": [{"docid": "doc-en-website-170f2c6397af29df24c6ac37c67e211b59f329e6aafc98b28b3069f632e11855", "text": "This is a Feature Request webpage /zh/docs/tasks/debug-application-cluster/debug-running-pod/ is not available in Chinese version, add it. What would you like to be add file /content/zh/docs/tasks/debug-application-cluster/debug-running-, and translate the file from its English version to Chinese Why is this needed synchronize Chinese with English version\n/language zh /assign", "commid": "website_issue_24177", "tokennum": 104}], "negative_passages": []} {"query_id": "q-en-website-fbcb0d8970043ec8a2cfde76f601a1a1ba170e38f1b36e24091be98f9203e98f", "query": "display: block; height: 100%; position: fixed; width: 100%; z-index: 1; top: 0; left: 0; background-color: rgba(51, 113, 227, 3%); border-right: 1px solid #dee2e6; overflow-x: hidden; overflow-x: scroll; padding-top: .5rem; }", "positive_passages": [{"docid": "doc-en-website-2aa75a8d54954ef53b5b273f48a2bf3b6ed929f3e02621824fd2da1f5a9615ce", "text": "This is a Bug Report