Skip to content

Commit 8be2a38

Browse files
authored
Merge pull request #43783 from asa3311/sync-zh-80
[zh] sync certificate-signing-requests feature-gates cheatsheet
2 parents c74d92c + 442e338 commit 8be2a38

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

content/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ O is the group that this user will belong to. You can refer to
878878

879879
```shell
880880
openssl genrsa -out myuser.key 2048
881-
openssl req -new -key myuser.key -out myuser.csr
881+
openssl req -new -key myuser.key -out myuser.csr -subj "/CN=myuser"
882882
```
883883

884884
<!--

content/zh-cn/docs/reference/command-line-tools-reference/feature-gates.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ For a reference to old feature gates that are removed, please refer to
234234
| `SELinuxMountReadWriteOncePod` | `false` | Alpha | 1.25 | 1.26 |
235235
| `SELinuxMountReadWriteOncePod` | `false` | Beta | 1.27 | 1.27 |
236236
| `SELinuxMountReadWriteOncePod` | `true` | Beta | 1.28 | |
237-
| `SchedulerQueueingHints` | `false` | Alpha | 1.28 | |
237+
| `SchedulerQueueingHints` | `true` | Beta | 1.28 | |
238238
| `SecurityContextDeny` | `false` | Alpha | 1.27 | |
239239
| `ServiceNodePortStaticSubrange` | `false` | Alpha | 1.27 | 1.27 |
240240
| `ServiceNodePortStaticSubrange` | `true` | Beta | 1.28 | |
@@ -1252,17 +1252,19 @@ Each feature gate is designed for enabling/disabling a specific feature:
12521252
- `SELinuxMountReadWriteOncePod`: Speeds up container startup by allowing kubelet to mount volumes
12531253
for a Pod directly with the correct SELinux label instead of changing each file on the volumes
12541254
recursively. The initial implementation focused on ReadWriteOncePod volumes.
1255-
- `SchedulerQueueingHints`: Enables the scheduler's _queueing hints_ enhancement,
1255+
- `SchedulerQueueingHints`: Enables [the scheduler's _queueing hints_ enhancement](https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/4247-queueinghint/README.md),
12561256
which benefits to reduce the useless requeueing.
1257-
- `SeccompDefault`: Enables the use of `RuntimeDefault` as the default seccomp profile
1258-
for all workloads.
1259-
The seccomp profile is specified in the `securityContext` of a Pod and/or a Container.
1257+
The scheduler retries scheduling pods if something changes in the cluster that could make the pod scheduled.
1258+
Queueing hints are internal signals that allow the scheduler to filter the changes in the cluster
1259+
that are relevant to the unscheduled pod, based on previous scheduling attempts.
12601260
-->
12611261
- `SELinuxMountReadWriteOncePod`:通过允许 kubelet 直接用正确的 SELinux
12621262
标签为 Pod 挂载卷而不是以递归方式更改这些卷上的每个文件来加速容器启动。最初的实现侧重 ReadWriteOncePod 卷。
1263-
- `SchedulerQueueingHints`:启用调度器的**排队提示**增强功能,有助于减少无效的重新排队。
1264-
- `SeccompDefault`: 允许将所有工作负载的默认 seccomp 配置文件为 `RuntimeDefault`
1265-
seccomp 配置在 Pod 或者容器的 `securityContext` 字段中指定。
1263+
- `SchedulerQueueingHints`:启用[调度器的**排队提示**增强功能](https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/4247-queueinghint/README.md)
1264+
有助于减少无效的重新排队。调度器会在集群中发生可能导致 Pod 被重新调度的变化时,
1265+
尝试重新进行 Pod 的调度。排队提示是一些内部信号,
1266+
用于帮助调度器基于先前的调度尝试来筛选集群中与未调度的 Pod 相关的变化。
1267+
12661268
<!--
12671269
- `SecurityContextDeny`: This gate signals that the `SecurityContextDeny` admission controller is deprecated.
12681270
- `ServerSideApply`: Enables the [Sever Side Apply (SSA)](/docs/reference/using-api/server-side-apply/)

content/zh-cn/docs/reference/kubectl/cheatsheet.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ kubectl get pods --field-selector=status.phase=Running
378378
kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'
379379
380380
# List Names of Pods that belong to Particular RC
381-
# "jq" command useful for transformations that are too complex for jsonpath, it can be found at https://stedolan.github.io/jq/
381+
# "jq" command useful for transformations that are too complex for jsonpath, it can be found at https://jqlang.github.io/jq/
382382
sel=${$(kubectl get rc my-rc --output=json | jq -j '.spec.selector | to_entries | .[] | "\(.key)=\(.value),"')%?}
383383
echo $(kubectl get pods --selector=$sel --output=jsonpath={.items..metadata.name})
384384
@@ -389,6 +389,9 @@ kubectl get pods --show-labels
389389
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
390390
&& kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"
391391
392+
# Check which nodes are ready with custom-columns
393+
kubectl get node -o custom-columns='NODE_NAME:.metadata.name,STATUS:.status.conditions[?(@.type=="Ready")].status'
394+
392395
# Output decoded secrets without external tools
393396
kubectl get secret my-secret -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'
394397
@@ -466,7 +469,7 @@ kubectl get pods --field-selector=status.phase=Running
466469
kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'
467470

468471
# 列出属于某个特定 RC 的 Pod 的名称
469-
# 在转换对于 jsonpath 过于复杂的场合,"jq" 命令很有用;可以在 https://stedolan.github.io/jq/ 找到它
472+
# 在转换对于 jsonpath 过于复杂的场合,"jq" 命令很有用;可以在 https://jqlang.github.io/jq/ 找到它
470473
sel=${$(kubectl get rc my-rc --output=json | jq -j '.spec.selector | to_entries | .[] | "\(.key)=\(.value),"')%?}
471474
echo $(kubectl get pods --selector=$sel --output=jsonpath={.items..metadata.name})
472475

@@ -476,6 +479,9 @@ kubectl get pods --show-labels
476479
# 检查哪些节点处于就绪状态
477480
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
478481
&& kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"
482+
483+
# 使用自定义列检查哪些节点处于就绪状态
484+
kubectl get node -o custom-columns='NODE_NAME:.metadata.name,STATUS:.status.conditions[?(@.type=="Ready")].status'
479485

480486
# 不使用外部工具来输出解码后的 Secret
481487
kubectl get secret my-secret -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'

0 commit comments

Comments
 (0)