Skip to content

Commit 56d1f96

Browse files
sergii4alexellis
authored andcommitted
Update start k3d cluster workflow
Signed-off-by: Sergii Getman <[email protected]>
1 parent b5f4ee7 commit 56d1f96

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

lab1b.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,10 @@ If you have Docker on your computer, then you can use `k3d` from Rancher Labs. I
4848

4949
* Start a cluster
5050

51-
```sh
52-
$ k3d create
53-
INFO[0000] Created cluster network with ID 9a7d5887754d3e317b5c1500f706a5ae602077a18bc71bcedb9fae86ebd84c0b
54-
INFO[0000] Created docker volume k3d-k3s-default-images
55-
INFO[0000] Creating cluster [k3s-default]
56-
INFO[0000] Creating server using docker.io/rancher/k3s:v0.9.1...
57-
INFO[0000] SUCCESS: created cluster [k3s-default]
58-
```
59-
60-
Switch into the k3d context:
61-
62-
```sh
63-
export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
64-
kubectl cluster-info
65-
```
66-
67-
> Note: You have to run this on any new terminal you open.
51+
1. `k3d cluster create CLUSTER_NAME` to create a new single-node cluster (= 1 container running k3s + 1 loadbalancer container)
52+
2. `k3d kubeconfig merge CLUSTER_NAME --switch-context` to update your default kubeconfig and switch the current-context to the new one
53+
3. execute some commands like `kubectl get pods --all-namespaces`
54+
If you want to delete default cluster `k3d cluster delete CLUSTER_NAME`
6855

6956
#### _Docker for Mac_
7057

0 commit comments

Comments
 (0)