Skip to content

Commit ff29e08

Browse files
authored
Merge pull request #39396 from Arhell/zh-upd
[zh] Update ConfigMap data extraction to use jsonpath instead of grep…
2 parents e6f3140 + 75be9fd commit ff29e08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-join.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ it off regardless. Doing so will disable the ability to use the `--discovery-tok
475475
* 从 API 服务器获取 `cluster-info` 文件:
476476

477477
```shell
478-
kubectl -n kube-public get cm cluster-info -o yaml | grep "kubeconfig:" -A11 | grep "apiVersion" -A10 | sed "s/ //" | tee cluster-info.yaml
478+
kubectl -n kube-public get cm cluster-info -o jsonpath='{.data.kubeconfig}' | tee cluster-info.yaml
479479
```
480480

481481
<!--

0 commit comments

Comments
 (0)