jiebi/CodeConvo huggingface dataset:
## {{% heading "whatsnext" %}} Learn more about the following: <del> * [Nodes](/docs/concepts/architecture/nodes/) and [their communication](/docs/concepts/architecture/control-plane-node-communication/) with the control plane. </del> <ins> * [Nodes](/docs/concepts/architecture/nodes/) and [their communication](/docs/concepts/architecture/control-plane-node-communication/) with the control plane. </ins> * Kubernetes [controllers](/docs/concepts/architecture/controller/). * [kube-scheduler](/docs/concepts/scheduling-eviction/kube-scheduler/) which is the default scheduler for Kubernetes. * Etcd's official [documentation](https://etcd.io/docs/).
<ins> --- title: Replica id: replica date: 2023-06-11 full_link: short_description: > Replicas are copies of pods, ensuring availability, scalability, and fault tolerance by maintaining identical instances. aka: tags: - fundamental - workload --- A copy or duplicate of a {{< glossary_tooltip text="Pod" term_id="pod" >}} or a set of pods. Replicas ensure high availability, scalability, and fault tolerance by maintaining multiple identical instances of a pod. <!--more--> Replicas are commonly used in Kubernetes to achieve the desired application state and reliability. They enable workload scaling and distribution across multiple nodes in a cluster. By defining the number of replicas in a Deployment or ReplicaSet, Kubernetes ensures that the specified number of instances are running, automatically adjusting the count as needed. Replica management allows for efficient load balancing, rolling updates, and self-healing capabilities in a Kubernetes cluster. </ins>
--- 本ウェブサイトには、現行版とその直前4バージョンのKubernetesドキュメントがあります。 <ins> Kubernetesバージョンのドキュメントの入手性は、そのリリースが現在サポートされているかどうかで分かれます。 どのKubernetesバージョンが公式にどのくらいの期間サポートされるかについて知るには、[サポート期間](/releases/patch-releases/#support-period)を参照してください。 </ins>
Auditing allows cluster administrators to answer the following questions: --> <del> Kubernetes**审计（Auditing）**功能提供了与安全相关的、按时间顺序排列的记录集， </del> <ins> Kubernetes **审计（Auditing）** 功能提供了与安全相关的、按时间顺序排列的记录集， </ins> 记录每个用户、使用 Kubernetes API 的应用以及控制面自身引发的活动。 审计功能使得集群管理员能够回答以下问题：
<!-- overview --> アプリケーションを拡張し、信頼性の高いサービスを提供するために、デプロイ時にアプリケーションがどのように動作するかを理解する必要があります。 <del> コンテナ、[Pod](/docs/concepts/workloads/pods/)、[Service](/docs/concepts/services-networking/service/)、クラスター全体の特性を調べることにより、Kubernetesクラスターのアプリケーションパフォーマンスを調査することができます。 </del> <ins> コンテナ、[Pod](/ja/docs/concepts/workloads/pods/)、[Service](/ja/docs/concepts/services-networking/service/)、クラスター全体の特性を調べることにより、Kubernetesクラスターのアプリケーションパフォーマンスを調査することができます。 </ins> Kubernetesは、これらの各レベルでアプリケーションのリソース使用に関する詳細な情報を提供します。 この情報により、アプリケーションのパフォーマンスを評価し、ボトルネックを取り除くことで全体のパフォーマンスを向上させることができます。
Kubernetesでは、アプリケーションの監視は1つの監視ソリューションに依存することはありません。 新しいクラスターでは、[リソースメトリクス](#resource-metrics-pipeline)または[フルメトリクス](#full-metrics-pipeline)パイプラインを使用してモニタリング統計を収集することができます。 <del> ## リソースメトリクスパイプライン </del> <ins> ## リソースメトリクスパイプライン {#resource-metrics-pipeline} </ins> リソースメトリックパイプラインは、[Horizontal Pod Autoscaler](/docs/tasks/run-application/horizontal-pod-autoscale/)コントローラーなどのクラスターコンポーネントや、`kubectl top`ユーティリティに関連する限定的なメトリックセットを提供します。
そして、集約されたPodリソース使用統計情報を、metrics-server Resource Metrics APIを通じて公開します。 このAPIは、kubeletの認証済みおよび読み取り専用ポート上の `/metrics/resource/v1beta1` で提供されます。 <del> ## フルメトリクスパイプライン </del> <ins> ## フルメトリクスパイプライン {#full-metrics-pipeline} </ins> フルメトリクスパイプラインは、より豊富なメトリクスにアクセスすることができます。 Kubernetesは、Horizontal Pod Autoscalerなどのメカニズムを使用して、現在の状態に基づいてクラスターを自動的にスケールまたは適応させることによって、これらのメトリクスに対応することができます。
to validate the request. If an expression evaluates to false, the validation check is enforced according to the `spec.failurePolicy` field. <ins> {{< note >}} You can quickly test CEL expressions in [CEL Playground](https://playcel.undistro.io). {{< /note >}} </ins> To configure a validating admission policy for use in a cluster, a binding is required. The following is an example of a ValidatingAdmissionPolicyBinding.:
* spec: Invalid value: map[string]interface {}{"maxReplicas":10, "minReplicas":0, "replicas":20}: failed rule: self.replicas <= self.maxReplicas ``` <ins> {{< note >}} You can quickly test CEL expressions in [CEL Playground](https://playcel.undistro.io). {{< /note >}} </ins> Validation rules are compiled when CRDs are created/updated. The request of CRDs create/update will fail if compilation of validation rules fail. Compilation process includes type checking as well.
## Creating a Deployment <del> Before creating a Deployment define an [environment variable](/docs/tasks/inject-data-application/define-environment-variable-container/#define-an-environment-variable-for-a-container) for a container. </del> The following is an example of a Deployment. It creates a ReplicaSet to bring up three `nginx` Pods: {{< codenew file="controllers/nginx-deployment.yaml" >}}
### Security <del> Enabling the GenericEphemeralVolume feature allows users to create PVCs indirectly if they can create Pods, even if they do not have permission to create PVCs directly. Cluster administrators must be aware of this. If this does not fit their security model, they should use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) </del> <ins> Using generic ephemeral volumes allows users to create PVCs indirectly if they can create Pods, even if they do not have permission to create PVCs directly. Cluster administrators must be aware of this. If this does not fit their security model, they should use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) </ins> that rejects objects like Pods that have a generic ephemeral volume. The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota)
title: Extending the Kubernetes API weight: 30 --- <ins> Custom resources are extensions of the Kubernetes API. Kubernetes provides two ways to add custom resources to your cluster: - The [CustomResourceDefinition](/docs/concepts/extend-kubernetes/api-extension/custom-resources/) (CRD) mechanism allows you to declaratively define a new custom API with an API group, kind, and schema that you specify. The Kubernetes control plane serves and handles the storage of your custom resource. CRDs allow you to create new types of resources for your cluster without writing and running a custom API server. - The [aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) sits behind the primary API server, which acts as a proxy. This arrangement is called API Aggregation (AA), which allows you to provide specialized implementations for your custom resources by writing and deploying your own API server. The main API server delegates requests to your API server for the custom APIs that you specify, making them available to all of its clients. </ins>
<div class="row"> <div class="col-md-9"> <h2>Kubernetes Basics</h2> <del> <p>This tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and includes an interactive online tutorial. These interactive tutorials let you manage a simple cluster and its containerized applications for yourself.</p> <p>Using the interactive tutorials, you can learn to:</p> </del> <ins> <p>This tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and a tutorial for you to follow along.</p> <p>Using the tutorials, you can learn to:</p> </ins> <ul> <li>Deploy a containerized application on a cluster.</li> <li>Scale the deployment.</li>
gpgcheck=1 gpgkey=https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/rpm/repodata/repomd.xml.key EOF <ins> ``` </ins> <del> {{< note >}} To upgrade kubectl to another minor release, you'll need to bump the version in `/etc/zypp/repos.d/kubernetes.repo` before running `zypper update`. This procedure is described in more detail in [Changing The Kubernetes Package Repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/). {{< /note >}} </del> <ins> {{< note >}} To upgrade kubectl to another minor release, you'll need to bump the version in `/etc/zypp/repos.d/kubernetes.repo` before running `zypper update`. This procedure is described in more detail in [Changing The Kubernetes Package Repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/). {{< /note >}} </ins> <del> 1. Install kubectl using `zypper`: </del> <ins> 2. Install kubectl using `zypper`: </ins> <del> ```bash sudo zypper install -y kubectl </del> <ins> ```bash sudo zypper install -y kubectl ``` </ins> {{% /tab %}} {{< /tabs >}}
## डेप्लॉयमेंट बनाएँ <del> कुबेरनेट्स [*पॉड*](/hi/docs/concepts/workloads/pods/) एक या अधिक कंटेनरों का एक समूह है, </del> <ins> कुबेरनेट्स [*पॉड*](/docs/concepts/workloads/pods/) एक या अधिक कंटेनरों का एक समूह है, </ins> जो प्रशासन और नेटवर्किंग के उद्देश्यों के लिए एक साथ बंधे होते हैं। इस ट्यूटोरियल के पॉड में केवल एक कंटेनर है। कुबेरनेट्स <del> [*डेप्लॉयमेंट*](/hi/docs/concepts/workloads/controllers/deployment/) आपके पॉड के स्वास्थ्य की </del> <ins> [*डेप्लॉयमेंट*](/docs/concepts/workloads/controllers/deployment/) आपके पॉड के स्वास्थ्य की </ins> जाँच करता है और यदि पॉड बंद हो जाता है तो पॉड के कंटेनर को पुनः आरंभ करता है। पॉड्स के निर्माण और स्केलिंग को प्रबंधित करने के लिए डेप्लॉयमेंट अनुशंसित तरीका है।
display: block; height: 100%; position: fixed; <del> width: 100%; z-index: 1; </del> top: 0; left: 0; background-color: rgba(51, 113, 227, 3%); border-right: 1px solid #dee2e6; <del> overflow-x: hidden; </del> <ins> overflow-x: scroll; </ins> padding-top: .5rem; }
## Install the Weave Net addon <del> Follow the [Integrating Kubernetes via the Addon](https://www.weave.works/docs/net/latest/kubernetes/kube-addon/) guide. </del> <ins> Follow the [Integrating Kubernetes via the Addon](https://github.com/weaveworks/weave/blob/master/site/kubernetes/kube-addon.md#-installation) guide. </ins> The Weave Net addon for Kubernetes comes with a <del> [Network Policy Controller](https://www.weave.works/docs/net/latest/kubernetes/kube-addon/#npc) </del> <ins> [Network Policy Controller](https://github.com/weaveworks/weave/blob/master/site/kubernetes/kube-addon.md#network-policy) </ins> that automatically monitors Kubernetes for any NetworkPolicy annotations on all namespaces and configures `iptables` rules to allow or block traffic as directed by the policies.
details. {{< /caution >}} <ins> ### service.beta.kubernetes.io/azure-load-balancer-disable-tcp-reset (deprecated) {#service-beta-kubernetes-azure-load-balancer-disble-tcp-reset} Example: `service.beta.kubernetes.io/azure-load-balancer-disable-tcp-reset: "false"` Used on: Service This annotation only works for Azure standard load balancer backed service. This annotation is used on the Service to specify whether the load balancer should disable or enable TCP reset on idle timeout. If enabled, it helps applications to behave more predictably, to detect the termination of a connection, remove expired connections and initiate new connections. You can set the value to be either true or false. See [Load Balancer TCP Reset](https://learn.microsoft.com/en-gb/azure/load-balancer/load-balancer-tcp-reset) for more information. {{< note >}} This annotation is deprecated. {{< /note >}} </ins> ### pod-security.kubernetes.io/enforce Type: Label
## Memory QoS with cgroup v2 <del> {{< feature-state feature-gate-name="MemoryQoS" >}} </del> <ins> {{< feature-state feature_gate_name="MemoryQoS" >}} </ins> Memory QoS uses the memory controller of cgroup v2 to guarantee memory resources in Kubernetes. Memory requests and limits of containers in pod are used to set specific interfaces `memory.min`
### はじめに Bashにおけるkubectlの補完スクリプトは`kubectl completion bash`コマンドで生成できます。 <del> シェル内で補完スクリプトをsourceすることでkubectlの自動補完が有効になります。 </del> <ins> 補完スクリプトをシェル内に読み込ませることでkubectlの自動補完が有効になります。 </ins> ただし、補完スクリプトは[**bash-completion**](https://github.com/scop/bash-completion)に依存しているため、事前にインストールしておく必要があります。
### kubectlの自動補完を有効にする <del> すべてのシェルセッションにてkubectlの補完スクリプトをsourceできるようにしなければなりません。 </del> <ins> 次に、kubectl補完スクリプトがすべてのシェルセッションで読み込まれるように設定する必要があります。 </ins> これを行うには複数の方法があります: <del> - 補完スクリプトを`~/.bash_profile`内でsourceする: </del> <ins> - 補完スクリプトを`~/.bash_profile`内で読み込ませる: </ins> ```bash echo 'source <(kubectl completion bash)' >>~/.bash_profile
この場合、なにも操作する必要はありません。 {{< note >}} <del> Homebrewでインストールしたbash-completion v2は`BASH_COMPLETION_COMPAT_DIR`ディレクトリ内のすべてのファイルをsourceするため、後者の2つの方法が機能します。 </del> <ins> Homebrewでインストールしたbash-completion v2は`BASH_COMPLETION_COMPAT_DIR`ディレクトリ内のすべてのファイルを読み込むため、後者の2つの方法が機能します。 </ins> {{< /note >}} どの場合でも、シェルをリロードしたあとに、kubectlの自動補完が機能するはずです。
[cAdvisor](https://github.com/google/cadvisor) that runs within the kubelet. If you enable the `PodAndContainerStatsFromCRI` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) in your cluster, and you use a container runtime that supports statistics access via <del> {{< glossary_tooltip term_id="cri" text="Container Runtime Interface">}} (CRI), then </del> <ins> {{< glossary_tooltip term_id="container-runtime-interface" text="Container Runtime Interface">}} (CRI), then </ins> the kubelet [fetches Pod- and container-level metric data using CRI](/docs/reference/instrumentation/cri-pod-container-metrics), and not via cAdvisor. ## {{% heading "whatsnext" %}}
<ins> --- title: フィーチャーゲート(Feature gate) id: feature-gate date: 2023-01-12 full_link: /ja/docs/reference/command-line-tools-reference/feature-gates/ short_description: > 特定のKubernetes機能を有効にするかどうかを制御する方法。 aka: tags: - fundamental - operation --- フィーチャーゲートはクラスター内でどのKubernetes機能を有効にするかを制御するために使用できるキー(不透明な文字列値)のセットです。 <!--more--> 各Kubernetesコンポーネントで`--feature-gates`コマンドラインフラグを使用して、これらの機能をオンまたはオフにすることができます。 各Kubernetesコンポーネントでは、そのコンポーネントに関連する一連のフィーチャーゲートを有効または無効にすることができます。 Kubernetesのドキュメントには、現在のすべての[フィーチャーゲート](/ja/docs/reference/command-line-tools-reference/feature-gates/)とその制御対象がリストされています。 </ins>
Note the [PodIndexLabel](/docs/reference/command-line-tools-reference/feature-gates/) feature gate must be enabled for this label to be added to pods. <ins> ### resource.kubernetes.io/pod-claim-name Type: Annotation Example: `resource.kubernetes.io/pod-claim-name: "my-pod-claim"` Used on: ResourceClaim This annotation is assigned to generated ResourceClaims. Its value corresponds to the name of the resource claim in the `.spec` of any Pod(s) for which the ResourceClaim was created. This annotation is an internal implementation detail of [dynamic resource allocation](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/). You should not need to read or modify the value of this annotation. </ins> ### cluster-autoscaler.kubernetes.io/safe-to-evict Type: Annotation
{{< feature-state for_k8s_version="v1.19" state="stable" >}} <del> A CertificateSigningRequest (CSR) resource is used to request that a certificate be signed </del> <ins> A [CertificateSigningRequest](/docs/reference/kubernetes-api/authentication-resources/certificate-signing-request-v1/) (CSR) resource is used to request that a certificate be signed </ins> by a denoted signer, after which the request may be approved or denied before finally being signed.
### Create a CertificateSigningRequest {#create-certificatessigningrequest} <del> Create a CertificateSigningRequest and submit it to a Kubernetes Cluster via kubectl. Below is a script to generate the CertificateSigningRequest. </del> <ins> Create a [CertificateSigningRequest](/docs/reference/kubernetes-api/authentication-resources/certificate-signing-request-v1/) and submit it to a Kubernetes Cluster via kubectl. Below is a script to generate the CertificateSigningRequest. </ins> ```shell cat <<EOF | kubectl apply -f -
The following methods exist for installing kubectl on Windows: <del> - [Install kubectl binary with curl on Windows](#install-kubectl-binary-with-curl-on-windows) </del> <ins> - [Install kubectl binary on Windows (via direct download or curl)](#install-kubectl-binary-on-windows-via-direct-download-or-curl) </ins> - [Install on Windows using Chocolatey, Scoop, or winget](#install-nonstandard-package-tools) <del> ### Install kubectl binary with curl on Windows </del> <ins> ### Install kubectl binary on Windows (via direct download or curl) </ins> <del> 1. Download the latest {{< skew currentVersion >}} patch release: [kubectl {{< skew currentPatchVersion >}}](https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe). </del> <ins> 1. You have two options for installing kubectl on your Windows device </ins> <del> Or if you have `curl` installed, use this command: </del> <ins> - Direct download: Download the latest {{< skew currentVersion >}} patch release binary directly for your specific architecture by visiting the [Kubernetes release page](https://kubernetes.io/releases/download/#binaries). Be sure to select the correct binary for your architecture (e.g., amd64, arm64, etc.). - Using curl: </ins> <del> ```powershell curl.exe -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe" ``` </del> <ins> If you have `curl` installed, use this command: ```powershell curl.exe -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe" ``` </ins> {{< note >}} To find out the latest stable version (for example, for scripting), take a look at
when localizing, that's even better. {{< /comment >}} <del> The CNCF [white paper](https://github.com/cncf/tag-security/tree/main/security-whitepaper) </del> <ins> The CNCF [white paper](https://github.com/cncf/tag-security/blob/main/community/resources/security-whitepaper/v2/CNCF_cloud-native-security-whitepaper-May2022-v2.pdf) </ins> on cloud native security defines security controls and practices that are appropriate to different _lifecycle phases_.
### Cloud native security {#further-reading-cloud-native} <del> * CNCF [white paper](https://github.com/cncf/tag-security/tree/main/security-whitepaper) </del> <ins> * CNCF [white paper](https://github.com/cncf/tag-security/blob/main/community/resources/security-whitepaper/v2/CNCF_cloud-native-security-whitepaper-May2022-v2.pdf) </ins> on cloud native security. * CNCF [white paper](https://github.com/cncf/tag-security/blob/f80844baaea22a358f5b20dca52cd6f72a32b066/supply-chain-security/supply-chain-security-paper/CNCF_SSCP_v1.pdf) on good practices for securing a software supply chain.
</ul> <h2>Basics</h2> <p>The preferred way to configure kubeadm is to pass an YAML configuration file with <del> the `--config“ option. Some of the configuration options defined in the kubeadm </del> <ins> the <code>--config</code> option. Some of the configuration options defined in the kubeadm </ins> config file are also available as command line flags, but only the most common/simple use case are supported with this approach.</p> <p>A kubeadm config file could contain multiple configuration types separated using three dashes (<code>---</code>).</p>
apiVersion: kubeadm.k8s.io/v1beta4 kind: UpgradeConfiguration </code></pre> <del> <p>To print the defaults for &quot;init&quot; and &quot;join&quot; actions use the following commands:</p> </del> <ins> <p>To print the defaults for <code>init</code> and <code>join</code> actions use the following commands:</p> </ins> <pre style="background-color:#fff">kubeadm config print init-defaults kubeadm config print join-defaults kubeadm config print reset-defaults kubeadm config print upgrade-defaults </pre><p>The list of configuration types that must be included in a configuration file depends by the action you are <del> performing (<code>init or </code>join`) and by the configuration options you are going to use (defaults or advanced customization).</p> </del> <ins> performing (<code>init</code> or <code>join</code>) and by the configuration options you are going to use (defaults or advanced customization).</p> </ins> <p>If some configuration types are not provided, or provided only partially, kubeadm will use default values; defaults provided by kubeadm includes also enforcing consistency of values across components when required (e.g. <code>--cluster-cidr</code> flag on controller manager and <code>clusterCIDR</code> on kube-proxy).</p>
<p>If the user provides a configuration types that is not expected for the action you are performing, kubeadm will ignore those types and print a warning.</p> <h2>Kubeadm init configuration types</h2> <del> <p>When executing kubeadm init with the `--config“ option, the following configuration types could be used: </del> <ins> <p>When executing kubeadm init with the <code>--config</code> option, the following configuration types could be used: </ins> InitConfiguration, ClusterConfiguration, KubeProxyConfiguration, KubeletConfiguration, but only one between InitConfiguration and ClusterConfiguration is mandatory.</p> <pre style="background-color:#fff"><span style="color:#000;font-weight:bold">apiVersion</span>:<span style="color:#bbb"> </span>kubeadm.k8s.io/v1beta4<span style="color:#bbb"> </span><span style="color:#bbb"></span><span style="color:#000;font-weight:bold">kind</span>:<span style="color:#bbb"> </span>InitConfiguration<span style="color:#bbb"> </span><span style="color:#bbb"></span><span style="color:#000;font-weight:bold">bootstrapTokens</span>:<span style="color:#bbb"> <del> </span><span style="color:#bbb"> </span><span style="color:#bbb">	</span>...<span style="color:#bbb"> </span><span style="color:#bbb"> </del> <ins> </span><span style="color:#bbb"></span>...<span style="color:#bbb"> </ins> </span><span style="color:#bbb"></span><span style="color:#000;font-weight:bold">nodeRegistration</span>:<span style="color:#bbb"> <del> </span><span style="color:#bbb"> </span><span style="color:#bbb">	</span>...<span style="color:#bbb"> </span><span style="color:#bbb"> </del> <ins> </span><span style="color:#bbb"></span>...<span style="color:#bbb"> </ins> </span></pre><p>The InitConfiguration type should be used to configure runtime settings, that in case of kubeadm init are the configuration of the bootstrap token and all the setting which are specific to the node where kubeadm is executed, including:</p>