From 0c49e4c166e06f5c474d870ed05b5d4b69cb9e04 Mon Sep 17 00:00:00 2001 From: Jonas Riedel Date: Wed, 29 May 2024 12:12:13 +0200 Subject: [PATCH 1/5] Add explanation how to set the k8s version --- docs/custom-image.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/custom-image.md b/docs/custom-image.md index 35584ab5..f4131e64 100644 --- a/docs/custom-image.md +++ b/docs/custom-image.md @@ -9,6 +9,8 @@ If you take a look at the [book](https://image-builder.sigs.k8s.io/capi/provider - Packer version >= 1.6.0 - Goss plugin for Packer version >= 1.2.0 - Ansible version >= 2.10.0 +- Qemu plugin for Packer version >= 1.1.0 + First, clone the repo `git clone git@github.com:kubernetes-sigs/image-builder.git` The build prerequisites for using image-builder for building raw images are managed by running: @@ -19,6 +21,12 @@ make deps-qemu ### Build the image +Before we can build the image, we have to set the k8s version we want to build the image for. +For example for k8s version `1.28.3`: +``` +export PACKER_FLAGS="--var 'kubernetes_rpm_version=1.28.3' --var 'kubernetes_semver=v1.28.3' --var 'kubernetes_series=v1.28' --var 'kubernetes_deb_version=1.28.3-1.1'" +``` + Now you can build the image: ```sh make build-qemu-ubuntu-2204 From 86ace683d9743876665b504faaf749b8ef10931a Mon Sep 17 00:00:00 2001 From: Jonas Riedel Date: Wed, 29 May 2024 12:19:18 +0200 Subject: [PATCH 2/5] Add info about default k8s version --- docs/custom-image.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/custom-image.md b/docs/custom-image.md index f4131e64..6d107712 100644 --- a/docs/custom-image.md +++ b/docs/custom-image.md @@ -21,7 +21,9 @@ make deps-qemu ### Build the image -Before we can build the image, we have to set the k8s version we want to build the image for. +Before we can build the image, we have to set the k8s version we want to build the image for. +If you don't specify the version, the latest version, -2, will be used. If the latest is, e.g., 1.30, then 1.28 will be used. + For example for k8s version `1.28.3`: ``` export PACKER_FLAGS="--var 'kubernetes_rpm_version=1.28.3' --var 'kubernetes_semver=v1.28.3' --var 'kubernetes_series=v1.28' --var 'kubernetes_deb_version=1.28.3-1.1'" From 7fec4d5771310ca5e288ada6f6467b5219f18c59 Mon Sep 17 00:00:00 2001 From: Jonas Riedel Date: Wed, 29 May 2024 12:22:52 +0200 Subject: [PATCH 3/5] Add codeblock syntax highlighting --- docs/custom-image.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/custom-image.md b/docs/custom-image.md index 6d107712..60229956 100644 --- a/docs/custom-image.md +++ b/docs/custom-image.md @@ -25,7 +25,8 @@ Before we can build the image, we have to set the k8s version we want to build t If you don't specify the version, the latest version, -2, will be used. If the latest is, e.g., 1.30, then 1.28 will be used. For example for k8s version `1.28.3`: -``` + +```sh export PACKER_FLAGS="--var 'kubernetes_rpm_version=1.28.3' --var 'kubernetes_semver=v1.28.3' --var 'kubernetes_series=v1.28' --var 'kubernetes_deb_version=1.28.3-1.1'" ``` From da538016a90e620c5a80b098a21f46067820e416 Mon Sep 17 00:00:00 2001 From: Jonas Riedel Date: Wed, 29 May 2024 13:23:34 +0200 Subject: [PATCH 4/5] Add note about basic auth and token for FTP --- docs/custom-image.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/custom-image.md b/docs/custom-image.md index 60229956..5197f288 100644 --- a/docs/custom-image.md +++ b/docs/custom-image.md @@ -46,7 +46,8 @@ qemu-img convert -O qcow2 ".qcow2" ### Upload image to IONOS Cloud -You can now upload the qcow2 image to IONOS Cloud via: +You can now upload the qcow2 image to IONOS Cloud via: +**NOTE: You have to use basic auth (username:password). Token authentication is not working with FTP.** ```sh ionosctl img upload -l txl -i ``` From 293427c80e809c392e44ece8a9a07ab8d6ed0622 Mon Sep 17 00:00:00 2001 From: Jonas Riedel Date: Wed, 29 May 2024 18:53:30 +0200 Subject: [PATCH 5/5] use alert and proper grammar --- docs/custom-image.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/custom-image.md b/docs/custom-image.md index 5197f288..3bfce7c0 100644 --- a/docs/custom-image.md +++ b/docs/custom-image.md @@ -22,7 +22,7 @@ make deps-qemu ### Build the image Before we can build the image, we have to set the k8s version we want to build the image for. -If you don't specify the version, the latest version, -2, will be used. If the latest is, e.g., 1.30, then 1.28 will be used. +By default, images will be built with current latest version - 2, e.g. if latest is 1.30.X then 1.28.X will be used. For example for k8s version `1.28.3`: @@ -47,7 +47,8 @@ qemu-img convert -O qcow2 ".qcow2" ### Upload image to IONOS Cloud You can now upload the qcow2 image to IONOS Cloud via: -**NOTE: You have to use basic auth (username:password). Token authentication is not working with FTP.** +> [!IMPORTANT] +> You have to use basic auth (username:password). Token authentication is not working with FTP. ```sh ionosctl img upload -l txl -i ```