Skip to content

Commit 6e36d73

Browse files
authored
Merge pull request #536 from afbjorklund/kubectl-message
Add message on how to run kubectl remotely
2 parents f951e7b + fd6a10d commit 6e36d73

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

examples/k3s.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ probes:
4646
The k3s kubeconfig file has not yet been created.
4747
Run "limactl shell k3s sudo journalctl -u k3s" to check the log.
4848
If that is still empty, check the bottom of the log at "/var/log/cloud-init-output.log".
49+
message: |
50+
To run `kubectl` on the host (assumes kubectl is installed):
51+
$ mkdir -p "{{.Dir}}/conf"
52+
$ export KUBECONFIG="{{.Dir}}/conf/kubeconfig.yaml"
53+
$ limactl shell {{.Name}} sudo cat /etc/rancher/k3s/k3s.yaml >$KUBECONFIG
54+
$ kubectl ...

examples/k8s.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,9 @@ probes:
106106
echo >&2 "kubernetes cluster is not up and running yet"
107107
exit 1
108108
fi
109+
message: |
110+
To run `kubectl` on the host (assumes kubectl is installed):
111+
$ mkdir -p "{{.Dir}}/conf"
112+
$ export KUBECONFIG="{{.Dir}}/conf/kubeconfig.yaml"
113+
$ limactl shell {{.Name}} sudo cat /etc/kubernetes/admin.conf >$KUBECONFIG
114+
$ kubectl ...

0 commit comments

Comments
 (0)