Skip to content

Commit 6d98f39

Browse files
authored
Merge pull request #11734 from nunnatsa/qs-kv-update
📖 Update KubeVirt quickstart guide
2 parents b8d827c + 240ccfa commit 6d98f39

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

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

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ a target [management cluster] on the selected [infrastructure provider].
150150
#### Install the Calico CNI
151151
Now we'll need to install a CNI. In this example, we're using calico, but other CNIs should work as well. Please see
152152
[calico installation guide](https://projectcalico.docs.tigera.io/getting-started/kubernetes/self-managed-onprem/onpremises#install-calico)
153-
for more details (use the "Manifest" tab). Below is an example of how to install calico version v3.24.4.
153+
for more details (use the "Manifest" tab). Below is an example of how to install calico version v3.29.1.
154154
155155
Use the Calico manifest to create the required resources; e.g.:
156156
```bash
157-
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.4/manifests/calico.yaml
157+
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/calico.yaml
158158
```
159159
160160
{{#/tab }}
@@ -652,20 +652,21 @@ kubectl wait pods -n metallb-system -l app=metallb,component=controller --for=co
652652
kubectl wait pods -n metallb-system -l app=metallb,component=speaker --for=condition=Ready --timeout=2m
653653
```
654654
655-
Now, we'll create the `IPAddressPool` and the `L2Advertisement` custom resources. The script below creates the CRs with
656-
the right addresses, that match to the kind cluster addresses:
655+
Now, we'll create the `IPAddressPool` and the `L2Advertisement` custom resources. For that, we'll need to set the IP
656+
range. First, we'll read the `kind` network in order to find its subnet:
657657
```bash
658-
GW_IP=$(docker network inspect -f '{{range .IPAM.Config}}{{.Gateway}}{{end}}' kind)
659-
NET_IP=$(echo ${GW_IP} | sed -E 's|^([0-9]+\.[0-9]+)\..*$|\1|g')
660-
cat <<EOF | sed -E "s|172.19|${NET_IP}|g" | kubectl apply -f -
658+
SUBNET=$(docker network inspect -f '{{range .IPAM.Config}}{{if .Gateway}}{{.Subnet}}{{end}}{{end}}' kind)
659+
PREFIX=$(echo $SUBNET | sed -E 's|^([0-9]+\.[0-9]+)\..*$|\1|g')
660+
661+
cat <<EOF | kubectl apply -f -
661662
apiVersion: metallb.io/v1beta1
662663
kind: IPAddressPool
663664
metadata:
664665
name: capi-ip-pool
665666
namespace: metallb-system
666667
spec:
667668
addresses:
668-
- 172.19.255.200-172.19.255.250
669+
- ${PREFIX}.255.200-${PREFIX}.255.250
669670
---
670671
apiVersion: metallb.io/v1beta1
671672
kind: L2Advertisement
@@ -675,6 +676,16 @@ metadata:
675676
EOF
676677
```
677678
679+
<aside class="note warning">
680+
681+
<h1>Notice</h1>
682+
683+
The example above is based on the Docker container runtime. The output of `docker network inspect` may be different when
684+
using another runtime. In such a case, the IPAddressPool's `spec.addresses` field should be populated manually,
685+
according to the specific network.
686+
687+
</aside>
688+
678689
#### Install KubeVirt on the kind cluster
679690
```bash
680691
# get KubeVirt version
@@ -1184,13 +1195,26 @@ Please visit the [KubeKey provider] for more information.
11841195
{{#/tab }}
11851196
{{#tab KubeVirt}}
11861197
1198+
In this example, we'll use the image for Kubernetes v1.32.1:
11871199
```bash
1188-
export CAPK_GUEST_K8S_VERSION="v1.23.10"
1189-
export CRI_PATH="/var/run/containerd/containerd.sock"
1190-
export NODE_VM_IMAGE_TEMPLATE="quay.io/capk/ubuntu-2004-container-disk:${CAPK_GUEST_K8S_VERSION}"
1200+
export NODE_VM_IMAGE_TEMPLATE="quay.io/capk/ubuntu-2404-container-disk:v1.32.1"
1201+
export CAPK_GUEST_K8S_VERSION="${NODE_VM_IMAGE_TEMPLATE/:*/}"
1202+
export CRI_PATH="unix:///var/run/containerd/containerd.sock"
11911203
```
11921204
Please visit the [KubeVirt project][KubeVirt provider] for more information.
11931205
1206+
<aside class="note">
1207+
1208+
<h1>Note</h1>
1209+
1210+
Find additional images under [quay.io/capk/ubuntu-2404-container-disk](https://quay.io/capk/ubuntu-2404-container-disk),
1211+
[quay.io/capk/ubuntu-2204-container-disk](https://quay.io/capk/ubuntu-2204-container-disk),
1212+
or [quay.io/capk/ubuntu-2004-container-disk](https://quay.io/capk/ubuntu-2004-container-disk).
1213+
1214+
Alternatively, create your own image; see [here](https://github.com/kubernetes-sigs/image-builder).
1215+
1216+
</aside>
1217+
11941218
{{#/tab }}
11951219
{{#tab Metal3}}
11961220
@@ -1736,7 +1760,7 @@ are enough for these two CNI to work on (actually) the same environment.
17361760
17371761
The following script downloads the Calico manifest and modifies the required field. The CIDR and the port values are examples.
17381762
```bash
1739-
curl https://raw.githubusercontent.com/projectcalico/calico/v3.24.4/manifests/calico.yaml -o calico-workload.yaml
1763+
curl https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/calico.yaml -o calico-workload.yaml
17401764
17411765
sed -i -E 's|^( +)# (- name: CALICO_IPV4POOL_CIDR)$|\1\2|g;'\
17421766
's|^( +)# ( value: )"192.168.0.0/16"|\1\2"10.243.0.0/16"|g;'\

0 commit comments

Comments
 (0)