Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Add explanation how to set the k8s version #139

Merged
merged 5 commits into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/custom-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -19,6 +21,15 @@ 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.
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`:

```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'"
```

Now you can build the image:
```sh
make build-qemu-ubuntu-2204
Expand All @@ -35,7 +46,9 @@ qemu-img convert -O qcow2 <image> "<image>.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:
> [!IMPORTANT]
> You have to use basic auth (username:password). Token authentication is not working with FTP.
```sh
ionosctl img upload -l txl -i <image>
```
Expand Down
Loading