Skip to content

Commit 41e3907

Browse files
authored
better way to identify cluster url and cert (#262)
Signed-off-by: Alexander Stielau <[email protected]> Signed-off-by: Alexander Stielau <[email protected]>
1 parent ebf23b3 commit 41e3907

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/operation/03-register-k8s-cluster.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ to your KubeAPIServer. You will find the CA in the kubeconfig file for this clus
2828

2929
Example:
3030

31-
* `grep certificate-authority-data ~/.kube/kubeconfig.yaml | awk '{print $2}' | base64 -d > /tmp/cluster-ca.crt`
32-
* `KUBE_API_SERVER_ADDRESS=$(grep server ~/.kube/kubeconfig.yaml | awk '{print $2}')`
31+
* `cat $KUBECONFIG | yq ".clusters[0].cluster.certificate-authority-data" | base64 -d > /tmp/cluster-ca.crt`
32+
* `KUBE_API_SERVER_ADDRESS=$(cat $KUBECONFIG | yq ".clusters[0].cluster.server")`
3333
* `monoctl create cluster $KUBE_API_SERVER_ADDRESS /tmp/cluster-ca.crt -n mycluster`

0 commit comments

Comments
 (0)