Skip to content

Commit ac35be2

Browse files
[en] Replace grep with kubectl get -o jsonpath.
1 parent 5c865a5 commit ac35be2

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)