[zh] Update ConfigMap data extraction to use jsonpath instead of grep/sed
parent
c160ad762a
commit
75be9fdf02
|
@ -475,7 +475,7 @@ it off regardless. Doing so will disable the ability to use the `--discovery-tok
|
||||||
* 从 API 服务器获取 `cluster-info` 文件:
|
* 从 API 服务器获取 `cluster-info` 文件:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl -n kube-public get cm cluster-info -o yaml | grep "kubeconfig:" -A11 | grep "apiVersion" -A10 | sed "s/ //" | tee cluster-info.yaml
|
kubectl -n kube-public get cm cluster-info -o jsonpath='{.data.kubeconfig}' | tee cluster-info.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
Loading…
Reference in New Issue