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 3 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
11 changes: 11 additions & 0 deletions 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.
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.
avorima marked this conversation as resolved.
Show resolved Hide resolved

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 Down
Loading