Skip to content

Commit 166bcc2

Browse files
authored
Merge pull request #38403 from stormqueen1990/fix/kubeadm-join-command
[en] Update ConfigMap data extraction to use jsonpath instead of grep/sed
2 parents 5c865a5 + ac35be2 commit 166bcc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/en/docs/reference/setup-tools/kubeadm/kubeadm-join.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ it off regardless. Doing so will disable the ability to use the `--discovery-tok
244244
* Fetch the `cluster-info` file from the API Server:
245245

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

250250
The output is similar to this:

0 commit comments

Comments
 (0)