Skip to content

Commit fe84250

Browse files
Add Docker specific get kubeconfig to quickstart
Signed-off-by: killianmuldoon <[email protected]>
1 parent 9277eb9 commit fe84250

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

docs/book/src/clusterctl/developers.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,27 @@ For example, assuming that on [docker hub][kind-docker-hub] there is no
181181
image for version `vX.Y.Z`, therefore creating a CAPD workload cluster with
182182
`--kubernetes-version=vX.Y.Z` will fail. See [issue 3795] for more details.
183183

184-
### Get the kubeconfig for the workload cluster
184+
### Get the kubeconfig for the workload cluster when using Docker Desktop
185185

186-
The command for getting the kubeconfig file for connecting to a workload cluster is the following:
186+
For Docker Desktop on macOS, Linux or Windows use kind to retrieve the kubeconfig.
187187

188+
```bash
189+
kind get kubeconfig --name capi-quickstart > capi-quickstart.kubeconfig
190+
````
191+
192+
Docker Engine for Linux works with the default clusterctl approach.
188193
```bash
189194
clusterctl get kubeconfig capi-quickstart > capi-quickstart.kubeconfig
190195
```
191196

192-
### Fix kubeconfig when using Docker Desktop
197+
### Fix kubeconfig when using Docker Desktop and clusterctl
198+
When retrieving the kubeconfig using `clusterctl` with Docker Desktop on macOS or Windows or Docker Desktop (Docker Engine works fine) on Linux, you'll need to take a few extra steps to get the kubeconfig for a workload cluster created with the Docker provider.
193199
194-
When using Docker Desktop on macOS or Docker Desktop (Docker Engine works fine) on Linux, you'll need to take a few extra steps to get the kubeconfig for a workload cluster created with the Docker provider.
200+
```bash
201+
clusterctl get kubeconfig capi-quickstart > capi-quickstart.kubeconfig
202+
```
195203
204+
To fix the kubeconfig run:
196205
```bash
197206
# Point the kubeconfig to the exposed port of the load balancer, rather than the inaccessible container IP.
198207
sed -i -e "s/server:.*/server: https:\/\/$(docker port capi-quickstart-lb 6443/tcp | sed "s/0.0.0.0/127.0.0.1/")/g" ./capi-quickstart.kubeconfig

docs/book/src/user/quick-start.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,20 +1091,35 @@ The control plane won't be `Ready` until we install a CNI in the next step.
10911091
10921092
</aside>
10931093
1094-
After the first control plane node is up and running, we can retrieve the [workload cluster] Kubeconfig:
1094+
After the first control plane node is up and running, we can retrieve the [workload cluster] Kubeconfig.
1095+
1096+
{{#tabs name:"tab-get-kubeconfig" tabs:"Default,Docker"}}
1097+
1098+
{{#/tab }}
1099+
{{#tab Default}}
10951100
10961101
```bash
10971102
clusterctl get kubeconfig capi-quickstart > capi-quickstart.kubeconfig
10981103
```
10991104
1100-
<aside class="note warning">
1105+
{{#/tab }}
11011106
1102-
<h1>Warning</h1>
1107+
{{#tab Docker}}
1108+
For Docker Desktop on macOS, Linux or Windows use kind to retrieve the kubeconfig. Docker Engine for Linux works with the default clusterctl approach.
11031109
1104-
If you're using Docker Desktop on macOS, or Docker Desktop (Docker Engine works fine) on Linux, you'll need to take a few extra steps to get the kubeconfig for a workload cluster created with the Docker provider. See [Additional Notes for the Docker provider](../clusterctl/developers.md#additional-notes-for-the-docker-provider).
1110+
```bash
1111+
kind get kubeconfig --name capi-quickstart > capi-quickstart.kubeconfig
1112+
```
1113+
1114+
<aside class="note warning">
1115+
1116+
Note: To use the default clusterctl method to retrieve kubeconfig for a workload cluster created with the Docker provider when using Docker Desktop see [Additional Notes for the Docker provider](../clusterctl/developers.md#additional-notes-for-the-docker-provider).
11051117
11061118
</aside>
11071119
1120+
{{#/tab }}
1121+
{{#/tabs }}
1122+
11081123
### Deploy a CNI solution
11091124
11101125
Calico is used here as an example.

0 commit comments

Comments
 (0)