Merge pull request #46976 from asa3311/sync-zh-128
[zh] sync namespaces statefulset basic-stateful-setpull/46987/head
commit
5255ca6bfc
|
@ -86,7 +86,7 @@ Kubernetes starts with four initial namespaces:
|
|||
: Kubernetes includes this namespace so that you can start using your new cluster without first creating a namespace.
|
||||
|
||||
`kube-node-lease`
|
||||
: This namespace holds [Lease](/docs/concepts/architecture/leases/) objects associated with each node. Node leases allow the kubelet to send [heartbeats](/docs/concepts/architecture/nodes/#heartbeats) so that the control plane can detect node failure.
|
||||
: This namespace holds [Lease](/docs/concepts/architecture/leases/) objects associated with each node. Node leases allow the kubelet to send [heartbeats](/docs/concepts/architecture/nodes/#node-heartbeats) so that the control plane can detect node failure.
|
||||
|
||||
`kube-public`
|
||||
: This namespace is readable by *all* clients (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement.
|
||||
|
@ -101,7 +101,7 @@ Kubernetes 启动时会创建四个初始名字空间:
|
|||
|
||||
`kube-node-lease`
|
||||
: 该名字空间包含用于与各个节点关联的 [Lease(租约)](/zh-cn/docs/concepts/architecture/leases/)对象。
|
||||
节点租约允许 kubelet 发送[心跳](/zh-cn/docs/concepts/architecture/nodes/#heartbeats),
|
||||
节点租约允许 kubelet 发送[心跳](/zh-cn/docs/concepts/architecture/nodes/#node-heartbeats),
|
||||
由此控制面能够检测到节点故障。
|
||||
|
||||
`kube-public`
|
||||
|
|
|
@ -156,7 +156,7 @@ spec:
|
|||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: nginx
|
||||
image: registry.k8s.io/nginx-slim:0.8
|
||||
image: registry.k8s.io/nginx-slim:0.24
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: web
|
||||
|
|
|
@ -984,7 +984,7 @@ image again:
|
|||
在一个终端窗口中对 `web` StatefulSet 执行 patch 操作来再次改变容器镜像:
|
||||
|
||||
```shell
|
||||
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.8"}]'
|
||||
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.24"}]'
|
||||
```
|
||||
```
|
||||
statefulset.apps/web patched
|
||||
|
@ -1078,9 +1078,9 @@ Get the Pods to view their container images:
|
|||
for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done
|
||||
```
|
||||
```
|
||||
registry.k8s.io/nginx-slim:0.8
|
||||
registry.k8s.io/nginx-slim:0.8
|
||||
registry.k8s.io/nginx-slim:0.8
|
||||
registry.k8s.io/nginx-slim:0.24
|
||||
registry.k8s.io/nginx-slim:0.24
|
||||
registry.k8s.io/nginx-slim:0.24
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -1154,7 +1154,7 @@ StatefulSet uses:
|
|||
再次 Patch StatefulSet 来改变此 StatefulSet 使用的容器镜像:
|
||||
|
||||
```shell
|
||||
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.7"}]'
|
||||
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.21"}]'
|
||||
```
|
||||
```
|
||||
statefulset.apps/web patched
|
||||
|
@ -1201,7 +1201,7 @@ Get the Pod's container image:
|
|||
kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
||||
```
|
||||
```
|
||||
registry.k8s.io/nginx-slim:0.8
|
||||
registry.k8s.io/nginx-slim:0.24
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -1280,7 +1280,7 @@ Get the Pod's container:
|
|||
kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
||||
```
|
||||
```
|
||||
registry.k8s.io/nginx-slim:0.7
|
||||
registry.k8s.io/nginx-slim:0.21
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -1344,7 +1344,7 @@ Get the `web-1` Pod's container image:
|
|||
kubectl get pod web-1 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
||||
```
|
||||
```
|
||||
registry.k8s.io/nginx-slim:0.8
|
||||
registry.k8s.io/nginx-slim:0.24
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -1432,9 +1432,9 @@ Get the container image details for the Pods in the StatefulSet:
|
|||
for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done
|
||||
```
|
||||
```
|
||||
registry.k8s.io/nginx-slim:0.7
|
||||
registry.k8s.io/nginx-slim:0.7
|
||||
registry.k8s.io/nginx-slim:0.7
|
||||
registry.k8s.io/nginx-slim:0.21
|
||||
registry.k8s.io/nginx-slim:0.21
|
||||
registry.k8s.io/nginx-slim:0.21
|
||||
```
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in New Issue