Skip to content

Commit 6a109f0

Browse files
committed
docs: update example of runing provider in a local kind cluster
- Show how to load the image into kind - Use a tag that isn't latest so kubernetes won't try to pull it from docker hub - Update Conditions fields to current kubernetes output Signed-off-by: cprivitere <23177737+cprivitere@users.noreply.github.com>
1 parent b38a81b commit 6a109f0

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

docs/book/src/developer/providers/getting-started/building-running-and-testing.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,36 @@ labels:
4545
cluster.x-k8s.io/provider: infrastructure-mailgun
4646
```
4747
48+
If you're using kind for your management cluster, you can use the following command to build and push your image to the kind cluster's local registry. We need to use the IMG variable to override the default `controller:latest` image name with a specific version like `controller:0.1` to avoid having kubernetes try to pull the latest version of `controller` from docker hub.
49+
50+
```bash
51+
cd cluster-api-provider-mailgun
52+
53+
# Build the Docker image
54+
make docker-build IMG=controller:dev
55+
56+
# Load the Docker image into the kind cluster
57+
kind load docker-image controller:dev
58+
```
59+
4860
Now you can apply your provider as well:
4961

5062
```bash
5163
cd cluster-api-provider-mailgun
5264
5365
# Install CRD and controller to current kubectl context
54-
make install deploy
66+
make install deploy IMG=controller:dev
5567
5668
kubectl describe -n cluster-api-provider-mailgun-system pod | grep -A 5 Conditions
5769
```
5870

5971
```text
6072
Conditions:
61-
Type Status
62-
Initialized True
63-
Ready True
64-
ContainersReady True
65-
PodScheduled True
73+
Type Status
74+
PodReadyToStartContainers True
75+
Initialized True
76+
Ready True
77+
ContainersReady True
6678
```
6779

6880
[label_prefix]: https://github.com/kubernetes-sigs/cluster-api/search?q=%22infrastructure-%22

0 commit comments

Comments
 (0)