committed by
Kubernetes Prow Robot
parent
0268ed0c18
commit
b05129acc3
@@ -333,7 +333,7 @@ deployment "not-best-effort-nginx" created
|
||||
```
|
||||
|
||||
|
||||
虽然没有指定默认的 limits,`best-effort-nginx` deployment 还是会创建 8 个 pods。这是由于它被 `best-effort` 配额追踪,而 `not-best-effort` 配额将忽略它。`not-best-effort` 配额将追踪 `not-best-effort-nginx` deployment,因为它创建的 pods 具有 `Burstable` 服务质量。
|
||||
虽然没有指定默认的 limits,`best-effort-nginx` deployment 还是会创建 8 个 pods。这是由于它被 `best-effort` 配额追踪,而 `not-best-effort` 配额将忽略它。`not-best-effort` 配额将追踪 `not-best-effort-nginx` deployment,因为它创建的 pods 具有 `Burstable` 服务质量。
|
||||
|
||||
|
||||
让我们列出 namespace 中的 pods:
|
||||
@@ -384,7 +384,7 @@ requests.memory 512Mi 1Gi
|
||||
```
|
||||
|
||||
|
||||
如你看到的,`best-effort` 配额追踪了我们在 `best-effort-nginx` deployment 中创建的 8 个 pods 的资源用量,而 `not-best-effort` 配额追踪了我们在 `not-best-effort-nginx` deployment 中创的两个 pods 的用量。
|
||||
如你看到的,`best-effort` 配额追踪了我们在 `best-effort-nginx` deployment 中创建的 8 个 pods 的资源用量,而 `not-best-effort` 配额追踪了我们在 `not-best-effort-nginx` deployment 中创的两个 pods 的用量。
|
||||
|
||||
|
||||
Scopes 提供了一种来对任何配额文档追踪的资源集合进行细分的机制,给操作人员部署和追踪资源消耗带来更大的灵活性。
|
||||
|
||||
@@ -55,7 +55,7 @@ content_template: templates/task
|
||||
默认 StorageClass 的注解 `storageclass.kubernetes.io/is-default-class` 设置为 `true`。注解的其它任意值或者缺省值将被解释为 `false`。
|
||||
|
||||
|
||||
要标记一个 StorageClass 为非默认的,您需要改变它的值为 `false`:
|
||||
要标记一个 StorageClass 为非默认的,您需要改变它的值为 `false`:
|
||||
|
||||
kubectl patch storageclass <your-class-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ content_template: templates/task
|
||||
1. 列出你集群中的 PersistentVolumes
|
||||
|
||||
kubectl get pv
|
||||
|
||||
|
||||
输出类似于这样:
|
||||
|
||||
NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM REASON AGE
|
||||
@@ -47,7 +47,7 @@ content_template: templates/task
|
||||
```shell
|
||||
kubectl patch pv <your-pv-name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
|
||||
```
|
||||
|
||||
|
||||
这里的 `<your-pv-name>` 是你选择的 PersistentVolume 的名字。
|
||||
|
||||
3. 验证你选择的 PersistentVolume 拥有正确的策略:
|
||||
|
||||
@@ -15,7 +15,7 @@ title: 集群管理
|
||||
## 创建和配置集群
|
||||
|
||||
|
||||
要在一组机器上安装 Kubernetes, 请根据您的环境,查阅现有的 [入门指南](/docs/getting-started-guides/)
|
||||
要在一组机器上安装 Kubernetes, 请根据您的环境,查阅现有的 [入门指南](/docs/getting-started-guides/)
|
||||
|
||||
|
||||
## 升级集群
|
||||
|
||||
@@ -38,7 +38,7 @@ content_template: templates/task
|
||||
```console
|
||||
$ kubectl run nginx --image=nginx --replicas=2
|
||||
deployment "nginx" created
|
||||
$ kubectl expose deployment nginx --port=80
|
||||
$ kubectl expose deployment nginx --port=80
|
||||
service "nginx" exposed
|
||||
```
|
||||
|
||||
@@ -121,7 +121,7 @@ Waiting for pod default/busybox-472357175-y0m47 to be running, status is Pending
|
||||
|
||||
Hit enter for command prompt
|
||||
|
||||
/ # wget --spider --timeout=1 nginx
|
||||
/ # wget --spider --timeout=1 nginx
|
||||
Connecting to nginx (10.100.0.16:80)
|
||||
wget: download timed out
|
||||
/ #
|
||||
|
||||
@@ -95,7 +95,7 @@ data:
|
||||
1. 查询首先被发送到 kube-dns 中的 DNS 缓存层。
|
||||
|
||||
1. 从缓存层,检查请求的后缀,并根据下面的情况转发到对应的 DNS 上:
|
||||
|
||||
|
||||
* *具有集群后缀的名字*(例如 ".cluster.local"):请求被发送到 kube-dns。
|
||||
|
||||
* *具有存根域后缀的名字*(例如 ".acme.local"):请求被发送到配置的自定义 DNS 解析器(例如:监听在 1.2.3.4)。
|
||||
|
||||
@@ -4,7 +4,7 @@ reviewers:
|
||||
- luxas
|
||||
- roberthbailey
|
||||
- jbeda
|
||||
title: 将 kubeadm 集群在 v1.8 版本到 v1.9 版本之间升级/降级
|
||||
title: 将 kubeadm 集群在 v1.8 版本到 v1.9 版本之间升级/降级
|
||||
content_template: templates/task
|
||||
---
|
||||
|
||||
@@ -98,9 +98,9 @@ chmod a+rx /usr/bin/kubeadm
|
||||
{{< caution >}}
|
||||
<!--
|
||||
|
||||
Upgrading the `kubeadm` package on your system prior to upgrading the control plane causes a failed upgrade.
|
||||
Even though `kubeadm` ships in the Kubernetes repositories, it's important to install `kubeadm` manually. The kubeadm
|
||||
team is working on fixing this limitation.
|
||||
Upgrading the `kubeadm` package on your system prior to upgrading the control plane causes a failed upgrade.
|
||||
Even though `kubeadm` ships in the Kubernetes repositories, it's important to install `kubeadm` manually. The kubeadm
|
||||
team is working on fixing this limitation.
|
||||
|
||||
--->
|
||||
**注意:** 在您的系统上升级控制面板之前升级 `kubeadm` 包会导致升级失败。
|
||||
@@ -189,7 +189,7 @@ You can now apply the upgrade by executing the following command:
|
||||
|
||||
_____________________________________________________________________
|
||||
```
|
||||
|
||||
|
||||
--->
|
||||
|
||||
```shell
|
||||
@@ -242,7 +242,7 @@ _____________________________________________________________________
|
||||
请注意:在您执行升级之前,您必须升级 kubeadm 到 v1.9.0 版本
|
||||
_____________________________________________________________________
|
||||
```
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
The `kubeadm upgrade plan` checks that your cluster is upgradeable and fetches the versions available to upgrade to in an user-friendly way.
|
||||
@@ -326,7 +326,7 @@ To upgrade the cluster with CoreDNS as the default internal DNS, invoke `kubeadm
|
||||
- Creates new certificate and key files of apiserver and backs up old files if they're about to expire in 180 days.
|
||||
|
||||
--->
|
||||
|
||||
|
||||
升级具有默认内部的 DNS 的 coreDNS 集群,调用具有 `--feature-gates=CoreDNS=true` 标记的 `kubeadm upgrade apply`。
|
||||
`kubeadm upgrade apply`按照如下进行:
|
||||
|
||||
@@ -345,14 +345,14 @@ To upgrade the cluster with CoreDNS as the default internal DNS, invoke `kubeadm
|
||||
|
||||
Your Container Network Interface (CNI) provider may have its own upgrade instructions to follow.
|
||||
Check the [addons](/docs/concepts/cluster-administration/addons/) page to find your CNI provider and see if there are additional upgrade steps necessary.
|
||||
|
||||
|
||||
--->
|
||||
|
||||
4. 手动升级定义网络(SDN)的软件
|
||||
|
||||
容器网络接口(CNI)提供者具有升级说明指导。
|
||||
检查这个[插件](/docs/concepts/cluster-administration/addons/)页面来找到 CNI 提供者和查看是否需要额外的升级步骤。
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
## Upgrading your master and node packages
|
||||
@@ -381,7 +381,7 @@ When running this command against the master host, this error is expected and ca
|
||||
node "master" already cordoned
|
||||
error: pods not managed by ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet (use --force to override): etcd-kubeadm, kube-apiserver-kubeadm, kube-controller-manager-kubeadm, kube-scheduler-kubeadm
|
||||
```
|
||||
<!--
|
||||
<!--
|
||||
|
||||
2. Upgrade the Kubernetes package versions on the `$HOST` node by using a Linux distribution-specific package manager:
|
||||
|
||||
|
||||
+1
-1
@@ -265,7 +265,7 @@ Here are two of the restrictions that a resource quota imposes on a namespace:
|
||||
-->
|
||||
|
||||
* 运行在命名空间中的每个容器必须有自己的内存限制。
|
||||
* 命名空间中所有容器的内存使用量之和不能超过声明的限制值。
|
||||
* 命名空间中所有容器的内存使用量之和不能超过声明的限制值。
|
||||
|
||||
<!--
|
||||
If a Container does not specify its own memory limit, it is given the default limit, and then
|
||||
|
||||
+3
-3
@@ -65,16 +65,16 @@ weight: 10
|
||||
```
|
||||
|
||||
Calico 的 pods 名以 `calico` 打头,检查确认每个 pods 状态为 `Running`。
|
||||
<!--
|
||||
<!--
|
||||
## Creating a local Calico cluster with kubeadm
|
||||
|
||||
To get a local single-host Calico cluster in fifteen minutes using kubeadm, refer to the
|
||||
To get a local single-host Calico cluster in fifteen minutes using kubeadm, refer to the
|
||||
[Calico Quickstart](https://docs.projectcalico.org/latest/getting-started/kubernetes/).
|
||||
-->
|
||||
|
||||
## 使用 kubeadm 创建一个本地 Calico 集群
|
||||
|
||||
在15分钟内使用 kubeadm 得到一个本地单主机 Calico 集群,请参考
|
||||
在15分钟内使用 kubeadm 得到一个本地单主机 Calico 集群,请参考
|
||||
[Calico 快速入门](https://docs.projectcalico.org/latest/getting-started/kubernetes/)。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
+6
-6
@@ -24,7 +24,7 @@ For background on Cilium, read the [Introduction to Cilium](https://cilium.readt
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
<!--
|
||||
<!--
|
||||
## Deploying Cilium on Minikube for Basic Testing
|
||||
|
||||
To get familiar with Cilium easily you can follow the
|
||||
@@ -51,14 +51,14 @@ clusterrolebinding "cilium" created
|
||||
daemonset "cilium" created
|
||||
clusterrole "cilium" created
|
||||
```
|
||||
<!--
|
||||
<!--
|
||||
The remainder of the Getting Started Guide explains how to enforce both L3/L4
|
||||
(i.e., IP address + port) security policies, as well as L7 (e.g., HTTP) security
|
||||
policies using an example application.
|
||||
-->
|
||||
入门指南其余的部分用一个示例应用说明了如何强制执行L3/L4(即 IP 地址+端口)的安全策略以及L7 (如 HTTP)的安全策略。
|
||||
|
||||
<!--
|
||||
<!--
|
||||
## Deploying Cilium for Production Use
|
||||
|
||||
For detailed instructions around deploying Cilium for production, see:
|
||||
@@ -74,7 +74,7 @@ production DaemonSet files.
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture discussion %}}
|
||||
<!--
|
||||
<!--
|
||||
## Understanding Cilium components
|
||||
|
||||
Deploying a cluster with Cilium adds Pods to the `kube-system` namespace. To see
|
||||
@@ -96,7 +96,7 @@ NAME DESIRED CURRENT READY NODE-SELECTOR AGE
|
||||
cilium 1 1 1 <none> 2m
|
||||
...
|
||||
```
|
||||
<!--
|
||||
<!--
|
||||
There are two main components to be aware of:
|
||||
|
||||
- One `cilium` Pod runs on each node in your cluster and enforces network policy
|
||||
@@ -113,7 +113,7 @@ configuration because it automatically connects to the minikube's etcd instance.
|
||||
- 在集群中的每个节点上都会运行一个 `cilium` Pod,并利用Linux BPF执行网络策略管理该节点上进出 Pod 的流量。
|
||||
- 对于生产部署,Cilium 应该复用 Kubernetes 所使用的键值存储集群(如 etcd),其通常在Kubernetes 的 master 节点上运行。
|
||||
[Cilium Kubernetes安装指南](https://cilium.readthedocs.io/en/latest/kubernetes/install/)
|
||||
包括了一个示例 DaemonSet,可以自定义指定此键值存储集群。
|
||||
包括了一个示例 DaemonSet,可以自定义指定此键值存储集群。
|
||||
简单的 minikube 的“一体化” DaemonSet 不需要这样的配置,因为它会自动连接到 minikube 的 etcd 实例。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ weight: 40
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
<!--
|
||||
<!--
|
||||
## Installing Romana with kubeadm
|
||||
|
||||
Follow the [containerized installation guide](https://github.com/romana/romana/tree/master/containerize) for kubeadm.
|
||||
@@ -49,7 +49,7 @@ To apply network policies use one of the following:
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
<!--
|
||||
<!--
|
||||
Once you have installed Romana, you can follow the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/) to try out Kubernetes NetworkPolicy.
|
||||
-->
|
||||
Romana 安装完成后,您可以按照[声明 Network Policy](/docs/tasks/administer-cluster/declare-network-policy/)去尝试使用 Kubernetes NetworkPolicy。
|
||||
|
||||
+4
-4
@@ -15,14 +15,14 @@ weight: 50
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
<!--
|
||||
<!--
|
||||
You need to have a Kubernetes cluster. Follow the [kubeadm getting started guide](/docs/getting-started-guides/kubeadm/) to bootstrap one.
|
||||
-->
|
||||
您需要拥有一个 Kubernetes 集群。按照[kubeadm 入门指南](/docs/getting-started-guides/kubeadm/)来引导一个。
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
<!--
|
||||
<!--
|
||||
## Install the Weave Net addon
|
||||
|
||||
Follow the [Integrating Kubernetes via the Addon](https://www.weave.works/docs/net/latest/kube-addon/) guide.
|
||||
@@ -34,7 +34,7 @@ The Weave Net addon for Kubernetes comes with a [Network Policy Controller](http
|
||||
按照[通过插件集成Kubernetes](https://www.weave.works/docs/net/latest/kube-addon/)指南。
|
||||
|
||||
Kubernetes 的 Weave Net 插件带有[网络策略控制器](https://www.weave.works/docs/net/latest/kube-addon/#npc),可自动监控 Kubernetes 所有名称空间中的任何 NetworkPolicy 注释。 配置`iptables`规则以允许或阻止策略指示的流量。
|
||||
<!--
|
||||
<!--
|
||||
## Test the installation
|
||||
|
||||
Verify that the weave works.
|
||||
@@ -69,7 +69,7 @@ weave-net-pmw8w 2/2 Running 0 9d
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
<!--
|
||||
<!--
|
||||
Once you have installed the Weave Net addon, you can follow the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/) to try out Kubernetes NetworkPolicy. If you have any question, contact us at [#weave-community on Slack or Weave User Group](https://github.com/weaveworks/weave#getting-help).
|
||||
-->
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ spec:
|
||||
resources:
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "800m"
|
||||
cpu: "800m"
|
||||
requests:
|
||||
memory: "700Mi"
|
||||
cpu: "400m"
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ spec:
|
||||
resources:
|
||||
limits:
|
||||
memory: "800Mi"
|
||||
cpu: "800m"
|
||||
cpu: "800m"
|
||||
requests:
|
||||
memory: "600Mi"
|
||||
cpu: "400m"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user